summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2015-02-13 11:22:11 -0200
committershennetsind <ind@henn.et>2015-02-13 11:22:11 -0200
commit1e609ca42e0ab4c7699b55dcfa043891b9a41136 (patch)
tree5aea0570306b6966d4a422a67fc679125621e5a6 /src/map/battle.c
parent868a2b4ab50431e0d0a48927b40156d5a83d9d46 (diff)
parent3487f7d9e52d072c56a3cfdad07c54476fd53ecb (diff)
downloadhercules-1e609ca42e0ab4c7699b55dcfa043891b9a41136.tar.gz
hercules-1e609ca42e0ab4c7699b55dcfa043891b9a41136.tar.bz2
hercules-1e609ca42e0ab4c7699b55dcfa043891b9a41136.tar.xz
hercules-1e609ca42e0ab4c7699b55dcfa043891b9a41136.zip
Merge branch 'master' of github.com:HerculesWS/Hercules
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 7b979a51f..d5f523208 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1528,9 +1528,6 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
case NPC_ENERGYDRAIN:
skillratio += 100 * skill_lv;
break;
- case NPC_EARTHQUAKE:
- skillratio += 100 + 100 * skill_lv + 100 * (skill_lv/2);
- break;
#ifdef RENEWAL
case WZ_HEAVENDRIVE:
case WZ_METEOR:
@@ -1894,6 +1891,9 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
case NPC_PULSESTRIKE:
skillratio += 100 * (skill_lv-1);
break;
+ case NPC_EARTHQUAKE:
+ skillratio += 100 + 100 * skill_lv + 100 * (skill_lv / 2);
+ break;
case RG_BACKSTAP:
if( sd && sd->status.weapon == W_BOW && battle_config.backstab_bow_penalty )
skillratio += (200 + 40 * skill_lv) / 2;
@@ -3601,15 +3601,6 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
ad.damage = battle->calc_defense(BF_MAGIC, src, target, skill_id, skill_lv, ad.damage, flag.imdef, 0);
- if (skill_id == NPC_EARTHQUAKE) {
- //Adds atk2 to the damage, should be influenced by number of hits and skill-ratio, but not mdef reductions. [Skotlex]
- //Also divide the extra bonuses from atk2 based on the number in range [Kevin]
- if(mflag>0)
- ad.damage+= (sstatus->rhw.atk2*skillratio/100)/mflag;
- else
- ShowError("Zero range by %d:%s, divide per 0 avoided!\n", skill_id, skill->get_name(skill_id));
- }
-
if(ad.damage<1)
ad.damage=1;
else if(sc){//only applies when hit
@@ -4526,6 +4517,12 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
case NPC_UNDEADATTACK:
case NPC_TELEKINESISATTACK:
case NPC_BLEEDING:
+ case NPC_EARTHQUAKE:
+ case NPC_FIREBREATH:
+ case NPC_ICEBREATH:
+ case NPC_THUNDERBREATH:
+ case NPC_ACIDBREATH:
+ case NPC_DARKNESSBREATH:
hitrate += hitrate * 20 / 100;
break;
case KN_PIERCE:
@@ -5068,6 +5065,16 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
//Div fix.
damage_div_fix(wd.damage, wd.div_);
#endif
+#if 0 // Can't find any source about this one even in eagis
+ if (skill_id == NPC_EARTHQUAKE) {
+ //Adds atk2 to the damage, should be influenced by number of hits and skill-ratio, but not mdef reductions. [Skotlex]
+ //Also divide the extra bonuses from atk2 based on the number in range [Kevin]
+ if ( wflag>0 )
+ ATK_ADD((sstatus->rhw.atk2*skillratio / 100) / wflag);
+ else
+ ShowError("Zero range by %d:%s, divide per 0 avoided!\n", skill_id, skill->get_name(skill_id));
+ }
+#endif
//Post skill/vit reduction damage increases
if (sc) {
//SC skill damages