Guillotine Fist SP Recovery Prevention Cleanup (#8443)

- Unified code for SC_EXTREMITYFIST
  * It stops natural SP recovery for 300s in pre-re
  * It stops natural SP recovery and recovery from items for 3s and shows icon in renewal
- Removed SC_EXTREMITYFIST2 as it's no longer needed
- Fixed an issue that caused a natural SP regen tick to happen right after using Guillotine Fist
- Fixes #8377
This commit is contained in:
Playtester 2024-06-19 07:53:30 +02:00 committed by GitHub
parent d191c2cf2a
commit 566ac2078d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 17 additions and 39 deletions

View File

@ -7359,7 +7359,7 @@ Body:
Time: 1500
- Level: 5
Time: 1000
Duration2: 300000
Duration1: 300000
Requires:
SpCost: 1
Weapon:

View File

@ -7699,7 +7699,6 @@ Body:
- Level: 5
Time: 1000
Duration1: 3000
Duration2: 300000
FixedCastTime:
- Level: 1
Time: 2000

View File

@ -1009,6 +1009,7 @@ Body:
Flags:
SendOption: true
- Status: Extremityfist
Icon: EFST_EXTREMITYFIST
DurationLookup: MO_EXTREMITYFIST
CalcFlags:
Regen: true
@ -6117,14 +6118,6 @@ Body:
NoBanishingBuster: true
NoDispell: true
RemoveOnHermode: true
- Status: Extremityfist2
Icon: EFST_EXTREMITYFIST
DurationLookup: MO_EXTREMITYFIST
Flags:
NoRemoveOnDead: true
NoDispell: true
NoBanishingBuster: true
NoClearance: true
- Status: Mtf_Aspd2
Icon: EFST_MTF_ASPD2
CalcFlags:

View File

@ -10623,7 +10623,7 @@ int pc_itemheal(map_session_data *sd, t_itemid itemid, int hp, int sp)
}
#ifdef RENEWAL
if (sd->sc.getSCE(SC_EXTREMITYFIST2))
if (sd->sc.getSCE(SC_EXTREMITYFIST))
sp = 0;
#endif
if (sd->sc.getSCE(SC_BITESCAR))

View File

@ -6073,7 +6073,7 @@ BUILDIN_FUNC(percentheal)
return SCRIPT_CMD_SUCCESS;
#ifdef RENEWAL
if( sd->sc.getSCE(SC_EXTREMITYFIST2) )
if( sd->sc.getSCE(SC_EXTREMITYFIST) )
sp = 0;
#endif

View File

@ -1912,7 +1912,6 @@
export_constant(SC_HIDDEN_CARD);
export_constant(SC_PERIOD_RECEIVEITEM_2ND);
export_constant(SC_PERIOD_PLUSEXP_2ND);
export_constant(SC_EXTREMITYFIST2);
export_constant(SC_POWERUP);
export_constant(SC_AGIUP);
export_constant(SC_PROTECTION);

View File

@ -2529,11 +2529,7 @@ int skill_onskillusage(map_session_data *sd, struct block_list *bl, uint16 skill
/* Splitted off from skill_additional_effect, which is never called when the
* attack skill kills the enemy. Place in this function counter status effects
* when using skills (eg: Asura's sp regen penalty, or counter-status effects
* from cards) that will take effect on the source, not the target. [Skotlex]
* Note: Currently this function only applies to Extremity Fist and BF_WEAPON
* type of skills, so not every instance of skill_additional_effect needs a call
* to this one.
* when using skills that will take effect on the source, not the target. [Skotlex]
*/
int skill_counter_additional_effect (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, t_tick tick)
{
@ -2581,9 +2577,6 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
}
switch(skill_id) {
case MO_EXTREMITYFIST:
sc_start(src,src,SC_EXTREMITYFIST,100,skill_lv,skill_get_time2(skill_id,skill_lv));
break;
case GS_FULLBUSTER:
sc_start(src,src,SC_BLIND,2*skill_lv,skill_lv,skill_get_time2(skill_id,skill_lv));
break;
@ -5522,11 +5515,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
skill_attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
if (skill_id == MO_EXTREMITYFIST) {
status_set_sp(src, 0, 0);
sc_start(src, src, SC_EXTREMITYFIST, 100, skill_lv, skill_get_time(skill_id, skill_lv));
status_change_end(src, SC_EXPLOSIONSPIRITS);
status_change_end(src, SC_BLADESTOP);
#ifdef RENEWAL
sc_start(src,src,SC_EXTREMITYFIST2,100,skill_lv,skill_get_time(skill_id,skill_lv));
#endif
} else {
status_set_hp(src, 1, 0);
status_change_end(src, SC_NEN);
@ -9553,7 +9544,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif_skill_nodamage(nullptr,bl,MG_SRECOVERY,sp,1);
if (tsc) {
#ifdef RENEWAL
if (tsc->getSCE(SC_EXTREMITYFIST2))
if (tsc->getSCE(SC_EXTREMITYFIST))
sp = 0;
#endif
if (tsc->getSCE(SC_NORECOVER_STATE)) {
@ -10306,7 +10297,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
#ifdef RENEWAL
sp1 = sp1 / 2;
sp2 = sp2 / 2;
if (tsc && tsc->getSCE(SC_EXTREMITYFIST2))
if (tsc && tsc->getSCE(SC_EXTREMITYFIST))
sp1 = tstatus->sp;
#endif
if (tsc && tsc->getSCE(SC_NORECOVER_STATE))
@ -13488,15 +13479,9 @@ TIMER_FUNC(skill_castend_id){
//Consume SP/spheres
skill_consume_requirement(sd,ud->skill_id, ud->skill_lv,1);
status_set_sp(src, 0, 0);
sc = &sd->sc;
if (sc->count)
{ //End states
status_change_end(src, SC_EXPLOSIONSPIRITS);
status_change_end(src, SC_BLADESTOP);
#ifdef RENEWAL
sc_start(src,src, SC_EXTREMITYFIST2, 100, ud->skill_lv, skill_get_time(ud->skill_id, ud->skill_lv));
#endif
}
sc_start(src, src, SC_EXTREMITYFIST, 100, ud->skill_lv, skill_get_time(ud->skill_id, ud->skill_lv));
status_change_end(src, SC_EXPLOSIONSPIRITS);
status_change_end(src, SC_BLADESTOP);
if( target && target->m == src->m ) { //Move character to target anyway.
short x, y;
short dir = map_calc_dir(src,target->x,target->y);

View File

@ -12992,6 +12992,8 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
case SC_BERSERK:
case SC_MERC_HPUP:
case SC_MERC_SPUP:
// Status needs to be updated immediately and not at the end of the damage
case SC_EXTREMITYFIST:
status_calc_bl_(bl, calc_flag, SCO_FORCE);
break;
default:

View File

@ -756,7 +756,7 @@ enum sc_type : int16 {
/* Guild Aura */
SC_LEADERSHIP,
SC_GLORYWOUNDS,
SC_SOULCOLD, //508
SC_SOULCOLD,
SC_HAWKEYES,
/* ... */
SC_ODINS_POWER,
@ -779,7 +779,7 @@ enum sc_type : int16 {
/* Max HP & SP */
SC_INCMHP,
SC_INCMSP,
SC_PARTYFLEE, // 531
SC_PARTYFLEE,
/**
* Kagerou & Oboro [malufett]
**/
@ -1307,8 +1307,8 @@ enum sc_type : int16 {
SC_PERIOD_RECEIVEITEM_2ND,
SC_PERIOD_PLUSEXP_2ND,
SC_EXTREMITYFIST2,
SC_POWERUP,
//SC_EXTREMITYFIST2,
SC_POWERUP = 951,
SC_AGIUP,
SC_PROTECTION,