summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-03 13:54:51 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-03 13:54:51 +0000
commit24fdc7fd359132805f403afab0d0d0dfcdfe929c (patch)
treeafaadf6a6b419f40b57db58c26eb82e3b30b351f
parent6529cd23af59110bef70f26dc9f1a1b9eb11e488 (diff)
downloadhercules-24fdc7fd359132805f403afab0d0d0dfcdfe929c.tar.gz
hercules-24fdc7fd359132805f403afab0d0d0dfcdfe929c.tar.bz2
hercules-24fdc7fd359132805f403afab0d0d0dfcdfe929c.tar.xz
hercules-24fdc7fd359132805f403afab0d0d0dfcdfe929c.zip
- Renamed setting delay_dependon_dex to delay_dependon_agi, the delay of skills is reduced now (when enabled) by AGI instead of DEX, which makes a lot more sense than DEX.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8923 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--conf-tmpl/Changelog.txt4
-rw-r--r--conf-tmpl/battle/skill.conf8
-rw-r--r--src/map/battle.c4
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/skill.c14
-rw-r--r--src/map/skill.h2
7 files changed, 24 insertions, 14 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index b5132b9e8..a4b4cd381 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,10 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/10/03
+ * Renamed setting delay_dependon_dex to delay_dependon_agi, the delay of
+ skills is reduced now (when enabled) by AGI instead of DEX, which makes a
+ lot more sense than DEX. [Skotlex]
2006/10/02
* Modified item-granded status resistance reduction to behave as explained
by Vicious (Ragnarok Monthly magazine) [Skotlex]
diff --git a/conf-tmpl/Changelog.txt b/conf-tmpl/Changelog.txt
index ca930252b..2a82f255e 100644
--- a/conf-tmpl/Changelog.txt
+++ b/conf-tmpl/Changelog.txt
@@ -1,5 +1,9 @@
Date Added
+2006/10/03
+ * Renamed setting delay_dependon_dex to delay_dependon_agi, the delay of
+ skills is reduced now (when enabled) by AGI instead of DEX, which makes a
+ lot more sense than DEX. [Skotlex]
2006/09/25
* Removed config setting allow_atcommand_when_mute as it's no longer used
(see manner_system in misc.conf for it's replacement) [Skotlex]
diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf
index 55702c1cd..dc164d5b9 100644
--- a/conf-tmpl/battle/skill.conf
+++ b/conf-tmpl/battle/skill.conf
@@ -35,9 +35,9 @@ casting_rate: 100
// Delay time after casting (Note 2)
delay_rate: 100
-// Is the delay time is dependent on the caster's DEX? (Note 1)
-// Note: On Official servers Dex does NOT affect delay time
-delay_dependon_dex: no
+// Is the delay time dependant on the caster's AGI? (Note 1)
+// Note: On Official servers no stat affects delay time
+delay_dependon_agi: no
// Minimum allowed delay for ANY skills after casting (in miliseconds) (Note 1)
// Note: Setting this to anything above 0 can stop speedhacks.
@@ -58,6 +58,8 @@ default_skill_delay: 300
no_skill_delay: 2
// At what dex does the cast time become zero (instacast)
+// If delay_dependon_agi is enabled, this is also the amount of agi required
+// for zero delay on skills.
castrate_dex_scale: 150
// Will normal attacks be able to ignore the delay after skills? (Note 1)
diff --git a/src/map/battle.c b/src/map/battle.c
index 49fcd1d2e..b884a0f85 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3457,7 +3457,7 @@ static const struct battle_data_short {
{ "enable_perfect_flee", &battle_config.enable_perfect_flee },
{ "casting_rate", &battle_config.cast_rate },
{ "delay_rate", &battle_config.delay_rate },
- { "delay_dependon_dex", &battle_config.delay_dependon_dex },
+ { "delay_dependon_agi", &battle_config.delay_dependon_agi },
{ "skill_delay_attack_enable", &battle_config.sdelay_attack_enable },
{ "left_cardfix_to_right", &battle_config.left_cardfix_to_right },
{ "skill_add_range", &battle_config.skill_add_range },
@@ -3856,7 +3856,7 @@ void battle_set_defaults() {
battle_config.enable_perfect_flee = BL_PC|BL_PET;
battle_config.cast_rate=100;
battle_config.delay_rate=100;
- battle_config.delay_dependon_dex=0;
+ battle_config.delay_dependon_agi=0;
battle_config.sdelay_attack_enable=0;
battle_config.left_cardfix_to_right=0;
battle_config.skill_add_range=0;
diff --git a/src/map/battle.h b/src/map/battle.h
index a4acd4538..fc6b685fb 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -93,7 +93,7 @@ extern struct Battle_Config {
unsigned short critical_rate;
unsigned short enable_baseatk;
unsigned short enable_perfect_flee;
- unsigned short cast_rate,delay_rate,delay_dependon_dex;
+ unsigned short cast_rate,delay_rate,delay_dependon_agi;
unsigned short sdelay_attack_enable;
unsigned short left_cardfix_to_right;
unsigned short skill_add_range;
diff --git a/src/map/skill.c b/src/map/skill.c
index ee93dbc12..1f67a3dd6 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -682,7 +682,7 @@ int skill_get_maxcount( int id ){ skill_get (skill_db[id].maxcount, id, 1); }
int skill_get_blewcount( int id ,int lv ){ skill_get (skill_db[id].blewcount[lv-1], id, lv); }
int skill_get_mhp( int id ,int lv ){ skill_get (skill_db[id].mhp[lv-1], id, lv); }
int skill_get_castnodex( int id ,int lv ){ skill_get (skill_db[id].castnodex[lv-1], id, lv); }
-int skill_get_delaynodex( int id ,int lv ){ skill_get (skill_db[id].delaynodex[lv-1], id, lv); }
+int skill_get_delaynodex( int id ,int lv ){ skill_get (skill_db[id].delaynoagi[lv-1], id, lv); }
int skill_get_nocast ( int id ){ skill_get (skill_db[id].nocast, id, 1); }
int skill_get_type( int id ){ skill_get (skill_db[id].skill_type, id, 1); }
int skill_get_unit_id ( int id, int flag ){ skill_get (skill_db[id].unit_id[flag], id, 1); }
@@ -8590,7 +8590,7 @@ int skill_castfix_sc (struct block_list *bl, int time)
*/
int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
{
- int delaynodex = skill_get_delaynodex(skill_id, skill_lv);
+ int delaynochange = skill_get_delaynodex(skill_id, skill_lv);
int time = skill_get_delay(skill_id, skill_lv);
nullpo_retr(0, bl);
@@ -8606,10 +8606,10 @@ int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
time = battle_config.default_skill_delay;
} else if (time < 0)
time = -time + status_get_amotion(bl); // if set to <0, the attack motion is added.
-
- if (battle_config.delay_dependon_dex && !(delaynodex&1))
+ else //Agi reduction should apply only to non-zero delay skills.
+ if (battle_config.delay_dependon_agi && !(delaynochange&1))
{ // if skill casttime is allowed to be reduced by dex
- int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
+ int scale = battle_config.castrate_dex_scale - status_get_agi(bl);
if (scale > 0)
time = time * scale / battle_config.castrate_dex_scale;
else //To be capped later to minimum.
@@ -8622,7 +8622,7 @@ int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
if (battle_config.delay_rate != 100)
time = time * battle_config.delay_rate / 100;
- if (!(delaynodex&2))
+ if (!(delaynochange&2))
{
struct status_change *sc;
sc= status_get_sc(bl);
@@ -11404,7 +11404,7 @@ int skill_readdb (void)
skill_split_atoi(split[1],skill_db[i].castnodex);
if (!split[2])
continue;
- skill_split_atoi(split[2],skill_db[i].delaynodex);
+ skill_split_atoi(split[2],skill_db[i].delaynoagi);
}
fclose(fp);
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
diff --git a/src/map/skill.h b/src/map/skill.h
index d1d6cc011..3f5884390 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -66,7 +66,7 @@ struct skill_db {
int weapon,ammo,ammo_qty[MAX_SKILL_LEVEL],state,spiritball[MAX_SKILL_LEVEL];
int itemid[10],amount[10];
int castnodex[MAX_SKILL_LEVEL];
- int delaynodex[MAX_SKILL_LEVEL];
+ int delaynoagi[MAX_SKILL_LEVEL];
int nocast;
int unit_id[2];
int unit_layout_type[MAX_SKILL_LEVEL];