summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-12-11 01:38:10 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-12-11 01:38:10 +0100
commit3294e3da732ee0bc4e38573b6f26df1d44f56c7e (patch)
treed2c7358bf4ec3946ccbd76ee27fd88931972d024
parent9e885d6d1378b4053054d16d435c319997348d84 (diff)
downloadcrawl-ref-3294e3da732ee0bc4e38573b6f26df1d44f56c7e.tar.gz
crawl-ref-3294e3da732ee0bc4e38573b6f26df1d44f56c7e.zip
A blank "statue" monster, to be redefined by vaults.
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/mon-data.h12
-rw-r--r--crawl-ref/source/mon-util.cc8
-rw-r--r--crawl-ref/source/mon-util.h3
-rw-r--r--crawl-ref/source/monster.cc3
-rw-r--r--crawl-ref/source/spells4.cc2
6 files changed, 27 insertions, 2 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 8fce0f0b8e..4d9733c34a 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2027,6 +2027,7 @@ enum monster_type // (int) menv[].type
MONS_ORANGE_STATUE,
MONS_SILVER_STATUE,
MONS_ICE_STATUE,
+ MONS_STATUE,
// Third batch of uniques
MONS_ROXANNE = 450, // -- statue, too!
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index 23fecfcc30..73dde6150e 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -4171,6 +4171,18 @@ static monsterentry mondata[] = {
MONUSE_NOTHING, MONEAT_NOTHING, SIZE_LARGE
},
+{
+ MONS_STATUE, '8', LIGHTGREY, "statue",
+ M_STATIONARY | M_SPEAKS,
+ MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_ELEC,
+ 0, 10, MONS_CLAY_GOLEM, MONS_STATUE, MH_NONLIVING, MAG_IMMUNE,
+ { {AT_HIT, AF_WEAP_ONLY, 20}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
+ { 8, 0, 0, 70 },
+ 12, 1, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT,
+ I_HIGH, HT_LAND, FL_NONE, 10, DEFAULT_ENERGY,
+ MONUSE_STARTING_EQUIPMENT, MONEAT_NOTHING, SIZE_LARGE
+},
+
// gargoyles ('9')
{
MONS_GARGOYLE, '9', LIGHTGREY, "gargoyle",
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index d5b4a54201..e86602e9c9 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1081,6 +1081,14 @@ mon_attack_def mons_attack_spec(const monsters *mon, int attk_number)
attk.flavour = RANDOM_ELEMENT(flavours);
}
+ if (attk.flavour == AF_WEAP_ONLY)
+ {
+ if (mon->inv[MSLOT_WEAPON] != NON_ITEM) // not mon->weapon() !
+ attk.flavour = AF_PLAIN;
+ else
+ return (mon_attack_def::attk(0, AT_NONE));
+ }
+
// Slime creature attacks are multiplied by the number merged.
if (mon->type == MONS_SLIME_CREATURE && mon->number > 1)
attk.damage *= mon->number;
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h
index e1e5491c94..a79260d378 100644
--- a/crawl-ref/source/mon-util.h
+++ b/crawl-ref/source/mon-util.h
@@ -85,7 +85,8 @@ enum mon_attack_flavour
AF_NAPALM,
AF_CHAOS,
AF_STEAL,
- AF_STEAL_FOOD
+ AF_STEAL_FOOD,
+ AF_WEAP_ONLY // AF_PLAIN if wielding a weapon, nothing if not
};
// Non-spell "summoning" types to give to monsters::mark_summoned(), or
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 75667278e8..19872b3b9a 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -370,6 +370,7 @@ int monsters::body_weight() const
case MONS_QUICKSILVER_DRAGON:
case MONS_SILVER_STATUE:
+ case MONS_STATUE:
weight *= 4;
break;
@@ -1932,7 +1933,7 @@ void monsters::wield_melee_weapon(int near)
// Switch to the alternate weapon if it's not a ranged weapon, too,
// or switch away from our main weapon if it's a ranged weapon.
- if (alt && !is_range_weapon(*alt) || weap && !alt)
+ if (alt && !is_range_weapon(*alt) || weap && !alt && type != MONS_STATUE)
swap_weapons(near);
}
}
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 5147acc2ea..1ecaa4bd06 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -121,6 +121,7 @@ static int _shatter_monsters(coord_def where, int pow, int, actor *)
case MONS_IRON_GOLEM:
case MONS_CRYSTAL_GOLEM:
case MONS_ORANGE_STATUE:
+ case MONS_STATUE:
case MONS_EARTH_ELEMENTAL:
case MONS_GARGOYLE:
case MONS_SKELETAL_DRAGON:
@@ -1391,6 +1392,7 @@ bool cast_fragmentation(int pow, const dist& spd)
case MONS_STONE_GOLEM:
case MONS_EARTH_ELEMENTAL:
case MONS_GARGOYLE:
+ case MONS_STATUE:
explode = true;
beam.ex_size = 2;
beam.name = "blast of rock fragments";