Skip to content

Has Number Of Units Attacking

Rubens de Oliveira Moraes Filho edited this page Apr 29, 2021 · 2 revisions

This boolean is responsible by evaluate if the player has a certain number of units attacking.

Stand-alone application

This method returns true if the player has <quantity> or more units of type <type> attacking the opponent; the method returns false otherwise. HaveQtdUnitsAttacking can be interpreted (composed) as:

HaveQtdUnitsAttacking(<type>, <quantity>)

Used in a Loop (For)

HaveQtdUnitsAttacking can appear inside of a loop/if structure, however, the boolean can't receive a unit as a parameter, which means that this boolean will be used always as the stand-alone way.


In code (how to creat one)

BooleanDSL bool_example = new BooleanDSL("HaveQtdUnitsAttacking(Worker,1)");

By translate method

bool_example.translate() --> print in Java console--> HaveQtdUnitsAttacking(Worker,1)

By friendly translate method

bool_example.friendly_translate() --> print in Java console--> HaveQtdUnitsAttacking(Worker,1)

By formated Structured DSL Tree Pre-Order Print method

BuilderDSLTreeSingleton.formatedStructuredDSLTreePreOrderPrint((iNodeDSLTree) bool_example); --> print in Java console--> b->HaveQtdUnitsAttacking(Worker,1)

Clone this wiki locally