diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-25 17:04:20 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-25 17:04:20 +0000 |
commit | b1c2d6e096eebdbae0c2f5a8dd48a5f67a1eb678 (patch) | |
tree | 9d9ef2508041df23a59c5bc447cc4ee8633944c5 /crawl-ref/source/fight.cc | |
parent | 287e5f0820620b81b518ab1f554107afd8a62ebe (diff) | |
download | crawl-ref-b1c2d6e096eebdbae0c2f5a8dd48a5f67a1eb678.tar.gz crawl-ref-b1c2d6e096eebdbae0c2f5a8dd48a5f67a1eb678.zip |
Complete rewrite of the beam code, making it considerably saner.
However, there might be quite a few bugs lurking in this rewrite. Sorry.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7975 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 3c22c76c3d..5a1b84b795 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -135,15 +135,6 @@ int effective_stat_bonus( int wepType ) #endif } -// Returns random2(x) if random_factor is true, otherwise the mean. -static int maybe_random2( int x, bool random_factor ) -{ - if (random_factor) - return random2(x); - else - return x / 2; -} - // Returns the to-hit for your extra unarmed.attacks. // DOES NOT do the final roll (i.e., random2(your_to_hit)). static int calc_your_to_hit_unarmed(int uattack = UNAT_NO_ATTACK, @@ -2408,7 +2399,7 @@ void melee_attack::chaos_affects_defender() beam.ench_power = beam.damage.num; - fire_beam(beam); + beam.fire(); if (you.can_see(defender)) obvious_effect = beam.obvious_effect; @@ -2975,7 +2966,7 @@ bool melee_attack::apply_damage_brand() beam_temp.beam_source = (attacker->atype() == ACT_PLAYER) ? MHITYOU : monster_index(atk); - mons_ench_f2( def, beam_temp ); + beam_temp.apply_enchantment_to_monster(def); obvious_effect = beam_temp.obvious_effect; } |