aboutsummaryrefslogtreecommitdiff
path: root/internal/game/action_fletch.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/action_fletch.go')
-rw-r--r--internal/game/action_fletch.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/internal/game/action_fletch.go b/internal/game/action_fletch.go
index 734453b..25f2966 100644
--- a/internal/game/action_fletch.go
+++ b/internal/game/action_fletch.go
@@ -33,6 +33,7 @@ func (g *Game) doInstantFletch(sess *net.Session, p *player.Player, recipe *acti
batches := 0
totalOutput := 0
+ skill := player.SkillName(recipe.EffectiveSkill())
for {
if !g.canDoFletchRecipe(p, recipe) {
break
@@ -60,8 +61,8 @@ func (g *Game) doInstantFletch(sess *net.Session, p *player.Player, recipe *acti
}
if recipe.XP > 0 {
- if newLevel := p.AddSkillXP(player.Fletching, recipe.XP); newLevel > 0 {
- sess.WriteLine(g.colorize(sess, "level_up", fmt.Sprintf("*** You are now level %d fletching! ***", newLevel)))
+ if newLevel := p.AddSkillXP(skill, recipe.XP); newLevel > 0 {
+ sess.WriteLine(g.colorize(sess, "level_up", fmt.Sprintf("*** You are now level %d %s! ***", newLevel, recipe.EffectiveSkill())))
}
}
@@ -91,7 +92,7 @@ func (g *Game) doInstantFletch(sess *net.Session, p *player.Player, recipe *acti
msg := fmt.Sprintf("You fletch %d %s.", totalOutput, outputName)
if p.OptionBool("xp_drops") && recipe.XP > 0 {
totalXP := recipe.XP * batches
- abbr := player.SkillAbbr[player.Fletching]
+ abbr := player.SkillAbbr[skill]
msg += g.colorize(sess, "xp", fmt.Sprintf(" (+%dxp %s)", totalXP, abbr))
}
sess.WriteLine(msg)
@@ -151,6 +152,8 @@ func (g *Game) advanceFletch(sess *net.Session, p *player.Player) {
outputQty = 1
}
+ skill := player.SkillName(recipe.EffectiveSkill())
+
placed := false
if outDef != nil && outDef.Stackable {
for i := 0; i < 28; i++ {
@@ -175,8 +178,8 @@ func (g *Game) advanceFletch(sess *net.Session, p *player.Player) {
}
if recipe.XP > 0 {
- if newLevel := p.AddSkillXP(player.Fletching, recipe.XP); newLevel > 0 {
- sess.WriteLine(g.colorize(sess, "level_up", fmt.Sprintf("*** You are now level %d fletching! ***", newLevel)))
+ if newLevel := p.AddSkillXP(skill, recipe.XP); newLevel > 0 {
+ sess.WriteLine(g.colorize(sess, "level_up", fmt.Sprintf("*** You are now level %d %s! ***", newLevel, recipe.EffectiveSkill())))
}
}
g.AccountStore.SaveCharacter(p)
@@ -190,7 +193,7 @@ func (g *Game) advanceFletch(sess *net.Session, p *player.Player) {
msg = fmt.Sprintf("You fletch %s.", outputName)
}
if p.OptionBool("xp_drops") && recipe.XP > 0 {
- abbr := player.SkillAbbr[player.Fletching]
+ abbr := player.SkillAbbr[skill]
msg += g.colorize(sess, "xp", fmt.Sprintf(" (+%dxp %s)", recipe.XP, abbr))
}
sess.WriteLine(msg)