diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-07 07:46:01 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-07 07:46:01 +0000 |
commit | 14e01888d06cfc94df20568d8e3c697fd3355117 (patch) | |
tree | 8f5d0f868eb1b7f11c0e39d8ad716cf55bbd606c | |
parent | ec655a58ffb1dc5d37a504aaac51f5393a1a81fb (diff) | |
download | hercules-14e01888d06cfc94df20568d8e3c697fd3355117.tar.gz hercules-14e01888d06cfc94df20568d8e3c697fd3355117.tar.bz2 hercules-14e01888d06cfc94df20568d8e3c697fd3355117.tar.xz hercules-14e01888d06cfc94df20568d8e3c697fd3355117.zip |
Some tidying up
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@929 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog.txt | 1 | ||||
-rw-r--r-- | src/map/battle.c | 61 |
2 files changed, 33 insertions, 29 deletions
diff --git a/Changelog.txt b/Changelog.txt index 62ed62185..a41ee747d 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,6 @@ Date Added 01/07 + * Some tidying up of battle_get_def and _def2 [celest] * Added 'bDelayrate' and changed Phen card, Marduk Card and Berzebub Card's effects to use this instead of bCastrate (which was reducing casting time, not delay time) [celest] diff --git a/src/map/battle.c b/src/map/battle.c index f82e60cd2..c0daf16a1 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -755,33 +755,36 @@ int battle_get_def(struct block_list *bl) if(def < 1000000) { if(sc_data) { - //キーピング時はDEF100 - if( sc_data[SC_KEEPING].timer!=-1) - def = 100; - //プロボック時は減算 - if( sc_data[SC_PROVOKE].timer!=-1 && bl->type != BL_PC) - def = (def*(100 - 6*sc_data[SC_PROVOKE].val1)+50)/100; - //戦太鼓の響き時は加算 - if( sc_data[SC_DRUMBATTLE].timer!=-1 && bl->type != BL_PC) - def += sc_data[SC_DRUMBATTLE].val3; - //毒にかかっている時は減算 - if(sc_data[SC_POISON].timer!=-1 && bl->type != BL_PC) - def = def*75/100; - //ストリップシールド時は減算 - if(sc_data[SC_STRIPSHIELD].timer!=-1 && bl->type != BL_PC) - def = def*sc_data[SC_STRIPSHIELD].val2/100; - //シグナムクルシス時は減算 - if(sc_data[SC_SIGNUMCRUCIS].timer!=-1 && bl->type != BL_PC) - def = def * (100 - sc_data[SC_SIGNUMCRUCIS].val2)/100; - //永遠の混沌時はDEF0になる - if(sc_data[SC_ETERNALCHAOS].timer!=-1 && bl->type != BL_PC) - def = 0; //凍結、石化時は右シフト if(sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0)) def >>= 1; - //コンセントレーション時は減算 - if( sc_data[SC_CONCENTRATION].timer!=-1 && bl->type != BL_PC) - def = (def*(100 - 5*sc_data[SC_CONCENTRATION].val1))/100; + + if (bl->type != BL_PC) { + //キーピング時はDEF100 + if( sc_data[SC_KEEPING].timer!=-1) + def = 100; + //プロボック時は減算 + if( sc_data[SC_PROVOKE].timer!=-1) + def = (def*(100 - 6*sc_data[SC_PROVOKE].val1)+50)/100; + //戦太鼓の響き時は加算 + if( sc_data[SC_DRUMBATTLE].timer!=-1) + def += sc_data[SC_DRUMBATTLE].val3; + //毒にかかっている時は減算 + if(sc_data[SC_POISON].timer!=-1) + def = def*75/100; + //ストリップシールド時は減算 + if(sc_data[SC_STRIPSHIELD].timer!=-1) + def = def*sc_data[SC_STRIPSHIELD].val2/100; + //シグナムクルシス時は減算 + if(sc_data[SC_SIGNUMCRUCIS].timer!=-1) + def = def * (100 - sc_data[SC_SIGNUMCRUCIS].val2)/100; + //永遠の混沌時はDEF0になる + if(sc_data[SC_ETERNALCHAOS].timer!=-1) + def = 0; + //コンセントレーション時は減算 + if( sc_data[SC_CONCENTRATION].timer!=-1) + def = (def*(100 - 5*sc_data[SC_CONCENTRATION].val1))/100; + } } //詠唱中は詠唱時減算率に基づいて減算 if(skilltimer != -1) { @@ -846,15 +849,15 @@ int battle_get_def2(struct block_list *bl) else if(bl->type==BL_PET) def2 = mob_db[((struct pet_data *)bl)->class_].vit; - if(sc_data) { - if( sc_data[SC_ANGELUS].timer!=-1 && bl->type != BL_PC) + if(bl->type != BL_PC && sc_data) { + if( sc_data[SC_ANGELUS].timer!=-1) def2 = def2*(110+5*sc_data[SC_ANGELUS].val1)/100; - if( sc_data[SC_PROVOKE].timer!=-1 && bl->type != BL_PC) + if( sc_data[SC_PROVOKE].timer!=-1) def2 = (def2*(100 - 6*sc_data[SC_PROVOKE].val1)+50)/100; - if(sc_data[SC_POISON].timer!=-1 && bl->type != BL_PC) + if(sc_data[SC_POISON].timer!=-1) def2 = def2*75/100; //コンセントレーション時は減算 - if( sc_data[SC_CONCENTRATION].timer!=-1 && bl->type != BL_PC) + if( sc_data[SC_CONCENTRATION].timer!=-1) def2 = def2*(100 - 5*sc_data[SC_CONCENTRATION].val1)/100; } if(def2 < 1) def2 = 1; |