Seven Towers: UCC Reference

USECODE INTRINSICS

UI_reduce_health(object obj, int hits, int type)
obj->reduce_health(int hits, int type)

Causes a fixed amount of damage of the specified type to a target. This intrinsic ignores armor and armor-granted immunities.

Parameters

objThe object to be damaged.
hitsHow much damage is to be caused.
typeThe type of the damage. If the target is immune to this damage type, he will take no damage from this intrinsic; conversely, a monster vulnerable to this type of damage takes doubled damage. Armor-granted immunities are ignored.

The type of the damage is a numerical value that describes what kind of damage should be caused. It can be one of the following values:

NORMAL_DAMAGE = 0Normal damage.
FIRE_DAMAGE = 1Damage from heat sources.
MAGIC_DAMAGE = 2Damage from a magical source.
LIGHTNING_DAMAGE = 3Damage from electrical sources such as lightning. Extremely painful, even a single point of damage causes the screen to flash a red color. This damage ignores all armor and does not depend on the attacker's strength.
POISON_DAMAGE = 3Damage from poison. Extremely painful, even a single point of damage causes the screen to flash a red color. This damage ignores all armor and does not depend on the attacker's strength.
STARVATION_DAMAGE = 3Damage from starvation. Extremely painful, even a single point of damage causes the screen to flash a red color. This damage ignores all armor and does not depend on the attacker's strength.
FREEZING_DAMAGE = 3Damage from frostbite. Extremely painful, even a single point of damage causes the screen to flash a red color. This damage ignores all armor and does not depend on the attacker's strength.
ETHEREAL_DAMAGE = 4Special magical damage, basically magic damage not blocked by normal magic resistance or armor.
SONIC_DAMAGE = 5Sound-based damage. This damage type ignores armor.

Related intrinsics

See also