Implement NPC_GRADUAL_GRAVITY (#7635)

This commit is contained in:
eppc0330 2023-03-13 08:25:47 +09:00 committed by GitHub
parent 1c35482ecf
commit b3881bd1fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 1 deletions

View File

@ -17907,6 +17907,18 @@ Body:
NoReiteration: true
NoOverlap: true
Status: PropertyWalk
- Id: 752
Name: NPC_GRADUAL_GRAVITY
Description: Increased Gravity
MaxLevel: 3
TargetType: Attack
DamageFlags:
NoDamage: true
Flags:
IsNpc: true
Range: 9
Duration1: 3000
Status: GRADUAL_GRAVITY
- Id: 756
Name: NPC_WIDEBLEEDING2
Description: Wide Bleeding

View File

@ -8548,3 +8548,11 @@ Body:
Debuff: true
CalcFlags:
Res: true
- Status: GRADUAL_GRAVITY
Icon: EFST_GRADUAL_GRAVITY
DurationLookup: NPC_GRADUAL_GRAVITY
Flags:
BlEffect: true
DisplayPc: true
NoDispell: true
NoClearance: true

View File

@ -89,7 +89,7 @@ typedef uint32 t_itemid;
#endif
#define MAX_FAME 1000000000 ///Max fame points
#define MAX_CART 100 ///Maximum item in cart
#define MAX_SKILL 1481 ///Maximum skill can be hold by Player, Homunculus, & Mercenary (skill list) AND skill_db limit
#define MAX_SKILL 1486 ///Maximum skill can be hold by Player, Homunculus, & Mercenary (skill list) AND skill_db limit
#define DEFAULT_WALK_SPEED 150 ///Default walk speed
#define MIN_WALK_SPEED 20 ///Min walk speed
#define MAX_WALK_SPEED 1000 ///Max walk speed

View File

@ -1872,6 +1872,7 @@
export_constant(SC_TOXIN_OF_MANDARA);
export_constant(SC_GOLDENE_TONE);
export_constant(SC_TEMPERING);
export_constant(SC_GRADUAL_GRAVITY);
#ifdef RENEWAL
export_constant(SC_EXTREMITYFIST2);

View File

@ -7817,6 +7817,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
sc_start(src,bl,type,100,skill_lv,skill_get_time(skill_id,skill_lv)));
break;
case NPC_GRADUAL_GRAVITY:
status_change_start(src, bl, type, 10000, skill_lv, 0, 0, 0, skill_get_time(skill_id, skill_lv), SCSTART_NOAVOID|SCSTART_NOTICKDEF|SCSTART_NORATEDEF);
clif_skill_nodamage(src, bl, skill_id, skill_lv, 1);
break;
#ifdef RENEWAL
// EDP also give +25% WATK poison pseudo element to user.
case ASC_EDP:

View File

@ -9352,6 +9352,7 @@ static int status_get_sc_interval(enum sc_type type)
case SC_LEECHESEND:
case SC_DPOISON:
case SC_DEATHHURT:
case SC_GRADUAL_GRAVITY:
return 1000;
case SC_BURNING:
case SC_PYREXIA:
@ -10889,6 +10890,11 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
val4 = 1;
tick_time = val2 * 1000; // [GodLesZ] tick time
break;
case SC_GRADUAL_GRAVITY:
val2 = 10 * val1;
tick_time = status_get_sc_interval(type);
val4 = tick - tick_time; // Remaining time
break;
case SC_BOSSMAPINFO:
if( sd != NULL ) {
struct mob_data *boss_md = map_getmob_boss(bl->m); // Search for Boss on this Map
@ -13961,6 +13967,12 @@ TIMER_FUNC(status_change_timer){
}
break;
case SC_GRADUAL_GRAVITY:
if (sce->val4 >= 0) {
status_zap(bl, status->max_hp * sce->val2 / 100, 0);
}
break;
case SC_BOSSMAPINFO:
if( sd && --(sce->val4) >= 0 ) {
struct mob_data *boss_md = map_id2boss(sce->val1);

View File

@ -1263,6 +1263,8 @@ enum sc_type : int16 {
SC_GOLDENE_TONE,
SC_TEMPERING,
SC_GRADUAL_GRAVITY,
#ifdef RENEWAL
SC_EXTREMITYFIST2, //! NOTE: This SC should be right before SC_MAX, so it doesn't disturb if RENEWAL is disabled
#endif