|
From: <gi...@cr...> - 2013-09-30 16:46:21
|
via 96a4fb3f24cbe59ac6ac971ccdd3387b5efd3146 (commit)
via 8b588dfb2c132f38624c8d2644c8f5badf5e14f5 (commit)
via 99e328b810d3611051b701dabf07c7886b4901a9 (commit)
from d5eeb803e6b36a8e0c8102ddc2cc28d8f772b73c (commit)
-----------------------------------------------------------------------
commit 96a4fb3f24cbe59ac6ac971ccdd3387b5efd3146
Author: Adam Borowski <kil...@an...>
Date: Mon Sep 30 18:34:50 2013 +0200
Remove a crashy trap from an abyssal vault.
I guess I could instead make such traps not crash, but since the only trap
in the Abyss comes from a single vault, and is a mechanical one to boot,
here it goes.
commit 8b588dfb2c132f38624c8d2644c8f5badf5e14f5
Author: Adam Borowski <kil...@an...>
Date: Mon Sep 30 18:29:07 2013 +0200
Fix a crash if a boulder beetle dies due to damage it deals.
In this case, this was an inner flame explosion, which we really should
make a fineff.
commit 99e328b810d3611051b701dabf07c7886b4901a9
Author: Adam Borowski <kil...@an...>
Date: Mon Sep 30 18:04:49 2013 +0200
Fix an infinite loop with insane friendlies attacking the player.
mon-act thinks the attack will succeed, melee_attack denied it. Since
insanity is a form of confusion, let's allow the monster to attack you.
Also, don't set the foe to the player in such a case: attack just once,
like it's done against monsters.
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/dat/des/branches/abyss.des | 3 +--
crawl-ref/source/fight.cc | 5 +++--
crawl-ref/source/mon-act.cc | 9 ++++++---
crawl-ref/source/mon-project.cc | 2 +-
4 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/crawl-ref/source/dat/des/branches/abyss.des b/crawl-ref/source/dat/des/branches/abyss.des
index 04b6a49..caa09d3 100644
--- a/crawl-ref/source/dat/des/branches/abyss.des
+++ b/crawl-ref/source/dat/des/branches/abyss.des
@@ -257,7 +257,6 @@ NAME: hangedman_abyss_feature_spike
TAGS: abyss extra no_item_gen no_pool_fixup allow_dup
MONS: fungus, plant, bush
ITEM: stone q:1, large rock q:1
-KFEAT: ^ : known dart trap / known needle trap / known blade trap
KFEAT: A : stone_arch w:99 / abandoned_shop w:1
KFEAT: - = altar_lugonu
KMASK: wWl = no_monster_gen
@@ -270,7 +269,7 @@ SUBST: f = A, g = C, h = T, i = U, j = V
SUBST: o = t, p = G, q = w, r = W, s = l
SUBST: J = x, K = c, L = v, MN = m, O = 1, P = 2, Q = 3, RS = b
SUBST: - = -----A
-SHUFFLE: AACCTTUUVYYdeefghi^, tGGwWlI, xxccvvbbmm+123
+SHUFFLE: AACCTTUUVYYdeefghi, tGGwWlI, xxccvvbbmm+123
: dgn.delayed_decay(_G, 'f', 'human skeleton')
: dgn.delayed_decay(_G, 'g', 'elf skeleton')
: dgn.delayed_decay(_G, 'h', 'dwarf skeleton')
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index b242df4..da68200 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -50,8 +50,9 @@ bool fight_melee(actor *attacker, actor *defender, bool *did_hit, bool simu)
{
ASSERT(!crawl_state.game_is_arena());
// Friendly and good neutral monsters won't attack unless confused.
- if (attacker->as_monster()->wont_attack() &&
- !mons_is_confused(attacker->as_monster()))
+ if (attacker->as_monster()->wont_attack()
+ && !mons_is_confused(attacker->as_monster())
+ && !attacker->as_monster()->has_ench(ENCH_INSANE))
{
return false;
}
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index 4895d48..07d8a57 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -2276,9 +2276,12 @@ void handle_monster_move(monster* mons)
&& !mons->has_ench(ENCH_CHARM)
&& !mons->withdrawn())
{
- // If it steps into you, cancel other targets.
- mons->foe = MHITYOU;
- mons->target = you.pos();
+ if (!mons->wont_attack())
+ {
+ // If it steps into you, cancel other targets.
+ mons->foe = MHITYOU;
+ mons->target = you.pos();
+ }
fight_melee(mons, &you);
diff --git a/crawl-ref/source/mon-project.cc b/crawl-ref/source/mon-project.cc
index a609cfa..53c9e37 100644
--- a/crawl-ref/source/mon-project.cc
+++ b/crawl-ref/source/mon-project.cc
@@ -222,7 +222,7 @@ static bool _boulder_hit(monster& mon, const coord_def &pos)
}
noisy(5, pos);
- return victim && victim->alive();
+ return victim && victim->alive() || !mon.alive();
}
static bool _iood_hit(monster& mon, const coord_def &pos, bool big_boom = false)
--
Dungeon Crawl Stone Soup
|