Kichi Posted June 11, 2013 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 509 Reputation: 80 Joined: 11/20/11 Last Seen: October 3, 2020 Share 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 Link to comment Share on other sites More sharing options...
Cydh Posted June 13, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share 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 Link to comment Share on other sites More sharing options...
Kichi Posted June 16, 2013 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 509 Reputation: 80 Joined: 11/20/11 Last Seen: October 3, 2020 Author Share 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 Link to comment Share on other sites More sharing options...
Kichi Posted June 20, 2013 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 509 Reputation: 80 Joined: 11/20/11 Last Seen: October 3, 2020 Author Share Posted June 20, 2013 bumb Quote Link to comment Share on other sites More sharing options...
Cydh Posted June 23, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share 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 Link to comment Share on other sites More sharing options...
Kichi Posted June 23, 2013 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 509 Reputation: 80 Joined: 11/20/11 Last Seen: October 3, 2020 Author Share 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 Link to comment Share on other sites More sharing options...
Cydh Posted June 23, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted June 23, 2013 if( target->type == BL_PC && pc_ismadogear((TBL_PC*)target) ) Quote Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.