tuxemon.item.conditions.current_hp module

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

Bases: ItemCondition

Compares the target 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: To make an item only usable if a monster is at less than full health, you would use the condition “is current_hp target,<,1.0”

  • comparison (str) –

  • value (int | float) –

comparison: str
name: ClassVar[str] = 'current_hp'

Return True if satisfied, or False if not.


target (Monster) – The target of the item’s use.

Return type:


value: int | float