diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-07 02:19:32 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-07 02:19:32 +0000 |
commit | 4e98aa96f6a58cfe20275ff1e40c16f411ee1f2e (patch) | |
tree | 9eecc18253ba10cc523c033b0be228ebecd5587b | |
parent | 679f7173c733b733c431bf9424ab3e4de8e70fce (diff) | |
download | crawl-ref-4e98aa96f6a58cfe20275ff1e40c16f411ee1f2e.tar.gz crawl-ref-4e98aa96f6a58cfe20275ff1e40c16f411ee1f2e.zip |
Simplify.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5512 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/spells2.cc | 33 | ||||
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 18 |
2 files changed, 27 insertions, 24 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 1fe62dd439..5af5bf96d3 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -1540,22 +1540,31 @@ bool summon_general_creature(int pow, monster_type mon, beh_type beha, switch (mon) { - case MONS_ICE_BEAST: - mpr("A chill wind blows around you."); - break; - case MONS_IMP: - mpr("A beastly little devil appears in a puff of flame."); - break; - case MONS_WHITE_IMP: - mpr("A beastly little devil appears in a puff of frigid air."); + { + const char *suffix = (mon == MONS_WHITE_IMP) ? "frigid air" : "flame"; + + mprf("A beastly little devil appears in a puff of %s.", suffix); break; + } case MONS_SHADOW_IMP: mpr("A shadowy apparition takes form in the air."); break; + case MONS_ICE_BEAST: + mpr("A chill wind blows around you."); + break; + + case MONS_ANGEL: + mpr("You open a gate to Zin's realm!"); + break; + + case MONS_DAEVA: + mpr("You are momentarily dazzled by a brilliant golden light."); + break; + case MONS_UGLY_THING: case MONS_VERY_UGLY_THING: { @@ -1573,14 +1582,6 @@ bool summon_general_creature(int pow, monster_type mon, beh_type beha, break; } - case MONS_ANGEL: - mpr("You open a gate to Zin's realm!"); - break; - - case MONS_DAEVA: - mpr("You are momentarily dazzled by a brilliant golden light."); - break; - default: { bool friendly = (random2(pow) > 3); diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 9bd94d7473..c1da593dcd 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1508,14 +1508,6 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) mon = MONS_ICE_BEAST; break; - case SPELL_SUMMON_UGLY_THING: - { - const int chance = std::max(6 - (powc / 12), 1); - mon = (one_chance_in(chance)) ? MONS_VERY_UGLY_THING - : MONS_UGLY_THING; - break; - } - case SPELL_SUMMON_GUARDIAN: mon = MONS_ANGEL; break; @@ -1524,6 +1516,16 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) mon = MONS_DAEVA; break; + // Starting here, there's a chance of monsters' being + // unfriendly. + case SPELL_SUMMON_UGLY_THING: + { + const int chance = std::max(6 - (powc / 12), 1); + mon = (one_chance_in(chance)) ? MONS_VERY_UGLY_THING + : MONS_UGLY_THING; + break; + } + default: break; } |