viewing paste Unknown #4997 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
Index: conf/battle/skill.conf
===================================================================
--- conf/battle/skill.conf    (revision 17067)
+++ conf/battle/skill.conf    (working copy)
@@ -39,6 +39,7 @@
 
 // At what dex does the cast time become zero (instacast)?
 castrate_dex_scale: 150
+castrate_dex_scale_3rd: 180 //[clydelion]
 
 // How much (dex*2+int) does variable cast turns zero?
 vcast_stat_scale: 530
Index: src/map/battle.c
===================================================================
--- src/map/battle.c    (revision 17067)
+++ src/map/battle.c    (working copy)
@@ -5710,6 +5710,7 @@
     { "max_cloth_color",                    &battle_config.max_cloth_color,                 4,      0,      INT_MAX,        },
     { "pet_hair_style",                     &battle_config.pet_hair_style,                  100,    0,      INT_MAX,        },
     { "castrate_dex_scale",                 &battle_config.castrate_dex_scale,              150,    1,      INT_MAX,        },
+    { "castrate_dex_scale_3rd",             &battle_config.castrate_dex_scale_3rd,          180,    1,      INT_MAX,        }, //[clydelion]
     { "vcast_stat_scale",                   &battle_config.vcast_stat_scale,                530,    1,      INT_MAX,        },
     { "area_size",                          &battle_config.area_size,                       14,     0,      INT_MAX,        },
     { "zeny_from_mobs",                     &battle_config.zeny_from_mobs,                  0,      0,      1,              },
Index: src/map/battle.h
===================================================================
--- src/map/battle.h    (revision 17067)
+++ src/map/battle.h    (working copy)
@@ -346,6 +346,7 @@
     int pet_hair_style; // added by [Skotlex]
 
     int castrate_dex_scale; // added by [MouseJstr]
+    int castrate_dex_scale_3rd; //[clydelion]
     int area_size; // added by [MouseJstr]
 
     int max_def, over_def_bonus; //added by [Skotlex]
Index: src/map/skill.c
===================================================================
--- src/map/skill.c    (revision 17067)
+++ src/map/skill.c    (working copy)
@@ -13702,6 +13702,7 @@
  *------------------------------------------*/
 int skill_castfix (struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
     int time = skill_get_cast(skill_id, skill_lv);
+    int castrate_dex_scale = (skill_id >= 2001)? battle_config.castrate_dex_scale_3rd : battle_config.castrate_dex_scale; //[clydelion]
 
     nullpo_ret(bl);
 #ifndef RENEWAL_CAST
@@ -13712,9 +13713,9 @@
 
         // calculate base cast time (reduced by dex)
         if( !(skill_get_castnodex(skill_id, skill_lv)&1) ) {
-            int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
+            int scale = castrate_dex_scale - status_get_dex(bl);
             if( scale > 0 )    // not instant cast
-                time = time * scale / battle_config.castrate_dex_scale;
+                time = time * scale / castrate_dex_scale;
             else
                 return 0;    // instant cast
         }
@@ -13880,7 +13881,7 @@
     int time = skill_get_delay(skill_id, skill_lv);
     struct map_session_data *sd;
     struct status_change *sc = status_get_sc(bl);
-
+    int castrate_dex_scale = (skill_id >= 2001)? battle_config.castrate_dex_scale_3rd : battle_config.castrate_dex_scale; //[clydelion]
     nullpo_ret(bl);
     sd = BL_CAST(BL_PC, bl);
 
@@ -13911,17 +13912,17 @@
     default:
         if (battle_config.delay_dependon_dex && !(delaynodex&1))
         {    // if skill delay is allowed to be reduced by dex
-            int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
+            int scale = castrate_dex_scale - status_get_dex(bl);
             if (scale > 0)
-                time = time * scale / battle_config.castrate_dex_scale;
+                time = time * scale / castrate_dex_scale;
             else //To be capped later to minimum.
                 time = 0;
         }
         if (battle_config.delay_dependon_agi && !(delaynodex&1))
         {    // if skill delay is allowed to be reduced by agi
-            int scale = battle_config.castrate_dex_scale - status_get_agi(bl);
+            int scale = castrate_dex_scale - status_get_agi(bl);
             if (scale > 0)
-                time = time * scale / battle_config.castrate_dex_scale;
+                time = time * scale / castrate_dex_scale;
             else //To be capped later to minimum.
                 time = 0;
         }
Viewed 885 times, submitted by clydelion.