summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-10-12 22:01:42 +0200
committerAdam Borowski <kilobyte@angband.pl>2009-10-12 22:01:42 +0200
commit759d9c1e18f28af3d2e8f1bfc234ec25dcfc2081 (patch)
treeb2515e11db09c9e95e3c637f004c4a7e0208c7fa
parent2495f7b7d5bc09feaea3d8a0bf148e2fcf7ff5a7 (diff)
downloadcrawl-ref-759d9c1e18f28af3d2e8f1bfc234ec25dcfc2081.tar.gz
crawl-ref-759d9c1e18f28af3d2e8f1bfc234ec25dcfc2081.zip
Bushes -- tree-like monsters than can be destroyed with any means of damage,
and are much easier to set on fire than trees.
-rw-r--r--crawl-ref/source/beam.cc23
-rw-r--r--crawl-ref/source/dat/database/quotes.txt7
-rw-r--r--crawl-ref/source/dat/descript/monsters.txt4
-rw-r--r--crawl-ref/source/enum.h1
-rw-r--r--crawl-ref/source/externs.h2
-rw-r--r--crawl-ref/source/losparam.cc3
-rw-r--r--crawl-ref/source/mon-data.h11
-rw-r--r--crawl-ref/source/mon-util.cc14
8 files changed, 46 insertions, 19 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index d323bb995a..33f810a08b 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2229,25 +2229,16 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted,
if (doFlavouredEffects)
simple_monster_message(monster, " resists.");
}
- else if (original < hurted)
+ else if (original < hurted && doFlavouredEffects)
{
if (mons_is_icy(monster->type))
- {
- if (doFlavouredEffects)
- simple_monster_message(monster, " melts!");
- }
+ simple_monster_message(monster, " melts!");
+ else if (monster->type == MONS_BUSH)
+ simple_monster_message(monster, " is on fire!");
+ else if (pbolt.flavour == BEAM_FIRE)
+ simple_monster_message(monster, " is burned terribly!");
else
- {
- if (doFlavouredEffects)
- {
- if (pbolt.flavour == BEAM_FIRE)
- simple_monster_message(monster,
- " is burned terribly!");
- else
- simple_monster_message(monster,
- " is scalded terribly!");
- }
- }
+ simple_monster_message(monster, " is scalded terribly!");
}
break;
diff --git a/crawl-ref/source/dat/database/quotes.txt b/crawl-ref/source/dat/database/quotes.txt
index c9dd161661..1de77e5784 100644
--- a/crawl-ref/source/dat/database/quotes.txt
+++ b/crawl-ref/source/dat/database/quotes.txt
@@ -546,6 +546,13 @@ bumblebee
From every opening Flower!"
-Isaac Watts. 1715.
%%%%
+bush
+
+"And the angel of the LORD appeared unto him in a flame of fire out of the
+ midst of a bush: and he looked, and, behold, the bush burned with fire, and
+ the bush was not consumed."
+ -KJV Bible, Ex3:2.
+%%%%
butterfly
"Happiness is a butterfly, which when pursued, is always just beyond your
diff --git a/crawl-ref/source/dat/descript/monsters.txt b/crawl-ref/source/dat/descript/monsters.txt
index 0908bacdc5..870c96c8f7 100644
--- a/crawl-ref/source/dat/descript/monsters.txt
+++ b/crawl-ref/source/dat/descript/monsters.txt
@@ -412,6 +412,10 @@ brown ooze
A viscous liquid, flowing along the floor in search of organic matter to corrode.
%%%%
+bush
+
+A woody plant that, unlike trees, can be removed even with bare hands. It looks dry enough to be easily set on fire.
+%%%%
water moccasin
A largish venomous brown snake. It usually lives near water, and is an able swimmer.
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 9fdfcfc2b0..d20cb38008 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1870,6 +1870,7 @@ enum monster_type // (int) menv[].type
MONS_FLAMING_CORPSE,
MONS_HARPY,
MONS_TOADSTOOL, // 198
+ MONS_BUSH,
//jmf: end new monsters
MONS_WHITE_IMP = 220, // 220
MONS_LEMURE,
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index c675520e37..0a7d1ff3ba 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1335,7 +1335,7 @@ public:
void scale_hp(int num, int den);
bool gain_exp(int exp);
- void react_to_damage(int damage, beam_type flavour);
+ void react_to_damage(int damage, beam_type flavour, kill_category whose);
void forget_random_spell();
diff --git a/crawl-ref/source/losparam.cc b/crawl-ref/source/losparam.cc
index f19412616e..3e9d09390a 100644
--- a/crawl-ref/source/losparam.cc
+++ b/crawl-ref/source/losparam.cc
@@ -92,6 +92,7 @@ unsigned short los_param_base::cloud_idx(const coord_def& p) const
opacity_type los_param_base::opacity(const coord_def& p) const
{
+ int m;
dungeon_feature_type f = feature(p);
if (grid_is_opaque(f))
return OPC_OPAQUE;
@@ -99,6 +100,8 @@ opacity_type los_param_base::opacity(const coord_def& p) const
return OPC_HALF;
else if (f == DNGN_TREES)
return OPC_HALF;
+ else if ((m = mgrd(trans(p))) && menv[m].type == MONS_BUSH)
+ return OPC_HALF;
else
return OPC_CLEAR;
}
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index 106987988f..8cabf9b596 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -2520,6 +2520,17 @@ static monsterentry mondata[] = {
HT_LAND, 10, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_SMALL
},
+{
+ MONS_BUSH, 'P', BROWN, "bush",
+ M_NO_EXP_GAIN | M_STATIONARY,
+ MR_RES_POISON | MR_VUL_FIRE | MR_RES_ASPHYX,
+ 0, 10, MONS_BUSH, MONS_BUSH, MH_PLANT, MAG_IMMUNE,
+ { AT_NO_ATK, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
+ { 20, 3, 5, 0 },
+ 30, 0, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_PLANT,
+ HT_LAND, 0, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_BIG
+},
+
// queen insects ('Q')
{
MONS_QUEEN_BEE, 'Q', YELLOW, "queen bee",
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index e5c4cca512..28f50718d4 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -25,6 +25,7 @@ REVISION("$Rev$");
#include "artefact.h"
#include "beam.h"
+#include "cloud.h"
#include "database.h"
#include "debug.h"
#include "delay.h"
@@ -6292,7 +6293,11 @@ int monsters::hurt(const actor *agent, int amount, beam_type flavour,
// Allow the victim to exhibit passive damage behaviour (royal
// jelly).
- react_to_damage(amount, flavour);
+ kill_category whose = (agent == NULL) ? KC_OTHER :
+ (agent->atype() == ACT_PLAYER) ? KC_YOU :
+ mons_friendly_real((monsters*)agent) ? KC_FRIENDLY :
+ KC_OTHER;
+ react_to_damage(amount, flavour, whose);
}
if (cleanup_dead && (hit_points <= 0 || hit_dice <= 0) && type != -1)
@@ -8441,7 +8446,7 @@ item_type_id_state_type monsters::drink_potion_effect(potion_type ptype)
return (ident);
}
-void monsters::react_to_damage(int damage, beam_type flavour)
+void monsters::react_to_damage(int damage, beam_type flavour, kill_category whose)
{
if (!alive())
return;
@@ -8507,6 +8512,11 @@ void monsters::react_to_damage(int damage, beam_type flavour)
menv[number].hurt(&you, damage, flavour);
}
}
+ else if (type == MONS_BUSH && flavour == BEAM_FIRE
+ && damage>8 && x_chance_in_y(damage, 20))
+ {
+ place_cloud(CLOUD_FIRE, pos(), 20+random2(15), whose, 5);
+ }
}
/////////////////////////////////////////////////////////////////////////