diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-10-11 16:38:02 +0000 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-10-11 16:38:02 +0000 |
commit | 64544982eaf64b83c9d8bdbb4b519505d541aec9 (patch) | |
tree | d89d2a2c99f5bd0d063cf0314178cec0406d5b03 | |
parent | e7ff598d02c8559661bcd39ad63e7a6d2577f3d0 (diff) | |
parent | a4ef465477e3701d5aebf419ab19823e685889c7 (diff) | |
download | plugin-64544982eaf64b83c9d8bdbb4b519505d541aec9.tar.gz plugin-64544982eaf64b83c9d8bdbb4b519505d541aec9.tar.bz2 plugin-64544982eaf64b83c9d8bdbb4b519505d541aec9.tar.xz plugin-64544982eaf64b83c9d8bdbb4b519505d541aec9.zip |
Merge branch 'jesusalva/wands' into 'master'
Jesusalva's Birthday Patch
Closes evol-all#65
See merge request evol/evol-hercules!24
-rw-r--r-- | src/emap/battle.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/emap/battle.c b/src/emap/battle.c index 5a24927..3889c18 100644 --- a/src/emap/battle.c +++ b/src/emap/battle.c @@ -91,8 +91,8 @@ struct Damage ebattle_calc_weapon_attack_post(struct Damage retVal, struct block_list *src, struct block_list *target, uint16 skill_id, - uint16 skill_lv __attribute__ ((unused)), - int wflag __attribute__ ((unused))) + uint16 skill_lv, + int wflag) { if (src == NULL) return retVal; @@ -101,6 +101,14 @@ struct Damage ebattle_calc_weapon_attack_post(struct Damage retVal, if (sd == NULL) return retVal; + // Staffs and Books will use MATK instead of ATK. + // These regular attacks are still subject to regular DEF/Evade/etc. + // And base attack bonus might still be gained from STR instead of INT. + // TODO: Move this to a pre-hook to avoid extra calculation + if (!skill_id && (sd->weapontype == W_STAFF || sd->weapontype == W_BOOK)) { + retVal=battle->calc_magic_attack(src, target, skill_id, skill_lv, wflag); + } + struct mob_data *md = BL_CAST(BL_MOB, target); if (md == NULL) return retVal; |