when attacking by boat, attack execution only starts from boat pixel

This commit is contained in:
evanpelle
2024-09-04 20:06:20 -07:00
parent 2082b229b4
commit a92bebce05
8 changed files with 22 additions and 10 deletions
+4 -1
View File
@@ -22,11 +22,14 @@ export class Executor {
createExec(intent: Intent): Execution {
if (intent.type == "attack") {
const source: Cell | null = intent.sourceX != null && intent.sourceY != null ? new Cell(intent.sourceX, intent.sourceY) : null
const target: Cell | null = intent.targetX != null && intent.targetY != null ? new Cell(intent.targetX, intent.targetY) : null
return new AttackExecution(
intent.troops,
intent.attackerID,
intent.targetID,
new Cell(intent.targetX, intent.targetY)
source,
target,
)
} else if (intent.type == "spawn") {
return new SpawnExecution(