summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.h
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-11 05:03:06 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-11 05:03:06 +0000
commitcefc04ea39dbf7ff9d434df3dddf427b23da6f8e (patch)
tree9be577f4ed8a55a545b33e985df387abef91754f /crawl-ref/source/player.h
parentd531426adb53352c85c8a411a60bee92cbc0a363 (diff)
downloadcrawl-ref-cefc04ea39dbf7ff9d434df3dddf427b23da6f8e.tar.gz
crawl-ref-cefc04ea39dbf7ff9d434df3dddf427b23da6f8e.zip
Added "items" boolean parameter to the player_res_foo() functions, which
when false makes equipped items be ignored when figuring reistance. Used by is_useless_item() to avoid (for example) rings of poison reistance being marked useless if the player equips one. Also mark rings of teleport control as useless if the player has inate teleport control, and never mark artifact jewellery as useless. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5725 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.h')
-rw-r--r--crawl-ref/source/player.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index 664d2c7a05..bae81da50e 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -161,15 +161,16 @@ int player_regen(void);
/* ***********************************************************************
* called from: fight - files - it_use2 - misc - ouch - spells - spells2
* *********************************************************************** */
-int player_res_cold(bool calc_unid = true);
-int player_res_acid(bool consider_unidentified_gear = true);
+int player_res_cold(bool calc_unid = true, bool temp = true,
+ bool items = true);
+int player_res_acid(bool calc_unid = true, bool items = true);
int player_acid_resist_factor();
int player_res_torment(bool calc_unid = true);
bool player_res_corrosion(bool calc_unid = true);
bool player_item_conserve(bool calc_unid = true);
-int player_mental_clarity(bool calc_unid = true);
+int player_mental_clarity(bool calc_unid = true, bool items = true);
bool player_can_smell();
bool player_can_swim();
@@ -180,23 +181,28 @@ int player_mutation_level(mutation_type mut);
/* ***********************************************************************
* called from: fight - files - ouch
* *********************************************************************** */
-int player_res_electricity(bool calc_unid = true);
+int player_res_electricity(bool calc_unid = true, bool temp = true,
+ bool items = true);
/* ***********************************************************************
* called from: acr - fight - misc - ouch - spells
* *********************************************************************** */
-int player_res_fire(bool calc_unid = true, bool temp = true);
-int player_res_steam(bool calc_unid = true, bool temp = true);
+int player_res_fire(bool calc_unid = true, bool temp = true,
+ bool items = true);
+int player_res_steam(bool calc_unid = true, bool temp = true,
+ bool items = true);
/* ***********************************************************************
* called from: beam - decks - fight - fod - it_use2 - misc - ouch -
* spells - spells2
* *********************************************************************** */
-int player_res_poison(bool calc_unid = true, bool temp = true);
+int player_res_poison(bool calc_unid = true, bool temp = true,
+ bool items = true);
-bool player_control_teleport(bool calc_unid = true);
+bool player_control_teleport(bool calc_unid = true, bool temp = true,
+ bool items = true);
int player_res_magic(void);