From: David L. R. <dol...@us...> - 2010-05-30 15:30:32
|
via d1c6365ccc2a3c48be406c2921b0f26e4559e6d8 (commit) from 28930cf82122cdcad624b5fe880938d8a44da375 (commit) ----------------------------------------------------------------------- commit d1c6365ccc2a3c48be406c2921b0f26e4559e6d8 Author: David Lawrence Ramsey <dol...@us...> Date: Sun May 30 10:24:50 2010 -0500 Rename you.demon_pow[] to you.innate_mutations[]. ----------------------------------------------------------------------- Summary of changes: crawl-ref/source/dbg-asrt.cc | 4 ++-- crawl-ref/source/fight.cc | 2 +- crawl-ref/source/ghost.cc | 2 +- crawl-ref/source/mutation.cc | 22 +++++++++++----------- crawl-ref/source/ng-setup.cc | 2 +- crawl-ref/source/player.cc | 4 ++-- crawl-ref/source/player.h | 2 +- crawl-ref/source/tags.cc | 4 ++-- crawl-ref/source/wiz-you.cc | 16 ++++++++-------- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/crawl-ref/source/dbg-asrt.cc b/crawl-ref/source/dbg-asrt.cc index 4231ccc..17eba53 100644 --- a/crawl-ref/source/dbg-asrt.cc +++ b/crawl-ref/source/dbg-asrt.cc @@ -229,8 +229,8 @@ static void _dump_player(FILE *file) fprintf(file, "Demon mutations:\n"); for (int i = 0; i < NUM_MUTATIONS; ++i) - if (you.demon_pow[i] > 0) - fprintf(file, " #%d: %d\n", i, you.demon_pow[i]); + if (you.innate_mutations[i] > 0) + fprintf(file, " #%d: %d\n", i, you.innate_mutations[i]); fprintf(file, "\n"); diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index e6c0116..9207e0c 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -3831,7 +3831,7 @@ int melee_attack::player_to_hit(bool random_factor) } else { // ...you must be unarmed - your_to_hit += you.demon_pow[MUT_CLAWS] ? 4 : 2; + your_to_hit += you.innate_mutations[MUT_CLAWS] ? 4 : 2; your_to_hit += maybe_random2(1 + you.skills[SK_UNARMED_COMBAT], random_factor); diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc index aa4faae..38bde5b 100644 --- a/crawl-ref/source/ghost.cc +++ b/crawl-ref/source/ghost.cc @@ -390,7 +390,7 @@ void ghost_demon::init_player_ghost() else { // Unarmed combat. - if (you.demon_pow[MUT_CLAWS]) + if (you.innate_mutations[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 55d88f0..cf53daa 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -141,7 +141,7 @@ bool mutation_is_fully_active(mutation_type mut) return (true); // Innate mutations are always active - if (you.demon_pow[mut]) + if (you.innate_mutations[mut]) return (true); // ... as are all mutations for semi-undead who are fully alive @@ -159,7 +159,7 @@ static bool _mutation_is_fully_inactive(mutation_type mut) { const mutation_def& mdef = get_mutation_def(mut); return (you.is_undead == US_SEMI_UNDEAD && you.hunger_state < HS_SATIATED - && !you.demon_pow[mut] && !mdef.physical); + && !you.innate_mutations[mut] && !mdef.physical); } formatted_string describe_mutations() @@ -378,7 +378,7 @@ formatted_string describe_mutations() // First add (non-removable) inborn abilities and demon powers. for (int i = 0; i < NUM_MUTATIONS; i++) { - if (you.mutation[i] != 0 && you.demon_pow[i]) + if (you.mutation[i] != 0 && you.innate_mutations[i]) { mutation_type mut_type = static_cast<mutation_type>(i); result += mutation_name(mut_type, -1, true); @@ -390,7 +390,7 @@ formatted_string describe_mutations() // Now add removable mutations. for (int i = 0; i < NUM_MUTATIONS; i++) { - if (you.mutation[i] != 0 && !you.demon_pow[i]) + if (you.mutation[i] != 0 && !you.innate_mutations[i]) { mutation_type mut_type = static_cast<mutation_type>(i); result += mutation_name(mut_type, -1, true); @@ -621,7 +621,7 @@ static bool _accept_mutation(mutation_type mutat, bool ignore_rarity = false) if (ignore_rarity) return (true); - const int rarity = mdef.rarity + you.demon_pow[mutat]; + const int rarity = mdef.rarity + you.innate_mutations[mutat]; // Low rarity means unlikely to choose it. return (x_chance_in_y(rarity, 10)); @@ -1262,7 +1262,7 @@ static bool _delete_single_mutation_level(mutation_type mutat) if (you.mutation[mutat] == 0) return (false); - if (you.demon_pow[mutat] >= you.mutation[mutat]) + if (you.innate_mutations[mutat] >= you.mutation[mutat]) return (false); const mutation_def& mdef = get_mutation_def(mutat); @@ -1386,7 +1386,7 @@ bool delete_mutation(mutation_type which_mutation, bool failMsg, continue; } - if (you.demon_pow[mutat] >= you.mutation[mutat]) + if (you.innate_mutations[mutat] >= you.mutation[mutat]) continue; const mutation_def& mdef = get_mutation_def(mutat); @@ -1477,13 +1477,13 @@ std::string mutation_name(mutation_type mut, int level, bool colour) if (colour) { const char* colourname = (mdef.bad ? "red" : "lightgrey"); - const bool permanent = (you.demon_pow[mut] > 0); + const bool permanent = (you.innate_mutations[mut] > 0); if (innate) colourname = (level > 0 ? "cyan" : "lightblue"); else if (permanent) { const bool demonspawn = (you.species == SP_DEMONSPAWN); - const bool extra = (you.mutation[mut] > you.demon_pow[mut]); + const bool extra = (you.mutation[mut] > you.innate_mutations[mut]); if (fully_inactive) colourname = "darkgrey"; @@ -1858,7 +1858,7 @@ bool perma_mutate(mutation_type which_mut, int how_much) if (mutate(which_mut, false, true, false, false, true)) levels++; - you.demon_pow[which_mut] += levels; + you.innate_mutations[which_mut] += levels; return (levels > 0); } @@ -1871,7 +1871,7 @@ int how_mutated(bool all, bool levels) { if (you.mutation[i]) { - if (!all && you.demon_pow[i] >= you.mutation[i]) + if (!all && you.innate_mutations[i] >= you.mutation[i]) continue; if (levels) diff --git a/crawl-ref/source/ng-setup.cc b/crawl-ref/source/ng-setup.cc index 8a482c8..bfb0f0e 100644 --- a/crawl-ref/source/ng-setup.cc +++ b/crawl-ref/source/ng-setup.cc @@ -313,7 +313,7 @@ void give_basic_mutations(species_type speci) // Starting mutations are unremovable. for (int i = 0; i < NUM_MUTATIONS; ++i) - you.demon_pow[i] = you.mutation[i]; + you.innate_mutations[i] = you.mutation[i]; } 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 6c09874..e666fb7 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -1870,7 +1870,7 @@ int player_movement_speed(bool ignore_burden) // Mutations: -2, -3, -4, unless innate and shapechanged. // Not when swimming, since it is "cover the ground quickly". if (player_mutation_level(MUT_FAST) > 0 - && (!you.demon_pow[MUT_FAST] || !player_is_shapechanged()) + && (!you.innate_mutations[MUT_FAST] || !player_is_shapechanged()) && !you.swimming()) { mv -= player_mutation_level(MUT_FAST) + 1; @@ -5115,7 +5115,7 @@ void player::init() ability_letter_table.init(ABIL_NON_ABILITY); mutation.init(0); - demon_pow.init(0); + innate_mutations.init(0); demonic_traits.clear(); diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index 73e2446..96a19dd 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -209,7 +209,7 @@ public: FixedVector<unsigned char, NUM_MUTATIONS> mutation; - FixedVector<unsigned char, NUM_MUTATIONS> demon_pow; + FixedVector<unsigned char, NUM_MUTATIONS> innate_mutations; struct demon_trait { diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index 261922c..a597c6c 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -1060,7 +1060,7 @@ static void tag_construct_you(writer &th) for (j = 0; j < NUM_MUTATIONS; ++j) { marshallByte(th, you.mutation[j]); - marshallByte(th, you.demon_pow[j]); + marshallByte(th, you.innate_mutations[j]); } marshallByte(th, you.demonic_traits.size()); @@ -1506,7 +1506,7 @@ static void tag_read_you(reader &th, char minorVersion) for (j = 0; j < count_s; ++j) { you.mutation[j] = unmarshallByte(th); - you.demon_pow[j] = unmarshallByte(th); + you.innate_mutations[j] = unmarshallByte(th); } count_c = unmarshallByte(th); diff --git a/crawl-ref/source/wiz-you.cc b/crawl-ref/source/wiz-you.cc index 732b405..b711dbe 100644 --- a/crawl-ref/source/wiz-you.cc +++ b/crawl-ref/source/wiz-you.cc @@ -85,24 +85,24 @@ void wizard_change_species( void ) unsigned char prev_muts[NUM_MUTATIONS]; for (i = 0; i < NUM_MUTATIONS; ++i) { - if (you.demon_pow[i] > 0) + if (you.innate_mutations[i] > 0) { - if (you.demon_pow[i] > you.mutation[i]) + if (you.innate_mutations[i] > you.mutation[i]) you.mutation[i] = 0; else - you.mutation[i] -= you.demon_pow[i]; + you.mutation[i] -= you.innate_mutations[i]; - you.demon_pow[i] = 0; + you.innate_mutations[i] = 0; } prev_muts[i] = you.mutation[i]; } give_basic_mutations(sp); for (i = 0; i < NUM_MUTATIONS; ++i) { - if (prev_muts[i] > you.demon_pow[i]) - you.demon_pow[i] = 0; + if (prev_muts[i] > you.innate_mutations[i]) + you.innate_mutations[i] = 0; else - you.demon_pow[i] -= prev_muts[i]; + you.innate_mutations[i] -= prev_muts[i]; } switch (sp) @@ -139,7 +139,7 @@ void wizard_change_species( void ) continue; ++you.mutation[m]; - ++you.demon_pow[m]; + ++you.innate_mutations[m]; } break; } -- Dungeon Crawl Stone Soup |