Fix lilypad splash duration being slightly longer than expected

This commit is contained in:
Eevee (Evelyn Woods) 2021-05-07 18:54:56 -06:00
parent 99dec75731
commit 87d7952960

View File

@ -2730,6 +2730,11 @@ export class Level extends LevelInterface {
} }
let tile = new Tile(type); let tile = new Tile(type);
this._init_animation(tile); this._init_animation(tile);
// Note that newly-spawned animations don't have their cooldown decremented right away, and
// in the case of lilypads, this has gameplay implications. I can't just not tick them down
// or the renderer will break, so cheat by extending the duration by a tic
this._set_tile_prop(tile, 'movement_speed', tile.movement_speed + 3);
this._set_tile_prop(tile, 'movement_cooldown', tile.movement_cooldown + 3);
this.add_tile(tile, cell); this.add_tile(tile, cell);
this.add_actor(tile); this.add_actor(tile);
} }