summaryrefslogtreecommitdiff
path: root/src/map/battle.cpp
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2024-08-07 23:40:36 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-08-30 21:05:24 +0200
commit48ee77e4fdfc3741996df0ddaca49c090292fc10 (patch)
tree9c8b265ac18c45bf6e51745af32b471646422b26 /src/map/battle.cpp
parent2af706705bf6dd3d147eb3b7f84fba3d3713a498 (diff)
downloadtmwa-48ee77e4fdfc3741996df0ddaca49c090292fc10.tar.gz
tmwa-48ee77e4fdfc3741996df0ddaca49c090292fc10.tar.bz2
tmwa-48ee77e4fdfc3741996df0ddaca49c090292fc10.tar.xz
tmwa-48ee77e4fdfc3741996df0ddaca49c090292fc10.zip
sc_phys_shield_item
Diffstat (limited to 'src/map/battle.cpp')
-rw-r--r--src/map/battle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/battle.cpp b/src/map/battle.cpp
index ac8dcf2..d66308d 100644
--- a/src/map/battle.cpp
+++ b/src/map/battle.cpp
@@ -2091,10 +2091,10 @@ ATK battle_weapon_attack(dumb_ptr<block_list> src, dumb_ptr<block_list> target,
}
if (wd.damage > 0
- && t_sc_data[StatusChange::SC_PHYS_SHIELD].timer
+ && (t_sc_data[StatusChange::SC_PHYS_SHIELD].timer || t_sc_data[StatusChange::SC_PHYS_SHIELD_ITEM].timer)
&& target->bl_type == BL::PC)
{
- int reduction = t_sc_data[StatusChange::SC_PHYS_SHIELD].val1;
+ int reduction = std::max(t_sc_data[StatusChange::SC_PHYS_SHIELD].val1, t_sc_data[StatusChange::SC_PHYS_SHIELD_ITEM].val1); // highest value is taken here but serverdata should make sure only one of those is active
if (reduction > wd.damage)
reduction = wd.damage;