diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-12 14:39:38 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-12 14:39:38 +0000 |
commit | 1bff3c05ddd42eda0d5310b4d1f2671aae52815d (patch) | |
tree | f368dee0160428d811be9f91e403a5cdec83c3c8 /crawl-ref/source/acr.cc | |
parent | a6faebe0c260af46518fa09ed6fce3992ce478a2 (diff) | |
download | crawl-ref-1bff3c05ddd42eda0d5310b4d1f2671aae52815d.tar.gz crawl-ref-1bff3c05ddd42eda0d5310b4d1f2671aae52815d.zip |
Implement the Petrify spell in a rather basic variant, and replace the
player spell "Paralyse" with it, i.e. not the wand/potion/misc. effects.
Petrify is a 4th level spell of the Enchantment/Transmigrations school
(a unique combination, I believe), all other values (incl. the level)
were shamelessly stolen from Paralysis.
Anyway, it consists of two elements (so I actually added TWO new
enchantments), Petrifying and Petrified.
A monster that is petrifying cannot move around but can perform actions
like hitting adjacent monsters or casting spells at a slowed rate (1.5
of the normal cost). Once this sub-enchantment runs out (happens faster)
the monster cannot move or act anymore, so it works like Paralysis. The
damage you do during stabbing is one third of what you'd do otherwise,
for both states of enchantment, and for both stabbing counts as
unchivalric behaviour.
It has not been implemented as a monster spell, and ghosts of characters
that had it will use Paralyse instead. Consequently, the effect on the
player (in self targetting) only handles the Petrified part.
Numbers, esp. enchantment timeout, will need tweaking. They're currently
Petrifying:
cturn = 50 / _mod_speed(10, mons->speed);
Petrified:
cturn = std::max(8, 150 / (1 + modded_speed(mons, 5)))
because I wanted the first to always run out faster than the second, but
at the same time make the ratio of Petrifying/Petrified tilt in favour
of the first for powerful monsters. The numbers are more or less made
up, and tested with different monsters in wizard mode. Still, could be
anything between too weak and overpowered, though the latter is more
likely.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5761 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r-- | crawl-ref/source/acr.cc | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 2ec9fb0cce..fdbd08193e 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -2462,14 +2462,14 @@ static bool _decrement_a_duration(duration_type dur, const char* endmsg = NULL, you.duration[dur]--; if (you.duration[dur] == midpoint) { - if ( midmsg ) + if (midmsg) mpr(midmsg, chan); you.duration[dur] -= midloss; } } else if (you.duration[dur] == 1) { - if ( endmsg ) + if (endmsg) mpr(endmsg, chan); rc = true; @@ -2593,7 +2593,7 @@ static void _decrement_durations() } } - //jmf: more flexible weapon branding code + //jmf: More flexible weapon branding code. if (you.duration[DUR_WEAPON_BRAND] > 1) you.duration[DUR_WEAPON_BRAND]--; else if (you.duration[DUR_WEAPON_BRAND] == 1) @@ -2656,7 +2656,7 @@ static void _decrement_durations() } } - // must come after transformation duration + // Must come after transformation duration. _decrement_a_duration(DUR_BREATH_WEAPON, "You have got your breath back.", -1, 0, NULL, MSGCH_RECOVERY); @@ -2717,7 +2717,7 @@ static void _decrement_durations() if ( _decrement_a_duration(DUR_TELEPORT) ) { - // only to a new area of the abyss sometimes (for abyss teleports) + // Only to a new area of the abyss sometimes (for abyss teleports). you_teleport_now( true, one_chance_in(5) ); untag_followers(); } @@ -2748,8 +2748,17 @@ static void _decrement_durations() _decrement_a_duration(DUR_BARGAIN, "You feel less charismatic."); _decrement_a_duration(DUR_CONF, "You feel less confused."); - if (_decrement_a_duration(DUR_PARALYSIS, "You can move again.")) - you.redraw_evasion = true; + if (you.duration[DUR_PARALYSIS] || you.duration[DUR_PETRIFIED]) + { + _decrement_a_duration(DUR_PARALYSIS); + _decrement_a_duration(DUR_PETRIFIED); + + if (!you.duration[DUR_PARALYSIS] && !you.duration[DUR_PETRIFIED]) + { + mpr("You can move again.", MSGCH_DURATION); + you.redraw_evasion = true; + } + } _decrement_a_duration(DUR_EXHAUSTED, "You feel less fatigued."); @@ -2774,7 +2783,7 @@ static void _decrement_durations() if (_decrement_a_duration(DUR_BERSERKER, "You are no longer berserk.")) { - //jmf: guilty for berserking /after/ berserk + //jmf: Guilty for berserking /after/ berserk. did_god_conduct( DID_STIMULANTS, 6 + random2(6) ); // Sometimes berserk leaves us physically drained. @@ -2804,23 +2813,26 @@ static void _decrement_durations() { mpr("Trog's vigour flows through your veins."); } - else if ( one_chance_in(chance) ) + else if (one_chance_in(chance)) { mpr("You pass out from exhaustion.", MSGCH_WARN); you.duration[DUR_PARALYSIS] += roll_dice( 1, 4 ); } } - if ( you.duration[DUR_PARALYSIS] == 0 ) + if (you.duration[DUR_PARALYSIS] == 0 + && you.duration[DUR_PETRIFIED] == 0) + { mpr("You are exhausted.", MSGCH_WARN); + } - // this resets from an actual penalty or from NO_BERSERK_PENALTY + // This resets from an actual penalty or from NO_BERSERK_PENALTY. you.berserk_penalty = 0; int dur = 12 + roll_dice( 2, 12 ); you.duration[DUR_EXHAUSTED] += dur; - // Don't trigger too many tutorial messages + // Don't trigger too many tutorial messages. const bool tut_slow = Options.tutorial_events[TUT_YOU_ENCHANTED]; Options.tutorial_events[TUT_YOU_ENCHANTED] = false; @@ -3148,7 +3160,7 @@ static void _world_reacts() if (you.duration[DUR_FIRE_SHIELD] > 0) manage_fire_shield(); - // food death check: + // Food death check. if (you.is_undead != US_UNDEAD && you.hunger <= 500) { if (!you.cannot_act() && one_chance_in(40)) @@ -4624,7 +4636,7 @@ static void _compile_time_asserts() COMPILE_CHECK(SP_VAMPIRE == 34 , c3); COMPILE_CHECK(SPELL_BOLT_OF_MAGMA == 18 , c4); COMPILE_CHECK(SPELL_POISON_ARROW == 94 , c5); - COMPILE_CHECK(SPELL_SUMMON_MUSHROOMS == 222 , c6); + COMPILE_CHECK(SPELL_SUMMON_MUSHROOMS == 223 , c6); //jmf: NEW ASSERTS: we ought to do a *lot* of these COMPILE_CHECK(NUM_SPELLS < SPELL_NO_SPELL , c7); |