summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-15 10:57:23 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-15 10:57:23 +0000
commit79282d0e5bbed27cc5df50413bfd2d9db0874fd3 (patch)
tree89e21722bdc18717d02adcb409076ea6ddee7619 /crawl-ref/source/monstuff.cc
parent4140d2abd9dfcd9cdda476fc4722067beefe0426 (diff)
downloadcrawl-ref-79282d0e5bbed27cc5df50413bfd2d9db0874fd3.tar.gz
crawl-ref-79282d0e5bbed27cc5df50413bfd2d9db0874fd3.zip
FR #2424917: holy monsters should drop non-summoned items when they die rather
than taking their entire inventory with them. If a monster drops/fires/throws a summoned item the item will vanish (assuming it's not a fired/thrown item which returns to the monster). Don't generate summoned monsters with throwing nets since the net will disappear as soon as it hits the target. If a monster drops an item onto a item destroying grid the item will be destroyed, accompanied by the approriate sound. This should never happen, since monsters only drop items in order to pick up another one, and they can't pick up items off of item destroying grids since there won't be any items there, but maybe in the future confused monsters will spontaneously drop items or something. Don't let orcs use orc-slaying weapons or draconians use dragon-slaying weapons. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7836 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc51
1 files changed, 10 insertions, 41 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 9c349d3d3a..0753e6dac4 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -920,60 +920,29 @@ void _monster_die_cloud(const monsters* monster, bool corpse, bool silent,
if (!summoned)
return;
- std::string prefix;
- std::string msg = " disappears in a puff of smoke!";
- cloud_type cloud = random_smoke_type();
- int dur = 1 + random2(3);
-
+ std::string prefix = " ";
if (corpse)
{
if (mons_weight(mons_species(monster->type)) == 0)
return;
- prefix = "'s corpse";
+ prefix = "'s corpse ";
}
- switch(summon_type)
- {
- case SPELL_SHADOW_CREATURES:
- msg = " disolves into shadows!";
- cloud = CLOUD_NONE;
- break;
-
- case MON_SUMM_CHAOS:
- msg = " degenerates into a cloud of primal chaos!";
- cloud = CLOUD_CHAOS;
- break;
-
- case MON_SUMM_WRATH:
- case MON_SUMM_AID:
- if (is_good_god(monster->god))
- {
- msg = " disolves into sparkling lights!";
- cloud = CLOUD_NONE;
- }
- break;
- }
+ std::string msg = summoned_poof_msg(monster);
+ msg += "!";
- if (monster->god == GOD_XOM && one_chance_in(10)
- || cloud != CLOUD_NONE && monster->type == MONS_CHAOS_SPAWN)
- {
- msg = " degenerates into a cloud of primal chaos!";
+ cloud_type cloud = CLOUD_NONE;
+ if (msg.find("smoke") != std::string::npos)
+ cloud = random_smoke_type();
+ else if (msg.find("chaos") != std::string::npos)
cloud = CLOUD_CHAOS;
- }
-
- if (mons_is_holy(monster) && summon_type != SPELL_SHADOW_CREATURES
- && summon_type != MON_SUMM_CHAOS)
- {
- msg = " disolves into sparkling lights!";
- cloud = CLOUD_NONE;
- }
if (!silent)
simple_monster_message(monster, (prefix + msg).c_str());
if (cloud != CLOUD_NONE)
- place_cloud( cloud, monster->pos(), dur,
+ place_cloud( cloud, monster->pos(), 1 + random2(3),
monster->kill_alignment() );
}
@@ -1002,7 +971,7 @@ void monster_die(monsters *monster, killer_type killer,
const bool gives_xp = !summoned
&& !mons_enslaved_body_and_soul(monster);
- const bool drop_items = !hard_reset && !mons_is_holy(monster);
+ const bool drop_items = !hard_reset;
const bool mons_reset( killer == KILL_RESET || killer == KILL_DISMISSED );