Commit Graph

1124 Commits

Author SHA1 Message Date
Marty-D
d60c007f3d Update move flag descriptions 2017-06-17 09:36:52 -04:00
Guangcong Luo
cf7607cb90 Move cache tables out of Dex.data
Template/Item/Move/Ability caches are now direct properties of Dex,
instead of being inside Dex.data.
2017-06-13 21:45:53 -05:00
Guangcong Luo
00448ac865 TypeScript: Update for latest nightly
The latest nightly of TypeScript changes how the checks work, and I'm
tracking it because it also fixes several major bugs in --checkJs.
2017-06-11 12:03:38 -05:00
Caleb Young
9dab8e50e1 Implement DPP damage formula (#3583) 2017-06-11 10:18:34 -05:00
asgdf
f22963c718 Fix Last Will crash (#3561)
By moving BeforeFaint right before the faint message, so the move is done
by then.
2017-05-28 17:24:17 +09:00
urkerab
f24d7cbadb Move Illusion-breaking out of the battle engine (#3549) 2017-05-24 20:36:17 -04:00
asgdf
8a33238544 Fix statuses still being effective after being removed that turn (#3538) 2017-05-24 23:55:35 +09:00
urkerab
d212b9f128 Move, Ability and Item effects should inherit the name (#3547) 2017-05-24 23:12:38 +09:00
Guangcong Luo
cd3ac06987 Fix Hail/Sandstorm damage regression
(Also add a test for it since this isn't even the first time this
exact regression has happened.)
2017-05-18 06:29:25 -05:00
Guangcong Luo
109b2cfe1d Slightly refactor teamsize 2017-05-18 05:38:14 -05:00
QuiteQuiet
1be924f6e8 Send team size at the start of battles (#3512) 2017-05-18 05:09:38 -05:00
Guangcong Luo
149ca3759c Add classes for data
Having classes for data will make it better for documenting and make
for overall nicer code that's easier to statically analyze.
2017-05-17 04:10:01 -05:00
Guangcong Luo
fe5fa7889e Fix various TypeScript-related errors
Now that typescript@next fixes the major issue plaguing us, we can
start working on the other issues!
2017-05-17 04:10:01 -05:00
urkerab
b12d9cbf04 Give Natures a Generation (#3528) 2017-05-14 07:22:42 -05:00
urkerab
8ca39d65fc Properly report a near miss for an alias (#3532) 2017-05-14 07:22:20 -05:00
Charlie Kobayashi
78ed58d0c4 Dex: fix dataSearch (#3525)
Use the result's name first instead of inexact search term if search is found.
2017-05-12 17:12:07 -05:00
Charlie Kobayashi
196364adca Effect: don't override inherited properties from moreData (#3524)
- caused weather effects passed in through ``moreData`` to be marked as simply ``"Effect"``
    - as a result, sandstorm and hail will damage Rock/Ground/Steel and Ice types  respectively
- this fix makes ``Effect`` inherit the ``effectType`` from ``moreData`` if it doesn't exist in the primary ``data`` variable passed into the constructor
2017-05-12 14:23:05 -05:00
urkerab
59583ee113 Include aliases when searching the dex (#3475) 2017-05-09 23:58:32 -05:00
Guangcong Luo
e34c77930a Start creating classes for getEffect data
Currently, getEffect/getTemplate/getMove/etc return bare objects.
Refactoring their returns into classes will allow TypeScript to type
check them.
2017-05-09 16:00:11 -05:00
Guangcong Luo
a75282ea97 Fix crash in /weakness 2017-05-08 19:06:54 -05:00
Guangcong Luo
22186f1903 Improve TypeScript typing
sim/dex.js and sim/prng.js are now valid strict TypeScript! Also they
have slightly less "any" use than before.
2017-05-08 02:58:55 -05:00
Quinton Lee
fa1b45f7ab Support supplementary rulesets in battles (#3330) 2017-05-05 20:13:08 -05:00
Guangcong Luo
9e180e4fc1 Remove MockBattle
No MockBattle feature needs to be kept out of sim/...
2017-05-05 16:57:18 -05:00
Guangcong Luo
6dd58b40d3 Refactor simulator into new sim/ directory
This is a surprisingly minor refactor considering how many files it
touches, but most of this is only renames.

In terms of file renames:
- `tools.js` is now `sim/dex.js`
- `battle-engine.js` is now `sim/index.js` and its three classes are
  in `sim/battle.js`, `sim/side.js`, and `sim/pokemon.js`
- `prng.js` is now `sim/prng.js`

In terms of variable renames:
- `Tools` is now `Dex`
- `BattleEngine` is now `Sim`
- `BattleEngine.Battle` is now `Sim.Battle`
- `BattleEngine.BattleSide` is now `Sim.Side`
- `BattleEngine.BattlePokemon` is now `Sim.Pokemon`
2017-05-05 16:48:38 -05:00