Skip to content

Opponent Has Unit That Kills In One Attack

Rubens de Oliveira Moraes Filho edited this page May 13, 2021 · 3 revisions

This boolean is responsible by evaluate if the opponent has a unit (in-game) able to eliminate a single unit of the Ally player.

Stand-alone application

This method returns true if the opponent controls a unit that is able to kill in a single attack a unit of type <type> controlled by the player. OpponentHasUnitThatKillsUnitInOneAttack can be interpreted (composed) as:

OpponentHasUnitThatKillsUnitInOneAttack(<type>)

Used in a Loop (For)

OpponentHasUnitThatKillsUnitInOneAttack can appear inside of a loop/if structure. This method returns true if the opponent controls a unit that is able to kill in a single attack the unit <unit> of type <type> controlled by the player; the method returns false otherwise. Note that if the unit <unit> isn't of type <type>, then the method also returns false. The parameter <unit> changes the command like the example below:

OpponentHasUnitThatKillsInOneAttack(<type>, <unit>)


In code (how to creat one)

BooleanDSL bool_example = new BooleanDSL("OpponentHasUnitThatKillsInOneAttack(Light)");

By translate method

bool_example.translate() --> print in Java console--> OpponentHasUnitThatKillsInOneAttack(Light)

By friendly translate method

bool_example.friendly_translate() --> print in Java console--> OpponentHasUnitThatKillsInOneAttack(Light)

By formated Structured DSL Tree Pre-Order Print method

BuilderDSLTreeSingleton.formatedStructuredDSLTreePreOrderPrint((iNodeDSLTree) bool_example); --> print in Java console--> b->OpponentHasUnitThatKillsInOneAttack(Light)

Clone this wiki locally