@civ-clone/base-unit-action-industrial-sabotage
v0.1.1
Published
The `IndustrialSabotage` unit action. See civ-clone/web-renderer#58.
Readme
base-unit-action-industrial-sabotage
The IndustrialSabotage unit action. See civ-clone/web-renderer#58.
perform(choice?)
MissionModeresolves the escape mode (defaultHARDafter a chosen target,ORDINARYotherwise). Then a caught check (base-unit-agent'sAgentSurviveswithCAUGHT_CHECK, given the resolved mode): a Diplomat that is caught goes toAgentLostand is destroyed by the city's owner, with noMoved.- The
CitySabotaged(unit, city, action)rules. Moved, then the Diplomat is used up (AgentLost, then destroyed as before) unless it survivesAgentSurviveswith the resolved mode. A rule that keeps it must spend its moves.
With none of base-unit-agent's rules registered, the Diplomat is always used up, as before.
Targets: targets() lists what the MissionTargets rules offer; perform(choice) takes one of them, or its name
(targetName), and the rules read it as action.chosenTarget(). A choice that isn't offered is ignored.
