From 058224d30dadecbcefb942afbd28fdcbdfc81128 Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Sun, 22 Nov 2009 12:47:28 +0300 Subject: Replace uses of disease_player with player::sicken. --- crawl-ref/source/food.cc | 6 +++--- crawl-ref/source/it_use2.cc | 2 +- crawl-ref/source/player.cc | 7 +------ crawl-ref/source/player.h | 1 - crawl-ref/source/spells3.cc | 2 +- 5 files changed, 6 insertions(+), 12 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 453aada8ce..41e398165c 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -1752,7 +1752,7 @@ static void _eat_chunk(corpse_effect_type chunk_effect, bool cannibal, case CE_HCL: you.rot(&you, 10 + random2(10)); - if (disease_player( 50 + random2(100) )) + if (you.sicken(50 + random2(100))) xom_is_stimulated(random2(100)); break; @@ -1777,7 +1777,7 @@ static void _eat_chunk(corpse_effect_type chunk_effect, bool cannibal, else { mpr("There is something wrong with this meat."); - if (disease_player(50 + random2(100))) + if (you.sicken(50 + random2(100))) xom_is_stimulated(random2(100)); } break; @@ -2274,7 +2274,7 @@ void vampire_nutrition_per_turn(const item_def &corpse, int feeding) case CE_HCL: you.rot(&you, 5 + random2(5)); - if (disease_player(50 + random2(100))) + if (you.sicken(50 + random2(100))) xom_is_stimulated(random2(100)); stop_delay(); break; diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc index daf3ac6a1b..df4051580b 100644 --- a/crawl-ref/source/it_use2.cc +++ b/crawl-ref/source/it_use2.cc @@ -125,7 +125,7 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known) if (x_chance_in_y(herbivorous + 1, 4)) { // Full herbivores always become ill from blood. - disease_player(50 + random2(100)); + you.sicken(50 + random2(100)); xom_is_stimulated(32 / xom_factor); } else diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index f914de5720..18d5fdcae3 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5078,11 +5078,6 @@ void dec_haste_player(int delay) } } -bool disease_player(int amount) -{ - return you.sicken(amount); -} - void dec_disease_player(int delay) { if (you.disease > 0) @@ -6720,7 +6715,7 @@ bool player::rot(actor *who, int amount, int immediate, bool quiet) } if (one_chance_in(4)) - disease_player(50 + random2(100)); + sicken(50 + random2(100)); return (true); } diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index 239ac20765..f9779dfa61 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -758,7 +758,6 @@ void dec_slow_player(int delay); void haste_player(int turns); void dec_haste_player(int delay); -bool disease_player(int amount); void dec_disease_player(int delay); bool player_weapon_wielded(); diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 49d51e12b9..08e6243fb3 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -1337,7 +1337,7 @@ bool cast_haunt(int pow, const coord_def& where, god_type god) || player_under_penance() || you.piety < piety_breakpoint(3) || !x_chance_in_y(you.piety, MAX_PIETY)) { - disease_player(25 + random2(50)); + you.sicken(25 + random2(50)); } return (success); -- cgit v1.2.3-54-g00ecf