summaryrefslogtreecommitdiff
path: root/src/map/skill.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-10-06 22:06:48 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-10-06 22:06:48 -0700
commitb5ad64c62a003699a8060744dbf27503386435d5 (patch)
tree96d44e79eb453966fc606c9c141968ff6dd6660d /src/map/skill.cpp
parent735bae276c2f08e10c5b02d8187c665dadb3adcb (diff)
downloadtmwa-b5ad64c62a003699a8060744dbf27503386435d5.tar.gz
tmwa-b5ad64c62a003699a8060744dbf27503386435d5.tar.bz2
tmwa-b5ad64c62a003699a8060744dbf27503386435d5.tar.xz
tmwa-b5ad64c62a003699a8060744dbf27503386435d5.zip
Remove vestigial support for offhanded weapons
Diffstat (limited to 'src/map/skill.cpp')
-rw-r--r--src/map/skill.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/map/skill.cpp b/src/map/skill.cpp
index d1c8685..7c79e46 100644
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -286,7 +286,7 @@ int skill_attack(BF attack_type, dumb_ptr<block_list> src,
lv = flag.level;
dmg = battle_calc_attack(attack_type, src, bl, skillid, skilllv, flag.lo); //ダメージ計算
- damage = dmg.damage + dmg.damage2;
+ damage = dmg.damage;
if (lv == 15)
lv = -1;
@@ -347,26 +347,16 @@ int skill_attack(BF attack_type, dumb_ptr<block_list> src,
{
hp += (dmg.damage * sd->hp_drain_per) / 100;
}
- if (sd->hp_drain_rate_ && dmg.damage2 > 0
- && random_::chance({sd->hp_drain_rate_, 100}))
- {
- hp += (dmg.damage2 * sd->hp_drain_per_) / 100;
- }
if (sd->sp_drain_rate > 0 && dmg.damage > 0
&& random_::chance({sd->sp_drain_rate, 100}))
{
sp += (dmg.damage * sd->sp_drain_per) / 100;
}
- if (sd->sp_drain_rate_ > 0 && dmg.damage2 > 0
- && random_::chance({sd->sp_drain_rate_, 100}))
- {
- sp += (dmg.damage2 * sd->sp_drain_per_) / 100;
- }
if (hp || sp)
pc_heal(sd, hp, sp);
}
- return (dmg.damage + dmg.damage2); /* 与ダメを返す */
+ return (dmg.damage); /* 与ダメを返す */
}
typedef int(*SkillFunc)(dumb_ptr<block_list>, dumb_ptr<block_list>,