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 /src/map/battle.c | |
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
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 61 |
1 files changed, 32 insertions, 29 deletions
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) { - //�L�[�s���O����DEF100 - if( sc_data[SC_KEEPING].timer!=-1) - def = 100; - //�v���{�b�N���͌��Z - if( sc_data[SC_PROVOKE].timer!=-1 && bl->type != BL_PC) - def = (def*(100 - 6*sc_data[SC_PROVOKE].val1)+50)/100; - //�푾�ۂ̋������͉��Z - if( sc_data[SC_DRUMBATTLE].timer!=-1 && bl->type != BL_PC) - def += sc_data[SC_DRUMBATTLE].val3; - //�łɂ������Ă��鎞�͌��Z - if(sc_data[SC_POISON].timer!=-1 && bl->type != BL_PC) - def = def*75/100; - //�X�g���b�v�V�[���h���͌��Z - if(sc_data[SC_STRIPSHIELD].timer!=-1 && bl->type != BL_PC) - def = def*sc_data[SC_STRIPSHIELD].val2/100; - //�V�O�i���N���V�X���͌��Z - if(sc_data[SC_SIGNUMCRUCIS].timer!=-1 && bl->type != BL_PC) - def = def * (100 - sc_data[SC_SIGNUMCRUCIS].val2)/100; - //�i���̍�����DEF0�ɂȂ� - if(sc_data[SC_ETERNALCHAOS].timer!=-1 && bl->type != BL_PC) - def = 0; //�����A�Ή����͉E�V�t�g if(sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0)) def >>= 1; - //�R���Z���g���[�V�������͌��Z - 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) { + //�L�[�s���O����DEF100 + if( sc_data[SC_KEEPING].timer!=-1) + def = 100; + //�v���{�b�N���͌��Z + if( sc_data[SC_PROVOKE].timer!=-1) + def = (def*(100 - 6*sc_data[SC_PROVOKE].val1)+50)/100; + //�푾�ۂ̋������͉��Z + if( sc_data[SC_DRUMBATTLE].timer!=-1) + def += sc_data[SC_DRUMBATTLE].val3; + //�łɂ������Ă��鎞�͌��Z + if(sc_data[SC_POISON].timer!=-1) + def = def*75/100; + //�X�g���b�v�V�[���h���͌��Z + if(sc_data[SC_STRIPSHIELD].timer!=-1) + def = def*sc_data[SC_STRIPSHIELD].val2/100; + //�V�O�i���N���V�X���͌��Z + if(sc_data[SC_SIGNUMCRUCIS].timer!=-1) + def = def * (100 - sc_data[SC_SIGNUMCRUCIS].val2)/100; + //�i���̍�����DEF0�ɂȂ� + if(sc_data[SC_ETERNALCHAOS].timer!=-1) + def = 0; + //�R���Z���g���[�V�������͌��Z + if( sc_data[SC_CONCENTRATION].timer!=-1) + def = (def*(100 - 5*sc_data[SC_CONCENTRATION].val1))/100; + } } //�r�����͉r�������Z���Ɋ�Â��Č��Z 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; //�R���Z���g���[�V�������͌��Z - 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; |