diff options
author | Guilherme G. Menaldo <guilherme.menaldo@outlook.com> | 2018-10-20 23:21:07 -0300 |
---|---|---|
committer | Guilherme G. Menaldo <guilherme.menaldo@outlook.com> | 2018-10-20 23:21:07 -0300 |
commit | 1e3d3a3c0bca912ebdf18ae337814b2f434ec442 (patch) | |
tree | 7711e509fca9fd4b4ddcc7185cbaa897086f9266 | |
parent | df3f7552e61d1dae45e83c55ff36b95ab95181bb (diff) | |
download | hercules-1e3d3a3c0bca912ebdf18ae337814b2f434ec442.tar.gz hercules-1e3d3a3c0bca912ebdf18ae337814b2f434ec442.tar.bz2 hercules-1e3d3a3c0bca912ebdf18ae337814b2f434ec442.tar.xz hercules-1e3d3a3c0bca912ebdf18ae337814b2f434ec442.zip |
Added setting to keep traps invisible when triggered
-rw-r--r-- | conf/map/battle/skill.conf | 15 | ||||
-rw-r--r-- | src/map/battle.c | 3 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/skill.c | 4 |
4 files changed, 18 insertions, 5 deletions
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); } |