From d419d7dc79e02aafe700dcccba8638975a4cd2e7 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 8 Feb 2009 00:44:14 +0000 Subject: Add yet more minor cosmetic fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8967 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/decks.cc | 7 ++++--- crawl-ref/source/effects.cc | 28 ++++++++++++++-------------- crawl-ref/source/mon-util.cc | 2 +- crawl-ref/source/player.cc | 5 +++-- crawl-ref/source/player.h | 2 +- 5 files changed, 23 insertions(+), 21 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index 0cb04851f9..b338bb7fcc 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -1740,7 +1740,7 @@ static int _drain_monsters(coord_def where, int pow, int, actor *) { const int mnstr = mgrd(where); if (mnstr == NON_MONSTER) - return 0; + return (0); monsters& mon = menv[mnstr]; @@ -1748,7 +1748,7 @@ static int _drain_monsters(coord_def where, int pow, int, actor *) simple_monster_message(&mon, " is unaffected."); else { - simple_monster_message(&mon, " is drained."); + simple_monster_message(&mon, " is drained!"); if (x_chance_in_y(pow / 60, 20)) { @@ -1760,7 +1760,8 @@ static int _drain_monsters(coord_def where, int pow, int, actor *) mon.hurt(&you, 2 + random2(50), BEAM_NEG); } } - return 1; + + return (1); } static void _mass_drain(int pow) diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 5bfbd5d67b..9c3dff2570 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -64,7 +64,7 @@ REVISION("$Rev$"); int holy_word_player(int pow, int caster, actor *attacker) { if (!player_is_unholy()) - return 0; + return (0); int hploss; @@ -75,7 +75,7 @@ int holy_word_player(int pow, int caster, actor *attacker) hploss = roll_dice(2, 15) + (random2(pow) / 3); if (!hploss) - return 0; + return (0); mpr("You are blasted by holy energy!"); @@ -106,7 +106,7 @@ int holy_word_player(int pow, int caster, actor *attacker) ouch(hploss, caster, type, aux); - return 1; + return (1); } int holy_word_monsters(coord_def where, int pow, int caster, @@ -125,12 +125,12 @@ int holy_word_monsters(coord_def where, int pow, int caster, const int mon = mgrd(where); if (mon == NON_MONSTER) - return retval; + return (retval); monsters *monster = &menv[mon]; if (!monster->alive() || !mons_is_unholy(monster)) - return retval; + return (retval); int hploss; @@ -164,7 +164,7 @@ int holy_word_monsters(coord_def where, int pow, int caster, } } - return retval; + return (retval); } int holy_word(int pow, int caster, const coord_def& where, bool silent, @@ -177,8 +177,8 @@ int holy_word(int pow, int caster, const coord_def& where, bool silent, attacker->conj_verb("speak").c_str()); } - return apply_area_within_radius(holy_word_monsters, where, pow, 8, caster, - attacker); + return (apply_area_within_radius(holy_word_monsters, where, pow, 8, caster, + attacker)); } int torment_player(int pow, int caster) @@ -201,7 +201,7 @@ int torment_player(int pow, int caster) if (!hploss) { mpr("You feel a surge of unholy energy."); - return 0; + return (0); } mpr("Your body is wracked with pain!"); @@ -241,7 +241,7 @@ int torment_player(int pow, int caster) ouch(hploss, caster, type, aux); - return 1; + return (1); } // torment_monsters() is called with power 0 because torment is @@ -263,12 +263,12 @@ int torment_monsters(coord_def where, int pow, int caster, actor *attacker) const int mon = mgrd(where); if (mon == NON_MONSTER) - return retval; + return (retval); monsters *monster = &menv[mon]; if (!monster->alive() || mons_res_negative_energy(monster) == 3) - return retval; + return (retval); int hploss = std::max(0, monster->hit_points / 2 - 1); @@ -282,12 +282,12 @@ int torment_monsters(coord_def where, int pow, int caster, actor *attacker) if (hploss) retval = 1; - return retval; + return (retval); } int torment(int caster, const coord_def& where) { - return apply_area_within_radius(torment_monsters, where, 0, 8, caster); + return (apply_area_within_radius(torment_monsters, where, 0, 8, caster)); } void immolation(int pow, int caster, coord_def where, bool known, diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 758879ac85..6c5bc8c5a9 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -7949,7 +7949,7 @@ item_type_id_state_type monsters::drink_potion_effect(potion_type ptype) void monsters::react_to_damage(int damage, beam_type flavour) { // The royal jelly objects to taking damage and will SULK. :-) - if (type == MONS_ROYAL_JELLY && flavour != BEAM_TORMENT_DAMAGE && alive() + if (alive() && type == MONS_ROYAL_JELLY && flavour != BEAM_TORMENT_DAMAGE && damage > 8 && x_chance_in_y(damage, 50)) { mon_acting mact(this); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 0e0c362709..7331b97a01 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5247,7 +5247,7 @@ bool confuse_player(int amount, bool resistable) return (true); } -bool curare_hits_player(int agent, int amount) +bool curare_hits_player(int death_source, int amount) { ASSERT(!crawl_state.arena); @@ -5268,7 +5268,8 @@ bool curare_hits_player(int agent, int amount) if (hurted) { mpr("You have difficulty breathing."); - ouch(hurted, agent, KILLED_BY_CURARE, "curare-induced apnoea"); + ouch(hurted, death_source, KILLED_BY_CURARE, + "curare-induced apnoea"); } potion_effect(POT_SLOWING, 2 + random2(4 + amount)); diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index 44131ffb91..c8eca92819 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -421,7 +421,7 @@ void contaminate_player(int change, bool controlled = false, bool confuse_player(int amount, bool resistable = true); -bool curare_hits_player(int agent, int degree); +bool curare_hits_player(int death_source, int amount); bool poison_player(int amount, bool force = false); void dec_poison_player(); void reduce_poison_player(int amount); -- cgit v1.2.3-54-g00ecf