Originally posted by [b]PanA[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1544
Hello. Excuse me, My English is very bad. I found some interesting features in code.
Stable version - battle.c
Skill ASC_BREAKER call firstly “battle_calc_weapon_attack” and next “battle_calc_misc_attack”.
CODE
....
if(skill_num==ASC_BREAKER)
{ //Breaker's int-based damage (a misc attack?)
struct Damage md = battle_calc_misc_attack(src, target, skill_num, skill_lv, wflag);
wd.damage += md.damage;
}
....
In “battle_calc_weapon_attack” and in “battle_calc_misc_attack”(twice for ASC_BREAKER) calls battle_calc_damage.
In battle_calc_damage:
CODE
if(sc->data[SC_DODGE] && !sc->opt1 &&
(flag&BF_LONG || sc->data[SC_SPURT])
&& rand()%100 < 20) {
if (sd && pc_issit(sd)) pc_setstand(sd); //Stand it to dodge.
clif_skill_nodamage(bl,bl,TK_DODGE,1,1);
if (!sc->data[SC_COMBO])
sc_start4(bl, SC_COMBO, 100, TK_JUMPKICK, src->id, 1, 0, 2000);
return 0;
}
This means for SC_DODGE ASC_BREAKER is two attacks, but for SC_AETERNA and SC_KAUPE ASC_BREAKER is one attack.
CODE
.....
if((sce=sc->data[SC_KAUPE]) &&
rand()%100 < sce->val2 &&
(src->type == BL_PC || !skill_num))
{ //Kaupe only blocks all skills of players.
clif_specialeffect(bl, 462, AREA);
//Shouldn't end until Breaker's non-weapon part connects.
if (skill_num != ASC_BREAKER || !(flag&BF_WEAPON))
if (--(sce->val3) <= 0) //We make it work like Safety Wall, even though it only blocks 1 time.
status_change_end(bl, SC_KAUPE, -1);
return 0;
}
.....
//Now damage increasing effects
if(sc->data[SC_AETERNA] && skill_num != PF_SOULBURN){
damage<<=1;
//Shouldn't end until Breaker's non-weapon part connects.
if (skill_num != ASC_BREAKER || !(flag&BF_WEAPON))
status_change_end( bl,SC_AETERNA,-1 );
}
.....
Some situation:
1) Soul Linker (or Star Gladiator) has SC_KAUPE and SC_DODGE.
probability 16%
SC_DODGE actives only when weapon attack calculates.
weapon attack missed, misc attack hits
SC_DODGE does not work correctly.
SC_DODGE becomes active, but SC_KAUPE is canceled.
probability 16%
SC_DODGE actives only when misc attack calculates.
weapon attack hit, misc attack missed
SC_KAUPE is not canceled. SC_DODGE works correctly.
probability 4%
SC_DODGE actives twice.
weapon attack missed, misc attack missed
SC_KAUPE is not canceled. SC_DODGE works correctly.
probability 64%
SC_DODGE doesn’t actives at all.
weapon attack hit, misc attack hit
SC_KAUPE is canceled.
2) Soul Linker (or Star Gladiator) has SC_AETERNA and SC_DODGE.
probability 16%
SC_DODGE actives only when weapon attack calculates.
weapon attack missed, misc attack hits
SC_AETERNA is canceled. SC_DODGE does not work correctly.
SC_DODGE becomes active, but Soul Linker still receive doubled misc damage.
probability 16%
SC_DODGE actives only when misc attack calculates.
weapon attack hit, misc attack missed
SC_AETERNA is not canceled. SC_DODGE does not work correctly.
SC_DODGE becomes active, but Soul Linker still receive doubled weapon damage.
probability 4%
SC_DODGE actives twice.
weapon attack missed, misc attack missed
SC_AETERNA is not canceled. SC_DODGE works correctly.
probability 64%
SC_DODGE doesn’t actives at all.
weapon attack hit, misc attack hit
SC_AETERNA is canceled. Soul Linker still receive full doubled damage.
3) In battle_calc_damage:
CODE
.....
if((sce=sc->data[SC_REJECTSWORD]) && flag&BF_WEAPON &&
// Fixed the condition check [Aalye]
(src->type!=BL_PC || (
((TBL_PC *)src)->status.weapon == W_DAGGER ||
((TBL_PC *)src)->status.weapon == W_1HSWORD ||
((TBL_PC *)src)->status.weapon == W_2HSWORD
)) &&
rand()%100 < sce->val2
){
damage = damage*50/100;
status_fix_damage(bl,src,damage,clif_damage(bl,src,gettick(),0,0,damage,0,0,0));
clif_skill_nodamage(bl,bl,ST_REJECTSWORD,sce->val1,1);
if(--(sce->val3)<=0)
status_change_end(bl, SC_REJECTSWORD, -1);
}
.....
Stalker has SC_REJECTSWORD. Assassin Cross has ice pick or combat knife. Assassin Cross casts on Stalker ASC_BREAKER. Stalker receives half weapon damage and Assassin Cross receives 50% reflected ranged damage.
Am I right?
I think this is bug.