From 58eff259a0f37495f45b2d14d6d916c054c3cfb1 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 25 Sep 2009 10:02:38 -0500 Subject: Add a vorpal type for tentacle attacks, and use it for the tentacle-slap attack type. Also, allow unarmed attacks to work on submerged monsters if they use the tentacle vorpal type. Finally, make kraken tentacles use the tentacle-slap attack type. --- crawl-ref/source/fight.cc | 5 +++-- crawl-ref/source/itemprop.h | 1 + crawl-ref/source/mon-data.h | 2 +- crawl-ref/source/mon-util.cc | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index a50a99904a..bb134d5530 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -149,7 +149,7 @@ int effective_stat_bonus( int wepType ) #endif } -// Returns the to-hit for your extra unarmed.attacks. +// 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, bool vampiric = false) @@ -411,7 +411,7 @@ void melee_attack::init_attack() } if (defender && defender->submerged()) - unarmed_ok = false; + unarmed_ok = (attacker->damage_type() == DVORP_TENTACLE); miscast_level = -1; miscast_type = SPTYP_NONE; @@ -721,6 +721,7 @@ static int _modify_blood_amount(const int damage, const int dam_type) switch (dam_type) { case DVORP_CRUSHING: // flails, also unarmed + case DVORP_TENTACLE: // unarmed, tentacles factor = 2; break; case DVORP_SLASHING: // whips diff --git a/crawl-ref/source/itemprop.h b/crawl-ref/source/itemprop.h index ef9e4e8c17..dd1fc9da8b 100644 --- a/crawl-ref/source/itemprop.h +++ b/crawl-ref/source/itemprop.h @@ -518,6 +518,7 @@ enum vorpal_damage_type DVORP_STABBING = 0x6000, // used for knives/daggers DVORP_CLAWING = 0x7000, // claw damage + DVORP_TENTACLE = 0x8000, // tentacle damage // These are shortcuts to tie vorpal/damage types for easy setting... // as above, setting more than one vorpal type is trouble. diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 48c2c0d425..e44a3370d6 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -3023,7 +3023,7 @@ static monsterentry mondata[] = { M_COLD_BLOOD | M_NO_EXP_GAIN, MR_RES_ASPHYX, 0, 10, MONS_KRAKEN_TENTACLE, MONS_KRAKEN_TENTACLE, MH_NATURAL, MAG_IMMUNE, - { {AT_HIT, AF_PLAIN, 15}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + { {AT_TENTACLE_SLAP, AF_PLAIN, 15}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 5, 3, 5, 0 }, 5, 7, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_ANIMAL, HT_WATER, 10, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_LARGE diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index a11cb43c8f..4aa59c072f 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3940,7 +3940,9 @@ int monsters::damage_type(int which_attack) if (!mweap) { const mon_attack_def atk = mons_attack_spec(this, which_attack); - return (atk.type == AT_CLAW) ? DVORP_CLAWING : DVORP_CRUSHING; + return ((atk.type == AT_CLAW) ? DVORP_CLAWING : + (atk.type == AT_TENTACLE_SLAP) ? DVORP_TENTACLE + : DVORP_CRUSHING); } return (get_vorpal_type(*mweap)); -- cgit v1.2.3-54-g00ecf