summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-23 21:23:36 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-23 21:23:36 +0000
commitf6bcd12cd633717e9e503bb453c85955e29cd519 (patch)
tree49225d619843accadf26532263f615392da5b8a2 /src/map/battle.c
parent9b9305b6b1a1a004c2ef909404daa705e956a5de (diff)
downloadhercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.gz
hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.bz2
hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.xz
hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.zip
- Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast time and delay reducibility by item scripts (cards and such)
- Fixed Martyr's Reckoning never triggering for gms with all skills - Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter - Made gm_skill_unconditional bypass skill blocking (guild timer, etc) - Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059) - Changed a few memsets to strncpy (reading past buffer is a bad idea) - Sped up some memset operations (multiples of 4 are faster) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 9ec58981e..cee92d515 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2778,6 +2778,7 @@ int battle_weapon_attack(struct block_list* src, struct block_list* target, unsi
struct status_data *sstatus, *tstatus;
struct status_change *sc, *tsc;
int damage,rdamage=0,rdelay=0;
+ int skillv;
struct Damage wd;
nullpo_retr(0, src);
@@ -2874,19 +2875,21 @@ int battle_weapon_attack(struct block_list* src, struct block_list* target, unsi
}
}
}
- //Recycled the damage variable rather than use a new one... [Skotlex]
- if(sd && (damage = pc_checkskill(sd,MO_TRIPLEATTACK)) > 0)
+
+ if(sd && (skillv = pc_checkskill(sd,MO_TRIPLEATTACK)) > 0)
{
- int triple_rate= 30 - damage; //Base Rate
+ int triple_rate= 30 - skillv; //Base Rate
if (sc && sc->data[SC_SKILLRATE_UP].timer!=-1 && sc->data[SC_SKILLRATE_UP].val1 == MO_TRIPLEATTACK)
{
triple_rate+= triple_rate*(sc->data[SC_SKILLRATE_UP].val2)/100;
status_change_end(src,SC_SKILLRATE_UP,-1);
}
if (rand()%100 < triple_rate)
- return skill_attack(BF_WEAPON,src,src,target,MO_TRIPLEATTACK,damage,tick,0);
+ return skill_attack(BF_WEAPON,src,src,target,MO_TRIPLEATTACK,skillv,tick,0);
}
- else if (sc) {
+
+ if (sc)
+ {
if (sc->data[SC_SACRIFICE].timer != -1)
return skill_attack(BF_WEAPON,src,src,target,PA_SACRIFICE,sc->data[SC_SACRIFICE].val1,tick,0);
if (sc->data[SC_MAGICALATTACK].timer != -1)
@@ -3340,7 +3343,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_agi", &battle_config.delay_dependon_agi },
+ { "delay_dependon_dex", &battle_config.delay_dependon_dex },
{ "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 },
@@ -3734,7 +3737,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_agi=0;
+ battle_config.delay_dependon_dex=0;
battle_config.sdelay_attack_enable=0;
battle_config.left_cardfix_to_right=0;
battle_config.skill_add_range=0;