I'm starting work on Tile States. Will be using this topic for discussion.
The design is currently as follows
- All tiles can have states
- When a battler is on the tile, the state will be added to the battler. The state will continue to be added to the battler as long as it's on the tile.
- When a battler leaves the tile, the state will still be on the battler. I think we can have states disappear immediately by using "on action end" removal timing, assuming a duration of 1. You should probably just use duration of 1 if you don't want lingering states. I will need to test this to make sure it works properly
States can be added to tiles in a variety of ways.
First, is in the grid config
GRID.addTileState("Two Grid", 1, 2, [2, 3])
This means that for config "Two Grid" grid 1, it will add state 2 to position [2, 3]
There's the option of adding it as plugin parameters.
What I'm thinking is you would basically copy the entire grid config from the GridBattle entry, paste it into GridTileStates. Then you would add tile states to each grid as needed. I will have to test if this approach works, but if it does, might be convenient.
I'd rather not add the plugin parameter directly into GridBattle.
Second way is part of your skill/item formulas. For example, if you target a tile, you could then say
b.addState(3)
Because a tile is just a battler as well.
A third way is maybe something like
BattleManager.addTileState(GRID_NAME, STATE_ID, POSITION)
If you need to dynamically add it during battle without any skills, and the grid config is no longer available. (the grid config is only loaded for the initial battle setup)