diff options
Diffstat (limited to 'src/map/battle.cpp')
-rw-r--r-- | src/map/battle.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/map/battle.cpp b/src/map/battle.cpp index b745e05..ac8dcf2 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -2060,18 +2060,28 @@ ATK battle_weapon_attack(dumb_ptr<block_list> src, dumb_ptr<block_list> target, // 攻撃対象となりうるので攻撃 | Attack because it can be attacked if (sd && sd->status.weapon == ItemLook::W_BOW) { - IOff0 aidx = sd->equip_index_maybe[EQUIP::ARROW]; - if (aidx.ok()) - { - if (battle_config.arrow_decrement) - pc_delitem(sd, aidx, 1, 0); - } - else + IOff0 widx = sd->equip_index_maybe[EQUIP::WEAPON]; + + OMATCH_BEGIN_SOME (sdidw, sd->inventory_data[widx]) { - clif_arrow_fail(sd, 0); - return ATK::ZERO; + if (!bool(sdidw->mode & ItemMode::DONT_USE_AMMO)) + { + IOff0 aidx = sd->equip_index_maybe[EQUIP::ARROW]; + if (aidx.ok()) + { + if (battle_config.arrow_decrement) + pc_delitem(sd, aidx, 1, 0); + } + else + { + clif_arrow_fail(sd, 0); + return ATK::ZERO; + } + } } + OMATCH_END (); } + wd = battle_calc_weapon_attack(src, target, SkillID::ZERO, 0, 0); // significantly increase injuries for hasted characters |