summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-31 23:18:31 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-31 23:18:31 -0300
commita03dddc9382c947ca574298c01e5834d82dbce57 (patch)
treee77b10450a514e0e5dc7c7ae739627205752e9fa
parent1dc42ff796f36477e8d117a7d42ae29f501a5dce (diff)
downloadhercules-a03dddc9382c947ca574298c01e5834d82dbce57.tar.gz
hercules-a03dddc9382c947ca574298c01e5834d82dbce57.tar.bz2
hercules-a03dddc9382c947ca574298c01e5834d82dbce57.tar.xz
hercules-a03dddc9382c947ca574298c01e5834d82dbce57.zip
[TMW2] DEF FIX
-rw-r--r--src/map/battle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 6257e05e3..5286f97a5 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1426,7 +1426,7 @@ static int64 battle_calc_defense(int attack_type, struct block_list *src, struct
**/
if( def1 < -399 ) // it stops at -399
- def1 = 399; // in aegis it set to 1 but in our case it may lead to exploitation so limit it to 399
+ def1 = -399; // in aegis it set to 1 but in our case it may lead to exploitation so limit it to 399
//return 1;
if( flag&2 )
@@ -1481,7 +1481,7 @@ static int64 battle_calc_defense(int attack_type, struct block_list *src, struct
* RE MDEF Reduction
**/
if( mdef < -99 ) // it stops at -99
- mdef = 99; // in aegis it set to 1 but in our case it may lead to exploitation so limit it to 99
+ mdef = -99; // in aegis it set to 1 but in our case it may lead to exploitation so limit it to 99
//return 1;
damage = (int)((100.0f - mdef / (mdef + 100.0f) * 90.0f) / 100.0f * damage - mdef2);