Skip to content

Commit

Permalink
Fixed STR affecting mob damage in pre-renewal (#4228)
Browse files Browse the repository at this point in the history
* Follow up to fe197bf.
* STR should not affect monster's damage.
* Split battle config between pre-renewal and renewal.
Thanks to @Playtester!
  • Loading branch information
aleos89 committed Jul 16, 2019
1 parent fc2c6e0 commit 2ca417b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion conf/battle/battle.conf
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/map/battle.cpp
Expand Up @@ -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, },
Expand Down
2 changes: 1 addition & 1 deletion src/map/battle.hpp
Expand Up @@ -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;
Expand Down
7 changes: 6 additions & 1 deletion src/map/status.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 2ca417b

Please sign in to comment.