Browse Source

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!
Aleos 5 years ago
parent
commit
2ca417b61f
4 changed files with 11 additions and 4 deletions
  1. 2 1
      conf/battle/battle.conf
  2. 2 1
      src/map/battle.cpp
  3. 1 1
      src/map/battle.hpp
  4. 6 1
      src/map/status.cpp

+ 2 - 1
conf/battle/battle.conf

@@ -10,7 +10,8 @@
 //--------------------------------------------------------------
 //--------------------------------------------------------------
 
 
 // Who should have a baseatk value (makes str affect damage)? (Note 3)
 // 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)
 // Who can have perfect flee? (Note 3)
 enable_perfect_flee: 1
 enable_perfect_flee: 1

+ 2 - 1
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,         },
 	{ "enable_critical",                    &battle_config.enable_critical,                 BL_PC,  BL_NUL, BL_ALL,         },
 	{ "mob_critical_rate",                  &battle_config.mob_critical_rate,               100,    0,      INT_MAX,        },
 	{ "mob_critical_rate",                  &battle_config.mob_critical_rate,               100,    0,      INT_MAX,        },
 	{ "critical_rate",                      &battle_config.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,   },
 	{ "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,        },
 	{ "casting_rate",                       &battle_config.cast_rate,                       100,    0,      INT_MAX,        },
 	{ "delay_rate",                         &battle_config.delay_rate,                      100,    0,      INT_MAX,        },
 	{ "delay_rate",                         &battle_config.delay_rate,                      100,    0,      INT_MAX,        },

+ 1 - 1
src/map/battle.hpp

@@ -141,7 +141,7 @@ struct Battle_Config
 	int enable_critical;
 	int enable_critical;
 	int mob_critical_rate;
 	int mob_critical_rate;
 	int critical_rate;
 	int critical_rate;
-	int enable_baseatk;
+	int enable_baseatk, enable_baseatk_renewal;
 	int enable_perfect_flee;
 	int enable_perfect_flee;
 	int cast_rate, delay_rate;
 	int cast_rate, delay_rate;
 	int delay_dependon_dex, delay_dependon_agi;
 	int delay_dependon_dex, delay_dependon_agi;

+ 6 - 1
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;
 	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;
 		return 0;
+#endif
 
 
 	if (bl->type == BL_PC)
 	if (bl->type == BL_PC)
 	switch(((TBL_PC*)bl)->status.weapon) {
 	switch(((TBL_PC*)bl)->status.weapon) {