Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/attackManager.js
Show First 20 Lines • Show All 218 Lines • ▼ Show 20 Lines | for (let struct of gameState.getEnemyStructures().values()) | ||||
if (!attackingUnits) | if (!attackingUnits) | ||||
{ | { | ||||
attackingUnits = new Set(); | attackingUnits = new Set(); | ||||
this.bombingAttacks.set(struct.id(), attackingUnits); | this.bombingAttacks.set(struct.id(), attackingUnits); | ||||
} | } | ||||
attackingUnits.add(ent.id()); | attackingUnits.add(ent.id()); | ||||
if (dist > range) | if (dist > range) | ||||
ent.move(x, z); | ent.move(x, z); | ||||
ent.attack(struct.id(), false, dist > range); | ent.attack(struct.id(), ["!Capture"], dist > range); | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
/** | /** | ||||
* Some functions are run every turn | * Some functions are run every turn | ||||
* Others once in a while | * Others once in a while | ||||
▲ Show 20 Lines • Show All 570 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator