Kichi Posted June 11, 2013 Posted June 11, 2013 Hi guys, i just wanna ask, how to reduce total damage? example when you deal normal 500k ashura, will reduce to 400k when u do to novice the system seem like u do ashura to other player who using thara frog card, but this is source modif i didn't ask itembonus. thanks Quote
Cydh Posted June 13, 2013 Posted June 13, 2013 on battle.c battle_calc_weapon_attack, on latest line before "return wd;" if( target->type == BL_PC && ((TBL_PC*)bl)->class_&MAPID_UPPERMASK == MAPID_NOVICE && skill_id == MO_EXTREMITYFIST && wd.damage > 500000 ) wd.damage = 400000; something like that Quote
Kichi Posted June 16, 2013 Author Posted June 16, 2013 (edited) on battle.c battle_calc_weapon_attack, on latest line before "return wd;" if( target->type == BL_PC && ((TBL_PC*)bl)->class_&MAPID_UPPERMASK == MAPID_NOVICE && skill_id == MO_EXTREMITYFIST && wd.damage > 500000 ) wd.damage = 400000; something like that what condition is that? would u like to write total damage - 20% ? thanks -- EDIT -- all type of damage (magic, weapon, misc) will reduce 20% Edited June 16, 2013 by OceanBlue Quote
Cydh Posted June 23, 2013 Posted June 23, 2013 Index: battle.c =================================================================== --- battle.c (revision 17382) +++ battle.c (working copy) @@ -3631,6 +3631,12 @@ wd.damage += md.damage; } + if( target->type == BL_PC && // if attacker is player + (((TBL_PC*)target)->class_&MAPID_UPPERMASK) == MAPID_NOVICE && // if novice, change for another job u like + skill_id == MO_EXTREMITYFIST && // the specified skill + wd.damage > 500000 ) // if damage is more than + ATK_RATE(80); + return wd; } @@ -4277,6 +4283,12 @@ //case HM_ERASER_CUTTER: } + if( target->type == BL_PC && // if attacker is player + (((TBL_PC*)target)->class_&MAPID_UPPERMASK) == MAPID_NOVICE && // if novice, change for another job u like + skill_id == WL_JACKFROST && // the specified skill + ad.damage > 500000 ) // if damage is more than + MATK_RATE(80); + return ad; } @@ -4593,6 +4605,12 @@ if(tstatus->mode&MD_IGNOREMISC && md.flag&(BF_MISC) ) //misc @TODO optimize me md.damage = md.damage2 = 1; + if( target->type == BL_PC && // if attacker is player + (((TBL_PC*)target)->class_&MAPID_UPPERMASK) == MAPID_NOVICE && // if novice, change for another job u like + skill_id == WL_JACKFROST && // the specified skill + md.damage > 500000 ) // if damage is more than + md.damage = md.damage * 80 / 100; + return md; } /*========================================== Quote
Kichi Posted June 23, 2013 Author Posted June 23, 2013 Index: battle.c =================================================================== --- battle.c (revision 17382) +++ battle.c (working copy) @@ -3631,6 +3631,12 @@ wd.damage += md.damage; } + if( target->type == BL_PC && // if attacker is player + (((TBL_PC*)target)->class_&MAPID_UPPERMASK) == MAPID_NOVICE && // if novice, change for another job u like + skill_id == MO_EXTREMITYFIST && // the specified skill + wd.damage > 500000 ) // if damage is more than + ATK_RATE(80); + return wd; } @@ -4277,6 +4283,12 @@ //case HM_ERASER_CUTTER: } + if( target->type == BL_PC && // if attacker is player + (((TBL_PC*)target)->class_&MAPID_UPPERMASK) == MAPID_NOVICE && // if novice, change for another job u like + skill_id == WL_JACKFROST && // the specified skill + ad.damage > 500000 ) // if damage is more than + MATK_RATE(80); + return ad; } @@ -4593,6 +4605,12 @@ if(tstatus->mode&MD_IGNOREMISC && md.flag&(BF_MISC) ) //misc @TODO optimize me md.damage = md.damage2 = 1; + if( target->type == BL_PC && // if attacker is player + (((TBL_PC*)target)->class_&MAPID_UPPERMASK) == MAPID_NOVICE && // if novice, change for another job u like + skill_id == WL_JACKFROST && // the specified skill + md.damage > 500000 ) // if damage is more than + md.damage = md.damage * 80 / 100; + return md; } /*========================================== wow thanks and 1 more, how about add check if opponent using mado? if( pc_ismadogear(sd) ) Quote
Cydh Posted June 23, 2013 Posted June 23, 2013 if( target->type == BL_PC && pc_ismadogear((TBL_PC*)target) ) Quote
Question
Kichi
Hi guys,
i just wanna ask, how to reduce total damage?
example
when you deal normal 500k ashura, will reduce to 400k when u do to novice
the system seem like u do ashura to other player who using thara frog card, but this is source modif i didn't ask itembonus.
thanks
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.