diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-04-11 13:23:24 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-04-11 13:23:24 -0300 |
commit | 0293e9cdb644bb70576024c76c69216a6d0767bf (patch) | |
tree | 43692b815bea289563e1da1bef4939fd5f300969 | |
parent | cfbb17bdb5a0b209eb64b898ef76829c4144684a (diff) | |
download | serverdata-0293e9cdb644bb70576024c76c69216a6d0767bf.tar.gz serverdata-0293e9cdb644bb70576024c76c69216a6d0767bf.tar.bz2 serverdata-0293e9cdb644bb70576024c76c69216a6d0767bf.tar.xz serverdata-0293e9cdb644bb70576024c76c69216a6d0767bf.zip |
Allow Luca to focus/unfocus even if he is not teaching the skill
-rw-r--r-- | npc/002-1/luca.txt | 49 | ||||
-rw-r--r-- | npc/commands/debug.txt | 14 | ||||
-rw-r--r-- | npc/magic/config.txt | 6 |
3 files changed, 67 insertions, 2 deletions
diff --git a/npc/002-1/luca.txt b/npc/002-1/luca.txt index 90762575..609cc389 100644 --- a/npc/002-1/luca.txt +++ b/npc/002-1/luca.txt @@ -35,11 +35,56 @@ L_Teach_soon: mes "\"You've grown quite a bit stronger since I first saw you, strolling around town like that! You know, if you train a little more, maybe we can help each other out a little?\""; goto L_close; +// FIXME Placeholder L_Teach: mesn; mesq l("Sorry %%i I am really really REALLY busy right now. Maybe later, when I find my toolset, we can start focusing on something."); - // FIXME: Rebirth Trait for Passive Skill Support (FOCUS) - close; + if (!getskilllv(SKILL_POOL)) close; + .@t=getactivatedpoolskilllist(); + mes ""; + mes l("Focus list:"); + mesc l("%s : %s", l("Mallard's Eye"), + (isfocused(SKILL_MALLARDS_EYE) ? l("Yes") : l("No"))); + mesc l("%s : %s", l("Brawling"), + (isfocused(SKILL_BRAWLING) ? l("Yes") : l("No"))); + mesc l("%s : %s", l("Speed"), + (isfocused(SKILL_SPEED) ? l("Yes") : l("No"))); + mesc l("%s : %s", l("Resist Ailment"), + (isfocused(SKILL_RESIST_POISON) ? l("Yes") : l("No"))); + mesc l("%s : %s", l("Astral Soul"), + (isfocused(SKILL_ASTRAL_SOUL) ? l("Yes") : l("No"))); + mesc l("%s : %s", l("Raging"), + (isfocused(SKILL_RAGING) ? l("Yes") : l("No"))); + menuint + l("Back"), -3, + rif(getskilllv(SKILL_MALLARDS_EYE), + l("Toggle Focus - Mallards Eye")), SKILL_MALLARDS_EYE, + rif(getskilllv(SKILL_BRAWLING), + l("Toggle Focus - Brawling"), SKILL_BRAWLING, + rif(getskilllv(SKILL_SPEED), + l("Toggle Focus - Speed"), SKILL_SPEED, + rif(getskilllv(SKILL_RESIST_POISON), + l("Toggle Focus - Resist Ailment"), SKILL_RESIST_POISON, + rif(getskilllv(SKILL_ASTRAL_SOUL), + l("Toggle Focus - Astral Soul"), SKILL_ASTRAL_SOUL, + rif(getskilllv(SKILL_RAGING), + l("Toggle Focus - Raging"), SKILL_RAGING; + mes ""; + switch (@menuret) { + case -3: close; + 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_Teach; /* if (getskilllv(SKILL_POOL)) goto L_Teachmore; diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt index b08012df..c02472ea 100644 --- a/npc/commands/debug.txt +++ b/npc/commands/debug.txt @@ -81,6 +81,20 @@ L_FocusSkills: mes "Your astral soul skill level is " + @astralsoul + "."; mes "Your raging skill level is " + @raging + "."; next; + mes ""; + mes l("Focus list:"); + mesc l("%s : %s", l("Mallard's Eye"), + (isfocused(SKILL_MALLARDS_EYE) ? l("Yes") : l("No"))); + mesc l("%s : %s", l("Brawling"), + (isfocused(SKILL_BRAWLING) ? l("Yes") : l("No"))); + mesc l("%s : %s", l("Speed"), + (isfocused(SKILL_SPEED) ? l("Yes") : l("No"))); + mesc l("%s : %s", l("Resist Ailment"), + (isfocused(SKILL_RESIST_POISON) ? l("Yes") : l("No"))); + mesc l("%s : %s", l("Astral Soul"), + (isfocused(SKILL_ASTRAL_SOUL) ? l("Yes") : l("No"))); + mesc l("%s : %s", l("Raging"), + (isfocused(SKILL_RAGING) ? l("Yes") : l("No"))); .@t=getactivatedpoolskilllist(); menuint l("Back"), -3, diff --git a/npc/magic/config.txt b/npc/magic/config.txt index 5bcdd306..6286c2a6 100644 --- a/npc/magic/config.txt +++ b/npc/magic/config.txt @@ -387,6 +387,12 @@ function script unpoolskill { return; } +// isfocused(skill) +function script isfocused { + .@f=getpoolskillFID(getarg(0)); + return (FOCUSING & .@f); +} + - script Magic Load NPC_HIDDEN,{ OnInit: end; |