From 2ca417b61f69f7e0a028e1f41abbb440d64d113d Mon Sep 17 00:00:00 2001 From: Aleos Date: Tue, 16 Jul 2019 12:17:11 -0400 Subject: [PATCH] Fixed STR affecting mob damage in pre-renewal (#4228) * Follow up to fe197bf. * STR should not affect monster's damage. * Split battle config between pre-renewal and renewal. Thanks to @Playtester! --- conf/battle/battle.conf | 3 ++- src/map/battle.cpp | 3 ++- src/map/battle.hpp | 2 +- src/map/status.cpp | 7 ++++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/conf/battle/battle.conf b/conf/battle/battle.conf index da1bddefe6..93fe9db69a 100644 --- a/conf/battle/battle.conf +++ b/conf/battle/battle.conf @@ -10,7 +10,8 @@ //-------------------------------------------------------------- // Who should have a baseatk value (makes str affect damage)? (Note 3) -enable_baseatk: 0x29F +enable_baseatk: 0x9 +enable_baseatk_renewal: 0x29F // Who can have perfect flee? (Note 3) enable_perfect_flee: 1 diff --git a/src/map/battle.cpp b/src/map/battle.cpp index 56ae3b9504..7ded4048da 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -7996,7 +7996,8 @@ static const struct _battle_data { { "enable_critical", &battle_config.enable_critical, BL_PC, BL_NUL, BL_ALL, }, { "mob_critical_rate", &battle_config.mob_critical_rate, 100, 0, INT_MAX, }, { "critical_rate", &battle_config.critical_rate, 100, 0, INT_MAX, }, - { "enable_baseatk", &battle_config.enable_baseatk, BL_CHAR|BL_NPC, BL_NUL, BL_ALL, }, + { "enable_baseatk", &battle_config.enable_baseatk, BL_CHAR|BL_HOM, BL_NUL, BL_ALL, }, + { "enable_baseatk_renewal", &battle_config.enable_baseatk_renewal, BL_ALL, BL_NUL, BL_ALL, }, { "enable_perfect_flee", &battle_config.enable_perfect_flee, BL_PC|BL_PET, BL_NUL, BL_ALL, }, { "casting_rate", &battle_config.cast_rate, 100, 0, INT_MAX, }, { "delay_rate", &battle_config.delay_rate, 100, 0, INT_MAX, }, diff --git a/src/map/battle.hpp b/src/map/battle.hpp index cffa0f3636..52d8eec2c9 100644 --- a/src/map/battle.hpp +++ b/src/map/battle.hpp @@ -141,7 +141,7 @@ struct Battle_Config int enable_critical; int mob_critical_rate; int critical_rate; - int enable_baseatk; + int enable_baseatk, enable_baseatk_renewal; int enable_perfect_flee; int cast_rate, delay_rate; int delay_dependon_dex, delay_dependon_agi; diff --git a/src/map/status.cpp b/src/map/status.cpp index 36d11b06c3..2f5618a92b 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -2435,8 +2435,13 @@ unsigned short status_base_atk(const struct block_list *bl, const struct status_ { int flag = 0, str, dex, dstr; - if(!(bl->type&battle_config.enable_baseatk)) +#ifdef RENEWAL + if (!(bl->type&battle_config.enable_baseatk_renewal)) return 0; +#else + if (!(bl->type&battle_config.enable_baseatk)) + return 0; +#endif if (bl->type == BL_PC) switch(((TBL_PC*)bl)->status.weapon) {