summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-01 04:00:00 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-01 04:00:00 +0000
commit04f5058cac8e12d3b85834bda4589239932f371a (patch)
tree20863dfb1b0a87c9643f0ca98ce2cb43cf195416 /crawl-ref/source/describe.cc
parent6e3985b473d0b26c028820b3d0a3808d3f3dd7ee (diff)
downloadcrawl-ref-04f5058cac8e12d3b85834bda4589239932f371a.tar.gz
crawl-ref-04f5058cac8e12d3b85834bda4589239932f371a.zip
Add some chaos attacks/weapons. Missiles and launchers of chaos fire a bolt of
a random type (including enchantments, which isn't so good since they don't have a visible beam). Might want to add BEAM_CHAOS and make it a beam of that. Weapons of chaos either does a random brand effect (fire, poison, etc) or a random chaos effect (which includes cloning the attack victim). The AF_CHAOS monster attack flavour either does a random monster flavour or chaos effect (same chaos effects as for weapons). The relative frequency of all the different effects/brands/flavours no doubt needs adjustment. All of this is currently only available via Xom. 10% of all common-type demons sent in by Xom will be chaos spawn (the only kind that use AF_CHAOS, and never randomly generated otherwise). All item gifts from Xom which are generated with a brand will have their brand switched to chaos (this should probably be made to happen less than 100% of the time). And finally one of Xom's bad acts is to upgrade a non-branded weapon of a nearby hostile monster to a chaos brand (this might need to be made less (or more) common). Oh, and if a randart has a brand which would be identified if it were merely an ego weapon, it now identifies the RAP_BRAND property of the randart. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7704 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index b80634e36b..4fd6f9a611 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -981,6 +981,14 @@ static std::string _describe_weapon(const item_def &item, bool verbose)
description += "It turns projectiles fired from it into "
"bolts of frost.";
break;
+ case SPWPN_CHAOS:
+ if (is_range_weapon(item))
+ description += "Each time it fires it turns the launched "
+ "projectile into a different, random type of bolt.";
+ else
+ description += "Each time it hits an enemy it has a "
+ "different, random effect.";
+ break;
case SPWPN_VAMPIRICISM:
description += "It inflicts no extra harm, "
"but heals its wielder somewhat when "
@@ -1145,11 +1153,21 @@ static std::string _describe_ammo( const item_def &item )
if (item.special && item_type_known(item))
{
description += "$$";
+ std::string bolt_name;
switch (item.special)
{
case SPMSL_FLAME:
+ bolt_name = "flame";
+ // Intentional fall-through
case SPMSL_ICE:
+ if (bolt_name.empty())
+ bolt_name = "ice";
+ // Intentional fall-through
+ case SPMSL_CHAOS:
+ if (bolt_name.empty())
+ bolt_name = "a random type";
+
description += "When ";
if (can_throw)
@@ -1163,7 +1181,7 @@ static std::string _describe_ammo( const item_def &item )
description += "fired from an appropriate launcher, ";
description += "it turns into a bolt of ";
- description += (item.special == SPMSL_FLAME) ? "flame" : "ice";
+ description += bolt_name;
description += ".";
break;
case SPMSL_POISONED: