Added a new trigger type for mobs, called "Damage", that triggers every (#151)

time the mob is harmed, through any means.

Valid return values: 
-1: prevents damage from occurring. Will also prevent a fight from
starting.
0: forces a miss.
>0 : the damage the mob will endure.

Available variables:
%actor%: the one doing the damage
%victim%: typically the same as %self% - the one being attacked
%damage%: the damage inflicted. Always a non-negative number.
%attacktype%: The attack type. Will be UNDEFINED when hitting with a
weapon.
This commit is contained in:
Thomas Arp
2025-07-02 22:22:17 +02:00
committed by GitHub
parent f1794521cf
commit bdaca46e79
5 changed files with 36 additions and 1 deletions

View File

@@ -877,6 +877,7 @@ const char *trig_types[] = {
"Door",
"UNUSED",
"Time",
"Damage",
"\n"
};