Jump to content
  • 0

Add reduce damage


Question

Posted

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

Posted

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

 

Posted (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 /thx

 

-- EDIT --

 

all type of damage (magic, weapon, misc) will reduce 20%

Edited by OceanBlue
Posted
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;
 }
 /*==========================================
 
Posted
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

/thx

 

and 1 more, how about add check if opponent using mado?

 

if( pc_ismadogear(sd) )

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...