Skip to content

Commit

Permalink
Fixed Homunculus Lif skills (rathena#8513)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daegaladh authored Jul 28, 2024
1 parent 3908b0e commit 48b1054
Show file tree
Hide file tree
Showing 13 changed files with 209 additions and 163 deletions.
9 changes: 0 additions & 9 deletions db/pre-re/skill_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30726,9 +30726,6 @@ Body:
TargetType: Self
DamageFlags:
NoDamage: true
Range: 9
Hit: Single
HitCount: 1
AfterCastActDelay: 2000
AfterCastWalkDelay: 1000
Requires:
Expand All @@ -30753,10 +30750,6 @@ Body:
TargetType: Self
DamageFlags:
NoDamage: true
Splash: true
Hit: Single
HitCount: 1
SplashArea: -1
AfterCastActDelay: 35000
AfterCastWalkDelay: 1000
Duration1:
Expand Down Expand Up @@ -30787,15 +30780,13 @@ Body:
Name: HLIF_BRAIN
Description: Brain Surgery
MaxLevel: 5
SplashArea: 1
- Id: 8004
Name: HLIF_CHANGE
Description: Change
MaxLevel: 3
TargetType: Self
DamageFlags:
NoDamage: true
Hit: Single
AfterCastActDelay:
- Level: 1
Time: 600000
Expand Down
6 changes: 5 additions & 1 deletion db/pre-re/status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2478,13 +2478,17 @@ Body:
DurationLookup: HLIF_AVOID
CalcFlags:
Speed: true
Flags:
NoSave: true
RemoveFromHomOnWarp: true
- Status: Change
DurationLookup: HLIF_CHANGE
CalcFlags:
Vit: true
Int: true
Flags:
RemoveOnChangeMap: true
NoSave: true
RemoveFromHomOnWarp: true
Fail:
Change: true
- Status: Bloodlust
Expand Down
11 changes: 2 additions & 9 deletions db/re/skill_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43018,9 +43018,8 @@ Body:
TargetType: Self
DamageFlags:
NoDamage: true
Range: 9
Hit: Single
HitCount: 1
Flags:
IgnoreGtb: true
AfterCastWalkDelay: 1000
Cooldown: 20000
Requires:
Expand All @@ -43045,10 +43044,6 @@ Body:
TargetType: Self
DamageFlags:
NoDamage: true
Splash: true
Hit: Single
HitCount: 1
SplashArea: -1
AfterCastWalkDelay: 1000
Duration1:
- Level: 1
Expand Down Expand Up @@ -43079,15 +43074,13 @@ Body:
Name: HLIF_BRAIN
Description: Brain Surgery
MaxLevel: 5
SplashArea: 1
- Id: 8004
Name: HLIF_CHANGE
Description: Change
MaxLevel: 3
TargetType: Self
DamageFlags:
NoDamage: true
Hit: Single
AfterCastWalkDelay: 1000
Duration1:
- Level: 1
Expand Down
6 changes: 5 additions & 1 deletion db/re/status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2600,13 +2600,17 @@ Body:
DurationLookup: HLIF_AVOID
CalcFlags:
Speed: true
Flags:
NoSave: true
RemoveFromHomOnMapWarp: true
- Status: Change
DurationLookup: HLIF_CHANGE
CalcFlags:
Vit: true
Int: true
Flags:
RemoveOnChangeMap: true
NoSave: true
RemoveFromHomOnMapWarp: true
Fail:
Change: true
- Status: Bloodlust
Expand Down
3 changes: 3 additions & 0 deletions doc/status.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ Flags: Various status flags for specific status change events.
SuperNoviceAngel - Status that is given from Super Novice Angel.
TaekwonAngel - Status that is given from Taekwon Angel.

RemoveFromHomOnWarp - Removes the status from the Homunculus when teleporting or warping to another map.
RemoveFromHomOnMapWarp - Removes the status from the Homunculus when warping to another map.

---------------------------------------

MinDuration: Minimum duration, in milliseconds, after reduction calculation for status resistance.
Expand Down
15 changes: 9 additions & 6 deletions doc/status_change.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1001,13 +1001,16 @@ SC_FLING ()
desc:
val1:

SC_AVOID ()
desc:
val1:
SC_AVOID (EFST_HLIF_AVOID)
desc: Increase walkspeed for Players and Homunculus
val1: Skill Level
val2: Walkspeed increase (10 * val1 for Players, 40 * val1 for Homunculus)

SC_CHANGE ()
desc:
val1:
SC_CHANGE (EFST_HLIF_CHANGE)
desc: Increase some Homunculus' statuses (VIT, INT); Uses MATK for damage calculation; Sets Homunculus' HP and SP to 10 on expiration; On Pre-Renewal, sets Homunculus' HP and SP to 100% on cast
val1: Skill Level
val2: VIT increase (20 * val1)
val3: INT increase (30 * val1)

SC_BLOODLUST ()
desc:
Expand Down
3 changes: 1 addition & 2 deletions src/map/clif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10804,8 +10804,7 @@ void clif_parse_LoadEndAck(int fd,map_session_data *sd)
clif_hominfo(sd,sd->hd,1);
clif_hominfo(sd,sd->hd,0); //for some reason, at least older clients want this sent twice
clif_homskillinfoblock( *sd->hd );
if( battle_config.hom_setting&HOMSET_COPY_SPEED )
status_calc_bl(&sd->hd->bl, { SCB_SPEED }); //Homunc mimic their master's speed on each map change
status_calc_bl(&sd->hd->bl, { SCB_SPEED });
if( !(battle_config.hom_setting&HOMSET_NO_INSTANT_LAND_SKILL) )
skill_unit_move(&sd->hd->bl,gettick(),1); // apply land skills immediately
}
Expand Down
4 changes: 2 additions & 2 deletions src/map/homunculus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ int hom_vaporize(map_session_data *sd, int flag)
hd->blockskill.clear();
hd->blockskill.shrink_to_fit();
}
status_change_clear(&hd->bl, 1);
clif_hominfo(sd, sd->hd, 0);
hom_save(hd);

Expand Down Expand Up @@ -1138,8 +1139,7 @@ bool hom_call(map_session_data *sd)
clif_hominfo(sd,hd,1);
clif_hominfo(sd,hd,0); // send this x2. dunno why, but kRO does that [blackhole89]
clif_homskillinfoblock( *hd );
if (battle_config.hom_setting&HOMSET_COPY_SPEED)
status_calc_bl(&hd->bl, { SCB_SPEED });
status_calc_bl(&hd->bl, { SCB_SPEED });
hom_save(hd);
} else
//Warp him to master.
Expand Down
5 changes: 5 additions & 0 deletions src/map/pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7008,6 +7008,11 @@ enum e_setpos pc_setpos(map_session_data* sd, unsigned short mapindex, int x, in

if( hom_is_active(sd->hd) )
{
if (sd->state.changemap)
status_db.removeByStatusFlag(&sd->hd->bl, { SCF_REMOVEFROMHOMONMAPWARP });
else
status_db.removeByStatusFlag(&sd->hd->bl, { SCF_REMOVEFROMHOMONWARP });

if (battle_config.hom_delay_reset_warp) {
sd->hd->blockskill.clear();
sd->hd->blockskill.shrink_to_fit();
Expand Down
2 changes: 2 additions & 0 deletions src/map/script_constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11297,6 +11297,8 @@
export_constant(SCF_REMOVEONUNEQUIPARMOR);
export_constant(SCF_REMOVEONHERMODE);
export_constant(SCF_REQUIRENOWEAPON);
export_constant(SCF_REMOVEFROMHOMONWARP);
export_constant(SCF_REMOVEFROMHOMONMAPWARP);

/* enchantgrades */
export_constant(ENCHANTGRADE_NONE);
Expand Down
14 changes: 6 additions & 8 deletions src/map/skill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7322,12 +7322,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui

//Check for undead skills that convert a no-damage skill into a damage one. [Skotlex]
switch (skill_id) {
case HLIF_HEAL: //[orn]
if (bl->type != BL_HOM) {
if (sd) clif_skill_fail( *sd, skill_id );
break ;
}
[[fallthrough]];
case AL_HEAL:
case ALL_RESURRECTION:
case PR_ASPERSIO:
Expand Down Expand Up @@ -10718,11 +10712,15 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
status_heal(bl, i, 0, 0);
}
break;
//Homun single-target support skills [orn]
// Homun single-target support skills [orn]
case HLIF_CHANGE:
#ifndef RENEWAL
status_percent_heal(bl, 100, 100);
[[fallthrough]];
#endif
case HAMI_BLOODLUST:
case HFLI_FLEET:
case HFLI_SPEED:
case HLIF_CHANGE:
case MH_ANGRIFFS_MODUS:
case MH_GOLDENE_FERSE:
clif_skill_nodamage(src,bl,skill_id,skill_lv,
Expand Down
Loading

0 comments on commit 48b1054

Please sign in to comment.