tuxemon.technique.conditions.current_hp module

class tuxemon.technique.conditions.current_hp.CurrentHitPointsCondition(comparison, value)[source]

Bases: TechCondition

Compares the Monster’s current hitpoints against the given value.

If an integer is passed, it will compare against the number directly, if a decimal between 0.0 and 1.0 is passed it will compare the current hp against the total hp.

Example: “conditions”: [

“is current_hp <,1.0”,

],

Parameters:
  • comparison (str) –

  • value (int | float) –

comparison: str
name: ClassVar[str] = 'current_hp'
test(target)[source]

Return True if satisfied, or False if not.

Parameters:

target (Monster) –

Return type:

bool

value: int | float