summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c31
-rw-r--r--src/map/skill.c23
-rw-r--r--src/map/skill.h2
-rw-r--r--src/map/status.c2
4 files changed, 31 insertions, 27 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
diff --git a/src/map/skill.c b/src/map/skill.c
index c6ddd883d..e1e60dbdb 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2213,7 +2213,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
}
}
- if( dmg.flag&BF_MAGIC && ( skill_id != NPC_EARTHQUAKE || (battle_config.eq_single_target_reflectable && (flag&0xFFF) == 1) ) ) {
+ if( dmg.flag&BF_MAGIC && ( (battle_config.eq_single_target_reflectable && (flag&0xFFF) == 1) ) ) {
// Earthquake on multiple targets is not counted as a target skill. [Inkfish]
if( (dmg.damage || dmg.damage2) && (type = skill->magic_reflect(src, bl, src==dsrc)) ) {
//Magic reflection, switch caster/target
@@ -3222,14 +3222,6 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
case KN_AUTOCOUNTER:
clif->skill_nodamage(src,target,skl->skill_id,skl->skill_lv,1);
break;
- case NPC_EARTHQUAKE:
- if( skl->type > 1 )
- skill->addtimerskill(src,tick+250,src->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag);
- skill->area_temp[0] = map->foreachinrange(skill->area_sub, src, skill->get_splash(skl->skill_id, skl->skill_lv), BL_CHAR, src, skl->skill_id, skl->skill_lv, tick, BCT_ENEMY, skill->area_sub_count);
- skill->area_temp[1] = src->id;
- skill->area_temp[2] = 0;
- map->foreachinrange(skill->area_sub, src, skill->get_splash(skl->skill_id, skl->skill_lv), splash_target(src), src, skl->skill_id, skl->skill_lv, tick, skl->flag, skill->castend_damage_id);
- break;
case WZ_WATERBALL:
skill->toggle_magicpower(src, skl->skill_id); // only the first hit will be amplify
if (!status->isdead(target))
@@ -3855,7 +3847,6 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case ASC_METEORASSAULT:
case GS_DESPERADO:
case GS_SPREADATTACK:
- case NPC_EARTHQUAKE:
case NPC_PULSESTRIKE:
case NPC_HELLJUDGEMENT:
case NPC_VAMPIRE_GIFT:
@@ -3925,8 +3916,6 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case MH_XENO_SLASHER:
clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
break;
- case NPC_EARTHQUAKE://FIXME: Isn't EarthQuake a ground skill after all?
- skill->addtimerskill(src,tick+250,src->id,0,0,skill_id,skill_lv,2,flag|BCT_ENEMY|SD_SPLASH|1);
default:
break;
}
@@ -6242,7 +6231,6 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
/* Fall through */
case SR_EARTHSHAKER:
case NC_INFRAREDSCAN:
- case NPC_EARTHQUAKE:
case NPC_VAMPIRE_GIFT:
case NPC_HELLJUDGEMENT:
case NPC_PULSESTRIKE:
@@ -10363,6 +10351,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
#ifdef RENEWAL
case NJ_HUUMA:
#endif
+ case NPC_EARTHQUAKE:
case NPC_EVILLAND:
case WL_COMET:
case RA_ELECTRICSHOCKER:
@@ -11399,6 +11388,9 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
}
}
break;
+ case NPC_EARTHQUAKE:
+ clif->skill_damage(src, src, timer->gettick(), status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
+ break;
default:
skill->unitsetting1_unknown(src, &skill_id, &skill_lv, &x, &y, &flag, &val1, &val2, &val3);
break;
@@ -11984,6 +11976,11 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
}
break;
+ case UNT_EARTHQUAKE:
+ skill->attack(BF_WEAPON, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick,
+ map->foreachinrange(skill->area_sub, &src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), BL_CHAR, &src->bl, sg->skill_id, sg->skill_lv, tick, BCT_ENEMY, skill->area_sub_count));
+ break;
+
case UNT_FIREPILLAR_WAITING:
skill->unitsetting(ss,sg->skill_id,sg->skill_lv,src->bl.x,src->bl.y,1);
skill->delunit(src);
diff --git a/src/map/skill.h b/src/map/skill.h
index 31a268971..b598b91c8 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1568,7 +1568,7 @@ enum {
UNT_DEATHWAVE, //TODO
UNT_WATERATTACK, //TODO
UNT_WINDATTACK, //TODO
- UNT_EARTHQUAKE, //TODO
+ UNT_EARTHQUAKE,
UNT_EVILLAND,
UNT_DARK_RUNNER, //TODO
UNT_DARK_TRANSFER, //TODO
diff --git a/src/map/status.c b/src/map/status.c
index 2595e8cf1..33287e472 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3722,7 +3722,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) {
#else
amotion = (1000 - 4 * st->agi - st->dex) * ((TBL_HOM*)bl)->homunculusDB->baseASPD / 1000;
- amotion = status->calc_aspd_rate(bl, sc, bst->aspd_rate);
+ amotion = status->calc_aspd_rate(bl, sc, amotion);
if ( st->aspd_rate != 1000 )
amotion = amotion*st->aspd_rate / 1000;