Commit Graph

68 Commits

Author SHA1 Message Date
Guangcong Luo
8eeac69acb Crits are 1.5x in gen 6 2013-10-11 11:59:30 -07:00
Guangcong Luo
65ad375891 runEvent can now chain a singleEvent
runEvent can run a modifier chain, so it's relevant that it can also
trigger a singleEvent on the passed effect within that chain.
2013-10-11 10:44:14 -07:00
Guangcong Luo
1dd94f1639 Properly chain modifiers in an event 2013-10-11 09:57:43 -07:00
Guangcong Luo
84f983ca06 New modifier event chain system 2013-10-11 09:40:45 -07:00
Joimer
6d8f648855 Gens 5 and 6: Update moves.
Add gen 6 nerf of elemental attacks.
Add gen 6 static base power of Hidden Power of 60.
Change type of some attacks to Fairy on gen 6.
Add to mod 5 all gen 6 changes so mod 5 keeps the same way.
2013-10-11 10:12:46 +02:00
Joimer
c5d9b19b4c Gen 6: Update Hidden Power
The prefered IVs change in Gen 6 due to the addition of a new type.
2013-10-11 09:47:18 +02:00
V4Victini
8a119fefeb Chain base power modifiers
onBasePower events now affect the base power modifier as opposed to the
base power directly. Also some moves had their base power changes moved
from basePowerCallback to onBasePower. These moves affect the modifier
and not the base power.

Note: The effects of weather and burn are still incorrectly applied as
base power modifiers
2013-10-05 18:56:32 -04:00
V4Victini
fb4dd5e385 Merge remote-tracking branch 'upstream/master' into damage 2013-10-05 15:55:26 -04:00
V4Victini
61bb6f218e Fix crits breaking multi-hit moves
If one hit crit the rest would negate the atk penalties/def boosts as
well

Also I moved some stuff around to decrease redundancy
2013-10-04 22:58:46 -04:00
V4Victini
1755aab059 Reset isStarted flag for forced switches
i.e Dragon Tail, Circle Throw
These would only set isActive to false, which caused Trace to behave
improperly
2013-10-04 18:47:30 -04:00
V4Victini
697ab493e5 Use RNG for getRandomSwitchable 2013-09-28 15:46:24 -04:00
V4Victini
1c2a9a76c0 Chain Final Modifiers 2013-09-27 23:30:55 -04:00
The Immortal
2a9d249074 Transform ignores Substitute in Gen 4 2013-09-23 14:34:49 +04:00
Joimer
ec71aa13a2 Gen 6: Add Hidden Power Fairy support
With the blooming of gen 6 mods and the advent of gen 6, add support
for Fairy-type Hidden Power so it can be used in gen 6 or gen 5.5 mods.
hpTypes max at 15 on gen 2 calcs and gen 3+ calcs if the maxTypes var
is at 15, so adding Fairy-type to the types array is harmless.
2013-09-17 14:24:09 +02:00
V4Victini
78edf360f2 Re-add getStat function 2013-09-11 19:50:00 -04:00
V4Victini
0ef4a02b0c Run ModifyDef/SpD events properly
and remove Chlorophyll's debug message
2013-09-11 04:10:14 -04:00
V4Victini
3a7296df75 Overhaul the stat system and implement chaining
- Add Battle.prototype.chain to chain modifiers
- BattlePokemon.prototype.getStat is passed different parameters and no longer runs the ModifyBoost event nor the ModifyStat events.
2013-09-11 03:12:23 -04:00
Guangcong Luo
5403120683 Fix crits ignoring boosts for all hits of multi-hit moves 2013-09-07 16:29:23 -07:00
Joimer
8c3ad040f0 Remove outdated comments 2013-09-07 16:26:44 -07:00
Guangcong Luo
1ac2924de5 Healing moves now fail when the user's at full health 2013-08-17 23:10:04 -07:00
Guangcong Luo
70f78202e1 Fix Red Card activating on inactive pokemon 2013-08-11 21:33:58 -07:00
Joimer
5cfa629173 Remove annoying Debug message 2013-08-10 22:31:34 +02:00
Joimer
e96630ed4a Gen 2: Correct Hidden Power Base Power calculation
Brackets were missing.
2013-08-10 17:22:19 +02:00
Joimer
948ea295e7 Gen 2: Add format and ladder 2013-08-09 22:06:00 +02:00
Joimer
64d783aea0 Gen 2: Implement Hidden Power
Typechart is necessary for the types IVs for specific hidden powers.
2013-08-09 22:03:02 +02:00
The Immortal
a53c3d3e0d Abilities/items of fainted Pokemon should not activate 2013-08-04 23:23:33 +04:00
Guangcong Luo
f5647c5564 Fainted pokemon should still have singleEvents
This is relevant for having Future Sight hit from a fainted pokemon.
2013-08-03 15:04:03 -07:00
Joim
9671687fa9 Gen 1: Fix partial trapping moves at 0 PP.
In gen 1, previous to this fix, when you used the last PP of a partial trapping move you couldn't continue the sequence and would be forced into Struggle. This fixes it.
2013-08-02 12:32:56 +02:00
Guangcong Luo
9e7e589733 Fix confusion damage message 2013-08-01 15:41:10 -07:00
V4Victini
4f9ae3098e Properly seed RNG 2013-07-24 02:41:02 -04:00
Marty-D
1a02b3f23b Fix Mold Breaker and friends.
- With the recent changes to the damage formula, ModifyDamage must also
be negated by Mold Breaker.
2013-07-23 12:26:12 -04:00
Guangcong Luo
365e3dbbbc A lobby room is no longer required to exist
Without a lobby room, joining your server will default to displaying
the room list.
2013-07-14 17:59:48 -07:00
Guangcong Luo
a6608e5817 Refactor: Remove typeof ... === 'undefined' 2013-07-14 11:37:01 -07:00
Guangcong Luo
562d1edbba Refactor: Data is no longer a global
It can still be accessed with Tools.data or Tools.mod(mod).data
2013-07-14 11:37:01 -07:00
Guangcong Luo
76530e66ec Refactor: lockdown now a property of Rooms.global
(and no longer a global)
2013-07-13 19:15:31 -07:00
V4Victini
fb6b9ebde0 Correct RNG 2013-07-10 16:24:01 -04:00
小太
2ed8dbac3f Implement a faster and generalised Gen 5 LCRNG 2013-07-10 23:36:37 +10:00
V4Victini
441288743c Add missing bracket 2013-07-10 03:26:56 -04:00
V4Victini
e2e960aaf1 Force words unsigned
Make sure values in words remained unsigned integers
2013-07-10 02:18:20 -04:00
V4Victini
5588f4a3ca Upgrade RNG
Battle.prototype.random now uses the LCRNG for Gen 5
Battle.prototype.nextFrame calculates what the seed will be next turn or
next n turns.
2013-07-10 00:22:50 -04:00
Guangcong Luo
9961535879 Raise maximum event stack depth to 8 2013-07-05 14:10:34 -07:00
Marty-D
25597b01e4 Another Transform fix.
- Gen 5: Does not copy IVs.
- Gen 4 and earlier: Does copy IVs. (As a result, Hidden Power type and
Base Power are copied.)
2013-07-05 14:29:50 -04:00
Guangcong Luo
020fcec0d0 Throw an error on an event stack overflow
This will allow our crash logger and emailer to have detailed
information about the error.
2013-07-04 17:53:06 -07:00
Joim
0098202e05 Add final modifier after min damage check
In-game, final modifiers like Life Orb are calculated after the minimum damage is calculated instead of calculating it earlier on base power.

This event run will call all onModifyDamage events on said modifiers to thus correctly modify the damage using BattlePokemon.prototype.modify
2013-06-27 23:45:23 +02:00
Marty-D
40bb42f92d Correct Transformed PP and max PP. 2013-06-27 12:48:14 -04:00
Marty-D
2e54904458 Make sure minimum recoil damage is 1HP. 2013-06-21 16:50:31 -04:00
Guangcong Luo
b986a39c79 Fix 'Failed' message on Restart event 2013-06-17 10:53:57 -05:00
Guangcong Luo
b43ff0b645 Nearly all move failures now display a message 2013-06-16 03:41:00 -07:00
Cathy J. Fitzpatrick
9f1f47c4ce Introduce globals explicitly 2013-06-11 19:14:32 -06:00
Cathy J. Fitzpatrick
837f6a69ac Remove useless check for 'mustRecharge' volatile
There is no volatile called 'mustRecharge', so this check is pointless.
2013-06-10 20:48:14 -06:00