From b0be3f023a024a4f8cc9903d52add7c81961303a Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Mon, 1 Oct 2018 13:48:10 -0300 Subject: Added option to make hunter traps invisible --- conf/map/battle/skill.conf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'conf/map/battle') diff --git a/conf/map/battle/skill.conf b/conf/map/battle/skill.conf index d258567a0..6923e729b 100644 --- a/conf/map/battle/skill.conf +++ b/conf/map/battle/skill.conf @@ -138,10 +138,13 @@ skill_nofootset: 1 // Default on official servers: true for player-traps gvg_traps_target_all: 1 -// Some traps settings (add as necessary): -// 1: Traps are invisible to those who come into view of it. When unset, all traps are visible at all times. -// (Invisible traps can be revealed through Hunter's Detecting skill) -traps_setting: 0 +// Hunter's traps visibility setting (with HiddenTrap: true on skill_db.conf) +// 0: Traps are always visible to everyone (Hercules/Pre-renewal) +// 1: Traps with HiddenTrap: true are hidden in versus maps (PvP/GvG/BG) +// 2: Traps with HiddenTrap: true are always invisible (Renewal) (Default) +// Notes: Invisibility applies to players that are not in caster's party. +// Invisible traps can be made visible to everyone with Hunter's Detecting skill. +trap_visibility: 2 // Restrictions applied to the Alchemist's Summon Flora skill (add as necessary) // 1: Enable players to damage the floras outside of versus grounds. -- cgit v1.2.3-70-g09d2 From 1e3d3a3c0bca912ebdf18ae337814b2f434ec442 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sat, 20 Oct 2018 23:21:07 -0300 Subject: Added setting to keep traps invisible when triggered --- conf/map/battle/skill.conf | 15 ++++++++++++--- src/map/battle.c | 3 ++- src/map/battle.h | 1 + src/map/skill.c | 4 +++- 4 files changed, 18 insertions(+), 5 deletions(-) (limited to 'conf/map/battle') diff --git a/conf/map/battle/skill.conf b/conf/map/battle/skill.conf index 6923e729b..cb219740f 100644 --- a/conf/map/battle/skill.conf +++ b/conf/map/battle/skill.conf @@ -139,12 +139,21 @@ skill_nofootset: 1 gvg_traps_target_all: 1 // Hunter's traps visibility setting (with HiddenTrap: true on skill_db.conf) +// Here we have 2 configs: +// visibility stands to how traps are displayed by default: // 0: Traps are always visible to everyone (Hercules/Pre-renewal) // 1: Traps with HiddenTrap: true are hidden in versus maps (PvP/GvG/BG) // 2: Traps with HiddenTrap: true are always invisible (Renewal) (Default) -// Notes: Invisibility applies to players that are not in caster's party. -// Invisible traps can be made visible to everyone with Hunter's Detecting skill. -trap_visibility: 2 +// Notes: - Invisibility applies to players that are not in caster's party. +// - Invisible traps can be made visible to everyone with Hunter's Detecting skill. +// +// display_on_trigger tells if HiddenTraps should become visible once triggered +// 0: Do not make traps visible once triggered (except for Ankle Snare) (Aegis) +// 1: Always make traps visible once triggered (Hercules) +trap_options: { + visibility: 2 + display_on_trigger: 1 +} // Restrictions applied to the Alchemist's Summon Flora skill (add as necessary) // 1: Enable players to damage the floras outside of versus grounds. diff --git a/src/map/battle.c b/src/map/battle.c index 895876300..a784f6884 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6966,7 +6966,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, }, - { "trap_visibility", &battle_config.trap_visibility, 0, 0, 2, }, + { "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, }, diff --git a/src/map/battle.h b/src/map/battle.h index 297768765..007fbabd2 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -150,6 +150,7 @@ struct Battle_Config { int defnotenemy; int vs_traps_bctall; int trap_visibility; + int trap_trigger; int summon_flora; //[Skotlex] int clear_unit_ondeath; //[Skotlex] int clear_unit_onwarp; //[Skotlex] diff --git a/src/map/skill.c b/src/map/skill.c index 2b31de6fc..c320fe4b3 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -12759,7 +12759,9 @@ static int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *b ts->tick += sg->interval*(map->count_oncell(bl->m,bl->x,bl->y,BL_CHAR,0)-1); } - if (battle_config.trap_visibility != 0 && skill->get_inf2(sg->skill_id) & INF2_HIDDEN_TRAP) { + if (sg->skill_id == HT_ANKLESNARE + || (battle_config.trap_trigger == 1 && skill->get_inf2(sg->skill_id) & INF2_HIDDEN_TRAP) + ) { src->visible = true; clif->skillunit_update(&src->bl); } -- cgit v1.2.3-70-g09d2