summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-05-06 01:10:05 +0200
committerGitHub <noreply@github.com>2019-05-06 01:10:05 +0200
commit4bcdd614e6d6de69edb7f203b21fc09a3fa0a5bc (patch)
treed1f3d43eb51906694583fff0dd8504647998cf9f /src/map/battle.c
parentd6fecbcb87db2a32bf189627b9b1dd7230265458 (diff)
parent1e3d3a3c0bca912ebdf18ae337814b2f434ec442 (diff)
downloadhercules-4bcdd614e6d6de69edb7f203b21fc09a3fa0a5bc.tar.gz
hercules-4bcdd614e6d6de69edb7f203b21fc09a3fa0a5bc.tar.bz2
hercules-4bcdd614e6d6de69edb7f203b21fc09a3fa0a5bc.tar.xz
hercules-4bcdd614e6d6de69edb7f203b21fc09a3fa0a5bc.zip
Merge pull request #2232 from guilherme-gm/201810-trap-visibility
Added option to make hunter traps invisible
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 4ee1791ba..c40c3afac 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -7004,7 +7004,8 @@ static const struct battle_data {
{ "player_damage_delay_rate", &battle_config.pc_damage_delay_rate, 100, 0, INT_MAX, },
{ "defunit_not_enemy", &battle_config.defnotenemy, 0, 0, 1, },
{ "gvg_traps_target_all", &battle_config.vs_traps_bctall, BL_PC, BL_NUL, BL_ALL, },
- { "traps_setting", &battle_config.traps_setting, 0, 0, 1, },
+ { "trap_options/visibility", &battle_config.trap_visibility, 2, 0, 2, },
+ { "trap_options/display_on_trigger", &battle_config.trap_trigger, 1, 0, 1, },
{ "summon_flora_setting", &battle_config.summon_flora, 1|2, 0, 1|2, },
{ "clear_skills_on_death", &battle_config.clear_unit_ondeath, BL_NUL, BL_NUL, BL_ALL, },
{ "clear_skills_on_warp", &battle_config.clear_unit_onwarp, BL_ALL, BL_NUL, BL_ALL, },
@@ -7601,6 +7602,10 @@ static bool battle_config_read(const char *filename, bool imported)
if (!imported)
battle->config_set_defaults();
+ if (libconfig->lookup(&config, "battle_configuration/traps_setting") != NULL) {
+ ShowError("The `traps_setting` battle conf option has been replaced by `trap_visibility`. Please see conf/map/battle/skill.conf.\n");
+ }
+
for (i = 0; i < ARRAYLENGTH(battle_data); i++) {
int type, val;
char config_name[256];