diff options
author | johnny shelley <jwshelley@shell-22005.(none)> | 2009-11-19 05:44:39 +0000 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-20 02:34:28 -0800 |
commit | cd397dc4d76ee1ca808b7a19780b7f0a573331f1 (patch) | |
tree | 2da4843a0e279a8a2ddb79326812249d70d7e6c2 /crawl-ref | |
parent | 1dcce9fd9868509eca825cf264c95dcb0b5e511a (diff) | |
download | crawl-ref-cd397dc4d76ee1ca808b7a19780b7f0a573331f1.tar.gz crawl-ref-cd397dc4d76ee1ca808b7a19780b7f0a573331f1.zip |
ammo mulch changes
fire / frost / electric / reaping are not auto mulch flame has chance to
save reduced by 2 frost has chance to save reduced by 1 reaping has
chance to save reduced by 3 electric has standard chance as it only
procs 1 in 3 added was_missile to beam properties in order to not auto
mulch other beam types than BEAM_MISSILE
Signed-off-by: Matthew Cline <zelgadis@sourceforge.net>
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/beam.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/beam.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/describe.cc | 16 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 9 |
4 files changed, 18 insertions, 11 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 79068c942f..b1027781fe 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3058,7 +3058,7 @@ void bolt::drop_object() ASSERT( item != NULL && item->is_valid() ); // Conditions: beam is missile and not tracer. - if (is_tracer || flavour != BEAM_MISSILE) + if (is_tracer || !was_missile) return; // Summoned creatures' thrown items disappear. diff --git a/crawl-ref/source/beam.h b/crawl-ref/source/beam.h index 20f03622cd..aad832b574 100644 --- a/crawl-ref/source/beam.h +++ b/crawl-ref/source/beam.h @@ -111,6 +111,8 @@ struct bolt bolt* special_explosion; // For exploding with a different // flavour/damage/etc than the beam // itself. + bool was_missile; // For determining if this was SPMSL_FLAME / FROST etc + // this is required in order to change mulch rate on these types // Various callbacks. std::vector<range_used_func> range_funcs; diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index abffa019e0..550eee4a9d 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1023,16 +1023,14 @@ static std::string _describe_ammo(const item_def &item) switch (item.special) { case SPMSL_FLAME: - bolt_name = "flame"; - // Intentional fall-through. + description += "It turns into a bolt of flame."; + break; case SPMSL_FROST: - if (bolt_name.empty()) - bolt_name = "frost"; - // Intentional fall-through. + description += "It turns into a bolt of flame."; + break; case SPMSL_ELECTRIC: - if (bolt_name.empty()) - bolt_name = "electricity"; - // Intentional fall-through. + description += "The electricity stored in it may find a path to the ground."; + break; case SPMSL_CHAOS: if (bolt_name.empty()) bolt_name = "a random type"; @@ -1052,7 +1050,6 @@ static std::string _describe_ammo(const item_def &item) description += "it turns into a bolt of "; description += bolt_name; description += "."; - always_destroyed = true; break; case SPMSL_POISONED: @@ -1069,7 +1066,6 @@ static std::string _describe_ammo(const item_def &item) description += "If it kills a monster, causing it to leave " "a corpse, the corpse will be animated as a zombie " "friendly to the one who " + threw_or_fired + " it."; - always_destroyed = true; break; case SPMSL_PENETRATION: description += "It will pass through any targets it hits, " diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 99d98abaae..13be59da12 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1975,6 +1975,7 @@ bool setup_missile_beam(const actor *agent, bolt &beam, item_def &item, } beam.type = dchar_glyph(zapsym); + beam.was_missile = true; returning = get_weapon_brand(item) == SPWPN_RETURNING || get_ammo_brand(item) == SPMSL_RETURNING; @@ -3206,6 +3207,8 @@ bool thrown_object_destroyed(item_def *item, const coord_def& where, if (item->base_type == OBJ_MISSILES) { int brand = get_ammo_brand(*item); + if (brand == SPMSL_CHAOS || brand == SPMSL_DISPERSAL) + return(true); // [dshaligram] Removed influence of Throwing on ammo preservation. // The effect is nigh impossible to perceive. switch (item->sub_type) @@ -3228,6 +3231,12 @@ bool thrown_object_destroyed(item_def *item, const coord_def& where, } if (brand == SPMSL_STEEL) chance *= 10; + if (brand == SPMSL_FLAME) + chance -= 2; + if (brand == SPMSL_FROST) // ice seems less destructive to the missile, right? + chance -= 1; + if (brand == SPMSL_REAPING) + chance -= 3; } // Enchanted projectiles get an extra shot at avoiding |