Skip to content

Commit

Permalink
Added "Modifying actors" blurb to Battles.md (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Goldberg committed Feb 21, 2017
1 parent dda2eae commit 91258b6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/docs/Battles.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,12 @@ FSP.battles.startBattle({
});
```

### Modifying actors

Each actor has a `statistics` object with an `{ current: number, normal: number }` describing one of the actor's statistics.
You can change an actor's statistic by directly modifying those objects via `FSP.battleMover`'s current `battleInfo`.

```javascript
// Changes the player's current actor to have 9001 attack
FSP.battleMover.getBattleInfo().teams.player.actors[0].statistics.attack.current = 9001;
```

0 comments on commit 91258b6

Please sign in to comment.