summaryrefslogtreecommitdiff
path: root/src/map
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 /src/map
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
Diffstat (limited to 'src/map')
-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
4 files changed, 11 insertions, 11 deletions
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];