scroll.server/crates/logic/src/battle
WiseDev 2933d2ff7e maintain the combat timers the way the client does
audit findings #4/#7/#8. resolve_attacks only ever wrote hit_timer, and
with the wrong model; field_52 (load), field_60 (dash), field_64
(special index) were left at 0 forever. all four are hashed by
LogicCombatComponent::encode, so the checksum broke the instant anything
could shoot.

now, mirroring LogicCombatComponent::update and updateHitTimer:
- field_52 and field_60 decrement by 50 every tick, unconditionally, for
  every combat component - the two lines at the top of update.
- hit_timer is seeded with LoadTime the first time, advances by the 50ms
  step, and a shot lands on each HitSpeed boundary the accumulator
  crosses (field18/HitSpeed rising past its previous quotient), instead
  of "fire at load_time+hit_speed then reset". on a shot field_52 is set
  back to LoadTime and field_64 cycles through SpecialAttackInterval.

still not bit-exact for combat: the state field (2 while attacking),
field_68 recovery, buff-scaled hit speed, and projectiles-as-objects are
their own ports. this closes the "timers never move" break; damage
lands under the new model (harness).
2026-08-24 09:54:07 +03:00
..
logic_battle.rs walk units around the river instead of through it 2026-08-23 13:23:58 +03:00
logic_battle_event.rs refill the hand, and decode SendBattleEventMessage 2026-08-23 11:47:25 +03:00
logic_character.rs refill the hand, and decode SendBattleEventMessage 2026-08-23 11:47:25 +03:00
logic_component.rs keep the path instead of finding it again every tick 2026-08-23 14:03:26 +03:00
logic_game_mode.rs take the checksum from before the closing checkpoint 2026-08-23 15:04:51 +03:00
logic_game_object.rs simulate movement, targeting and damage on the server 2026-08-23 13:10:30 +03:00
logic_game_object_manager.rs build and send the battle sector state 2026-08-23 10:24:20 +03:00
logic_game_object_ref.rs battle model: LogicBattle, the object manager and BattleResultMessage 2026-08-23 10:00:16 +03:00
logic_pathfinder.rs keep units on the map so the pathfinder cannot panic 2026-08-23 14:23:22 +03:00
logic_simulation.rs maintain the combat timers the way the client does 2026-08-24 09:54:07 +03:00
logic_tilemap.rs walk units around the river instead of through it 2026-08-23 13:23:58 +03:00
logic_time.rs battle model: LogicBattle, the object manager and BattleResultMessage 2026-08-23 10:00:16 +03:00
logic_tutorial_manager.rs battle model: LogicBattle, the object manager and BattleResultMessage 2026-08-23 10:00:16 +03:00
mod.rs count the deploy timer down and hold the troop still while it runs 2026-08-24 09:39:13 +03:00
verify.rs matchmake two players before falling back to a bot 2026-08-23 13:19:38 +03:00