Commit Graph

4282 Commits

Author SHA1 Message Date
Guangcong Luo
fc16f4fe4f Hacked Z-moves can't be Z-boosted 2017-02-27 01:14:35 -04:00
Guangcong Luo
0bf08c2ad3 Fix calling Z-move names
e.g. Z-Sleep Talk would previously call Z-Taunt, when it should be
calling Taunt.

This was only ever a text error; it never used Z-Taunt's Z-effect.
2017-02-27 01:06:54 -04:00
MacChaeger
19b0b48ac0 Random Battle: Improve level balancing (#3293) 2017-02-26 04:37:38 +04:00
urkerab
1d4ac35d37 Simplify the way the factory tier is chosen (#3286) 2017-02-25 06:16:55 -06:00
Ivo Julca
55641c2635 Fix regressions in random team generation and improve comments
The regressions affected information handling
- Seeds used for random teams were no longer being logged.
- The seed used for generating p2's team was also used for the battle itself.
2017-02-24 20:18:59 -05:00
HoeenHero
1551ec0e98 Battle Factory: Fix issue with sides having different tiered teams (#3285) 2017-02-24 15:28:43 -06:00
Guangcong Luo
6306b5979f Fix infinite looping Dancer 2017-02-24 06:54:13 -06:00
Guangcong Luo
eeea7e3ed0 Fix Hidden Power validation 2017-02-24 05:13:44 -06:00
Guangcong Luo
bb7b168355 Fix crash in PRNG 2017-02-24 05:46:51 -05:00
The Immortal
e34318b518 Standard GBU: Fix undefined Pokemon name 2017-02-24 14:23:58 +04:00
The Immortal
f70d3cf1cc Standard GBU: Use format name for Soul Dew message 2017-02-24 13:49:28 +04:00
Guangcong Luo
8ee23475e4 Fix Dancer + Petal Dance
Dancer Petal Dance shouldn't lock. This is a horrible hack but it fixes
the problem. A real fix would involve refactoring basically all locking
moves. Which I guess I should do one day...

Fixes #2974
2017-02-24 03:25:00 -06:00
Guangcong Luo
9200062819 Improve Dancer implementation
This doesn't fix the biggest issue with Dancer (Petal Dance locking),
but it does fix every other Dancer issue, by moving it from useMove
to runMove.

This also adds improved comments on runMove and useMove.
2017-02-24 03:17:37 -06:00
Guangcong Luo
d9b431b7c2 Stop converting set values to names
Because of the way fastUnpackTeam works, it's currently a reasonable
assumption that all the values in a `set` are IDs, and various parts
of the code have started to rely on that assumption.

Removing some old code to try to guarantee that the values in a `set`
are names allow us to work towards a new guarantee that `set` values
are IDs.

Closes #2553
2017-02-24 01:38:45 -06:00
Guangcong Luo
d4a968cab5 Make Copycat fail to copy Baneful Bunker 2017-02-24 00:57:40 -06:00
Guangcong Luo
4052b28cec Refactor event validator
This is a huge refactor that consolidates many different places event,
DW, and VC moves are validated, so that they're now validated in the
single place Validator#validateEvent. DW and VC moves are now treated
as special cases of events.

Validator#checkLearnset now does zero validation of event, DW, and VC
moves; it now simply passes the list of possible sources back to
Validator#validateSet, and it's validateSet's job to determine if the
Pokemon meets the requirements for any of those sources.

(In addition to simplifying checkLearnset, this also means more
useful error messages if you fail to meet the requirements for an
event move or DW move.)

validateSet should also be a decent margin simpler, due to a lot of
its code being folded into validateEvent.
2017-02-24 00:38:47 -06:00
Guangcong Luo
97b0652b0d Unban Soul Dew in Gen 7 BS/VGC 2017-02-23 18:22:46 -05:00
Guangcong Luo
54df5c857d Validator: Support Gen 1 Virtual Console moves
This adds validator support for Gen 1 Virtual Console moves.

Fixes #3208

If anyone wants the quick-and-dirty eval script I used to update
Learnsets:

```
Object.entries(Tools.mod('gen1').data.Learnsets).forEach(([speciesid, lset]) => {
	Object.entries(lset.learnset).forEach(([moveid, sources]) => {
		if (sources.some(s => s.startsWith('1L') || s.startsWith('1M'))) {
			let newLset = Tools.data.Learnsets[speciesid].learnset;
			if (!newLset[moveid]) newLset[moveid] = [];
			let i = 0;
			while (i < newLset[moveid].length && newLset[moveid][i].startsWith('7')) i++;
			newLset[moveid].splice(i, 0, '7V');
		}
	})
})
```
2017-02-23 05:23:14 -06:00
Kevin Lau
05f34da175 Random Battle: Reject Sheer Force Conkeldurr (#3277)
Sheer Force only boosting one of its moves is rather mediocre compared to
Iron Fist boosting most of its moves, or Guts for even more raw power.
2017-02-23 02:04:28 -06:00
Dan Pantry
56ba782966 refactor PRNG to its own class
This removes the 'deterministic test' tools by preventing action at a
distance (namely, preventing the modification of the `init` method in
`Battle` during tests). This action at a distance is incredibly
confusing.

All this action at a distance did was discard any parameters that were
passed to `Battle` that weren't the first three (which was probably a
mistake by the original author) and also hard code `this.seed` and
`this.startingSeed` in `Battle`.

This functionality has now been moved to the `PRNG` class, so instead
users should pass a `PRNG` to `Battle` as the 5th constructor argument.
Users can also pass one as the third argument to `common.createBattle`
or use `common.createBattleWithPRNG` with the PRNG as the first
argument.

The PRNG is just an encapsulation of the pseudo-random algorithm in a
class. It is stateful, so make sure to take a `clone()` of the PRNG if
you want to re-use it.
2017-02-22 20:44:20 -05:00
Spandan Punwatkar
17665eb1e2 Update Ability Clause to also check for Variants (#3269) 2017-02-22 23:48:55 +04:00
MacChaeger
d30b75c9f0 Fix Typo (#3273) 2017-02-21 23:21:25 +04:00
TheRealQuote
7c7928d7c3 UU Changes (#3270)
Banning Victini and dropping down Staraptor as per this post: http://www.smogon.com/forums/threads/np-sumo-uu-stage-1-feels-like-we-only-go-backwards.3595341/page-2#post-7241566
2017-02-21 19:48:59 +04:00
Guangcong Luo
0c98319d2b Don't add "Z-" to "Extreme Evoboost"
This uses a better rule for detecting for whether or not a move is a
status Z-move.

Closes #3268
2017-02-21 01:12:11 -06:00
Guangcong Luo
6e4f1cfb35 Remove Pokestar learnsets
The Pokestar learnsets cause client build errors because they refer to
nonexistent Pokedex entries, so they need to be removed.
2017-02-20 03:21:40 -06:00
Kevin Lau
b8d1f0b45e Random Doubles: Use Wishiwashi-School for calculating Wishiwashi level (#3266) 2017-02-20 02:34:32 -06:00
Quinton Lee
b88b9a19cc Fix Smeargle forme name 2017-02-19 20:56:35 -06:00
MacChaeger
05a140b671 Add Pokestar Studios SFX props and actors (#3205) 2017-02-19 16:17:06 -06:00
MacChaeger
25b0e0aae3 Challenge Cup: Fix Wishiwashi's level (#3246) 2017-02-19 01:26:51 -06:00
Marty-D
8a3e4e5ac1 Fix Trace 2017-02-18 23:04:28 -05:00
HoeenHero
86f934f893 Update Pokedex colors (#3244) 2017-02-18 09:56:00 -05:00
Marty-D
cbfd339e0e Update move descriptions 2017-02-17 19:48:31 -05:00
Marty-D
c66ebaed3c Update Ability descriptions 2017-02-17 15:08:48 -05:00
Marty-D
019f844e0e Add event Machamp 2017-02-14 21:27:00 -05:00
Quinton Lee
72236f007f Fix Z-Move validation in Baton Pass Clause (#3213)
A Pokemon can only use 1 Z-Move in battle
2017-02-10 16:07:19 -06:00
Guangcong Luo
825b4180cd Fix Prankster/Dark hint info leak 2017-02-10 17:10:15 -05:00
The Immortal
1f5216898f Mienshao and Arcanine are UU
According to the updated UU stats
2017-02-10 15:19:54 +04:00
The Immortal
c118e517cd Update UU 2017-02-10 13:36:47 +04:00
Kevin Lau
41f4727df1 Random Doubles: Implement some Doubles sets (#3219) 2017-02-07 23:56:13 +04:00
The Immortal
63c8418f00 Update UU Pokemon 2017-02-07 22:35:25 +04:00
Kevin Lau
0ea4363cae Random Doubles: Fix Level Scaling for Parental Bond and Protean (#3216)
EV values are balanced now, so it's better to base it on the number of
attacks.
2017-02-06 21:50:08 +04:00
The Immortal
2c285f0166 Fix errors in previous commit 2017-02-06 20:00:48 +04:00
The Immortal
50074f0928 Update tiers 2017-02-06 17:28:36 +04:00
TheRealQuote
dbe2851420 Usage-based tier updates (#3212)
Kingdra moved from OU to UU
Scolipede moved from BL to OU
Charizard-Mega-Y moved from BL to OU
Clefable moved from OU to UU
Mantine moved from OU to UU
Salamence moved from BL to OU
Volcarona moved from BL to OU

http://www.smogon.com/forums/threads/initial-gen-7-uu-banlists-updated-in-post-38.3591784/page-2#post-7219329
2017-02-06 12:56:18 +04:00
urkerab
dc478871c4 Counter and Mirror Coat should honour Z-powered special moves (#3209) 2017-02-05 22:19:28 -04:00
Kevin Lau
7c252d7ff1 Random Doubles: Preliminary Overhaul (#3204)
Most ability checks are up to date with Random Singles, as are some of the
item checks.
2017-02-04 11:35:21 +04:00
Marty-D
687b3ae8b7 Fix multi-hit self-drop moves 2017-02-03 19:06:22 -05:00
Marty-D
b91dd35cc6 Update move descriptions 2017-02-01 20:45:47 -05:00
Marty-D
e51b5f1cce Fix multi-target self-drop moves 2017-02-01 18:11:33 -05:00
Kevin Lau
f466787851 Random Doubles: Switch to 84-all EV system like Random Singles (#3199)
EV generation is incredibly lopsided in random doubles and should be more
balanced.
2017-02-01 16:52:08 +04:00