diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-08-31 00:44:20 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-08-31 00:44:20 +0200 |
commit | a9eeb4a370e85069c25286e5cedc9682d5d04b2e (patch) | |
tree | 450c0ccd5f5353553d5b96edee2850623dffcc03 /crawl-ref/source/exercise.cc | |
parent | 57aec7d2a0ae1095fb1babd8f0fcc276927bf8e5 (diff) | |
parent | 35613e094ca5d0be028ee9261afebf3e35faa563 (diff) | |
download | crawl-ref-a9eeb4a370e85069c25286e5cedc9682d5d04b2e.tar.gz crawl-ref-a9eeb4a370e85069c25286e5cedc9682d5d04b2e.zip |
Merge branch 'master' into glasnost
Yay for conflicts galore (wax removal, std:: purge, tileidx changes).
Diffstat (limited to 'crawl-ref/source/exercise.cc')
-rw-r--r-- | crawl-ref/source/exercise.cc | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/crawl-ref/source/exercise.cc b/crawl-ref/source/exercise.cc index 622b74727d..da3e096a45 100644 --- a/crawl-ref/source/exercise.cc +++ b/crawl-ref/source/exercise.cc @@ -101,15 +101,15 @@ static int _abil_degree(ability_type abil) return 1; case ABIL_NEMELEX_DRAW_ONE: - return (1 + random2(2)); + return 1 + random2(2); case ABIL_NEMELEX_PEEK_TWO: - return (2 + random2(2)); + return 2 + random2(2); case ABIL_NEMELEX_TRIPLE_DRAW: - return (3 + random2(3)); + return 3 + random2(3); case ABIL_NEMELEX_DEAL_FOUR: - return (4 + random2(4)); + return 4 + random2(4); case ABIL_NEMELEX_STACK_FIVE: - return (5 + random2(5)); + return 5 + random2(5); case ABIL_YRED_RECALL_UNDEAD_SLAVES: case ABIL_MAKHLEB_MINOR_DESTRUCTION: @@ -120,7 +120,7 @@ static int _abil_degree(ability_type abil) case ABIL_SIF_MUNA_CHANNEL_ENERGY: case ABIL_OKAWARU_HEROISM: case ABIL_JIYVA_CALL_JELLY: - return (1 + random2(3)); + return 1 + random2(3); case ABIL_ZIN_RECITE: return 2; @@ -128,7 +128,7 @@ static int _abil_degree(ability_type abil) case ABIL_TSO_DIVINE_SHIELD: case ABIL_KIKU_RECEIVE_CORPSES: case ABIL_BEOGH_SMITING: - return (2 + random2(2)); + return 2 + random2(2); case ABIL_MAKHLEB_LESSER_SERVANT_OF_MAKHLEB: case ABIL_LUGONU_BEND_SPACE: case ABIL_FEDHAS_SUNLIGHT: @@ -137,11 +137,11 @@ static int _abil_degree(ability_type abil) case ABIL_FEDHAS_SPAWN_SPORES: case ABIL_FEDHAS_EVOLUTION: case ABIL_CHEIBRIADOS_TIME_BEND: - return (2 + random2(3)); + return 2 + random2(3); case ABIL_YRED_ANIMATE_REMAINS: case ABIL_YRED_ANIMATE_DEAD: case ABIL_YRED_DRAIN_LIFE: - return (2 + random2(4)); + return 2 + random2(4); case ABIL_ZIN_IMPRISON: case ABIL_MAKHLEB_MAJOR_DESTRUCTION: @@ -150,34 +150,34 @@ static int _abil_degree(ability_type abil) case ABIL_LUGONU_BANISH: case ABIL_JIYVA_SLIMIFY: case ABIL_CHEIBRIADOS_DISTORTION: - return (3 + random2(5)); + return 3 + random2(5); case ABIL_TSO_CLEANSING_FLAME: - return (3 + random2(6)); + return 3 + random2(6); case ABIL_OKAWARU_FINESSE: - return (3 + random2(7)); + return 3 + random2(7); case ABIL_CHEIBRIADOS_SLOUCH: - return (4 + random2(4)); + return 4 + random2(4); case ABIL_ELYVILON_PURIFICATION: - return (4 + random2(6)); + return 4 + random2(6); case ABIL_LUGONU_CORRUPT: case ABIL_JIYVA_CURE_BAD_MUTATION: case ABIL_CHEIBRIADOS_TIME_STEP: case ABIL_KIKU_TORMENT: - return (5 + random2(5)); + return 5 + random2(5); case ABIL_ZIN_SANCTUARY: - return (5 + random2(8)); + return 5 + random2(8); case ABIL_MAKHLEB_GREATER_SERVANT_OF_MAKHLEB: - return (6 + random2(6)); + return 6 + random2(6); case ABIL_ELYVILON_DIVINE_VIGOUR: - return (6 + random2(10)); + return 6 + random2(10); case ABIL_TSO_SUMMON_DIVINE_WARRIOR: case ABIL_YRED_ENSLAVE_SOUL: case ABIL_LUGONU_ABYSS_EXIT: - return (8 + random2(10)); + return 8 + random2(10); default: return 0; @@ -203,7 +203,7 @@ static void _exercise_spell(spell_type spell, bool success) // exercise skills in that random order. That way, first skill don't // stay in the queue for a shorter time. bool conj = false; - std::vector<skill_type> disc; + vector<skill_type> disc; for (int ndx = 0; ndx <= SPTYP_LAST_EXPONENT; ndx++) { if (!spell_typematch(spell, 1 << ndx)) @@ -220,7 +220,7 @@ static void _exercise_spell(spell_type spell, bool success) if (conj && !x_chance_in_y(skillcount, 4)) return; - std::random_shuffle(disc.begin(), disc.end()); + random_shuffle(disc.begin(), disc.end()); for (unsigned int k = 0; k < disc.size(); ++k) { @@ -254,7 +254,7 @@ static bool _check_train_armour(int amount) { // XXX: animal skin; should be a better way to get at that. const int mass_base = 100; - const int mass = std::max(item_mass(*armour) - mass_base, 0); + const int mass = max(item_mass(*armour) - mass_base, 0); if (x_chance_in_y(mass, you.skill(SK_ARMOUR, 50))) { exercise(SK_ARMOUR, amount); |