diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/command.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/fight.cc | 22 | ||||
-rw-r--r-- | crawl-ref/source/food.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/tutorial.cc | 3 |
4 files changed, 20 insertions, 15 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 34df390d2b..dfb78e084a 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -229,7 +229,7 @@ static void _print_version(void) cmd_version.add_text(_get_version_features()); cmd_version.add_text(_get_version_changes()); - // Read in information about changed in comparison to the latest version. + // Read in information about changes in comparison to the latest version. FILE* fp = fopen(datafile_path("034_changes.txt", true).c_str(), "r"); if (fp) { diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index bce2727800..1c92ab90c1 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1286,7 +1286,7 @@ void melee_attack::player_warn_miss() { did_hit = false; - // upset only non-sleeping monsters if we missed + // Upset only non-sleeping monsters if we missed. if (def->behaviour != BEH_SLEEP) behaviour_event( def, ME_WHACK, MHITYOU ); @@ -1496,7 +1496,7 @@ int melee_attack::player_stab(int damage) // The stabbing message looks better here: if (stab_attempt) { - // construct reasonable message + // Construct reasonable message. stab_message( def, stab_bonus ); exercise(SK_STABBING, 1 + random2avg(5, 4)); @@ -1506,14 +1506,14 @@ int melee_attack::player_stab(int damage) else { stab_bonus = 0; - // ok.. if you didn't backstab, you wake up the neighborhood. + // Ok.. if you didn't backstab, you wake up the neighborhood. // I can live with that. alert_nearby_monsters(); } if (stab_bonus) { - // lets make sure we have some damage to work with... + // Lets make sure we have some damage to work with... if (damage < 1) damage = 1; @@ -1532,8 +1532,6 @@ int melee_attack::player_stab(int damage) } damage = player_stab_weapon_bonus(damage); - if (mons_is_petrified(def)) - damage /= 3; } return (damage); @@ -1543,7 +1541,7 @@ int melee_attack::player_apply_monster_ac(int damage) { if (stab_bonus) { - // when stabbing we can get by some of the armour + // When stabbing we can get by some of the armour. if (def->ac > 0) { const int ac = def->ac @@ -1555,11 +1553,14 @@ int melee_attack::player_apply_monster_ac(int damage) } else { - // apply AC normally + // Apply AC normally. if (def->ac > 0) damage -= random2(1 + def->ac); } + if (mons_is_petrified(def)) + damage /= 3; + return (damage); } @@ -2671,7 +2672,8 @@ void melee_attack::player_calc_hit_damage() damage_done = player_stab(damage_done); damage_done = player_apply_monster_ac(damage_done); - // This doesn't actually modify damage -- bwr + // This doesn't actually modify damage. -- bwr + // It only chooses the appropriate verb. damage_done = player_weapon_type_modify( damage_done ); if (damage_done < 0) @@ -3949,7 +3951,7 @@ void melee_attack::mons_check_attack_perceived() { interrupt_activity(AI_MONSTER_ATTACKS, atk); - // if a friend wants to help, they can attack <monster_attacking> + // If a friend wants to help, they can attack the attacking monster. if (you.pet_target == MHITNOT) you.pet_target = monster_index(atk); } diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 779faab8c9..5f69c4f1ec 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -786,10 +786,10 @@ bool eat_food(bool run_hook, int slot) if (igrd[you.x_pos][you.y_pos] != NON_ITEM && slot == -1) { const int res = eat_from_floor(); - if ( res == 1 ) - return true; - if ( res == -1 ) - return false; + if (res == 1) + return (true); + if (res == -1) + return (false); } return (prompt_eat_from_inventory(slot)); diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index 7abc98742d..2f51959ef8 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -1016,6 +1016,9 @@ void taken_new_item(unsigned char item_type) // Give a special message if you gain a skill you didn't have before. void tut_gained_new_skill(int skill) { + if (!Options.tutorial_left) + return; + learned_something_new(TUT_SKILL_RAISE); switch (skill) |