diff options
-rw-r--r-- | crawl-ref/source/spells2.cc | 75 | ||||
-rw-r--r-- | crawl-ref/source/spells2.h | 7 | ||||
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 36 |
3 files changed, 52 insertions, 66 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 75cf0030a2..5fdfeee380 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -1567,8 +1567,10 @@ bool summon_general_creature(int pow, bool quiet, monster_type mon, msg = "A very ugly thing appears."; break; - case MONS_DRAGON: - msg = "A dragon appears."; + case MONS_WRAITH: + case MONS_FREEZING_WRAITH: + case MONS_SPECTRAL_WARRIOR: + msg = "An insubstantial figure forms in the air."; break; case MONS_ANGEL: @@ -1579,6 +1581,10 @@ bool summon_general_creature(int pow, bool quiet, monster_type mon, msg = "You are momentarily dazzled by a brilliant golden light."; break; + case MONS_DRAGON: + msg = "A dragon appears."; + break; + default: { msg = "A demon appears!"; @@ -1587,7 +1593,12 @@ bool summon_general_creature(int pow, bool quiet, monster_type mon, } if (beha == BEH_HOSTILE) - msg += " It doesn't look very happy."; + { + if (mons_class_holiness(mon) == MH_UNDEAD) + msg = "You sense a hostile presence."; + else + msg += " It doesn't look very happy."; + } int monster = create_monster( @@ -1604,7 +1615,19 @@ bool summon_general_creature(int pow, bool quiet, monster_type mon, monsters *summon = &menv[monster]; - if (mon == MONS_DAEVA) + if (mons_class_holiness(mon) == MH_UNDEAD) + { + //jmf: Kiku sometimes deflects this + if (!you.is_undead + && !(you.religion == GOD_KIKUBAAQUDGHA + && (!player_under_penance() + && you.piety >= piety_breakpoint(3) + && you.piety > random2(MAX_PIETY)))) + { + disease_player(25 + random2(50)); + } + } + else if (mon == MONS_DAEVA) summon->flags |= MF_ATT_CHANGE_ATTEMPT; } else @@ -1776,50 +1799,6 @@ bool summon_swarm(int pow, beh_type beha, bool god_gift) return (success); } -void summon_undead(int pow) -{ - int temp_rand = 0; - monster_type mon = MONS_PROGRAM_BUG; - - int numsc = 1 + random2(pow) / 30 + random2(pow) / 30; - numsc = stepdown_value(numsc, 2, 2, 6, 8); //see stuff.cc {dlb} - - mpr("You call on the undead to aid you!"); - - for (int scount = 0; scount < numsc; ++scount) - { - temp_rand = random2(25); - - mon = ((temp_rand > 8) ? MONS_WRAITH : // 64% - (temp_rand > 3) ? MONS_FREEZING_WRAITH // 20% - : MONS_SPECTRAL_WARRIOR); // 16% - - bool friendly = (random2(pow) > 5); - - if (create_monster( - mgen_data(mon, - friendly ? BEH_FRIENDLY : BEH_HOSTILE, 5, - you.pos(), - friendly ? you.pet_target : MHITYOU)) != -1) - { - if (friendly) - mpr("An insubstantial figure forms in the air."); - else - mpr("You sense a hostile presence."); - } - } - - //jmf: Kiku sometimes deflects this - if (!you.is_undead - && !(you.religion == GOD_KIKUBAAQUDGHA - && (!player_under_penance() - && you.piety >= piety_breakpoint(3) - && you.piety > random2(MAX_PIETY)))) - { - disease_player( 25 + random2(50) ); - } -} // end summon_undead() - void summon_things( int pow ) { int big_things = 0; diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h index 3a3a284b48..35fe1cc645 100644 --- a/crawl-ref/source/spells2.h +++ b/crawl-ref/source/spells2.h @@ -168,13 +168,6 @@ void summon_things(int pow); // last updated 24may2000 {dlb} /* *********************************************************************** - * called from: spell - * *********************************************************************** */ -void summon_undead(int pow); - - -// last updated 24may2000 {dlb} -/* *********************************************************************** * called from: ability - spell * *********************************************************************** */ void turn_undead(int pow); // what should I use for pow? diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 4f06a72d4d..932efbb0fb 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1446,10 +1446,6 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) vampiric_drain(powc, spd); break; - case SPELL_SUMMON_WRAITHS: - summon_undead(powc); - break; - case SPELL_DETECT_ITEMS: mprf("You detect %s", (detect_items(powc) > 0) ? "items!" : "nothing."); @@ -1492,8 +1488,10 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) case SPELL_CALL_CANINE_FAMILIAR: case SPELL_SUMMON_ICE_BEAST: case SPELL_SUMMON_UGLY_THING: + case SPELL_SUMMON_WRAITHS: case SPELL_SUMMON_GUARDIAN: case SPELL_SUMMON_DAEVA: + case SPELL_SUMMON_DRAGON: { bool quiet = (spell == SPELL_SUMMON_BUTTERFLIES @@ -1507,18 +1505,21 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) || spell == SPELL_DEMONIC_HORDE || spell == SPELL_CALL_CANINE_FAMILIAR || spell == SPELL_SUMMON_UGLY_THING) ? 3 : - (spell == SPELL_SUMMON_DRAGON) ? 5 + (spell == SPELL_SUMMON_WRAITHS + || spell == SPELL_SUMMON_DRAGON) ? 5 : -1; int numsc = (spell == SPELL_SUMMON_BUTTERFLIES - || spell == SPELL_SUMMON_SCORPIONS) ? 3 + || spell == SPELL_SUMMON_SCORPIONS) ? 3 : + (spell == SPELL_SUMMON_WRAITHS) ? 5 : -1; int how_many = (spell == SPELL_SUMMON_BUTTERFLIES) ? std::max(15, 4 + random2(3) + random2(powc) / 10) : (spell == SPELL_SUMMON_SCORPIONS) ? stepdown_value(1 + random2(powc) / 10 + random2(powc) / 10, 2, 2, 6, 8) : - (spell == SPELL_DEMONIC_HORDE) ? 7 + random2(5) + (spell == SPELL_DEMONIC_HORDE) ? 7 + random2(5) : + (spell == SPELL_SUMMON_WRAITHS) ? stepdown_value(1 + random2(powc) / 30 + random2(powc) / 30, 2, 2, 6, 8) : 1; for (int i = 0; i < how_many; ++i) @@ -1541,8 +1542,6 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) case SPELL_SUMMON_DEMON: case SPELL_DEMONIC_HORDE: - if (i == 0) - mpr("You open a gate to Pandemonium!"); mon = summon_any_demon( (spell == SPELL_DEMONIC_HORDE) ? DEMON_LESSER : DEMON_COMMON); @@ -1592,9 +1591,14 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) break; } - case SPELL_SUMMON_DRAGON: - mon = MONS_DRAGON; + case SPELL_SUMMON_WRAITHS: + { + const int chance = random2(25); + mon = ((chance > 8) ? MONS_WRAITH : // 64% + (chance > 3) ? MONS_FREEZING_WRAITH // 20% + : MONS_SPECTRAL_WARRIOR); // 16% break; + } case SPELL_SUMMON_GUARDIAN: mon = MONS_ANGEL; @@ -1604,10 +1608,20 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) mon = MONS_DAEVA; break; + case SPELL_SUMMON_DRAGON: + mon = MONS_DRAGON; + break; + default: break; } + if (i == 0 && (spell == SPELL_SUMMON_DEMON || + spell == SPELL_DEMONIC_HORDE)) + { + mpr("You open a gate to Pandemonium!"); + } + summon_general_creature(powc, quiet, mon, BEH_FRIENDLY, unfriendly, numsc, false); } |