diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-17 18:02:58 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-17 18:02:58 +0000 |
commit | b305e13fcd4ff065144a40f7dd8a2d328b6fbdf5 (patch) | |
tree | cd95a7d6550b9093522cd17d09f00443e23b0eb6 /crawl-ref/source | |
parent | f2cbb9bba137d6b0977f15c5f2b9949b916b5816 (diff) | |
download | crawl-ref-b305e13fcd4ff065144a40f7dd8a2d328b6fbdf5.tar.gz crawl-ref-b305e13fcd4ff065144a40f7dd8a2d328b6fbdf5.zip |
Add yet more minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7463 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/beam.cc | 25 | ||||
-rw-r--r-- | crawl-ref/source/fight.cc | 14 |
2 files changed, 20 insertions, 19 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index b276e85a25..ebac83d785 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -1815,10 +1815,10 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted, if (!hurted && res > 0) { if (doFlavouredEffects) - simple_monster_message( monster, " appears unharmed." ); + simple_monster_message(monster, " appears unharmed."); } else if (res <= 0 && doFlavouredEffects && !one_chance_in(3)) - poison_monster( monster, _whose_kill(pbolt) ); + poison_monster(monster, _whose_kill(pbolt)); break; } @@ -1836,11 +1836,11 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted, // Poison arrow can poison any living thing regardless of // poison resistance. -- bwr if (mons_has_lifeforce(monster)) - poison_monster( monster, _whose_kill(pbolt), 2, true ); + poison_monster(monster, _whose_kill(pbolt), 2, true); } } else if (doFlavouredEffects) - poison_monster( monster, _whose_kill(pbolt), 4 ); + poison_monster(monster, _whose_kill(pbolt), 4); break; @@ -1898,14 +1898,14 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted, if (!doFlavouredEffects) return (hurted); - if (mons_res_poison( monster ) <= 0) - poison_monster( monster, _whose_kill(pbolt) ); + if (mons_res_poison(monster) <= 0) + poison_monster(monster, _whose_kill(pbolt)); - if (one_chance_in( 3 + 2 * mons_res_negative_energy(monster) )) + if (one_chance_in(3 + 2 * mons_res_negative_energy(monster))) { bolt beam; beam.flavour = BEAM_SLOW; - mons_ench_f2( monster, beam ); + mons_ench_f2(monster, beam); } } break; @@ -1928,8 +1928,9 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted, if (doFlavouredEffects) { - simple_monster_message(monster, (hurted == 0) ? - " appears unharmed." : " writhes in agony!"); + simple_monster_message(monster, + hurted == 0 ? " appears unharmed." + : " writhes in agony!"); } break; @@ -1977,7 +1978,7 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted, break; default: break; - } // end of switch + } if (pbolt.name == "hellfire") { @@ -2047,7 +2048,7 @@ static bool _monster_resists_mass_enchantment(monsters *monster, return (true); } - if (check_mons_resist_magic( monster, pow )) + if (check_mons_resist_magic(monster, pow)) { simple_monster_message(monster, mons_immune_magic(monster)? " is unaffected." diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index a2bf7c8bc1..67c88e6dd1 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -3602,11 +3602,11 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) case AF_ROT: if (one_chance_in(20) || (damage_done > 2 && one_chance_in(3))) - defender->rot( attacker, 2 + random2(3), damage_done > 5 ); + defender->rot(attacker, 2 + random2(3), damage_done > 5); break; case AF_DISEASE: - defender->sicken( 50 + random2(100) ); + defender->sicken(50 + random2(100)); break; case AF_FIRE: @@ -3635,7 +3635,7 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) resist_adjust_damage(defender, BEAM_COLD, defender->res_cold(), - atk->hit_dice + random2( 2 * atk->hit_dice )); + atk->hit_dice + random2(2 * atk->hit_dice)); if (needs_message && special_damage) { @@ -3652,7 +3652,7 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) defender, BEAM_ELECTRICITY, defender->res_elec(), - atk->hit_dice + random2( atk->hit_dice / 2 )); + atk->hit_dice + random2(atk->hit_dice / 2)); if (defender->airborne()) special_damage = special_damage * 2 / 3; @@ -3706,7 +3706,7 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) { if (defender->atype() == ACT_PLAYER) mprf("You feel less resilient."); - defender->rot( attacker, 0, coinflip()? 2 : 1 ); + defender->rot(attacker, 0, coinflip() ? 2 : 1); } } break; @@ -3767,7 +3767,7 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) if (one_chance_in(10) || (damage_done > 2 && one_chance_in(3))) { - defender->confuse( 1 + random2( 3 + atk->hit_dice ) ); + defender->confuse(1 + random2(3 + atk->hit_dice)); } break; @@ -3819,7 +3819,7 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) void melee_attack::mons_perform_attack_rounds() { - const int nrounds = atk->has_hydra_multi_attack()? atk->number : 4; + const int nrounds = atk->has_hydra_multi_attack() ? atk->number : 4; const coord_def pos = defender->pos(); // Melee combat, tell attacker to wield its melee weapon. |