summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/battle.c3
-rw-r--r--src/map/map.c1
-rw-r--r--src/map/skill.c10
-rw-r--r--src/map/status.c1
4 files changed, 15 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 538f47bb0..37e06a6ba 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3077,6 +3077,9 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
damage -= 50 * damage / 100;//50% reduction to physical ranged attacks
}
+ if (sc->data[SC_SU_STOOP])
+ damage -= damage * 90 / 100;
+
// Compressed code, fixed by map.h [Epoque]
if (src->type == BL_MOB) {
const struct mob_data *md = BL_UCCAST(BL_MOB, src);
diff --git a/src/map/map.c b/src/map/map.c
index 0a60a92b4..4eebafde0 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -337,6 +337,7 @@ int map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) {
//status_change_end(bl, SC_BLADESTOP, INVALID_TIMER); //Won't stop when you are knocked away, go figure...
status_change_end(bl, SC_NJ_TATAMIGAESHI, INVALID_TIMER);
status_change_end(bl, SC_MAGICROD, INVALID_TIMER);
+ status_change_end(bl, SC_SU_STOOP, INVALID_TIMER);
if (sc && sc->data[SC_PROPERTYWALK] &&
sc->data[SC_PROPERTYWALK]->val3 >= skill->get_maxcount(sc->data[SC_PROPERTYWALK]->val1,sc->data[SC_PROPERTYWALK]->val2) )
status_change_end(bl,SC_PROPERTYWALK,INVALID_TIMER);
diff --git a/src/map/skill.c b/src/map/skill.c
index 5efe74825..4d901236a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2141,6 +2141,9 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in
dy = -diry[dir];
}
+ if (tsc && tsc->data[SC_SU_STOOP]) // Any knockback will cancel it.
+ status_change_end(target, SC_SU_STOOP, INVALID_TIMER);
+
return unit->blown(target, dx, dy, count, flag); // send over the proper flag
}
@@ -6023,6 +6026,13 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
clif->skill_nodamage(src,bl,skill_id,skill_lv,
sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
break;
+ // Works just like the above list of skills, except animation caused by
+ // status must trigger AFTER the skill cast animation or it will cancel
+ // out the status's animation.
+ case SU_STOOP:
+ clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
+ sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
+ break;
case KN_AUTOCOUNTER:
sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv));
skill->addtimerskill(src, tick + 100, bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag);
diff --git a/src/map/status.c b/src/map/status.c
index cde02d2bc..8a8cf123e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -724,6 +724,7 @@ void initChangeTables(void)
*/
status->set_sc(SU_HIDE, SC_SUHIDE, SI_SUHIDE, SCB_SPEED);
add_sc(SU_SCRATCH, SC_BLOODING);
+ status->set_sc(SU_STOOP, SC_SU_STOOP, SI_SU_STOOP, SCB_NONE);
// Elemental Spirit summoner's 'side' status changes.
status->set_sc( EL_CIRCLE_OF_FIRE , SC_CIRCLE_OF_FIRE_OPTION, SI_CIRCLE_OF_FIRE_OPTION, SCB_NONE );