Skip to content

feat(siege): guild siege war machines, ammunition modifiers, and gate armor penetration - #196

Open
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-siege-machines-1787850077952
Open

feat(siege): guild siege war machines, ammunition modifiers, and gate armor penetration#196
angelTomo9 wants to merge 2 commits into
Bitcoindefi:mainfrom
angelTomo9:feat-siege-machines-1787850077952

Conversation

@angelTomo9

Copy link
Copy Markdown

Summary

Implements a guild siege war machine (Catapults, Ballistas, Battering Rams) assault engine for OpenAO MMORPG.

Features

  • Catapult, Ballista, and Battering Ram deployment specs and reload timers
  • Material-specific ammunition damage multipliers (Fire Pots vs wood, Boulders vs stone)
  • Fortification gate armor mitigation formulas
  • Full unit test coverage under Vitest

Comment thread api/src/lib/siegeWarMachine.ts
@gitar-bot

gitar-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Adds guild siege war machines, ammunition modifiers, and gate armor penetration. Also enforces the reload cooldown interval in fireAtStructure, addressing the previously missing cooldown check.

✅ 1 resolved
Bug: Reload cooldown is never enforced in fireAtStructure

📄 api/src/lib/siegeWarMachine.ts:103-117
The spec defines reloadTimeSeconds and each machine tracks lastFiredEpochMs, and fireAtStructure receives currentEpochMs — but the function never checks whether the reload interval has elapsed before dealing damage. It unconditionally applies damage and then overwrites lastFiredEpochMs, so a caller can fire every tick and the advertised reload-timer feature has no effect. Add a guard that returns a no-op/zero-damage result (or throws) when currentEpochMs - machine.lastFiredEpochMs < spec.reloadTimeSeconds * 1000.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 5 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant