From 87f7b2a593dd33328802483d8aefb03d72e3162f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 28 Oct 2023 23:44:05 +0200 Subject: [PATCH] attacking guarding dogs now wakes up all other existing guarding dogs, and causes a small ambush -- also affects shmup mode and other ranged attacks --- attack.cpp | 2 ++ complex2.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/attack.cpp b/attack.cpp index 8c32f11e..4db866e6 100644 --- a/attack.cpp +++ b/attack.cpp @@ -506,6 +506,8 @@ EX void killMonster(cell *c, eMonster who, flagtype deathflags IS(0)) { } #endif + if(m == moHunterGuard) ambush::guard_attack(); + if(m == moGolemMoved) m = moGolem; if(m == moKnightMoved) m = moKnight; if(m == moSlimeNextTurn) m = moSlime; diff --git a/complex2.cpp b/complex2.cpp index 14441e27..94507f5f 100644 --- a/complex2.cpp +++ b/complex2.cpp @@ -905,6 +905,12 @@ EX void ambush(cell *c, int dogs) { addMessage(XLAT("You are ambushed!")); } +EX void guard_attack() { + addMessage(XLAT("%The1 alarms other dogs as it dies!", moHunterGuard)); + for(cell *c: dcal) if(c->monst == moHunterGuard) c->monst = moHunterDog; + ambush(cwt.at, 7); + } + EX } EX namespace dice {