Commit Graph

96 Commits

Author SHA1 Message Date
urkerab
c7f9aa009c Fix spread Z-Moves interaction with protection (#4163) 2017-11-18 14:41:47 -05:00
Marty-D
77039602e3
Release Hidden Ability Orange and White Flower Florges line
Thanks, Kaphotics!
2017-11-18 09:15:41 -05:00
Guangcong Luo
e716e9edc7 Implement Ultra Burst 2017-11-17 00:01:09 -06:00
Guangcong Luo
e25eeb9eb0 Correctly validate Rockruff-Dusk 2017-11-16 21:45:24 -06:00
Kris Johnson
f2caefba9b Ultra Sun and Ultra Moon update (#4151) 2017-11-16 20:34:43 -06:00
MacChaeger
6f82808c34 Fix clearing volatiles (#4120) 2017-11-12 22:09:52 -05:00
Guangcong Luo
b9ea17e014 TypeScript: Correctly mark args as optional 2017-11-12 01:57:53 -06:00
Guangcong Luo
9a1cb36882 Support three arguments in addVolatile 2017-11-12 01:22:31 -06:00
Guangcong Luo
6dc65e48cf MODULE_NOT_FOUND is now ENOENT in Node 8 2017-11-09 14:43:43 -06:00
Guangcong Luo
56190af620 Fix up TypeScript errors
Also suppress TypeScript validation of various files we don't want
validated right now.
2017-11-08 01:23:04 -06:00
Guangcong Luo
e377d69395 Fix core team-validation intersection check 2017-11-05 00:11:51 -07:00
Guangcong Luo
7904e7791b Fix Gen 2 Hidden Power IV validation 2017-11-05 00:11:51 -07:00
Kris Johnson
4c5518320b Use standard formatting for STABmons move checking (#4123) 2017-11-04 13:54:54 -07:00
Guangcong Luo
c5d438b7be Fix TypeScript error in validator
...we should probably add TypeScript to CI sometime soon...
2017-11-04 12:14:47 -07:00
Kris Johnson
475e70b822 STABmons: Fix move validation error (#4121) 2017-11-03 15:42:37 +08:00
Guangcong Luo
17015189f1 Don't crash when validating impossible moves 2017-11-02 14:35:26 -05:00
Kris Johnson
c7e11d5469 Fix error in STABmons (#4118) 2017-11-02 14:02:18 -05:00
Guangcong Luo
011528bd5a Fix Hidden Ability validation
Previously, a mix of past-gen and modern event sources for a move would
confuse the validator. This case is now properly handled.
2017-11-02 13:36:05 -05:00
Guangcong Luo
528a6745cb TypeScript: Use GenderName alias in Template 2017-11-02 13:00:41 -05:00
Guangcong Luo
fed55531f1 Make the dexes table null-prototype
Fixes a 'constructor' issue in Dex.mod()
2017-11-02 13:00:40 -05:00
Guangcong Luo
e8d245f97b Support Pomeg Glitch 2017-11-02 13:52:24 -04:00
whales
c28a387a2f Fix Dex#getType (#4116) 2017-11-02 10:29:49 -04:00
urkerab
d86b272145 Other Metagames of the Month November 2017 (#4108) 2017-11-02 14:44:21 +08:00
Guangcong Luo
2d9fc18280 TypeScript sim/team-validator.js 2017-11-02 00:15:04 -05:00
Guangcong Luo
0e728281e6 Move team-validator to sim/team-validator 2017-11-01 05:22:37 -05:00
Guangcong Luo
6a6bc18d44 Work around ESLint 4.1.0 trailing spaces bug 2017-10-23 09:22:30 -05:00
Guangcong Luo
246dfa1da3 Refactor in-object-literal to array-includes (#4079)
Previously, if we wanted to test if A was either 'B' or 'C', we would use
the pattern:

    A in {B:1, C:1}

I actually don't know how common this pattern is; I just started using
it because I was tired of typing `A === 'B' || A === 'C'` all the time.
I never really liked it, though; the `:1` part made it kind of
blatantly a hack.

I did some testing and `['B', 'C'].includes(A)` is overall faster.

(A switch statement is around 20x faster still, but who wants to type
that much code?)

Anyway, the new standard is

    ['B', 'C'].includes(A)

Something something progress!
2017-10-23 09:19:15 -05:00
Marty-D
97bb5af755 Fix crash in confusion damage 2017-10-21 09:28:40 -04:00
Guangcong Luo
c640a69ffc Don't send Rated text for normal rated battles 2017-10-21 03:43:12 -05:00
Marty-D
312f93c47c Revert "Fix confusion interaction with HP-checking items (#4045)"
This reverts commit
6651c5dadb.
2017-10-20 21:05:49 -04:00
Quinton Lee
a0b8228592 TypeScript: Improve Sim typing (#4069)
Also improves intellisense for Visual Studio and Visual Studio Code.
2017-10-20 07:53:26 -05:00
Guangcong Luo
a207147a48 Support custom rated battle message
Currently, the bold circled "Rated" marker in battle logs is only used
for rated battles. This change also supports using them to mark tour
battles.
2017-10-18 05:41:03 -05:00
QuiteQuiet
6651c5dadb Fix confusion interaction with HP-checking items (#4045) 2017-10-17 09:26:27 -04:00
Guangcong Luo
110b6a5511 Implement tiebreaker
This is the tiebreaker used for timeouts in Gen 6-7 (I think), but it's
not currently used anywhere.
2017-10-08 03:39:58 -05:00
Ben Davies
77b4c77864 Dex: constructor is not a format alias 2017-09-18 21:20:03 -03:00
Guangcong Luo
6b870967e0 Fix bug in support for >10 pokemon in Team Preview 2017-09-09 20:31:54 -04:00
Guangcong Luo
737d9dbba0 Support more than 10 Pokemon in Team Preview 2017-09-09 20:19:24 -04:00
Guangcong Luo
066d970b54 Fix >6-pokemon Custom Games 2017-09-09 19:41:55 -04:00
Guangcong Luo
b42a322ecb Support over 6 Pokemon in Custom Game 2017-09-09 18:25:26 -04:00
Guangcong Luo
1e87e989cc Hacky fix to the 6-move bug 2017-09-08 18:20:08 -04:00
Guangcong Luo
057e6b4e89 Alias formats without gen number to Gen 7 formats
Closes #3785
2017-09-08 10:27:20 -04:00
urkerab
bd6743bbe7 Reveal own Ability in Gen 7 (#3969) 2017-09-06 23:21:19 -04:00
Guangcong Luo
25d0079b4f Sim: Fix Berries not activating after weather
Previously, Berries would not activate after weather damage and before
other residual damage/healing.

According to: https://www.youtube.com/watch?v=FRI5PSekhR4

They should activate then. More research is needed to determine what
other situations Berries should activate but don't.
2017-09-05 07:00:55 -04:00
Guangcong Luo
7785375d14 Sim: Faint-switch in fainted pokemon Spe order
Now, if multiple Pokemon fainted in one turn, they will be switched
out in Speed order (of the fainted Pokemon).
2017-09-05 06:53:56 -04:00
Ghoulean Algebra
f067ee13ee Gen II: Fix Hidden Power's power calculation (#3925)
Before : HP_Power=(5*(v+2w+4x+8y)+min(Z, 3))/2 + 31 
After: HP_Power=(5*(v+2w+4x+8y)+(Z % 4))/2 + 31 

where 
* v is 1 if SpcIV>=8; otherwise 0, 
* w is 1 if SpeIV>=8; otherwise 0, 
* x is 1 if DefIV>=8; otherwise 0, 
* y is 1 if AtkIV>=8; otherwise 0, 
* Z = SpcIV

See: 
http://tasvideos.org/forum/viewtopic.php?p=361950#361950
https://github.com/pret/pokecrystal/blob/master/battle/hidden_power.asm#L52
2017-08-27 20:22:05 -04:00
Quinton Lee
0c94145c40 Fix remaining custom format issues (#3910)
Rules for custom formats are once again sanitized and can be passed
around more easily by attaching them to the format's id.

Fixes:
- "Rule:" being required to add or remove a rule
- ruleset changes not being shown in battles
- the display of custom rules being affected by user input
- custom formats being broken by /hotpatch formats
2017-08-23 22:27:09 -07:00
Guangcong Luo
18d656519c Fix chooseMove again 2017-08-09 21:52:30 -05:00
Guangcong Luo
29bfa41f79 Fix crash in autoChoose 2017-08-09 20:28:25 -05:00
Marty-D
5aa7045900 Fix Solar Blade redirection issue 2017-08-05 12:32:35 -04:00
Guangcong Luo
4df6548cf4 Fix bugs in VGC auto-move resolver 2017-08-02 07:02:32 -04:00