diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-07 07:28:20 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-07 07:28:20 +0000 |
commit | ec655a58ffb1dc5d37a504aaac51f5393a1a81fb (patch) | |
tree | c3ae2a16fe13e388c611f1d9ef2003b15db01c54 /src/map/skill.c | |
parent | 33c337fcfdde9e71a15b4f6856d1c22ce1b6a9bc (diff) | |
download | hercules-ec655a58ffb1dc5d37a504aaac51f5393a1a81fb.tar.gz hercules-ec655a58ffb1dc5d37a504aaac51f5393a1a81fb.tar.bz2 hercules-ec655a58ffb1dc5d37a504aaac51f5393a1a81fb.tar.xz hercules-ec655a58ffb1dc5d37a504aaac51f5393a1a81fb.zip |
* Added 'bDelayrate' and changed Phen card, Marduk Card and Berzebub Card's effects to use this
* Some tidying up of skill_castfix and skill_delayfix
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@928 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index c767d9f15..cf99a8615 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7398,7 +7398,6 @@ int skill_castfix( struct block_list *bl, int time ) struct map_session_data *sd = NULL; struct mob_data *md; // [Valaris] struct status_change *sc_data; - int dex; int castrate=100; int skill,lv; @@ -7417,7 +7416,6 @@ int skill_castfix( struct block_list *bl, int time ) if(lv <= 0) return 0; sc_data = battle_get_sc_data(bl); - dex=battle_get_dex(bl); if (skill > MAX_SKILL_DB || skill < 0) return 0; @@ -7430,11 +7428,9 @@ int skill_castfix( struct block_list *bl, int time ) if(time==0) return 0; if (sd) { - if(skill_get_castnodex(skill, lv) > 0) + if(!skill_get_castnodex(skill, lv) > 0) { castrate=((struct map_session_data *)bl)->castrate; - else { - castrate=((struct map_session_data *)bl)->castrate; - time=time*castrate*(battle_config.castrate_dex_scale - dex)/(battle_config.castrate_dex_scale * 100); + time=time*castrate*(battle_config.castrate_dex_scale - battle_get_dex(bl))/(battle_config.castrate_dex_scale * 100); time=time*battle_config.cast_rate/100; } } @@ -7455,6 +7451,7 @@ int skill_delayfix( struct block_list *bl, int time ) struct status_change *sc_data; struct map_session_data *sd = NULL; int skill,lv = 0; + int delayrate=100; nullpo_retr(0, bl); @@ -7473,12 +7470,14 @@ int skill_delayfix( struct block_list *bl, int time ) time = battle_get_adelay (bl)/2; if(sd) { + delayrate=((struct map_session_data *)bl)->delayrate; + if(battle_config.delay_dependon_dex && /* dexΜeΏπvZ·ι */ !skill_get_delaynodex(skill, lv)) // if skill casttime is allowed to be reduced by dex - time=time*(battle_config.castrate_dex_scale - battle_get_dex(bl))/battle_config.castrate_dex_scale; + time=time*delayrate*(battle_config.castrate_dex_scale - battle_get_dex(bl))/(battle_config.castrate_dex_scale * 100); + + time=time*battle_config.delay_rate/100; } - - time=time*battle_config.delay_rate/100; /* uMΜ */ if(sc_data && sc_data[SC_POEMBRAGI].timer!=-1 ) |