Commit Graph

23714 Commits

Author SHA1 Message Date
Juanma Serrano
7d5cb15322 Gen 2 is out of beta
The generation has no critical bugs at all.
2014-12-22 14:05:53 +01:00
Juanma Serrano
9280b5d9c8 Gen 2: Implement critical hit mechanics 2014-12-22 14:05:26 +01:00
Juanma Serrano
3081454085 Fix travis error build from ef8f839735 2014-12-22 13:39:35 +01:00
Juanma Serrano
fb18d41885 Gen 2: Fix Baton Pass mons getting damaged by psn / leech seed
AfterMoveSelf does not happen if the move used was Baton Pass.
2014-12-22 13:23:04 +01:00
Juanma Serrano
412bf38d75 Gen 2: Fix AfterMoveSelf events
Leech seed, etc., must be activated just after the Pokémon moves and even if asleep or FP.
2014-12-22 13:23:04 +01:00
Juanma Serrano
3292d9a1c9 Gen 2: Refactor stat and damage calculation 2014-12-22 13:23:04 +01:00
The Immortal
ef8f839735 Add event Linoone 2014-12-22 16:15:27 +04:00
ascriptmaster
fa79202649 Private Room refactor - Distinguish hidden and secret rooms
Seperated /privateroom command into /privateroom and /hiddenroom. In
hidden rooms, mostly set by battle players, global staff maintain their
ranks within the room, but the rank is not kept in secret/private rooms
(only set by users who can create chat rooms).

Created command /whoare to allow global staff to see the hidden rooms a
user is in.
2014-12-22 02:39:50 -08:00
Joimer
b78184d182 Gens 1 and 2: Implement Psywave properly using less resources
Instead of doing the same as the cartridge does for Psywave damage, we hardocde the random possibility with a min and a max.
2014-12-21 21:59:00 +01:00
Joimer
4eae2b5140 Gen 1: Implement paralyse speed drop properly 2014-12-21 21:39:03 +01:00
Joimer
bcd970f30d Gens 1 and 2: Proper stat reduction calculation
This is huge since there's a change in -1 Snorlax's speed that is relevant to Gen 2.

See:
http://www.smogon.com/forums/threads/stat-reduction-bug.3520407/
https://github.com/iimarckus/pokered/blob/master/engine/battle/core.asm#L7856
https://github.com/kanzure/pokecrystal/blob/master/battle/effect_commands.asm#L6608
2014-12-21 21:27:08 +01:00
Joimer
482940a459 Gen 2: Remove unnecessary code 2014-12-21 20:55:35 +01:00
Joimer
02b85e373e Gen 1: Floor all divisions 2014-12-21 20:40:50 +01:00
Joimer
586c85471b Gen 1: Implement burn attack dropping and its bugs properly
Attack is calculated with burn upon switch in and stored.
Attack drop is thus not restored with Rest.
Attack drop is restored with an attack debuff, removed with attack buff.
2014-12-21 20:28:22 +01:00
Joimer
5bcfc21fc1 Gen 1: Update readme 2014-12-21 20:16:35 +01:00
Joimer
50d373c549 Gen 1: Implement correct Psywave damage calculation
In gen 1, it generates a random number from 0 to 255 until the number is higher than 0 and less than level + floor(level / 2) and then returns it.
2014-12-21 13:58:46 +01:00
Joimer
d685ed8149 Gen 1: Imprement self-destruct moves damage buff properly
Defense is halved upon damage calculation.
There is no need to double their base power anymore, as now it is calculated correctly.
2014-12-21 13:44:38 +01:00
Guangcong Luo
e6e6837704 Merge pull request #1374 from TheImmortal/master
Move mega evolution message to client
2014-12-20 23:59:58 -06:00
Joimer
081229546a Fix typo in previous commit 2014-12-20 22:47:45 +01:00
Joimer
97b79c8f9f Gen 1: Refactor damage formula
Refactored damage formula, now following cartridge step by step.
2014-12-20 22:46:22 +01:00
Joimer
540d19f2c4 Gen 1: Remove properly Dig and Fly invulnerabilities 2014-12-20 21:55:33 +01:00
Joimer
c663b645da Gen 1: Add correct partial trapping rolls
The initial roll was still wrong.
Also there's no need to declare a variable for a random.
2014-12-20 21:52:08 +01:00
Joimer
07a146e57e Gen 1: Add Confusion self-hit bug with two Substitutes
If the confused Pokemon has a Substitute up, damage will be dealt to the opponent's Substitute instead.
If the opponent doesn't have a Substitute up, no damage will be dealt.
2014-12-20 21:42:35 +01:00
Joimer
867b67ccd4 Gen 1: Hi Jump Kick recoil also hits your own Subtitute
Also call clampIntRange from Battle, not from BattlePokemon.
Also remove the damage message from confusion, only the message from Substitute must appear.
2014-12-20 21:22:46 +01:00
Joimer
944d80fafe Gen 1: Improve status, stat, and volatiles handling
Burn attack drop is not negated the same way as speed.
It's just halving the attack stat and a boost with Swords Dance exactly negates it.
Use the same calculation as the cartridge for the probabilities for statuses and status damage:
The attack in burn is halved and floored, then if 0 put to 1.
The speed in paralyse is quartered, floored and then if 0 put to 1.
The chance to get fully paralyzed is if random 0-255 < 64.
The chance for confusion self hit is if random 0-255 >= 128.
If the Pokémon is fully paralysed or self-hits in confusion, most move volatiles are removed.
This changes also add the invulnerable bug for two-turn moves.
2014-12-20 21:22:44 +01:00
The Immortal
14b63873a3 Move mega evolution message to client 2014-12-20 21:56:15 +04:00
The Immortal
41cc584d16 Make Random Battle changes
- Prevent Oblivion Wing + Hurricane Yveltal
- Increase non-mega Banette's level
2014-12-20 21:15:14 +04:00
Ivo Julca
c969855228 Fix ghost users staying in rooms when a user merged into a banned account
A mismatch between the key in `room.users` and the userid arised due to the fact that users had their `userid` property updated before getting disconnected from the server.
2014-12-20 06:59:10 -05:00
Ivo Julca
842ab65ecd Fix IP miscount for banned users 2014-12-20 06:53:40 -05:00
Joimer
25960550b0 Gen 1: Implement Rage properly 2014-12-20 11:24:44 +01:00
Guangcong Luo
f34bd9b208 Merge pull request #1372 from sirDonovan/roomhelp
Add link to roomauth guide in /roomhelp
2014-12-20 02:39:34 -06:00
Ivo Julca
4cdf5dc10b Gear Grind should not call the RNG 2014-12-19 22:09:32 -05:00
sirDonovan
277f769595 Add link to roomauth guide in /roomhelp 2014-12-19 19:53:21 -06:00
Ivo Julca
fe433105a5 Move some Gen 1 OU rules to Gen 1 mod rulesets
- Freeze Clause Mod is standard.
- Filler bans are moved higher up.
2014-12-19 20:15:53 -05:00
Ivo Julca
85a47df88a Freeze Clause is a mod 2014-12-19 20:13:02 -05:00
Ivo Julca
1921979b2a Move Doubles Challenge Cup to ORAS Doubles section 2014-12-19 20:08:44 -05:00
Ivo Julca
c71090c410 Make seasonal mechanics player-name agnostic
If a player was renamed in a battle, they would become immune to obstacles and unable to achieve custom victory.
2014-12-19 20:07:48 -05:00
Joimer
588c88a9d0 Take Gen 1 OU out of beta
With all the recent bug fixes we cannot deem it as a beta format.
2014-12-19 21:27:59 +01:00
Joimer
5b8091d05f Gen 1: Fix partial trapping moves not recalculating the damage properly
With the existing damage check, the damage was re-calculated upon switch-in, but afterwards the old damage was applied.
The removed check is not necessary as the hit will return the previous partial trap damage if existing, thus always assigning that damage again until switch or faint.
2014-12-19 21:24:46 +01:00
Joimer
5aa2e6da44 Gen 1: Substitute doesn't stop partially trapped
When a Pokémon gets hit by a Wrap-like move, it gets partially trapped regardless of Substitute.
2014-12-19 20:26:11 +01:00
Joimer
3bbc9cca1e Gen 1: Delete unnecessary code for move usage
All Gen 1 moves are edited to be either target normal or target self.
It is thus unnecessary to comment the different types of hitting when this is already available on the main code.
Also it is not relevant to have code that's never going to be used.
2014-12-19 20:23:17 +01:00
Marty-D
0d0949fdfd Remove unnecessary ohko flag
It's not even a real flag.
2014-12-19 10:25:05 -05:00
Juanma Serrano
3d1d3d3a89 Gen 1: Refactor getStat
We no longer need the callback since we can edit BattlePokemon from the mod.
2014-12-19 15:00:22 +01:00
Juanma Serrano
b21ef33bdd Gen 1: Confusion self-hit hits Substitute 2014-12-19 14:46:51 +01:00
Juanma Serrano
6b3a5e8e18 Random Double Battles: reject Chlorophyll unless the Pokémon itself has Sunny Day
See: http://www.smogon.com/forums/threads/joims-to-do-list.3486934/page-3#post-5895492
2014-12-19 14:17:40 +01:00
Juanma Serrano
ad9b293eac Gen 1: Implement Mirror Move 2014-12-19 13:41:33 +01:00
Juanma Serrano
25435fbc5f Gen 1: Store properly last move used by Pokémon
Pokémons store the last move used and that variable is reset upon freeze or asleep.

Source: http://www.smogon.com/forums/threads/past-gens-research-thread.3506992/#post-5878612
2014-12-19 13:41:33 +01:00
The Immortal
5186f9155f Fix second Helping Hand message 2014-12-19 13:56:29 +04:00
The Immortal
f571d809a2 Add event Charizard and Pikachu 2014-12-19 13:41:19 +04:00
Ivo Julca
8d5a43417b Fix tracking of autolocked/autobanned userids
- `user.locked` would be equal to the id the user had when the rename has performed, rather than the autolocked userid.
- `lockedIps`'s property values would be sometimes wrong in a similar way due to a missing change in 47e90226.
Both of these issues are hereby fixed.
2014-12-19 01:46:51 -05:00