Browse Source

Implemented New Arch Mage Skill "Energy Conversion" (#8981)

Haydrich 2 tháng trước cách đây
mục cha
commit
b18d4e7e6a
3 tập tin đã thay đổi với 55 bổ sung0 xóa
  1. 35 0
      db/re/skill_db.yml
  2. 7 0
      db/re/skill_tree.yml
  3. 13 0
      src/map/skill.cpp

+ 35 - 0
db/re/skill_db.yml

@@ -45231,6 +45231,41 @@ Body:
           Amount: 76
       Status:
         Mystery_Powder: true
+  - Id: 6516
+    Name: AG_ENERGY_CONVERSION
+    Description: Energy Conversion
+    MaxLevel: 5
+    Type: Magic
+    TargetType: Self
+    DamageFlags:
+      NoDamage: true
+    CastTime: 1000   # TODO
+    Cooldown:
+      - Level: 1
+        Time: 15000
+      - Level: 2
+        Time: 12000
+      - Level: 3
+        Time: 9000
+      - Level: 4
+        Time: 6000
+      - Level: 5
+        Time: 3000
+    FixedCastTime: 1500
+    AfterCastActDelay: 500
+    Requires:
+      SpCost: 10
+      ApCost:
+        - Level: 1
+          Amount: 22
+        - Level: 2
+          Amount: 19
+        - Level: 3
+          Amount: 16
+        - Level: 4
+          Amount: 13
+        - Level: 5
+          Amount: 10
   - Id: 6511
     Name: SHC_CROSS_SLASH
     Description: Cross Slash

+ 7 - 0
db/re/skill_tree.yml

@@ -7019,6 +7019,13 @@ Body:
         Requires:
           - Name: AG_RAIN_OF_CRYSTAL
             Level: 1
+      - Name: AG_ENERGY_CONVERSION
+        MaxLevel: 5
+        Requires:
+          - Name: WL_RECOGNIZEDSPELL
+            Level: 2
+          - Name: AG_CLIMAX
+            Level: 1
   - Job: Cardinal
     Inherit:
       Novice: true

+ 13 - 0
src/map/skill.cpp

@@ -10931,6 +10931,19 @@ int32 skill_castend_nodamage_id (struct block_list *src, struct block_list *bl,
 			sc_start(src,src,SC_SMA,100,skill_lv,skill_get_time(SL_SMA,skill_lv));
 		break;
 
+	case AG_ENERGY_CONVERSION:
+		if (status_get_sp(src) == status_get_max_sp(src)) {
+			if( sd != nullptr ){
+				clif_skill_fail( *sd, skill_id, USESKILL_FAIL );
+			}
+			break;
+		}
+		
+		// Apply the SP gain to the caster
+		clif_skill_nodamage(src, *bl, skill_id, skill_lv);
+		status_heal(bl, 0, (skill_lv * (skill_lv + 1) / 2) * 40, 1);
+		break;
+
 	// New guild skills [Celest]
 	case GD_BATTLEORDER:
 	case GD_REGENERATION: