From: <gi...@cr...> - 2013-04-30 12:00:16
|
via e5d409023bf8c5529556f63cb74602637c6180dc (commit) via 26a324c3dbaa1ae2915c552739fb8dac82cc217c (commit) via c43ebfc54eaeeadb441f023eb7f1494156450a0a (commit) via 7d0eca2d614043e5789615be5aa1fceffc366e10 (commit) via 433c8706aa80f84e9c3bb45a646bd474f3e4c74f (commit) via 8fdc22675aa934a89fa219d06f03ac2a14652a15 (commit) via 0463c216bc6f563e46b014330b7b23e5a0917083 (commit) via 73c58b84b289202c16931e19b6892620e2fcacd6 (commit) via de56254bcde09c08ba72c07d27cb6b6fff3ad659 (commit) via d3168e4aa0e12af89f58e96ea9760676b98b27ac (commit) via cd5f249830e642a12391b752d16f9707a00c3852 (commit) via afe756faf15897561df6f2995464a67385e12e86 (commit) via 092fa32faf0b7f0f295765bbb5945e8118e39e58 (commit) via f5432ac14e6ccacda088cbecac937fdb85eaf90e (commit) via c73457f29f79098f8b75cfa4fff671e1eff688fa (commit) from 124357920a9e92b31089fc6d0dc0306b54cf4afa (commit) ----------------------------------------------------------------------- commit e5d409023bf8c5529556f63cb74602637c6180dc Author: Robert Burnham <bur...@gm...> Date: Tue Apr 30 06:49:44 2013 -0500 Implement secondary effects for MUT_RUNED_HANDS Allows for an antimagic effect at +15, +30, +45% power of normal (based on damage_done). Restrictions are set at the effect of the mutation: 1) Aux punches only 2) Main hand punches 3) Channeled through weapon Remember, this is a secondary effect for MUT_RUNED_HANDS. commit 26a324c3dbaa1ae2915c552739fb8dac82cc217c Merge: c43ebfc 1243579 Author: Robert Burnham <bur...@gm...> Date: Tue Apr 30 06:46:56 2013 -0500 Merge branch 'ds_trade_offs' of gitorious.org:crawl/crawl into ds_trade_offs commit c43ebfc54eaeeadb441f023eb7f1494156450a0a Author: Robert Burnham <bur...@gm...> Date: Thu Apr 25 15:40:53 2013 -0500 Revert "Setup structure for alt effects of MUT_RUNED_HANDS" This reverts commit 7d0eca2d614043e5789615be5aa1fceffc366e10. commit 7d0eca2d614043e5789615be5aa1fceffc366e10 Author: Robert Burnham <bur...@gm...> Date: Wed Apr 24 08:20:01 2013 -0500 Setup structure for alt effects of MUT_RUNED_HANDS Alternate effects will be to "seal" spells of a target for a duration. Since there could concievably be some interesting monster ideas which seal a player spell, I've done my best to set up the functions to allow this to be mirrored for monster implementations. commit 433c8706aa80f84e9c3bb45a646bd474f3e4c74f Author: Robert Burnham <bur...@gm...> Date: Wed Apr 24 06:47:32 2013 -0500 Remove duplicate enum for RUNED_HANDS commit 8fdc22675aa934a89fa219d06f03ac2a14652a15 Merge: 0463c21 afe756f Author: Robert Burnham <bur...@gm...> Date: Tue Apr 23 20:55:22 2013 -0500 Merge branch 'ds_trade_offs' of gitorious.org:crawl/crawl into ds_trade_offs commit 0463c216bc6f563e46b014330b7b23e5a0917083 Author: Robert Burnham <bur...@gm...> Date: Mon Apr 22 16:15:40 2013 -0500 Reorder runed_hands in the mutation list commit 73c58b84b289202c16931e19b6892620e2fcacd6 Author: Robert Burnham <bur...@gm...> Date: Fri Apr 19 08:35:28 2013 -0500 New DS mutation: Runed Hands Provides +25/50/75 Spell Power (0.5 enhancer, 1 enhancer, 1.5 enhancer) Additional plans to add melee combat effects of some type. This commit breaks save compat because of the addition of MUT_RUNED_HANDS in the appropriate list of mutations. commit de56254bcde09c08ba72c07d27cb6b6fff3ad659 Author: Robert Burnham <bur...@gm...> Date: Wed Apr 17 18:38:51 2013 -0500 Differentiate Iridescent and Rough Black scales Although in some circumstances the minus dex of rough black isn't too big of a deal, it is noticable for other characters, and the AC offset isn't very differnet from iridescent scales. This boosts rough black from 4,7,10 to 4,8,12. commit d3168e4aa0e12af89f58e96ea9760676b98b27ac Author: Robert Burnham <bur...@gm...> Date: Wed Apr 17 18:37:43 2013 -0500 Remove dprf accidentally left in commit cd5f249830e642a12391b752d16f9707a00c3852 Author: Robert Burnham <bur...@gm...> Date: Wed Apr 17 16:10:45 2013 -0500 Give monstrous DS a scale mutation At some point it was removed, perhaps for balance? I can find no entry of the change in the logs, so I can't be sure. Monstrous DS are, in any case rather low on the defense side, so a scale mutation provides something to even that out. This isn't intended to buff monstrous ds (mds) because they are weak, but rather to allow for the PC to progress further with a degree of difficulty consistent with non monstrous ds. commit afe756faf15897561df6f2995464a67385e12e86 Author: Robert Burnham <bur...@gm...> Date: Fri Apr 19 08:35:28 2013 -0500 New DS mutation: Runed Hands Provides +25/50/75 Spell Power (0.5 enhancer, 1 enhancer, 1.5 enhancer) Additional plans to add melee combat effects of some type. This commit breaks save compat because of the addition of MUT_RUNED_HANDS in the appropriate list of mutations. commit 092fa32faf0b7f0f295765bbb5945e8118e39e58 Author: Robert Burnham <bur...@gm...> Date: Wed Apr 17 18:38:51 2013 -0500 Differentiate Iridescent and Rough Black scales Although in some circumstances the minus dex of rough black isn't too big of a deal, it is noticable for other characters, and the AC offset isn't very differnet from iridescent scales. This boosts rough black from 4,7,10 to 4,8,12. commit f5432ac14e6ccacda088cbecac937fdb85eaf90e Author: Robert Burnham <bur...@gm...> Date: Wed Apr 17 18:37:43 2013 -0500 Remove dprf accidentally left in commit c73457f29f79098f8b75cfa4fff671e1eff688fa Author: Robert Burnham <bur...@gm...> Date: Wed Apr 17 16:10:45 2013 -0500 Give monstrous DS a scale mutation At some point it was removed, perhaps for balance? I can find no entry of the change in the logs, so I can't be sure. Monstrous DS are, in any case rather low on the defense side, so a scale mutation provides something to even that out. This isn't intended to buff monstrous ds (mds) because they are weak, but rather to allow for the PC to progress further with a degree of difficulty consistent with non monstrous ds. ----------------------------------------------------------------------- Summary of changes: crawl-ref/source/melee_attack.cc | 47 +++++++++++++++++++++++++++++-------- crawl-ref/source/melee_attack.h | 2 +- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/crawl-ref/source/melee_attack.cc b/crawl-ref/source/melee_attack.cc index 86ddc0a..948f4f6 100644 --- a/crawl-ref/source/melee_attack.cc +++ b/crawl-ref/source/melee_attack.cc @@ -1469,15 +1469,10 @@ bool melee_attack::player_aux_apply(unarmed_attack_type atk) did_hit = true; aux_damage = player_aux_stat_modify_damage(aux_damage); - aux_damage = random2(aux_damage); - aux_damage = player_apply_fighting_skill(aux_damage, true); - aux_damage = player_apply_misc_modifiers(aux_damage); - aux_damage = player_apply_slaying_bonuses(aux_damage, true); - aux_damage = player_apply_final_multipliers(aux_damage); const int pre_ac_dmg = aux_damage; @@ -1565,6 +1560,24 @@ bool melee_attack::player_aux_apply(unarmed_attack_type atk) you.can_see(defender) ? ", but do no damage" : ""); } + // [rpb] Unarmed punches with runed hands provides the antimagic effect + // at a slightly less significant power than for primary attacks. The + // effect is applied this late because we want output to occur after + // the typical attack phrases. + if (player_mutation_level(MUT_RUNED_HANDS)) + { + int power = damage_done * + (1 + player_mutation_level(MUT_RUNED_HANDS) * 0.15); + antimagic_affects_defender(power*2); + + if (!special_damage_message.empty()) + { + mprf("%s", special_damage_message.c_str()); + + special_damage_message.clear(); + } + } + if (defender->as_monster()->hit_points < 1) { _defender_die(); @@ -2386,11 +2399,14 @@ bool melee_attack::distortion_affects_defender() return false; } -void melee_attack::antimagic_affects_defender() +void melee_attack::antimagic_affects_defender(int power) { + // [rpb] We expect power to come in unscaled + power *= 2; + if (defender->is_player()) { - int mp_loss = min(you.magic_points, random2(damage_done * 2)); + int mp_loss = min(you.magic_points, random2(power)); if (!mp_loss) return; mpr("You feel your power leaking away.", MSGCH_WARN); @@ -2403,7 +2419,7 @@ void melee_attack::antimagic_affects_defender() { defender->as_monster()->add_ench(mon_enchant(ENCH_ANTIMAGIC, 0, attacker, // doesn't matter - random2(damage_done * 2) * BASELINE_DELAY)); + random2(power) * BASELINE_DELAY)); special_damage_message = apostrophise(defender->name(DESC_THE)) + " magic leaks into the air."; @@ -3024,6 +3040,17 @@ bool melee_attack::apply_damage_brand() return false; } + // [rpb] MUT_RUNED_HANDS allows for antimagic on unarmed attacks + // (mut level 2) and on unbranded weapons (level 3) at +15/30/45% power + if (attacker->is_player() && brand == SPWPN_NORMAL + && player_mutation_level(MUT_RUNED_HANDS) + && (!weapon || player_mutation_level(MUT_RUNED_HANDS) > 2)) + { + int power = damage_done * + (1 + player_mutation_level(MUT_RUNED_HANDS) * 0.15); + antimagic_affects_defender(power*2); + } + if (!damage_done && (brand == SPWPN_FLAMING || brand == SPWPN_FREEZING || brand == SPWPN_HOLY_WRATH || brand == SPWPN_ORC_SLAYING @@ -3258,7 +3285,7 @@ bool melee_attack::apply_damage_brand() break; case SPWPN_ANTIMAGIC: - antimagic_affects_defender(); + antimagic_affects_defender(damage_done); break; } @@ -4653,7 +4680,7 @@ void melee_attack::mons_apply_attack_flavour() break; case AF_ANTIMAGIC: - antimagic_affects_defender(); + antimagic_affects_defender(damage_done); break; case AF_PAIN: diff --git a/crawl-ref/source/melee_attack.h b/crawl-ref/source/melee_attack.h index e4325d2..60b28c4 100644 --- a/crawl-ref/source/melee_attack.h +++ b/crawl-ref/source/melee_attack.h @@ -121,7 +121,7 @@ private: /* Brand / Attack Effects */ // Returns true if the defender is banished. bool distortion_affects_defender(); - void antimagic_affects_defender(); + void antimagic_affects_defender(int power); void pain_affects_defender(); void chaos_affects_defender(); void chaos_affects_attacker(); -- Dungeon Crawl Stone Soup |