mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-18 19:28:35 -05:00
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`
23 lines
804 B
JavaScript
23 lines
804 B
JavaScript
'use strict';
|
|
|
|
const assert = require('./../../assert');
|
|
|
|
describe('Mod loader', function () {
|
|
it.skip('should work fine in any order', function () {
|
|
{
|
|
Chat.uncacheTree('./sim/dex');
|
|
let Dex = require('./../../../sim/dex');
|
|
assert.strictEqual(Dex.mod('gen2').getTemplate('nidoking').learnset.bubblebeam.join(','), '1M');
|
|
assert.strictEqual(Dex.mod('gen2').getMove('crunch').secondaries[0].boosts.def, undefined);
|
|
}
|
|
{
|
|
Chat.uncacheTree('./sim/dex');
|
|
let Dex = require('./../../../sim/dex');
|
|
Dex.mod('gen2').getTemplate('nidoking');
|
|
Dex.mod('gen4').getMove('crunch');
|
|
assert.strictEqual(Dex.mod('gen2').getTemplate('nidoking').learnset.bubblebeam.join(','), '1M');
|
|
assert.strictEqual(Dex.mod('gen2').getMove('crunch').secondaries[0].boosts.def, undefined);
|
|
}
|
|
});
|
|
});
|