Kaynağa Gözat

Implemented New Windhawk Skill (#8985)

Co-authored-by: Atemo <Atemo@users.noreply.github.com>
Haydrich 3 ay önce
ebeveyn
işleme
6a47debc5e

+ 43 - 0
db/re/skill_db.yml

@@ -45018,6 +45018,49 @@ Body:
         - Level: 5
           Amount: 78
     Status: WeaponBlock_On
+  - Id: 6520
+    Name: WH_WILD_WALK
+    Description: Wild Walk
+    MaxLevel: 5
+    Type: Weapon
+    TargetType: Attack
+    DamageFlags:
+      Critical: true
+    Flags:
+      AllowOnWarg: true
+    Range: 11
+    Hit: Multi_Hit
+    HitCount: -3
+    CastCancel: true
+    CastTime: 3000
+    FixedCastTime: 350
+    AfterCastActDelay: 500
+    Duration1:
+      - Level: 1
+        Time: 6000
+      - Level: 2
+        Time: 9000
+      - Level: 3
+        Time: 12000
+      - Level: 4
+        Time: 15000
+      - Level: 5
+        Time: 18000
+    Requires:
+      SpCost:
+        - Level: 1
+          Amount: 63
+        - Level: 2
+          Amount: 66
+        - Level: 3
+          Amount: 69
+        - Level: 4
+          Amount: 72
+        - Level: 5
+          Amount: 75
+      ApCost: 5
+      State: Falcon
+    Status: Wild_Walk
   - Id: 8001
     Name: HLIF_HEAL
     Description: Healing Touch

+ 7 - 0
db/re/skill_tree.yml

@@ -7201,6 +7201,13 @@ Body:
         Requires:
           - Name: WH_SOLIDTRAP
             Level: 1
+      - Name: WH_WILD_WALK
+        MaxLevel: 5
+        Requires:
+          - Name: WH_NATUREFRIENDLY
+            Level: 3
+          - Name: WH_HAWKRUSH
+            Level: 3
   - Job: Imperial_Guard
     Inherit:
       Novice: true

+ 12 - 0
db/re/status.yml

@@ -9746,3 +9746,15 @@ Body:
       Rising_Moon: true
       Midnight_Moon: true
       Dawn_Moon: true
+  - Status: Wild_Walk
+    Icon: EFST_WILD_WALK
+    DurationLookup: WH_WILD_WALK
+    CalcFlags:
+      Flee: true
+      Speed: true
+    Flags:
+      NoRemoveOnDead: true
+      NoSave: true
+      NoBanishingBuster: true
+      NoDispell: true
+      NoClearance: true

+ 8 - 0
src/map/battle.cpp

@@ -6138,6 +6138,14 @@ static int32 battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list
 			RE_LVL_DMOD(100);
 			skillratio += skillratio * (20 * (sd ? pc_checkskill(sd, WH_ADVANCED_TRAP) : 5)) / 100;
 			break;
+		case WH_WILD_WALK:
+			skillratio += -100 + 1800 + 2800 * skill_lv;
+			// !TODO: unknown con and WH_NATUREFRIENDLY/HT_STEELCROW skills ratio
+			skillratio += 5 * sstatus->con;
+			skillratio += skillratio * pc_checkskill(sd, WH_NATUREFRIENDLY) / 10;
+			skillratio += skillratio * pc_checkskill(sd, HT_STEELCROW) / 10;
+			RE_LVL_DMOD(100);
+			break;
 		case BO_ACIDIFIED_ZONE_WATER:
 		case BO_ACIDIFIED_ZONE_GROUND:
 		case BO_ACIDIFIED_ZONE_WIND:

+ 1 - 0
src/map/script_constants.hpp

@@ -1962,6 +1962,7 @@
 	export_constant(SC_DAWN_MOON);
 	export_constant(SC_STAR_BURST);
 	export_constant(SC_SKY_ENCHANT);
+	export_constant(SC_WILD_WALK);
 
 /// Do not modify code below this, until the end of the API hook, since it will be automatically generated again
 /// @APIHOOK_START(EFST_CONST)

+ 2 - 1
src/map/skill.cpp

@@ -5304,9 +5304,10 @@ int32 skill_castend_damage_id (struct block_list* src, struct block_list *bl, ui
 		skill_attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
 		break;
 	case DK_DRAGONIC_AURA:
+	case WH_WILD_WALK:
 		clif_skill_nodamage(src, *bl, skill_id, skill_lv);
 		skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag);
-		sc_start(src, src, SC_DRAGONIC_AURA, 100, skill_lv, skill_get_time(skill_id,skill_lv));
+		sc_start(src, src, skill_get_sc(skill_id), 100, skill_lv, skill_get_time(skill_id,skill_lv));
 		break;
 	case DK_STORMSLASH:
 	case IG_IMPERIAL_CROSS:

+ 8 - 0
src/map/status.cpp

@@ -7418,6 +7418,8 @@ static int16 status_calc_flee(struct block_list *bl, status_change *sc, int32 fl
 		flee -= sc->getSCE(SC_WATER_BARRIER)->val2;
 	if( sc->getSCE(SC_C_MARKER) )
 		flee -= sc->getSCE(SC_C_MARKER)->val3;
+	if( sc->getSCE(SC_WILD_WALK) != nullptr )
+		flee += sc->getSCE(SC_WILD_WALK)->val3;
 #ifdef RENEWAL
 	if( sc->getSCE(SC_SPEARQUICKEN) )
 		flee += 2 * sc->getSCE(SC_SPEARQUICKEN)->val1;
@@ -7951,6 +7953,8 @@ static uint16 status_calc_speed(struct block_list *bl, status_change *sc, int32
 		if( sc->getSCE(SC_JAWAII_SERENADE) ){
 			val = max( val, 25 );
 		}
+		if( sc->getSCE(SC_WILD_WALK) != nullptr )
+			val = max( val, sc->getSCE(SC_WILD_WALK)->val2 );
 
 		// !FIXME: official items use a single bonus for this [ultramage]
 		if( sd && sd->bonus.speed_rate + sd->bonus.speed_add_rate < 0 ) // Permanent item-based speedup
@@ -12629,6 +12633,10 @@ int32 status_change_start(struct block_list* src, struct block_list* bl,enum sc_
 			tick_time = status_get_sc_interval(type);
 			val4 = tick - tick_time; // Remaining time
 			break;
+		case SC_WILD_WALK:
+			val2 = (1 + val1 / 2) * 25;
+			val3 = 50 + 50 * val1;
+			break;
 
 		default:
 			if (calc_flag.none() && scdb->skill_id == 0 && scdb->icon == EFST_BLANK && scdb->opt1 == OPT1_NONE && scdb->opt2 == OPT2_NONE && scdb->state.none() && scdb->flag.none() && scdb->endonstart.empty() && scdb->endreturn.empty() && scdb->fail.empty() && scdb->endonend.empty()) {

+ 1 - 0
src/map/status.hpp

@@ -1384,6 +1384,7 @@ enum sc_type : int16 {
 	SC_DAWN_MOON,
 	SC_STAR_BURST,
 	SC_SKY_ENCHANT,
+	SC_WILD_WALK,
 
 	SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
 };