summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-06 01:04:43 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-06 01:04:43 +0000
commitc9280b209b895d9ce902114acd2ba527b002049c (patch)
treec1f3313afb08df45f86551df9c9009c19a530cd6 /crawl-ref/source/fight.cc
parent6130fccaade80830ca14374b7803a5aa0ef6dfe5 (diff)
downloadcrawl-ref-c9280b209b895d9ce902114acd2ba527b002049c.tar.gz
crawl-ref-c9280b209b895d9ce902114acd2ba527b002049c.zip
Add the flaming corpse monster, as specified in FR [1746720], with
several tweaks: its resistances are the inverse of the freezing wraith's, but with sticky flame resistance added, and its console character is a lightred 'z'. As specified, it uses a sticky flame melee attack: AF_NAPALM. Note that it needs a tile. Also, expand the list of servants that Yredelemnul can send, as specified by Lemuel awhile ago (including the flaming corpse). This expansion allows the sending of more than one creature per instance, currently only used for Yred's flying skulls. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6873 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc29
1 files changed, 26 insertions, 3 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index f0ce3aaaa4..f9b7c40db2 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1885,6 +1885,7 @@ static bool is_boolean_resist(beam_type flavour)
switch (flavour)
{
case BEAM_ELECTRICITY:
+ case BEAM_NAPALM:
return (true);
default:
return (false);
@@ -1928,9 +1929,9 @@ int resist_adjust_damage(actor *defender, beam_type flavour,
const bool monster = (defender->atype() == ACT_MONSTER);
- // Check if this is a resist that pretends to be boolean for
- // damage purposes - only electricity at the moment, raw poison
- // damage uses the normal formula.
+ // Check if this is a resist that pretends to be boolean for damage
+ // damage purposes - only electricity and sticky flame (napalm) at
+ // the moment, raw poison damage uses the normal formula.
int res_base = (is_boolean_resist(flavour) ? 2 : 1);
const int resistible_fraction = get_resistible_fraction(flavour);
@@ -3833,6 +3834,28 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk)
defender->go_berserk(false);
break;
+
+ case AF_NAPALM:
+ if (one_chance_in(20) || (damage_done > 0 && one_chance_in(3)))
+ {
+ if (needs_message)
+ {
+ mprf("%s %s covered in liquid flames%s",
+ def_name(DESC_CAP_THE).c_str(),
+ defender->conj_verb("are").c_str(),
+ special_attack_punctuation().c_str());
+ }
+
+ if (defender->atype() == ACT_PLAYER)
+ sticky_flame_player();
+ else
+ {
+ sticky_flame_monster(monster_index(def),
+ mons_friendly(atk) ? KC_FRIENDLY : KC_OTHER,
+ std::min(4, 1 + random2(atk->hit_dice) / 2));
+ }
+ }
+ break;
}
}