diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-01-06 19:33:30 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-01-06 19:47:21 +0530 |
commit | 7fc0151d1374a440f91a12de180cbbc8d2ffb1a5 (patch) | |
tree | d044e6038dba817111ae06cb7f27fee011d3532c | |
parent | 65df1b1f5ffe872e5baa3eb8611c0335f944b4cf (diff) | |
download | crawl-ref-7fc0151d1374a440f91a12de180cbbc8d2ffb1a5.tar.gz crawl-ref-7fc0151d1374a440f91a12de180cbbc8d2ffb1a5.zip |
Fix fractured grammar in miscast death/foo causes.
-rw-r--r-- | crawl-ref/source/spl-mis.cc | 22 | ||||
-rw-r--r-- | crawl-ref/source/spl-mis.h | 2 |
2 files changed, 15 insertions, 9 deletions
diff --git a/crawl-ref/source/spl-mis.cc b/crawl-ref/source/spl-mis.cc index 16a3599e70..746ff1452a 100644 --- a/crawl-ref/source/spl-mis.cc +++ b/crawl-ref/source/spl-mis.cc @@ -237,14 +237,16 @@ void MiscastEffect::init() // Explosion stuff. beam.is_explosion = true; + // [ds] Don't attribute the beam's cause to the actor, because the + // death message will name the actor anyway. if (cause.empty()) - cause = get_default_cause(); + cause = get_default_cause(false); beam.aux_source = cause; beam.beam_source = kill_source; beam.thrower = kt; } -std::string MiscastEffect::get_default_cause() +std::string MiscastEffect::get_default_cause(bool attribute_to_user) const { // This is only for true miscasts, which means both a spell and that // the source of the miscast is the same as the target of the miscast. @@ -255,7 +257,7 @@ std::string MiscastEffect::get_default_cause() if (source == NON_MONSTER) { ASSERT(target->atype() == ACT_PLAYER); - std::string str = "your miscasting "; + std::string str = "miscasting "; str += spell_title(spell); return str; } @@ -263,13 +265,17 @@ std::string MiscastEffect::get_default_cause() ASSERT(act_source->atype() == ACT_MONSTER); ASSERT(act_source == target); - if (you.can_see(act_source)) + if (attribute_to_user) { - return apostrophise(source_as_monster()->base_name(DESC_PLAIN)) - + " spell miscasting"; + return (std::string(you.can_see(act_source)? + act_source->name(DESC_NOCAP_A) + : "something") + + " miscasting " + spell_title(spell)); } else - return "something's spell miscasting"; + { + return std::string("miscast of ") + spell_title(spell); + } } bool MiscastEffect::neither_end_silenced() @@ -711,7 +717,7 @@ bool MiscastEffect::_create_monster(monster_type what, int abj_deg, : GOD_NO_GOD; if (cause.empty()) - cause = get_default_cause(); + cause = get_default_cause(true); mgen_data data = mgen_data::hostile_at(what, cause, alert, abj_deg, 0, target->pos(), 0, god); diff --git a/crawl-ref/source/spl-mis.h b/crawl-ref/source/spl-mis.h index 0bf8eb0548..df34fbf9f3 100644 --- a/crawl-ref/source/spl-mis.h +++ b/crawl-ref/source/spl-mis.h @@ -100,7 +100,7 @@ private: private: void init(); - std::string get_default_cause(); + std::string get_default_cause(bool attribute_to_user) const; monsters* target_as_monster() { |