Commit Graph

3630 Commits

Author SHA1 Message Date
Marty-D
f1a18767c1 Fix Sticky Hold interaction with Sticky Barb 2016-03-29 13:44:19 -04:00
Marty-D
a25e33b5c3 End the Fling effect properly
Previously, the base power for the item would be used for bounced moves later in the same turn.
2016-03-29 10:36:52 -04:00
The Immortal
26e5e5a348 Fix Fury Cutter mechanics
Missed this in the previous commit.
2016-03-29 01:04:20 +04:00
The Immortal
d2af5a7741 Update move mechanics
This removes the hardcoded base power in `basePowerCallback` to match
in-game. Affects OMs that modify base power and want to follow
mechanics, without needing a mod.
2016-03-29 00:38:38 +04:00
Carl Sobolewski
30745356c8 Pickup: make -item message consistent with others
All other abilities use '[from] ability:'
2016-03-28 01:27:37 -06:00
The Immortal
ce66e144f8 Remove NU suspect and ban Sceptile 2016-03-27 19:28:41 +04:00
Carl Sobolewski
c14aa7f018 Truant: Don't leak move information 2016-03-25 14:10:26 -06:00
Kevin Lau
715de49408 Refactor Anger Point to the Hit event handler
This fixes its interaction with Clear Smog because Hit handlers for
moves always activate before all other global event handlers.

Removed the Hit event from the list of events stopped by Mold Breaker
variants as there are no abilities that would be negated by it that
use that handler.
2016-03-23 20:23:42 -07:00
The Immortal
03565b3f65 Add event Ho-Oh 2016-03-20 18:34:17 +04:00
The Immortal
a8776fdb45 Random Battle: Prevent Psychic and Psyshock together 2016-03-19 07:07:22 +04:00
Marty-D
324c3768bd Add Mareep event 2016-03-18 12:23:34 -04:00
Marty-D
3237960fad Add Bestow Pikachu and update Gen 6 events 2016-03-17 23:28:57 -04:00
Marty-D
b1a8f8ed32 Update Barrier Dragonite event 2016-03-17 13:46:33 -04:00
Marty-D
4c2bc7585f Merge pull request #2449 from ascriptmaster/move-fixes
Normalize overwrites moves that change type
2016-03-16 23:38:03 -04:00
Kevin Lau
bfac338ddb Normalize doesn't affect moves that change type
The ModifyMove singleEvent for moves always runs before the
larger event that triggers an ability's event handler and
take precedence over Normalize, so we code exceptions in
Normalize to not change the type in those situations.

Conveniently, all the moves that change type right now are
defaulted to Normal-type, and since Normalize technically
won't change the type of any Normal-type move, we're using
that as the guideline for our exception.
2016-03-16 10:54:47 -07:00
The Immortal
d49ca20a90 Add event Dragonite 2016-03-16 00:53:41 +04:00
Quite Quiet
79747aa8b4 Modify target sent when redirected 2016-03-15 09:21:56 +01:00
Ivo Julca
0281176fd1 Remove usage of Array|Object methods implemented by Sugar.js
Adds a dependency to shim Object.values until it's natively available.
2016-03-09 16:55:34 -05:00
The Immortal
60cbc64ec3 Remove animation if Sucker Punch fails 2016-03-09 20:33:39 +04:00
Ivo Julca
821c2eba4d Battle Factory: update sets 2016-03-08 19:32:43 -05:00
The Immortal
db251d3822 Add maxHP flag for Shedinja
Refer to 61e2cfca27.
2016-03-08 17:25:20 +04:00
Marty-D
c70bc2da94 Avoid all potential Thousand Arrows crashes from info commands 2016-03-07 21:45:29 -05:00
The Immortal
1007219525 Move Gurdurr to RU 2016-03-07 05:54:46 +04:00
Marty-D
5d01004381 Fix Powder tag 2016-03-05 22:29:33 -05:00
Ivo Julca
23573646de Fix information leak in random formats 2016-03-04 19:46:25 -05:00
The Immortal
316cd1baa4 Update NU 2016-03-05 02:05:49 +04:00
Guangcong Luo
33a0ea235e Merge pull request #2438 from QuiteQuiet/spread
Pass list of hit targets with [spread]
2016-03-04 13:44:57 -06:00
Quite Quiet
20877368a3 Pass list of hit targets with [spread] 2016-03-03 22:57:11 +01:00
Marty-D
1179e512e9 Add Hidden Ability Regi events 2016-03-03 15:47:18 -05:00
Marty-D
d4decbc30f Fix Fling and Gem interaction with stealing items 2016-03-02 09:24:26 -05:00
Quite Quiet
7a14a8f547 Notify client when a move is a spread move 2016-03-02 10:42:09 +01:00
Juanma Serrano
b88cf8fb7c Seasonal update
Improve Grappling Hook and add a move for Summer
2016-03-02 09:55:13 +01:00
The Immortal
cb7f801a19 Add new events 2016-03-01 22:09:30 +04:00
Marty-D
fcf760d34c Fix Follow Me and Rage Powder tags 2016-03-01 10:30:23 -05:00
Juanma Serrano
c92f87993f Implement March Seasonal, Dimension Doom 2016-02-29 14:44:51 +01:00
The Immortal
5047fda6fc Random Battle improvements 2016-02-28 00:35:15 +04:00
Marty-D
4db441ba2b Fix Me First 2016-02-27 15:34:13 -05:00
The Immortal
9e16f45902 Random Battle updates
- Improve Flying types by making sure they have a second STAB if they
need it
- Revert bf0af09d7c and instead hardcode
the moveset modification for Aggron; Autotomize does have a benefit
with Heavy Slam
2016-02-27 03:24:51 +04:00
The Immortal
bf0af09d7c Random Battle: Update Aggron 2016-02-26 22:28:09 +04:00
The Immortal
2bc3f92d4b Add new RU bans 2016-02-26 12:02:39 +04:00
Marty-D
93356219c0 Fix Mountaineer 2016-02-24 19:57:15 -05:00
The Immortal
bee0e4b287 Add Pikachu event 2016-02-22 15:35:17 +04:00
Guangcong Luo
541747ac85 Refactor move disabling
pokemon.disabledMoves no longer exists; disabled move information is
now all tracked in pokemon.moveset.
2016-02-19 19:41:55 -06:00
Guangcong Luo
8446e5fbc3 Fix Thousand Arrows Wonder Guard interaction
Thousand Arrows shouldn't add Smack Down if Wonder Guard avoids it.
2016-02-19 17:23:21 -06:00
Guangcong Luo
794d160eec Refactor runImmunity
BattlePokemon#runImmunity is now two functions, runImmunity and
runStatusImmunity.

The split is helpful because: 1. NegateImmunity only applies to type
immunities, and 2. Immunity only applies to status immunities and
Ground immunities.

Ground immunities are now entirely handled hardcoded in isGrounded.

This overall doesn't have a noticeable impact on performance, but
it makes certain things behave more predictably, and correctly
shows the ability activation for Levitate, so I assume that means it's
a net positive. I hope I at least improved readability...
2016-02-19 05:18:40 -06:00
The Immortal
2b02f1ee2e Random Battle: Prevent Trick with setup 2016-02-17 18:06:37 +04:00
Guangcong Luo
cc7ccd2efe Stop unnecessarily calling update()
pokemon.update() used to be called after pretty much everything, but
now that we've refactored pretty much everything out of it, it's no
longer necessary for most of the situations we call it for.

It currently only updates pokemon.speed, so I've renamed it updateSpeed
for clarity.

We now only update pokemon.speed on switch-in, right before the
residual event, and at the beginning of every turn. This gives
something like a 30% speed-up.
2016-02-17 01:07:22 -06:00
Guangcong Luo
a8e8272bac Refactor types and remove ModifyPokemon
The unwieldy system that is typesData is now removed, and is replaced by
the array `types` and the string `addedType`, which track the same amount
of information in a much more efficient way. (Roost is now hardcoded, but
let's not talk about that.)

Incidentally, this now roughly matches client, which tracks typechange
and typeadd as volatiles.

This allows us to remove ModifyPokemon, which overall provides a 10%
performance increase. I was hoping it'd be more substantial, but oh well.
2016-02-16 23:42:37 -06:00
Guangcong Luo
0fbaf3fc8e Stop using ModifyPokemon for disabling moves
We already have DisableMove.
2016-02-16 21:47:27 -06:00
Guangcong Luo
9b46d7658c Show item existence in Team Preview 2016-02-16 14:59:33 -05:00