From af86b0e57fdfa0064770513b868834bf27cb5b56 Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 23 Jun 2006 21:33:24 +0000 Subject: - Corrected ASC_BREAKER. Int-based damage is applied after attribute fixes and before card reductions. The skill now completely disregards left weapon. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7319 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/login/login.c | 1 - src/map/battle.c | 19 ++++++++++++------- src/map/skill.c | 6 ++---- 3 files changed, 14 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/login/login.c b/src/login/login.c index fe40c67ee..45c18f7b3 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -3571,7 +3571,6 @@ int login_lan_config_read(const char *lancfgName) { // Reading general configuration file //----------------------------------- int login_config_read(const char *cfgName) { - struct hostent *h = NULL; char line[1024], w1[1024], w2[1024]; FILE *fp; diff --git a/src/map/battle.c b/src/map/battle.c index 84bea03bc..9c28f0867 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -929,7 +929,12 @@ static struct Damage battle_calc_weapon_attack( } 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; + } + //Check for critical if(!flag.cri && sstatus->cri && (!skill_num || skill_num == KN_AUTOCOUNTER || skill_num == SN_SHARPSHOOTING || skill_num == NJ_KIRIKAGE)) @@ -1693,9 +1698,6 @@ static struct Damage battle_calc_weapon_attack( if(skill_num==TF_POISON) ATK_ADD(15*skill_lv); - if(skill_num==ASC_BREAKER) //Breaker's int-based damage. - ATK_ADD(rand()%500 + 500 + skill_lv * sstatus->int_ * 5); - if (skill_num || !(battle_config.attack_attr_none&src->type)) { //Elemental attribute fix if (!(!sd && tsd && battle_config.mob_ghostring_fix && tstatus->def_ele==ELE_GHOST)) @@ -1718,6 +1720,10 @@ static struct Damage battle_calc_weapon_attack( } } + //Breaker's int-based damage (applies after attribute modifiers) + if(skill_num==ASC_BREAKER) + ATK_ADD(rand()%500 + 500 + skill_lv * sstatus->int_ * 5); + if ((!flag.rh || !wd.damage) && (!flag.lh || !wd.damage2)) flag.cardfix = 0; //When the attack does no damage, avoid doing %bonuses @@ -1873,7 +1879,7 @@ static struct Damage battle_calc_weapon_attack( wd.damage2 = 0; flag.rh=1; flag.lh=0; - } else if(sd->status.weapon > MAX_WEAPON_TYPE && skill_num != ASC_BREAKER) + } else if(flag.rh && flag.lh) { //Dual-wield if (wd.damage) { @@ -2087,7 +2093,7 @@ struct Damage battle_calc_magic_attack( break; case PR_SANCTUARY: ad.blewcount|=0x10000; - ad.dmotion = 0; //No flinch animation. + ad.dmotion = 0; //No flinch animation. case AL_HEAL: case PR_BENEDICTIO: case WZ_FIREPILLAR: @@ -2720,7 +2726,6 @@ void battle_drain(TBL_PC *sd, TBL_PC* tsd, int rdamage, int ldamage, int race, i } if (!thp && !tsp) return; - //Split'em up as Hp/Sp could be drained/leeched. status_heal(&sd->bl, thp, tsp, battle_config.show_hp_sp_drain?3:1); if (tsd) { diff --git a/src/map/skill.c b/src/map/skill.c index 6bb438690..f787bf5fd 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4155,7 +4155,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; case TF_STEAL: // スティール - if(sd && dstmd) { + if(sd) { if(pc_steal_item(sd,bl)) clif_skill_nodamage(src,bl,skillid,skilllv,1); else @@ -4165,10 +4165,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case RG_STEALCOIN: // スティールコイン if(sd) { - if(pc_steal_coin(sd,bl)) { + if(pc_steal_coin(sd,bl)) clif_skill_nodamage(src,bl,skillid,skilllv,1); - mob_target(dstmd,src,skill_get_range2(src,skillid,skilllv)); - } else clif_skill_fail(sd,skillid,0,0); } -- cgit v1.2.3-70-g09d2