summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c4
-rw-r--r--src/map/skill.c19
-rw-r--r--src/map/status.c21
-rw-r--r--src/map/unit.c3
4 files changed, 31 insertions, 16 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index b2be1e295..91541270f 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2516,7 +2516,9 @@ struct Damage battle_calc_misc_attack(
if (tsd) md.damage>>=1;
break;
case NJ_ZENYNAGE:
- md.damage = 500*skill_lv +rand()%(500*skill_lv);
+ md.damage = skill_get_zeny(skill_num ,skill_lv);
+ if (!md.damage) md.damage = 2;
+ md.damage = md.damage/2 + rand()%md.damage;
if (sd) pc_payzeny(sd, md.damage);
if(map_flag_vs(target->m) || is_boss(target))
md.damage>>=1; //temp value
diff --git a/src/map/skill.c b/src/map/skill.c
index c316c6b74..22dfc71a7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1454,7 +1454,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
rate = sd?(sd->addeff2[type]+(sd->state.arrow_atk?sd->arrow_addeff2[type]:0)):0;
- if (rate) //Self infliced status from attacking.
+ if (rate) //Self inflicted status from attacking.
status_change_start(src,i,rate,7,0,0,0,skill_get_time2(StatusSkillChangeTable[type],7),0);
rate = dstsd?dstsd->addeff3[type]:0;
@@ -2934,6 +2934,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case NPC_SMOKING:
case NPC_SELFDESTRUCTION:
case GS_FLING:
+ case NJ_ZENYNAGE:
skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
break;
@@ -2999,12 +3000,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
skill_castend_damage_id);
}
break;
- case NJ_ZENYNAGE:
- if(sd->status.zeny < skilllv*1000)
- clif_skill_fail(sd,skillid,5,0);
- else
- skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
- break;
case NJ_KASUMIKIRI:
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
sc_start(src,SC_HIDING,100,skilllv,skill_get_time(skillid,skilllv));
@@ -3032,7 +3027,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
//case NJ_SYURIKEN:
//case NJ_KUNAI:
//case NJ_HUUMA:
- //case NJ_ZENYNAGE:
case NJ_TATAMIGAESHI:
//case NJ_KASUMIKIRI:
//case NJ_KIRIKAGE:
@@ -7904,13 +7898,20 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
clif_skill_fail(sd,skill,0,0);
return 0;
}
- zeny = 1;
break;
case NJ_ISSEN:
if (sc && sc->data[SC_NEN].timer!=-1)
return 0;
break;
+
+ case NJ_ZENYNAGE:
+ if(sd->status.zeny < zeny) {
+ clif_skill_fail(sd,skill,5,0);
+ return 0;
+ }
+ zeny = 0; //Zeny is reduced on skill_attack.
+ break;
}
if(!(type&2)){
diff --git a/src/map/status.c b/src/map/status.c
index 9d384bac6..8fe79f999 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -165,7 +165,7 @@ void initChangeTables(void) {
add_sc(WZ_VERMILION, SC_BLIND);
add_sc(WZ_FROSTNOVA, SC_FREEZE);
add_sc(WZ_STORMGUST, SC_FREEZE);
- set_sc(WZ_QUAGMIRE, SC_QUAGMIRE, SI_QUAGMIRE, SCB_AGI|SCB_DEX|SCB_ASPD);
+ set_sc(WZ_QUAGMIRE, SC_QUAGMIRE, SI_QUAGMIRE, SCB_AGI|SCB_DEX|SCB_ASPD|SCB_SPEED);
set_sc(BS_ADRENALINE, SC_ADRENALINE, SI_ADRENALINE, SCB_ASPD);
set_sc(BS_WEAPONPERFECT, SC_WEAPONPERFECTION, SI_WEAPONPERFECTION, SCB_NONE);
set_sc(BS_OVERTHRUST, SC_OVERTHRUST, SI_OVERTHRUST, SCB_NONE);
@@ -898,11 +898,16 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
if (!flag && ( //Blocked only from using the skill (stuff like autospell may still go through
(sc->data[SC_MARIONETTE].timer != -1 && skill_num != CG_MARIONETTE) ||
(sc->data[SC_MARIONETTE2].timer != -1 && skill_num == CG_MARIONETTE) ||
- sc->data[SC_SILENCE].timer != -1 ||
sc->data[SC_STEELBODY].timer != -1 ||
sc->data[SC_BERSERK].timer != -1
))
return 0;
+
+ if (flag != 2 && ( //Those that block begin/end casting.
+ sc->data[SC_SILENCE].timer != -1
+ ))
+ return 0;
+
//Skill blocking.
if (
(sc->data[SC_VOLCANO].timer != -1 && skill_num == WZ_ICEWALL) ||
@@ -2425,8 +2430,11 @@ void status_calc_bl_sub_pc(struct map_session_data *sd, unsigned long flag)
if (flag == SCB_ALL)
return; //Refresh is done on invoking function (status_calc_pc)
- if(flag&SCB_SPEED)
+ if(flag&SCB_SPEED) {
clif_updatestatus(sd,SP_SPEED);
+ if (sd->ud.walktimer != -1) //Re-walk to adjust speed. [Skotlex]
+ unit_walktoxy(&sd->bl, sd->ud.to_x, sd->ud.to_y, sd->ud.state.walk_easy);
+ }
if(flag&SCB_STR)
clif_updatestatus(sd,SP_STR);
if(flag&SCB_AGI)
@@ -2582,9 +2590,12 @@ void status_calc_bl(struct block_list *bl, unsigned long flag)
status->mdef2 = status_calc_mdef2(bl, sc, b_status->mdef2 +(status->int_ - b_status->int_) +((status->vit - b_status->vit)>>1));
}
- if(flag&SCB_SPEED)
+ if(flag&SCB_SPEED) {
+ struct unit_data *ud = unit_bl2ud(bl);
status->speed = status_calc_speed(bl, sc, b_status->speed);
-
+ if (ud && ud->walktimer != -1) //Re-walk to adjust speed. [Skotlex]
+ unit_walktoxy(bl, ud->to_x, ud->to_y, ud->state.walk_easy);
+ }
if(flag&SCB_CRI && b_status->cri) {
if (status->luk == b_status->luk)
status->cri = status_calc_critical(bl, sc, b_status->cri);
diff --git a/src/map/unit.c b/src/map/unit.c
index 249b1db71..8dd38f5ea 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1466,7 +1466,8 @@ int unit_remove_map(struct block_list *bl, int clrtype) {
unit_stop_attack(bl);
if (ud->skilltimer != -1)
unit_skillcastcancel(bl,0);
- ud->attackabletime = ud->canmove_tick = ud->canact_tick = gettick();
+// Do not reset can-act delay. [Skotlex]
+ ud->attackabletime = ud->canmove_tick /*= ud->canact_tick*/ = gettick();
clif_clearchar_area(bl,clrtype);
if(sc && sc->count ) { //map-change/warp dispells.