summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichieru <Michieru@users.noreply.github.com>2014-10-08 10:31:28 +0200
committerMichieru <Michieru@users.noreply.github.com>2014-10-08 10:31:28 +0200
commit11ab6ab49bd0ee9f4c5e53833974589d0510645d (patch)
tree46ef2bafed8229c1ca2469c349ebb6ead46eb6df
parentb41a5e90de640f118ade027eadbdb621d5d2d6f4 (diff)
downloadhercules-11ab6ab49bd0ee9f4c5e53833974589d0510645d.tar.gz
hercules-11ab6ab49bd0ee9f4c5e53833974589d0510645d.tar.bz2
hercules-11ab6ab49bd0ee9f4c5e53833974589d0510645d.tar.xz
hercules-11ab6ab49bd0ee9f4c5e53833974589d0510645d.zip
Update Hovering to it's official formula. (bug:8384)
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/skill.c21
-rw-r--r--src/map/status.c2
3 files changed, 19 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 5eabc719d..f95a4e568 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2707,10 +2707,6 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
sc_start2(src,bl,SC_COMBOATTACK,100,GC_WEAPONBLOCKING,src->id,2000);
return 0;
}
- if( sc->data[SC_HOVERING] && skill_id && (skill->get_inf(skill_id)&INF_GROUND_SKILL || skill_id == SR_WINDMILL) ) {
- d->dmg_lv = ATK_BLOCK;
- return 0;
- }
if ((sce=sc->data[SC_AUTOGUARD]) && flag&BF_WEAPON && !(skill->get_nk(skill_id)&NK_NO_CARDFIX_ATK) && rnd()%100 < sce->val2) {
int delay;
struct block_list *d_bl = NULL;
@@ -2783,7 +2779,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
return 0;
}
- if((sc->data[SC_HERMODE] || sc->data[SC_HOVERING]) && flag&BF_MAGIC)
+ if((sc->data[SC_HERMODE]) && flag&BF_MAGIC)
return 0;
if(sc->data[SC_NJ_TATAMIGAESHI] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG)
diff --git a/src/map/skill.c b/src/map/skill.c
index ff4e2f791..bf060d107 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3412,7 +3412,7 @@ int skill_reveal_trap (struct block_list *bl, va_list ap) {
int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) {
struct map_session_data *sd = NULL;
struct status_data *tstatus;
- struct status_change *sc;
+ struct status_change *sc, *tsc;
if (skill_id > 0 && !skill_lv) return 0;
@@ -3440,6 +3440,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
}
sc = status->get_sc(src);
+ tsc = status->get_sc(bl);
if (sc && !sc->count)
sc = NULL; //Unneeded
@@ -3804,6 +3805,9 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
if( (skill->area_temp[1] != bl->id && !(skill->get_inf2(skill_id)&INF2_NPC_SKILL)) || flag&SD_ANIMATION )
sflag |= SD_ANIMATION; // original target gets no animation (as well as all NPC skills)
+ if ( tsc && tsc->data[SC_HOVERING] && ( skill_id == SR_WINDMILL || skill_id == LG_MOONSLASHER ) )
+ break;
+
heal = skill->attack(skill->get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, sflag);
if( skill_id == NPC_VAMPIRE_GIFT && heal > 0 ) {
clif->skill_nodamage(NULL, src, AL_HEAL, heal, 1);
@@ -11338,6 +11342,9 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick
if (sc && sc->data[SC_VACUUM_EXTREME] && map->getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR))
status_change_end(bl, SC_VACUUM_EXTREME, INVALID_TIMER);
+ if ( sc && sc->data[SC_HOVERING] && ( sg->skill_id == SO_VACUUM_EXTREME || sg->skill_id == SO_ELECTRICWALK || sg->skill_id == SO_FIREWALK || sg->skill_id == WZ_QUAGMIRE ) )
+ return 0;
+
type = status->skill2sc(sg->skill_id);
sce = (sc && type != -1)?sc->data[type]:NULL;
skill_id = sg->skill_id; //In case the group is deleted, we need to return the correct skill id, still.
@@ -11558,9 +11565,6 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
tsc = status->get_sc(bl);
ssc = status->get_sc(ss); // Status Effects for Unit caster.
- if ( tsc && tsc->data[SC_HOVERING] )
- return 0; //Under hovering characters are immune to trap and ground target skills.
-
// Maestro or Wanderer is unaffected by traps of trappers he or she charmed [SuperHulk]
if ( ssc && ssc->data[SC_SIREN] && ssc->data[SC_SIREN]->val2 == bl->id && (skill->get_inf2(sg->skill_id)&INF2_TRAP) )
return 0;
@@ -11569,6 +11573,15 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
type = status->skill2sc(sg->skill_id);
skill_id = sg->skill_id;
+ if ( tsc && tsc->data[SC_HOVERING] ) {
+ switch ( skill_id ) {
+ case HT_SKIDTRAP: case HT_LANDMINE: case HT_ANKLESNARE: case HT_FLASHER: case HT_SHOCKWAVE:
+ case HT_SANDMAN: case HT_FREEZINGTRAP: case HT_BLASTMINE: case HT_CLAYMORETRAP: case HW_GRAVITATION:
+ case SA_DELUGE: case SA_VOLCANO: case SA_VIOLENTGALE: case NJ_SUITON:
+ return 0;
+ }
+ }
+
if (sg->interval == -1) {
switch (sg->unit_id) {
case UNT_ANKLESNARE: //These happen when a trap is splash-triggered by multiple targets on the same cell.
diff --git a/src/map/status.c b/src/map/status.c
index a8a0f066d..8c0e31221 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6876,7 +6876,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
)
return 0;
case SC_VACUUM_EXTREME:
- if(sc->data[SC_HALLUCINATIONWALK] || sc->data[SC_HOVERING])
+ if(sc->data[SC_HALLUCINATIONWALK])
return 0;
break;
case SC_STONE: