diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-22 14:09:01 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-22 14:09:01 +0000 |
commit | 7740a68642e66bb59368042d109262332d849298 (patch) | |
tree | eb9cb5b75c38753e9956604e70f8281695e428e0 /src/map/battle.c | |
parent | 68b7108daded2d1b35ae383e6acd9d251112e22d (diff) | |
download | hercules-7740a68642e66bb59368042d109262332d849298.tar.gz hercules-7740a68642e66bb59368042d109262332d849298.tar.bz2 hercules-7740a68642e66bb59368042d109262332d849298.tar.xz hercules-7740a68642e66bb59368042d109262332d849298.zip |
- getnameditem will now also work on stackable items
- Corrected battle_calc_weapon_attack so that all skills ignore your left-hand weapon, and that the Katar's double-attack damage bonus for the offhand damage applies ONLY on normal attacks.
- Fixed Resurrect Homunculus's % to 20*lv%
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8426 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 51101b3c0..facdd6169 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -953,17 +953,15 @@ static struct Damage battle_calc_weapon_attack( if (skill_num == GS_GROUNDDRIFT) s_ele = s_ele_ = wflag; //element comes in flag. - if (sd && sd->weapontype1 == 0 && sd->weapontype2 > 0) - { - flag.rh=0; - flag.lh=1; - } - if (sstatus->lhw && sstatus->lhw->atk) - flag.lh=1; - - if (skill_num == ASC_BREAKER) - { //Soul Breaker disregards dual-wielding. - flag.rh = 1; flag.lh = 0; + if(!skill_num) + { //Skills ALWAYS use ONLY your right-hand weapon (tested on Aegis 10.2) + if (sd && sd->weapontype1 == 0 && sd->weapontype2 > 0) + { + flag.rh=0; + flag.lh=1; + } + if (sstatus->lhw && sstatus->lhw->atk) + flag.lh=1; } //Check for critical @@ -1193,7 +1191,6 @@ static struct Damage battle_calc_weapon_attack( short index = sd->equip_index[8]; wd.damage = sstatus->batk; - if (flag.lh) wd.damage2 = wd.damage; if (index >= 0 && sd->inventory_data[index] && @@ -1205,7 +1202,6 @@ static struct Damage battle_calc_weapon_attack( if(src->type == BL_HOM){ TBL_HOM *hd = (TBL_HOM*)src; wd.damage = hd->master->homunculus.intimacy ; - wd.damage2 = hd->master->homunculus.intimacy ; hd->master->homunculus.intimacy = 200; clif_send_homdata(hd->master,0x100,hd->master->homunculus.intimacy/100); break; @@ -1230,7 +1226,7 @@ static struct Damage battle_calc_weapon_attack( i |= 16; // for ex. shuriken must not be influenced by DEX } wd.damage = battle_calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, sd, i); - if (sstatus->lhw && flag.lh) + if (flag.lh) wd.damage2 = battle_calc_base_damage(sstatus, sstatus->lhw, sc, tstatus->size, sd, i); // Added split damage for Huuma @@ -1766,7 +1762,8 @@ static struct Damage battle_calc_weapon_attack( } wd.damage = battle_addmastery(sd,target,wd.damage,0); - if (flag.lh) wd.damage2 = battle_addmastery(sd,target,wd.damage2,1); + if (flag.lh) + wd.damage2 = battle_addmastery(sd,target,wd.damage2,1); if((skill=pc_checkskill(sd,SG_STAR_ANGER)) >0 && (t_class == sd->hate_mob[2] || (sc && sc->data[SC_MIRACLE].timer!=-1))) { @@ -1989,8 +1986,8 @@ static struct Damage battle_calc_weapon_attack( wd.damage2 = wd.damage2 * (30 + (skill * 10))/100; if(wd.damage2 < 1) wd.damage2 = 1; } - } else if(sd->status.weapon == W_KATAR) - { //Katars + } else if(sd->status.weapon == W_KATAR && !skill_num) + { //Katars (offhand damage only applies to normal attacks, tested on Aegis 10.2) skill = pc_checkskill(sd,TF_DOUBLE); wd.damage2 = wd.damage * (1 + (skill * 2))/100; |