Skip to content

Commit

Permalink
Record seeing Pokémon, in trainer's Pokédexes
Browse files Browse the repository at this point in the history
Also actually store the ‘dex.
  • Loading branch information
varkor committed Jan 8, 2016
1 parent 5d613f7 commit cc8c64e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion battle/scripts/objects/general/BattleContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -3007,7 +3007,9 @@ function BattleContext (client) {
else
battleContext.opponents[place] = poke;
}
// The start of the battle
foreach(battleContext.allTrainers(), function (character) {
character.dex.see(poke.species);
});
if (!battleContext.process) {
if (!poke.trainer.isWild()) {
poke.battler.display.transition = 0;
Expand Down Expand Up @@ -3037,6 +3039,7 @@ function BattleContext (client) {
foreach((poke.battler.side === Battles.side.near ? battleContext.hazards.near : battleContext.hazards.far), function (hazard) {
hazard.type.effects.hazard(poke, hazard.stack);
});
// The start of the battle
if (initial) {
var OPowers = 0, takeEffect = {};
foreach(Stats.all, function (stat) {
Expand Down
1 change: 1 addition & 0 deletions battle/scripts/objects/general/trainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function trainer (data) {
store.party = self.party.store();
store.storage = self.storage.store();
store.bag = self.bag.store();
store.dex = self.dex.store();
return JSONCopy(store);
};

Expand Down

0 comments on commit cc8c64e

Please sign in to comment.