summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player-stats.cc
diff options
context:
space:
mode:
authorBen Striegel <ben.striegel@gmail.com>2012-03-22 23:50:45 -0400
committerNeil Moore <neil@s-z.org>2012-04-04 23:39:23 -0400
commit8da6c8d011e0fc1d7953322b48ae0a4309827c46 (patch)
tree0aeb1cecdf2758531792a47b286f85caf93e4668 /crawl-ref/source/player-stats.cc
parentaf7e6c68faf109a230195b517ec6185ec4bd08d2 (diff)
downloadcrawl-ref-8da6c8d011e0fc1d7953322b48ae0a4309827c46.tar.gz
crawl-ref-8da6c8d011e0fc1d7953322b48ae0a4309827c46.zip
Suppression aura effects, part 1
This first round of suppression effects focuses solely on denying the player any advantages (and disadvantages!) from equipped magical items. Specifically, I searched for the following three strings in the source: "wearing", "player_equip", and "scan_artefact" and added a "you.suppressed()" clause to ensure that effects only apply outside of fields of magical suppression. There's a lot more to do, but this is a good start. Specifically, this addresses the most important aspect of the suppression aura, which is to deny the player any resists from items.
Diffstat (limited to 'crawl-ref/source/player-stats.cc')
-rw-r--r--crawl-ref/source/player-stats.cc45
1 files changed, 27 insertions, 18 deletions
diff --git a/crawl-ref/source/player-stats.cc b/crawl-ref/source/player-stats.cc
index 18de7a1849..f97c2d689a 100644
--- a/crawl-ref/source/player-stats.cc
+++ b/crawl-ref/source/player-stats.cc
@@ -324,14 +324,17 @@ static int _strength_modifier()
result += che_stat_boost();
- // ego items of strength
- result += 3 * count_worn_ego(SPARM_STRENGTH);
+ if (!you.suppressed())
+ {
+ // ego items of strength
+ result += 3 * count_worn_ego(SPARM_STRENGTH);
- // rings of strength
- result += player_equip(EQ_RINGS_PLUS, RING_STRENGTH);
+ // rings of strength
+ result += player_equip(EQ_RINGS_PLUS, RING_STRENGTH);
- // randarts of strength
- result += scan_artefacts(ARTP_STRENGTH);
+ // randarts of strength
+ result += scan_artefacts(ARTP_STRENGTH);
+ }
// mutations
result += player_mutation_level(MUT_STRONG)
@@ -365,14 +368,17 @@ static int _int_modifier()
result += che_stat_boost();
- // ego items of intelligence
- result += 3 * count_worn_ego(SPARM_INTELLIGENCE);
+ if (!you.suppressed())
+ {
+ // ego items of intelligence
+ result += 3 * count_worn_ego(SPARM_INTELLIGENCE);
- // rings of intelligence
- result += player_equip(EQ_RINGS_PLUS, RING_INTELLIGENCE);
+ // rings of intelligence
+ result += player_equip(EQ_RINGS_PLUS, RING_INTELLIGENCE);
- // randarts of intelligence
- result += scan_artefacts(ARTP_INTELLIGENCE);
+ // randarts of intelligence
+ result += scan_artefacts(ARTP_INTELLIGENCE);
+ }
// mutations
result += player_mutation_level(MUT_CLEVER)
@@ -393,14 +399,17 @@ static int _dex_modifier()
result += che_stat_boost();
- // ego items of dexterity
- result += 3 * count_worn_ego(SPARM_DEXTERITY);
+ if (!you.suppressed())
+ {
+ // ego items of dexterity
+ result += 3 * count_worn_ego(SPARM_DEXTERITY);
- // rings of dexterity
- result += player_equip(EQ_RINGS_PLUS, RING_DEXTERITY);
+ // rings of dexterity
+ result += player_equip(EQ_RINGS_PLUS, RING_DEXTERITY);
- // randarts of dexterity
- result += scan_artefacts(ARTP_DEXTERITY);
+ // randarts of dexterity
+ result += scan_artefacts(ARTP_DEXTERITY);
+ }
// mutations
result += player_mutation_level(MUT_AGILE)