mirror of
https://github.com/tbamud/tbamud.git
synced 2026-04-02 18:37:19 +02:00
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:
parent
f1794521cf
commit
bdaca46e79
5 changed files with 36 additions and 1 deletions
|
|
@ -71,6 +71,7 @@
|
|||
#define MTRIG_DOOR (1 << 17) /* door manipulated in room */
|
||||
|
||||
#define MTRIG_TIME (1 << 19) /* trigger based on game hour */
|
||||
#define MTRIG_DAMAGE (1 << 20) /* trigger whenever mob is damaged */
|
||||
|
||||
/* obj trigger types */
|
||||
#define OTRIG_GLOBAL (1 << 0) /* unused */
|
||||
|
|
@ -264,6 +265,7 @@ void time_wtrigger(room_data *room);
|
|||
|
||||
int login_wtrigger(struct room_data *room, char_data *actor);
|
||||
|
||||
int damage_mtrigger(char_data *ch, char_data *victim, int dam, int attacktype);
|
||||
/* function prototypes from dg_scripts.c */
|
||||
ACMD(do_attach) ;
|
||||
ACMD(do_detach);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue