summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreaverb <reaverb.Crawl@gmail.com>2014-05-14 14:30:31 -0400
committerreaverb <reaverb.Crawl@gmail.com>2014-05-14 14:37:19 -0400
commitaec04a413c852d49afe770046d084465d2600762 (patch)
treeb65534ae5ad828759d30c4a86a1e2e26a4e51ecd
parent4a66bc2554fa7ba61a1752e470afd709edcac21e (diff)
downloadcrawl-ref-aec04a413c852d49afe770046d084465d2600762.tar.gz
crawl-ref-aec04a413c852d49afe770046d084465d2600762.zip
Use you.innate_mutation rather than you.innate_mutations
Ditto for you.temp_mutation.
-rw-r--r--crawl-ref/source/acquire.cc2
-rw-r--r--crawl-ref/source/dbg-asrt.cc4
-rw-r--r--crawl-ref/source/ghost.cc2
-rw-r--r--crawl-ref/source/mutation.cc46
-rw-r--r--crawl-ref/source/ng-setup.cc2
-rw-r--r--crawl-ref/source/player.cc8
-rw-r--r--crawl-ref/source/player.h4
-rw-r--r--crawl-ref/source/tags.cc52
-rw-r--r--crawl-ref/source/transform.cc2
-rw-r--r--crawl-ref/source/wiz-you.cc16
10 files changed, 69 insertions, 69 deletions
diff --git a/crawl-ref/source/acquire.cc b/crawl-ref/source/acquire.cc
index 02d03f2f4d..ea1c0599bb 100644
--- a/crawl-ref/source/acquire.cc
+++ b/crawl-ref/source/acquire.cc
@@ -709,7 +709,7 @@ static int _acquirement_wand_subtype()
switch (type)
{
case WAND_HEAL_WOUNDS:
- w = (you.innate_mutations[MUT_NO_DEVICE_HEAL] ? 5 : 25); break;
+ w = (you.innate_mutation[MUT_NO_DEVICE_HEAL] ? 5 : 25); break;
case WAND_HASTING: // each 17.9%, group unknown each 26.3%
w = (you.species == SP_FORMICID ? 5 : 25); break;
case WAND_TELEPORTATION: // each 10.7%, group unknown each 17.6%
diff --git a/crawl-ref/source/dbg-asrt.cc b/crawl-ref/source/dbg-asrt.cc
index 90e32fff0a..a9c345a50b 100644
--- a/crawl-ref/source/dbg-asrt.cc
+++ b/crawl-ref/source/dbg-asrt.cc
@@ -280,8 +280,8 @@ static void _dump_player(FILE *file)
{
mutation_type mut = static_cast<mutation_type>(i);
int normal = you.mutation[i];
- int innate = you.innate_mutations[i];
- int temp = you.temp_mutations[i];
+ int innate = you.innate_mutation[i];
+ int temp = you.temp_mutation[i];
// Normally innate and temp imply normal, but a crash handler should
// expect the spanish^Wunexpected.
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc
index 8fb1341afb..e494a38443 100644
--- a/crawl-ref/source/ghost.cc
+++ b/crawl-ref/source/ghost.cc
@@ -451,7 +451,7 @@ void ghost_demon::init_player_ghost()
else
{
// Unarmed combat.
- if (you.innate_mutations[MUT_CLAWS])
+ if (you.innate_mutation[MUT_CLAWS])
damage += you.experience_level;
damage += you.skills[SK_UNARMED_COMBAT];
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 9cc22bd312..774c6bcb06 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -214,7 +214,7 @@ mutation_activity_type mutation_activity_level(mutation_type mut)
if (you.is_undead == US_SEMI_UNDEAD)
{
// Innate mutations are always active
- if (you.innate_mutations[mut])
+ if (you.innate_mutation[mut])
return MUTACT_FULL;
// ... as are all mutations for semi-undead who are fully alive
@@ -670,7 +670,7 @@ string describe_mutations(bool center_title)
// First add (non-removable) inborn abilities and demon powers.
for (int i = 0; i < NUM_MUTATIONS; i++)
{
- if (you.mutation[i] != 0 && you.innate_mutations[i])
+ if (you.mutation[i] != 0 && you.innate_mutation[i])
{
mutation_type mut_type = static_cast<mutation_type>(i);
result += mutation_desc(mut_type, -1, true);
@@ -694,8 +694,8 @@ string describe_mutations(bool center_title)
// Now add removable mutations.
for (int i = 0; i < NUM_MUTATIONS; i++)
{
- if (you.mutation[i] != 0 && !you.innate_mutations[i]
- && !you.temp_mutations[i])
+ if (you.mutation[i] != 0 && !you.innate_mutation[i]
+ && !you.temp_mutation[i])
{
mutation_type mut_type = static_cast<mutation_type>(i);
result += mutation_desc(mut_type, -1, true);
@@ -707,7 +707,7 @@ string describe_mutations(bool center_title)
//Finally, temporary mutations.
for (int i = 0; i < NUM_MUTATIONS; i++)
{
- if (you.mutation[i] != 0 && you.temp_mutations[i])
+ if (you.mutation[i] != 0 && you.temp_mutation[i])
{
mutation_type mut_type = static_cast<mutation_type>(i);
result += mutation_desc(mut_type, -1, true);
@@ -1062,7 +1062,7 @@ static bool _accept_mutation(mutation_type mutat, bool ignore_rarity = false)
if (ignore_rarity)
return true;
- const int rarity = mdef.rarity + you.innate_mutations[mutat];
+ const int rarity = mdef.rarity + you.innate_mutation[mutat];
// Low rarity means unlikely to choose it.
return x_chance_in_y(rarity, 10);
@@ -1250,7 +1250,7 @@ static int _handle_conflicting_mutations(mutation_type mutation,
if (mutation == a && you.mutation[b] > 0)
{
- if (you.innate_mutations[b] >= you.mutation[b])
+ if (you.innate_mutation[b] >= you.mutation[b])
return -1;
int res = conflict[i][2];
@@ -1805,7 +1805,7 @@ bool mutate(mutation_type which_mutation, const string &reason, bool failMsg,
}
else
{
- you.temp_mutations[mutat]++;
+ you.temp_mutation[mutat]++;
you.attribute[ATTR_TEMP_MUTATIONS]++;
you.attribute[ATTR_TEMP_MUT_XP] =
min(you.experience_level, 17)
@@ -1842,10 +1842,10 @@ static bool _delete_single_mutation_level(mutation_type mutat,
if (you.mutation[mutat] == 0)
return false;
- if (you.innate_mutations[mutat] >= you.mutation[mutat])
+ if (you.innate_mutation[mutat] >= you.mutation[mutat])
return false;
- if (!transient && you.temp_mutations[mutat] >= you.mutation[mutat])
+ if (!transient && you.temp_mutation[mutat] >= you.mutation[mutat])
return false;
const mutation_def& mdef = get_mutation_def(mutat);
@@ -1978,7 +1978,7 @@ bool delete_mutation(mutation_type which_mutation, const string &reason,
continue;
}
- if (you.innate_mutations[mutat] >= you.mutation[mutat])
+ if (you.innate_mutation[mutat] >= you.mutation[mutat])
continue;
// MUT_ANTENNAE is 0, and you.attribute[] is initialized to 0.
@@ -2030,7 +2030,7 @@ bool delete_temp_mutation()
int count = 0;
for (int i = 0; i < NUM_MUTATIONS; i++)
- if (you.temp_mutations[i] > 0 && one_chance_in(++count))
+ if (you.temp_mutation[i] > 0 && one_chance_in(++count))
mutat = static_cast<mutation_type>(i);
#if TAG_MAJOR_VERSION == 34
@@ -2050,7 +2050,7 @@ bool delete_temp_mutation()
if (_delete_single_mutation_level(mutat, "temp mutation expiry", true))
{
- --you.temp_mutations[mutat];
+ --you.temp_mutation[mutat];
--you.attribute[ATTR_TEMP_MUTATIONS];
return true;
}
@@ -2080,7 +2080,7 @@ string mutation_desc(mutation_type mut, int level, bool colour)
|| active == MUTACT_HUNGER && lowered);
const bool fully_inactive = (active == MUTACT_INACTIVE);
- const bool temporary = (you.temp_mutations[mut] > 0);
+ const bool temporary = (you.temp_mutation[mut] > 0);
// level == -1 means default action of current level
if (level == -1)
@@ -2133,7 +2133,7 @@ string mutation_desc(mutation_type mut, int level, bool colour)
}
if (you.species == SP_VAMPIRE && !mdef.physical
- && !you.innate_mutations[mut])
+ && !you.innate_mutation[mut])
{
++_num_hunger_based;
result += colour ? "<lightred>+</lightred>" : "+";
@@ -2149,7 +2149,7 @@ string mutation_desc(mutation_type mut, int level, bool colour)
if (colour)
{
const char* colourname = (mdef.bad ? "red" : "lightgrey");
- const bool permanent = (you.innate_mutations[mut] > 0);
+ const bool permanent = (you.innate_mutation[mut] > 0);
if (innate_upgrade)
{
@@ -2163,7 +2163,7 @@ string mutation_desc(mutation_type mut, int level, bool colour)
else if (permanent)
{
const bool demonspawn = (you.species == SP_DEMONSPAWN);
- const bool extra = (you.mutation[mut] > you.innate_mutations[mut]);
+ const bool extra = (you.mutation[mut] > you.innate_mutation[mut]);
if (fully_inactive)
colourname = "darkgrey";
@@ -2183,7 +2183,7 @@ string mutation_desc(mutation_type mut, int level, bool colour)
else if (_is_slime_mutation(mut))
colourname = "green";
else if (temporary)
- colourname = (you.mutation[mut] > you.temp_mutations[mut]) ?
+ colourname = (you.mutation[mut] > you.temp_mutation[mut]) ?
"lightmagenta" : "magenta";
// Build the result
@@ -2491,10 +2491,10 @@ bool perma_mutate(mutation_type which_mut, int how_much, const string &reason)
int levels = 0;
while (how_much-- > 0)
{
- dprf("Perma Mutate: %d, %d, %d", cap, you.mutation[which_mut], you.innate_mutations[which_mut]);
+ dprf("Perma Mutate: %d, %d, %d", cap, you.mutation[which_mut], you.innate_mutation[which_mut]);
if (you.mutation[which_mut] == cap
- && you.innate_mutations[which_mut] > 0
- && you.innate_mutations[which_mut] == cap-1)
+ && you.innate_mutation[which_mut] > 0
+ && you.innate_mutation[which_mut] == cap-1)
{
// [rpb] primarily for demonspawn, if the mutation level is already
// at the cap for this facet, the innate mutation level is greater
@@ -2510,7 +2510,7 @@ bool perma_mutate(mutation_type which_mut, int how_much, const string &reason)
}
levels++;
}
- you.innate_mutations[which_mut] += levels;
+ you.innate_mutation[which_mut] += levels;
return levels > 0;
}
@@ -2529,7 +2529,7 @@ int how_mutated(bool all, bool levels)
{
if (you.mutation[i])
{
- if (!all && you.innate_mutations[i] >= you.mutation[i])
+ if (!all && you.innate_mutation[i] >= you.mutation[i])
continue;
if (levels)
diff --git a/crawl-ref/source/ng-setup.cc b/crawl-ref/source/ng-setup.cc
index 9068fed24c..8c67edf1ab 100644
--- a/crawl-ref/source/ng-setup.cc
+++ b/crawl-ref/source/ng-setup.cc
@@ -342,7 +342,7 @@ void give_basic_mutations(species_type speci)
// Starting mutations are unremovable.
for (int i = 0; i < NUM_MUTATIONS; ++i)
- you.innate_mutations[i] = you.mutation[i];
+ you.innate_mutation[i] = you.mutation[i];
}
static void _newgame_make_item_tutorial(int slot, equipment_type eqslot,
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 52c3e29ab5..2bf75e9b58 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2858,7 +2858,7 @@ void forget_map(bool rot)
#endif
}
-static void _remove_temp_mutations()
+static void _remove_temp_mutation()
{
int num_remove = min(you.attribute[ATTR_TEMP_MUTATIONS],
max(you.attribute[ATTR_TEMP_MUTATIONS] * 5 / 12 - random2(3),
@@ -2977,7 +2977,7 @@ void gain_exp(unsigned int exp_gained, unsigned int* actual_gain)
{
you.attribute[ATTR_TEMP_MUT_XP] -= exp_gained;
if (you.attribute[ATTR_TEMP_MUT_XP] <= 0)
- _remove_temp_mutations();
+ _remove_temp_mutation();
}
recharge_xp_evokers(exp_gained);
@@ -5937,8 +5937,8 @@ void player::init()
exp_docked_total = 0;
mutation.init(0);
- innate_mutations.init(0);
- temp_mutations.init(0);
+ innate_mutation.init(0);
+ temp_mutation.init(0);
demonic_traits.clear();
magic_contamination = 0;
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index 3ea8723194..9e1ec38c91 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -191,8 +191,8 @@ public:
FixedVector<uint8_t, NUM_GODS> piety_max;
FixedVector<uint8_t, NUM_MUTATIONS> mutation;
- FixedVector<uint8_t, NUM_MUTATIONS> innate_mutations;
- FixedVector<uint8_t, NUM_MUTATIONS> temp_mutations;
+ FixedVector<uint8_t, NUM_MUTATIONS> innate_mutation;
+ FixedVector<uint8_t, NUM_MUTATIONS> temp_mutation;
struct demon_trait
{
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 6442af93ce..66abb8b513 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1437,8 +1437,8 @@ static void tag_construct_you(writer &th)
for (j = 0; j < NUM_MUTATIONS; ++j)
{
marshallByte(th, you.mutation[j]);
- marshallByte(th, you.innate_mutations[j]);
- marshallByte(th, you.temp_mutations[j]);
+ marshallByte(th, you.innate_mutation[j]);
+ marshallByte(th, you.temp_mutation[j]);
}
marshallByte(th, you.demonic_traits.size());
@@ -2467,22 +2467,22 @@ static void tag_read_you(reader &th)
for (j = 0; j < count; ++j)
{
you.mutation[j] = unmarshallUByte(th);
- you.innate_mutations[j] = unmarshallUByte(th);
+ you.innate_mutation[j] = unmarshallUByte(th);
#if TAG_MAJOR_VERSION == 34
if (th.getMinorVersion() >= TAG_MINOR_TEMP_MUTATIONS
&& th.getMinorVersion() != TAG_MINOR_0_11)
{
#endif
- you.temp_mutations[j] = unmarshallUByte(th);
+ you.temp_mutation[j] = unmarshallUByte(th);
#if TAG_MAJOR_VERSION == 34
}
#endif
#if TAG_MAJOR_VERSION == 34
- if (you.innate_mutations[j] + you.temp_mutations[j] > you.mutation[j])
+ if (you.innate_mutation[j] + you.temp_mutation[j] > you.mutation[j])
{
mprf(MSGCH_ERROR, "Mutation #%d out of sync, fixing up.", j);
- you.mutation[j] = you.innate_mutations[j] + you.temp_mutations[j];
+ you.mutation[j] = you.innate_mutation[j] + you.temp_mutation[j];
}
#endif
}
@@ -2497,11 +2497,11 @@ static void tag_read_you(reader &th)
{
mutation_type mut = stat_mutations[j];
stat_type stat = stat_types[j];
- int total_mutation_level = you.temp_mutations[mut] + you.mutation[mut];
+ int total_mutation_level = you.temp_mutation[mut] + you.mutation[mut];
if (total_mutation_level > 2)
{
- int new_level = max(0, min(you.temp_mutations[mut] - you.mutation[mut], 2));
- you.temp_mutations[mut] = new_level;
+ int new_level = max(0, min(you.temp_mutation[mut] - you.mutation[mut], 2));
+ you.temp_mutation[mut] = new_level;
}
if (you.mutation[mut] > 2)
{
@@ -2530,18 +2530,18 @@ static void tag_read_you(reader &th)
you.mutation[mut] = 2;
break;
};
- if (you.temp_mutations[mut] > 2 && you.mutation[mut] < 2)
- you.temp_mutations[mut] = 1;
+ if (you.temp_mutation[mut] > 2 && you.mutation[mut] < 2)
+ you.temp_mutation[mut] = 1;
else
- you.temp_mutations[mut] = 0;
+ you.temp_mutation[mut] = 0;
}
}
- you.mutation[MUT_FAST] = you.innate_mutations[MUT_FAST];
- you.mutation[MUT_SLOW] = you.innate_mutations[MUT_SLOW];
+ you.mutation[MUT_FAST] = you.innate_mutation[MUT_FAST];
+ you.mutation[MUT_SLOW] = you.innate_mutation[MUT_SLOW];
#endif
for (j = count; j < NUM_MUTATIONS; ++j)
- you.mutation[j] = you.innate_mutations[j] = 0;
+ you.mutation[j] = you.innate_mutation[j] = 0;
#if TAG_MAJOR_VERSION == 34
if (th.getMinorVersion() < TAG_MINOR_NO_DEVICE_HEAL)
@@ -2558,34 +2558,34 @@ static void tag_read_you(reader &th)
if (you.species == SP_GARGOYLE)
{
you.mutation[MUT_POISON_RESISTANCE] =
- you.innate_mutations[MUT_POISON_RESISTANCE] = 0;
+ you.innate_mutation[MUT_POISON_RESISTANCE] = 0;
}
if (you.species == SP_DJINNI)
{
you.mutation[MUT_NEGATIVE_ENERGY_RESISTANCE] =
- you.innate_mutations[MUT_NEGATIVE_ENERGY_RESISTANCE] = 3;
+ you.innate_mutation[MUT_NEGATIVE_ENERGY_RESISTANCE] = 3;
}
- if (you.species == SP_FELID && you.innate_mutations[MUT_JUMP] == 0)
+ if (you.species == SP_FELID && you.innate_mutation[MUT_JUMP] == 0)
{
- you.mutation[MUT_JUMP] = you.innate_mutations[MUT_JUMP]
+ you.mutation[MUT_JUMP] = you.innate_mutation[MUT_JUMP]
= min(1 + you.experience_level / 6, 3);
}
if (you.species == SP_FORMICID)
{
- you.mutation[MUT_ANTENNAE] = you.innate_mutations[MUT_ANTENNAE] = 3;
+ you.mutation[MUT_ANTENNAE] = you.innate_mutation[MUT_ANTENNAE] = 3;
you.mutation[MUT_EXOSKELETON] =
- you.innate_mutations[MUT_EXOSKELETON] = 0;
+ you.innate_mutation[MUT_EXOSKELETON] = 0;
}
if (you.species == SP_VINE_STALKER)
{
you.mutation[MUT_NO_DEVICE_HEAL] =
- you.innate_mutations[MUT_NO_DEVICE_HEAL] = 2;
+ you.innate_mutation[MUT_NO_DEVICE_HEAL] = 2;
}
}
if (th.getMinorVersion() < TAG_MINOR_DIET_MUT)
{
- you.mutation[MUT_CARNIVOROUS] = you.innate_mutations[MUT_CARNIVOROUS];
- you.mutation[MUT_HERBIVOROUS] = you.innate_mutations[MUT_HERBIVOROUS];
+ you.mutation[MUT_CARNIVOROUS] = you.innate_mutation[MUT_CARNIVOROUS];
+ you.mutation[MUT_HERBIVOROUS] = you.innate_mutation[MUT_HERBIVOROUS];
}
if (th.getMinorVersion() < TAG_MINOR_SAPROVOROUS)
@@ -2594,13 +2594,13 @@ static void tag_read_you(reader &th)
|| you.species == SP_OGRE || you.species == SP_KOBOLD)
{
you.mutation[MUT_SAPROVOROUS] =
- you.innate_mutations[MUT_SAPROVOROUS] = 0;
+ you.innate_mutation[MUT_SAPROVOROUS] = 0;
}
if (you.species == SP_OGRE)
{
// Remove the innate level of fast metabolism
you.mutation[MUT_FAST_METABOLISM] -= 1;
- you.innate_mutations[MUT_FAST_METABOLISM] -= 1;
+ you.innate_mutation[MUT_FAST_METABOLISM] -= 1;
}
}
#endif
diff --git a/crawl-ref/source/transform.cc b/crawl-ref/source/transform.cc
index 448cb8a75a..c2f8d981b8 100644
--- a/crawl-ref/source/transform.cc
+++ b/crawl-ref/source/transform.cc
@@ -1355,7 +1355,7 @@ void untransform(bool skip_wielding, bool skip_move)
ASSERT(beastly_slot(app) != EQ_NONE);
// would be lots of work to do it via delete_mutation, the hacky
// way is one line:
- you.mutation[app] = you.innate_mutations[app];
+ you.mutation[app] = you.innate_mutation[app];
you.attribute[ATTR_APPENDAGE] = 0;
mprf(MSGCH_DURATION, "Your %s disappear%s.", appendage_name(app),
(app == MUT_TENTACLE_SPIKE) ? "s" : "");
diff --git a/crawl-ref/source/wiz-you.cc b/crawl-ref/source/wiz-you.cc
index 9cb716bdf5..03ec05a7f0 100644
--- a/crawl-ref/source/wiz-you.cc
+++ b/crawl-ref/source/wiz-you.cc
@@ -98,24 +98,24 @@ void wizard_change_species(void)
uint8_t prev_muts[NUM_MUTATIONS];
for (int i = 0; i < NUM_MUTATIONS; ++i)
{
- if (you.innate_mutations[i] > 0)
+ if (you.innate_mutation[i] > 0)
{
- if (you.innate_mutations[i] > you.mutation[i])
+ if (you.innate_mutation[i] > you.mutation[i])
you.mutation[i] = 0;
else
- you.mutation[i] -= you.innate_mutations[i];
+ you.mutation[i] -= you.innate_mutation[i];
- you.innate_mutations[i] = 0;
+ you.innate_mutation[i] = 0;
}
prev_muts[i] = you.mutation[i];
}
give_basic_mutations(sp);
for (int i = 0; i < NUM_MUTATIONS; ++i)
{
- if (prev_muts[i] > you.innate_mutations[i])
- you.innate_mutations[i] = 0;
+ if (prev_muts[i] > you.innate_mutation[i])
+ you.innate_mutation[i] = 0;
else
- you.innate_mutations[i] -= prev_muts[i];
+ you.innate_mutation[i] -= prev_muts[i];
}
switch (sp)
@@ -165,7 +165,7 @@ void wizard_change_species(void)
continue;
++you.mutation[m];
- ++you.innate_mutations[m];
+ ++you.innate_mutation[m];
}
break;
}