From 3e0b87a60f6a8f02be36446a0fcc21ac72fe2bb0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 11 Apr 2021 11:18:45 -0300 Subject: Add debug menu for focus skills --- npc/commands/debug.txt | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'npc/commands') diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt index 6aa0510d..e61858be 100644 --- a/npc/commands/debug.txt +++ b/npc/commands/debug.txt @@ -57,7 +57,6 @@ L_BasicSkills: goto L_Begin; L_FocusSkills: - /* @pool = getskilllv(SKILL_POOL); @mallard = getskilllv(SKILL_MALLARDS_EYE); @brawling = getskilllv(SKILL_BRAWLING); @@ -65,6 +64,7 @@ L_FocusSkills: @poison = getskilllv(SKILL_RESIST_POISON); @astralsoul = getskilllv(SKILL_ASTRAL_SOUL); @raging = getskilllv(SKILL_RAGING); + /* menu "Overview of my focus skills.", L_SeeFocusSkills, "Focus or unfocus.", L_Unfocus, @@ -72,7 +72,47 @@ L_FocusSkills: "Reset focus skills.", L_ResetFocusSkills, "Back to the main menu.", L_Begin, "Close.", L_close; - + */ + mes "Your focusing skill level is " + @pool + "."; + mes "Your mallard's eye skill level is " + @mallard + "."; + mes "Your brawling skill level is " + @brawling + "."; + mes "Your speed skill level is " + @speed + "."; + mes "Your resist poison skill level is " + @poison + "."; + mes "Your astral soul skill level is " + @astralsoul + "."; + mes "Your raging skill level is " + @raging + "."; + next; + .@t=getactivatedpoolskilllist(); + menuint + l("Back"), -3, + l("Focus Skill +"), -2, + rif(getskilllv(SKILL_POOL), l("Focus Skill -")), -1, + ("Toggle Focus - Mallards Eye"), SKILL_MALLARDS_EYE, + ("Toggle Focus - Brawling"), SKILL_BRAWLING, + ("Toggle Focus - Speed"), SKILL_SPEED, + ("Toggle Focus - Resist Ailment"), SKILL_RESIST_POISON, + ("Toggle Focus - Astral Soul"), SKILL_ASTRAL_SOUL, + ("Toggle Focus - Raging"), SKILL_RAGING; + mes ""; + switch (@menuret) { + case -3: goto L_Begin; + case -2: + skill SKILL_POOL, @pool+1, 0; break; + case -1: + skill SKILL_POOL, max(0, @pool-1), 0; break; + default: + if (FOCUSING & getpoolskillFID(@menuret)) { + unpoolskill(@menuret); + mesc "Focus removed", 1; + } else { + .@s = poolskill(@menuret); + if (.@s) + mesc "Focus added", 2; + else + mesc sprintf("Impossible to focus. You can only focus %d skills at a time.", .@t), 1; + } + } + goto L_FocusSkills; + /* L_SeeFocusSkills: cleararray @skilllist_name$[0], "", 8; cleararray @skilllist_id[0], 0, 8; @@ -258,7 +298,6 @@ L_ResetFocusSkills: next; goto L_FocusSkills; */ - goto L_Begin; L_MagicSkills: @general = getskilllv(SKILL_MAGIC); -- cgit v1.2.3-60-g2f50