summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/art-func.h
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2014-03-27 19:58:10 +0000
committerChris Campbell <chriscampbell89@gmail.com>2014-03-28 00:13:07 +0000
commit8cf0a2b35dd70e1b0eb2d92b4df78f6bf0447dbb (patch)
treee783de8855244f720824cf2b37efe0515f12b7a4 /crawl-ref/source/art-func.h
parentcbe865235fea0901219c31f507dc62a948a9373d (diff)
downloadcrawl-ref-8cf0a2b35dd70e1b0eb2d92b4df78f6bf0447dbb.tar.gz
crawl-ref-8cf0a2b35dd70e1b0eb2d92b4df78f6bf0447dbb.zip
Fix Singing Sword messages
Broken by 25a9b7f745d6, it was using the same messages for silence and 0 tension and never using the SCREAM messages.
Diffstat (limited to 'crawl-ref/source/art-func.h')
-rw-r--r--crawl-ref/source/art-func.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/art-func.h b/crawl-ref/source/art-func.h
index c2b41efc40..9225da7311 100644
--- a/crawl-ref/source/art-func.h
+++ b/crawl-ref/source/art-func.h
@@ -353,7 +353,7 @@ static void _SINGING_SWORD_unequip(item_def *item, bool *show_msgs)
static void _SINGING_SWORD_world_reacts(item_def *item)
{
int tension = get_tension(GOD_NO_GOD);
- int tier = (tension <= 0) ? 0 : (tension < 40) ? 1 : 2;
+ int tier = (tension <= 0) ? 1 : (tension < 40) ? 2 : 3;
bool silent = silenced(you.pos());
string old_name = get_artefact_name(*item);
@@ -371,14 +371,14 @@ static void _SINGING_SWORD_world_reacts(item_def *item)
}
// not as spammy at low tension
- if (!x_chance_in_y(7, (tier == 0) ? 1000 : (tier == 1) ? 100 : 10))
+ if (!x_chance_in_y(7, (tier == 1) ? 1000 : (tier == 2) ? 100 : 10))
return;
// it will still struggle more with higher tension
if (silent)
tier = 0;
- if (tier == 2 && one_chance_in(10))
+ if (tier == 3 && one_chance_in(10))
tier++; // SCREAM -- double damage
const char *tenname[] = {"silenced", "no_tension", "low_tension",
@@ -389,13 +389,13 @@ static void _SINGING_SWORD_world_reacts(item_def *item)
msg = maybe_pick_random_substring(msg);
msg = maybe_capitalise_substring(msg);
- const int loudness[] = {0, 15, 25, 35};
+ const int loudness[] = {0, 0, 15, 25, 35};
item_noise(*item, msg, loudness[tier]);
- if (tier < 2)
+ if (tier < 3)
return; // no damage on low tiers
- sonic_damage(tier == 3);
+ sonic_damage(tier == 4);
}
////////////////////////////////////////////////////