diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-01-21 20:43:34 -0700 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-01-21 22:11:39 -0700 |
commit | ce86bbf1374fe8894466314c116b39bd0b2fbf3b (patch) | |
tree | 9a991b8acf991c15e4307539ff5ad7b6b0ecde10 /crawl-ref/source/mon-behv.cc | |
parent | 889f32d1afad941cdf3a3fa9d877aee8947f1f02 (diff) | |
download | crawl-ref-ce86bbf1374fe8894466314c116b39bd0b2fbf3b.tar.gz crawl-ref-ce86bbf1374fe8894466314c116b39bd0b2fbf3b.zip |
Demonspawn warmongers: Grand Avatar.
Listed in the proposal as Icon of Greatness.
A grand avatar behaves similarly to both a spectral weapon and a
battlesphere in that it attacks targets the caster and its nearby allies
either attack in melee or by battlesphere-triggered conjurations; it
is only guaranteed to attack if the triggerer does at least 15 damage,
though it may trigger randomly below that threshold.
Diffstat (limited to 'crawl-ref/source/mon-behv.cc')
-rw-r--r-- | crawl-ref/source/mon-behv.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc index 1ae87ba554..fa22992fe6 100644 --- a/crawl-ref/source/mon-behv.cc +++ b/crawl-ref/source/mon-behv.cc @@ -299,6 +299,14 @@ void handle_behaviour(monster* mon) } } + // Grand avatar targeting is handled through its triggerers + // and _grand_avatar_act in mon-act.cc. + if (mon->type == MONS_GRAND_AVATAR) + { + mon->behaviour = BEH_SEEK; + return; + } + bool changed = true; bool isFriendly = mon->friendly(); bool isNeutral = mon->neutral(); @@ -455,7 +463,8 @@ void handle_behaviour(monster* mon) && mon->type != MONS_GIANT_SPORE && mon->type != MONS_BALL_LIGHTNING && mon->type != MONS_BATTLESPHERE - && mon->type != MONS_SPECTRAL_WEAPON) + && mon->type != MONS_SPECTRAL_WEAPON + && mon->type != MONS_GRAND_AVATAR) { if (!crawl_state.game_is_zotdef()) { @@ -1155,6 +1164,7 @@ static void _set_nearest_monster_foe(monster* mon) || mon->behaviour == BEH_WITHDRAW || mon->type == MONS_BATTLESPHERE || mon->type == MONS_SPECTRAL_WEAPON + || mon->type == MONS_GRAND_AVATAR || mon->has_ench(ENCH_HAUNTING)) { return; @@ -1318,7 +1328,8 @@ void behaviour_event(monster* mon, mon_event_type event, const actor *src, if (src == &you && !mon->has_ench(ENCH_INSANE) && mon->type != MONS_BATTLESPHERE - && mon->type != MONS_SPECTRAL_WEAPON) + && mon->type != MONS_SPECTRAL_WEAPON + && mon->type != MONS_GRAND_AVATAR) { mon->attitude = ATT_HOSTILE; breakCharm = true; @@ -1500,7 +1511,8 @@ void behaviour_event(monster* mon, mon_event_type event, const actor *src, if (src->is_player() && !mon->has_ench(ENCH_INSANE) && mon->type != MONS_BATTLESPHERE - && mon->type != MONS_SPECTRAL_WEAPON) + && mon->type != MONS_SPECTRAL_WEAPON + && mon->type != MONS_GRAND_AVATAR) { // Why only attacks by the player change attitude? -- 1KB mon->attitude = ATT_HOSTILE; |