Skip to content

Commit

Permalink
Make temporary mutation apply multiple levels of a bad mutation
Browse files Browse the repository at this point in the history
And replace demonspawn corrupters' corrupt body spell with a single-target
version of the wretched star spell, instead of their hand-picked list of
"corrupt" mutations. Wretched stars and demonspawn corrupters now attempt to
apply 2 levels of a bad mutation (with a chance of trying to do so twice).
  • Loading branch information
Chris Campbell committed Jan 5, 2016
1 parent a6cb66c commit f6225c7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 29 deletions.
2 changes: 1 addition & 1 deletion crawl-ref/source/beam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3738,7 +3738,7 @@ void bolt::affect_player_enchantment(bool resistible)
case BEAM_CORRUPT_BODY:
if (temp_mutate(RANDOM_CORRUPT_MUTATION, "corrupt body"))
{
if (one_chance_in(5))
if (one_chance_in(4))
temp_mutate(RANDOM_CORRUPT_MUTATION, "corrupt body");
mprf(MSGCH_WARN, "A corruption grows within you!");
}
Expand Down
6 changes: 3 additions & 3 deletions crawl-ref/source/dat/descript/spells.txt
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ Fires a penetrating bolt of acid.
%%%%
Corrupt Body spell

Instills a corruption within a target, temporarily mutating their body in a
particularly adverse fashion. It cannot affect artificial beings, and the
undead will decompose if affected.
Instills a corruption within a target, temporarily mutating their body in an
adverse fashion. It cannot affect artificial beings, and the undead will
decompose if affected.
%%%%
Corrupting Pulse spell

Expand Down
4 changes: 2 additions & 2 deletions crawl-ref/source/mon-cast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2937,9 +2937,9 @@ static void _corrupting_pulse(monster *mons)
if (!is_sanctuary(you.pos())
&& cell_see_cell(you.pos(), mons->pos(), LOS_SOLID))
{
int num_mutations = 2 + random2(3);
int num_mutations = one_chance_in(4) ? 2 : 1;
for (int i = 0; i < num_mutations; ++i)
temp_mutate(RANDOM_BAD_MUTATION, "wretched star");
temp_mutate(RANDOM_CORRUPT_MUTATION, "wretched star");
}
}

Expand Down
16 changes: 8 additions & 8 deletions crawl-ref/source/mutation-data.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static const mutation_def mut_data[] =
},

{ MUT_HEAT_VULNERABILITY, 0, 3,
mutflag::BAD | mutflag::CORRUPT | mutflag::QAZLAL, true,
mutflag::BAD | mutflag::QAZLAL, true,
"heat vulnerability",

{"You are vulnerable to heat.",
Expand All @@ -171,7 +171,7 @@ static const mutation_def mut_data[] =
},

{ MUT_COLD_VULNERABILITY, 0, 3,
mutflag::BAD | mutflag::CORRUPT | mutflag::QAZLAL, true,
mutflag::BAD | mutflag::QAZLAL, true,

"cold vulnerability",

Expand Down Expand Up @@ -246,7 +246,7 @@ static const mutation_def mut_data[] =
"regeneration",
},

{ MUT_SLOW_REGENERATION, 3, 3, mutflag::BAD | mutflag::CORRUPT, false,
{ MUT_SLOW_REGENERATION, 3, 3, mutflag::BAD, false,
"slow regeneration",

{"You regenerate slowly when monsters are visible.",
Expand Down Expand Up @@ -431,7 +431,7 @@ static const mutation_def mut_data[] =
},

{ MUT_DEFORMED, 8, 1,
mutflag::BAD | mutflag::XOM | mutflag::CORRUPT,
mutflag::BAD | mutflag::XOM,
true,
"deformed body",

Expand Down Expand Up @@ -591,7 +591,7 @@ static const mutation_def mut_data[] =
"berserk rage",
},

{ MUT_DETERIORATION, 10, 2, mutflag::BAD | mutflag::XOM | mutflag::CORRUPT, false,
{ MUT_DETERIORATION, 10, 2, mutflag::BAD | mutflag::XOM, false,
"deterioration",

{"Your body sometimes deteriorates upon taking damage.",
Expand All @@ -609,7 +609,7 @@ static const mutation_def mut_data[] =
"deteriorating body",
},

{ MUT_BLURRY_VISION, 10, 3, mutflag::BAD | mutflag::XOM | mutflag::CORRUPT, false,
{ MUT_BLURRY_VISION, 10, 3, mutflag::BAD | mutflag::XOM, false,
"blurry vision",

{"Scrolls take you a little longer to read.",
Expand Down Expand Up @@ -664,7 +664,7 @@ static const mutation_def mut_data[] =
},

{ MUT_FRAIL, 10, 3,
mutflag::BAD | mutflag::XOM | mutflag::CORRUPT, false,
mutflag::BAD | mutflag::XOM, false,
"frail",

{"You are frail (-10% HP).",
Expand Down Expand Up @@ -1059,7 +1059,7 @@ static const mutation_def mut_data[] =
"increased magical capacity (+10% MP)",
},

{ MUT_LOW_MAGIC, 9, 3, mutflag::BAD | mutflag::CORRUPT, false,
{ MUT_LOW_MAGIC, 9, 3, mutflag::BAD, false,
"low mp",

{"Your magical capacity is low (-10% MP).",
Expand Down
16 changes: 4 additions & 12 deletions crawl-ref/source/mutation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ enum class mutflag
JIYVA = 1 << 2, // jiyva-only muts
QAZLAL = 1 << 3, // qazlal wrath
XOM = 1 << 4, // xom being xom
CORRUPT = 1 << 5, // wretched stars

LAST = CORRUPT
LAST = XOM
};
DEF_BITFIELD(mutflags, mutflag, 5);
DEF_BITFIELD(mutflags, mutflag, 4);
COMPILE_CHECK(mutflags::exponent(mutflags::last_exponent) == mutflag::LAST);

#include "mutation-data.h"
Expand Down Expand Up @@ -187,7 +186,6 @@ static int _mut_weight(const mutation_def &mut, mutflag use)
case mutflag::JIYVA:
case mutflag::QAZLAL:
case mutflag::XOM:
case mutflag::CORRUPT:
return 1;
case mutflag::GOOD:
case mutflag::BAD:
Expand Down Expand Up @@ -857,11 +855,6 @@ static mutation_type _get_random_xom_mutation()
return mutat;
}

static mutation_type _get_random_corrupt_mutation()
{
return _get_mut_with_use(mutflag::CORRUPT);
}

static mutation_type _get_random_qazlal_mutation()
{
return _get_mut_with_use(mutflag::QAZLAL);
Expand All @@ -879,6 +872,7 @@ static mutation_type _get_random_mutation(mutation_type mutclass)
mt = x_chance_in_y(3, 5) ? mutflag::GOOD : mutflag::BAD;
break;
case RANDOM_BAD_MUTATION:
case RANDOM_CORRUPT_MUTATION:
mt = mutflag::BAD;
break;
case RANDOM_GOOD_MUTATION:
Expand Down Expand Up @@ -1311,6 +1305,7 @@ bool mutate(mutation_type which_mutation, const string &reason, bool failMsg,
case RANDOM_MUTATION:
case RANDOM_GOOD_MUTATION:
case RANDOM_BAD_MUTATION:
case RANDOM_CORRUPT_MUTATION:
mutat = _get_random_mutation(which_mutation);
break;
case RANDOM_XOM_MUTATION:
Expand All @@ -1319,9 +1314,6 @@ bool mutate(mutation_type which_mutation, const string &reason, bool failMsg,
case RANDOM_SLIME_MUTATION:
mutat = _get_random_slime_mutation();
break;
case RANDOM_CORRUPT_MUTATION:
mutat = _get_random_corrupt_mutation();
break;
case RANDOM_QAZLAL_MUTATION:
mutat = _get_random_qazlal_mutation();
break;
Expand Down
4 changes: 1 addition & 3 deletions crawl-ref/source/wiz-you.cc
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ bool wizard_add_mutation()
const bool god_gift = (answer == 1);

msgwin_get_line("Which mutation (name, 'good', 'bad', 'any', "
"'xom', 'slime', 'corrupt', 'qazlal')? ",
"'xom', 'slime', 'qazlal')? ",
specs, sizeof(specs));

if (specs[0] == '\0')
Expand All @@ -626,8 +626,6 @@ bool wizard_add_mutation()
mutat = RANDOM_XOM_MUTATION;
else if (spec == "slime")
mutat = RANDOM_SLIME_MUTATION;
else if (spec == "corrupt")
mutat = RANDOM_CORRUPT_MUTATION;
else if (spec == "qazlal")
mutat = RANDOM_QAZLAL_MUTATION;

Expand Down

0 comments on commit f6225c7

Please sign in to comment.