summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-07 20:31:40 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-07 20:31:40 +0000
commit8630d5ddbb8c544096ebd7e6f023c23e9d7e407d (patch)
tree51be561862466e0923395295c07751d9a7bcb6d3
parentcceac7bc951fbde646d4e9ce5dcf1e855fb9e336 (diff)
downloadhercules-8630d5ddbb8c544096ebd7e6f023c23e9d7e407d.tar.gz
hercules-8630d5ddbb8c544096ebd7e6f023c23e9d7e407d.tar.bz2
hercules-8630d5ddbb8c544096ebd7e6f023c23e9d7e407d.tar.xz
hercules-8630d5ddbb8c544096ebd7e6f023c23e9d7e407d.zip
- Cleaned up the Asura code so that when the skill fails your SP/Spheres/Fury are all taken away always, as well as moving you next to the target (as long as the target still exists within a reachable path from your position)
- SC_GUILDAURA is now removed on logout. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8175 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--src/map/skill.c43
-rw-r--r--src/map/unit.c2
3 files changed, 40 insertions, 10 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 539f5b975..9a51b271d 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/07
+ * Cleaned up the Asura code so that when the skill fails your
+ SP/Spheres/Fury are all taken away always, as well as moving you next to
+ the target (as long as the target still exists within a reachable path from
+ your position) [Skotlex]
+ * SC_GUILDAURA is now removed on logout. [Skotlex]
* Fixed Venom Splasher doing half-damage instead of full-damage to the
"exploding" character. [Skotlex]
* Hopefully fixed the party_even_share cast-overflow bug as reported by
diff --git a/src/map/skill.c b/src/map/skill.c
index 69c700d95..a3c77829e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2791,15 +2791,15 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
}
break;
- case KN_CHARGEATK:
case MO_EXTREMITYFIST:
- if (skillid == MO_EXTREMITYFIST && sc && sc->count)
+ if (sc && sc->count)
{
if (sc->data[SC_EXPLOSIONSPIRITS].timer != -1)
status_change_end(src, SC_EXPLOSIONSPIRITS, -1);
if (sc->data[SC_BLADESTOP].timer != -1)
status_change_end(src,SC_BLADESTOP,-1);
}
+ case KN_CHARGEATK:
if(!check_distance_bl(src, bl, 2)) { //Need to move to target.
int dx,dy;
@@ -2818,13 +2818,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
break;
}
clif_slide(src,src->x,src->y);
- if (skillid != MO_EXTREMITYFIST || battle_check_target(src, bl, BCT_ENEMY) > 0) //Check must be done here because EF should be broken this way.. [Skotlex]
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- else if (sd)
- clif_skill_fail(sd,skillid,0,0);
- }
- else //Assume minimum distance of 1 for Charge.
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,skillid == KN_CHARGEATK?1:flag);
+ } else //Assume minimum distance of 1 for Charge.
+ flag = 1;
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
break;
//Splash attack skills.
@@ -5714,7 +5710,6 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
break;
}
}
-
//Avoid doing double checks for instant-cast skills.
if (tid != -1 && !status_check_skilluse(src, target, ud->skillid, 1))
break;
@@ -5777,6 +5772,34 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
return 1;
} while(0);
//Skill failed.
+ if (ud->skillid == MO_EXTREMITYFIST && sd)
+ { //When Asura fails...
+ //Consume SP/spheres
+ skill_check_condition(sd,ud->skillid, ud->skilllv,1);
+ sc = &sd->sc;
+ if (sc->count)
+ { //End states
+ if (sc->data[SC_EXPLOSIONSPIRITS].timer != -1)
+ status_change_end(src, SC_EXPLOSIONSPIRITS, -1);
+ if (sc->data[SC_BLADESTOP].timer != -1)
+ status_change_end(src,SC_BLADESTOP,-1);
+ }
+ if (target && target->m == src->m)
+ { //Move character to target anyway.
+ int dx,dy;
+ dx = target->x - src->x;
+ dy = target->y - src->y;
+ if(dx > 0) dx++;
+ else if(dx < 0) dx--;
+ if (dy > 0) dy++;
+ else if(dy < 0) dy--;
+
+ if (unit_movepos(src, src->x+dx, src->y+dy, 1, 1))
+ clif_slide(src,src->x,src->y);
+
+ clif_skill_fail(sd,ud->skillid,0,0);
+ }
+ }
ud->skillid = ud->skilllv = ud->skilltarget = 0;
ud->canact_tick = tick;
if(sd) sd->skillitem = sd->skillitemlv = -1;
diff --git a/src/map/unit.c b/src/map/unit.c
index 063c9ac34..7eace7b06 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1628,6 +1628,8 @@ int unit_free(struct block_list *bl) {
status_change_end(bl,SC_BERSERK,-1);
if(sd->sc.data[SC_TRICKDEAD].timer!=-1)
status_change_end(bl,SC_TRICKDEAD,-1);
+ if(sd->sc.data[SC_GUILDAURA].timer!=-1)
+ status_change_end(bl,SC_GUILDAURA,-1);
if (battle_config.debuff_on_logout&1) {
if(sd->sc.data[SC_ORCISH].timer!=-1)
status_change_end(bl,SC_ORCISH,-1);