From 589c24cae68875c6953ce2778083b213f4072797 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sun, 1 Apr 2007 20:06:57 +0000 Subject: Fixed super-electric-golems. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1174 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 10 ++++++++-- crawl-ref/source/mon-data.h | 2 +- crawl-ref/source/player.cc | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index a756d29d6a..05cd73127c 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2760,8 +2760,10 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) case AF_ELEC: special_damage = - resist_adjust_damage(defender->res_elec(), - atk->hit_dice + random2( 2 * atk->hit_dice )); + resist_adjust_damage( + defender->res_elec(), + atk->hit_dice + random2( atk->hit_dice / 2 )); + if (defender->levitates()) special_damage = special_damage * 2 / 3; @@ -2770,6 +2772,10 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) attacker->name(DESC_CAP_THE).c_str(), attacker->conj_verb("shock").c_str(), defender->name(DESC_NOCAP_THE).c_str()); + +#ifdef DEBUG_DIAGNOSTICS + mprf(MSGCH_DIAGNOSTICS, "Shock damage: %d", special_damage); +#endif break; case AF_VAMPIRIC: diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 2b09f34de8..75f479927f 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -3833,7 +3833,7 @@ M_SPELLCASTER | M_SEE_INVIS, MR_RES_ELEC | MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD, 0, 10, MONS_CLAY_GOLEM, MONS_ELECTRIC_GOLEM, MH_NONLIVING, -8, - { {AT_HIT, AF_ELEC, 12}, {AT_HIT, AF_ELEC, 12}, {AT_HIT, AF_ELEC, 12}, {AT_HIT, AF_PLAIN, 12} }, + { {AT_HIT, AF_ELEC, 15}, {AT_HIT, AF_ELEC, 15}, {AT_HIT, AF_PLAIN, 18}, {AT_HIT, AF_PLAIN, 18} }, { 15, 7, 4, 0 }, 5, 20, 20, 7, MST_ELECTRIC_GOLEM, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_PLANT, MONUSE_OPEN_DOORS, SIZE_LARGE diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index dd6f5fff6d..74d3654049 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5080,7 +5080,7 @@ int player::res_cold() const int player::res_elec() const { - return (player_res_electricity()); + return (player_res_electricity() * 2); } int player::res_poison() const -- cgit v1.2.3-54-g00ecf