Change Critical Damage on Emperium from 1 to 2

goddameit

New member
Messages
59
Points
0
Age
34
Emulator
Request from x13th

wCFJ3KQ.jpg


battle.c.patch

 

Attachments

Last edited by a moderator:
I try to do this.. but my crit damage is still 1 ... where do I put that battle.c patch? am I just going to copy what's written inside that patch file and paste it to my battle.c?

 
I try to do this.. but my crit damage is still 1 ... where do I put that battle.c patch? am I just going to copy what's written inside that patch file and paste it to my battle.c?
read it

 
Last edited by a moderator:
Index: map/battle.c===================================================================--- map/battle.c (revision 13127)+++ map/battle.c (working copy)@@ -4898,6 +4898,11 @@ wd.damage = wd.div_; // In some cases, right hand no need to have a weapon to increase damage if( flag.lh && (flag.hit || wd.damage2 > 0) ) wd.damage2 = wd.div_; if (flag.cri && class_ == MOBID_EMPERIUM) { wd.damage2 = 2; wd.damage2 = 2; return wd; } if( flag.hit && class_ == MOBID_EMPERIUM ) { if(wd.damage2 > 0) { wd.damage2 = battle->attr_fix(src,target,wd.damage2,s_ele_,tstatus->def_ele, tstatus->ele_lv); wd.damage2 = battle->calc_gvg_damage(src,target,wd.damage2,wd.div_,skill_id,skill_lv,wd.flag); } else if(wd.damage > 0) { wd.damage = battle->attr_fix(src,target,wd.damage,s_ele_,tstatus->def_ele, tstatus->ele_lv); wd.damage = battle->calc_gvg_damage(src,target,wd.damage,wd.div_,skill_id,skill_lv,wd.flag); } return wd; } if( !(battle_config.skill_min_damage&1) ) //Do not return if you are supposed to deal greater damage to plants than 1. [Skotlex] return wd; }
im done with the battle.c but the crit damage on emp is still the same.. I've been trying some of those source release but I keep on failing...
default_wacko.png
:wacko: i don't know why i keep on failing.. im just following the instruction/guide ..
default_dry.png
<_<
default_dry.png


battle.c

 

Attachments

phew~! 
default_dry.png
 
default_dry.png
  nothing change  even if im using the latest hercules and clients... 
default_angry.png
 
default_angry.png
 
default_angry.png


 
Last edited by a moderator:
It's because it filters for MOBID_EMPERIUM.

In map.h:

https://raw.githubusercontent.com/HerculesWS/Hercules/b8abf962fd079bc3cad4498aa968f2318d1f5fde/src/map/map.h

You can see that MOBID_EMPERIUM is defined as ID=1288, so it will only work on the monster with ID 1288.

If you want a different Emperium to work like this instead, just check for its monster ID and put the number instead of MOBID_EMPERIUM. What Emperium ID is spawning in WoE anyway?
Hmm I'ms ure it's 1288. Since the last time I check my emperium HP change to 100 HP after I update to latest one. When I change again the HP of 1288 mobid it applies to all castle emperium.

 
What if you add some debug output before the "if" and test with that:

Code:
ShowDebug("Attack against plant: critical=%d class_=%dn", flag.cri, class_);
Whenever someone attacks a plant mode monster it will then print out if it's a critical and the ID of the target. Then you can check if it's correct against the castle emperium.
 
Back
Top