From 8b63621196b61b105009b1ca40d208afb825dd7e Mon Sep 17 00:00:00 2001 From: rud0lp20 Date: Tue, 31 Jul 2012 16:38:47 +0000 Subject: Fixed SC_CRYSTALIZE where it stacks with other opt and ignore SC_WARMER. Fixed weapon check in dual wielding where it doesn't function properly specially in checking with the dual-wield constants. Added some Kagerou/Oboro skills. (KO_KAIHOU,KO_ZENKAI,KO_GENWAKU,KO_IZAYOI) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16539 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/map/battle.c') diff --git a/src/map/battle.c b/src/map/battle.c index e1d34d7e0..f06ab2292 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1422,7 +1422,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo s_ele_ = sstatus->lhw.ele; if( sd ){ //Summoning 10 talisman will endow your weapon. ARR_FIND(1, 6, i, sd->talisman[i] >= 10); - if( i < 5) s_ele = s_ele_ = i; + if( i < 5 ) s_ele = s_ele_ = i; } if( flag.arrow && sd && sd->bonus.arrow_ele ) s_ele = sd->bonus.arrow_ele; @@ -1778,6 +1778,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo skillratio += sc->data[SC_MAXOVERTHRUST]->val2; if(sc->data[SC_BERSERK]) skillratio += 100; + if(sc->data[SC_ZENKAI] && sstatus->rhw.ele == sc->data[SC_ZENKAI]->val2 ) + skillratio += sc->data[SC_ZENKAI]->val1 * 2; } if( !skill_num ) { @@ -2599,6 +2601,16 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo status_change_end(target,SC_SPIRIT,INVALID_TIMER); } break; + case KO_KAIHOU: + if( sd ){ + ARR_FIND(1, 6, i, sd->talisman[i] > 0); + if( i < 5 ){ + s_ele = i; + ATK_ADDRATE(100 * sd->talisman[i]);// +100% custom value. + pc_del_talisman(sd, sd->talisman[i], i); + } + } + break; } } //Div fix. @@ -3339,8 +3351,8 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list if (s_ele == -1){ // pl=-1 : the skill takes the weapon's element s_ele = sstatus->rhw.ele; if( sd ){ //Summoning 10 talisman will endow your weapon - ARR_FIND(1, 6, i, sd->talisman[i] > 0); - if( i < 5) s_ele = i; + ARR_FIND(1, 6, i, sd->talisman[i] >= 10); + if( i < 5 ) s_ele = i; } }else if (s_ele == -2) //Use status element s_ele = status_get_attack_sc_element(src,status_get_sc(src)); -- cgit v1.2.3-70-g09d2