diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-29 10:52:16 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-29 10:52:16 +0000 |
commit | 775b9001bdbf57534c231191f194ab76b0c5e81c (patch) | |
tree | db6f435eadc0d6d853108243a44cdc4853560431 /crawl-ref/source/fight.cc | |
parent | 253496da889864afbddbaea897571342f6b38d21 (diff) | |
download | crawl-ref-775b9001bdbf57534c231191f194ab76b0c5e81c.tar.gz crawl-ref-775b9001bdbf57534c231191f194ab76b0c5e81c.zip |
Updated changes list.
Give Lugonu's retribution more of the Abyss/distortion theme.
Added extra check for Sif Muna gifts.
Reduced spatial vortex base damage, but give them a distortion attack.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1118 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 138 |
1 files changed, 75 insertions, 63 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index c2664ce6ba..ca1d3df729 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1493,6 +1493,76 @@ void melee_attack::drain_monster() attacker->god_conduct(DID_NECROMANCY, 2); } +bool melee_attack::distortion_affects_defender() +{ + //jmf: blink frogs *like* distortion + // I think could be amended to let blink frogs "grow" like + // jellies do {dlb} + if (defender->id() == MONS_BLINK_FROG) + { + if (one_chance_in(5)) + { + emit_nodmg_hit_message(); + special_damage_message = + make_stringf("%s %s in the translocular energy.", + defender->name(DESC_CAP_THE).c_str(), + defender->conj_verb("bask").c_str()); + + defender->heal(1 + random2avg(7, 2), true); // heh heh + } + return (false); + } + + if (one_chance_in(3)) + { + special_damage_message = + make_stringf( + "Space bends around %s.", + defender->name(DESC_NOCAP_THE).c_str()); + special_damage += 1 + random2avg(7, 2); + return (false); + } + + if (one_chance_in(3)) + { + special_damage_message = + make_stringf( + "Space warps horribly around %s!", + defender->name(DESC_NOCAP_THE).c_str()); + + special_damage += 3 + random2avg(24, 2); + return (false); + } + + if (one_chance_in(3)) + { + emit_nodmg_hit_message(); + defender->blink(); + return (false); + } + + // Used to be coinflip() || coinflip() for players, just coinflip() + // for monsters; this is a compromise. Note that it makes banishment + // a touch more likely for players, and a shade less likely for + // monsters. + if (!one_chance_in(3)) + { + emit_nodmg_hit_message(); + defender->teleport(coinflip(), one_chance_in(5)); + return (false); + } + + if (you.level_type != LEVEL_ABYSS && coinflip()) + { + emit_nodmg_hit_message(); + defender->banish( atk? atk->name(DESC_PLAIN, true) + : attacker->name(DESC_PLAIN) ); + return (true); + } + + return (false); +} + bool melee_attack::apply_damage_brand() { // Monster resistance to the brand. @@ -1665,70 +1735,8 @@ bool melee_attack::apply_damage_brand() break; case SPWPN_DISTORTION: - //jmf: blink frogs *like* distortion - // I think could be amended to let blink frogs "grow" like - // jellies do {dlb} - if (defender->id() == MONS_BLINK_FROG) - { - if (one_chance_in(5)) - { - emit_nodmg_hit_message(); - special_damage_message = - make_stringf("%s %s in the translocular energy.", - defender->name(DESC_CAP_THE).c_str(), - defender->conj_verb("bask").c_str()); - - defender->heal(1 + random2avg(7, 2), true); // heh heh - } - break; - } - - if (one_chance_in(3)) - { - special_damage_message = - make_stringf( - "Space bends around %s.", - defender->name(DESC_NOCAP_THE).c_str()); - special_damage += 1 + random2avg(7, 2); - break; - } - - if (one_chance_in(3)) - { - special_damage_message = - make_stringf( - "Space warps horribly around %s!", - defender->name(DESC_NOCAP_THE).c_str()); - - special_damage += 3 + random2avg(24, 2); - break; - } - - if (one_chance_in(3)) - { - emit_nodmg_hit_message(); - defender->blink(); - break; - } - - // Used to be coinflip() || coinflip() for players, just coinflip() - // for monsters; this is a compromise. Note that it makes banishment - // a touch more likely for players, and a shade less likely for - // monsters. - if (!one_chance_in(3)) - { - emit_nodmg_hit_message(); - defender->teleport(coinflip(), one_chance_in(5)); - break; - } - - if (you.level_type != LEVEL_ABYSS && coinflip()) - { - emit_nodmg_hit_message(); - defender->banish( atk? atk->name(DESC_PLAIN, true) - : attacker->name(DESC_PLAIN) ); + if (distortion_affects_defender()) return (true); - } break; case SPWPN_CONFUSE: @@ -2865,6 +2873,10 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) defender->poison( attacker, 2 + random2(4) ); splash_defender_with_acid(3); break; + + case AF_DISTORT: + distortion_affects_defender(); + break; } } |