aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_attack.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-16 23:37:50 -0400
committerhistoria <[not public]>2026-06-16 23:37:50 -0400
commit389e307f205f9b7edf604fb9f86e1038ead736ef (patch)
tree595095b5877cc2b0513d31fb126303d8796cc311 /internal/game/cmd_attack.go
parent085e728d22a3369bd110b77409914cfbe9ebe611 (diff)
downloadthehouseoficarus-389e307f205f9b7edf604fb9f86e1038ead736ef.tar.gz
feat: major xterm256 color overhaul, see worldbuilding docs.
Diffstat (limited to 'internal/game/cmd_attack.go')
-rw-r--r--internal/game/cmd_attack.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/internal/game/cmd_attack.go b/internal/game/cmd_attack.go
index 2e15419..359e0ac 100644
--- a/internal/game/cmd_attack.go
+++ b/internal/game/cmd_attack.go
@@ -6,12 +6,12 @@ import (
"strconv"
"strings"
- "thirdcollapse/internal/combat"
- "thirdcollapse/internal/engine"
- "thirdcollapse/internal/net"
- "thirdcollapse/internal/object"
- "thirdcollapse/internal/player"
- "thirdcollapse/internal/world"
+ "thehouseoficarus/internal/combat"
+ "thehouseoficarus/internal/engine"
+ "thehouseoficarus/internal/net"
+ "thehouseoficarus/internal/object"
+ "thehouseoficarus/internal/player"
+ "thehouseoficarus/internal/world"
)
func (g *Game) doAttack(sess *net.Session, input string) {
@@ -308,7 +308,7 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
op := other.Player.(*player.Player)
mobLvl := mobCombatLevel(mob)
levelStr := g.levelColorize(other, op.CombatLevel(), mobLvl, fmt.Sprintf("(level %d)", mobLvl))
- other.WriteLine(fmt.Sprintf("\n%s has slain %s %s!", p.Name, mobDisplayName(mob, false), levelStr))
+ other.WriteLine(g.colorize(other, "broadcast", fmt.Sprintf("\n%s has slain %s %s!", p.Name, mobDisplayName(mob, false), levelStr)))
}
}
}
@@ -324,7 +324,7 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
if !mob.Unique {
dropper = "The " + mob.Name
}
- sess.WriteLine(fmt.Sprintf(" %s drops: %s", dropper, name))
+ sess.WriteLine(g.colorize(sess, "drop_message", fmt.Sprintf(" %s drops: %s", dropper, name)))
}
if len(mob.Drops.Loot) > 0 {
@@ -345,9 +345,9 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
dropper = "The " + mob.Name
}
if qty > 1 {
- sess.WriteLine(fmt.Sprintf(" %s drops: %d x %s", dropper, qty, name))
+ sess.WriteLine(g.colorize(sess, "drop_message", fmt.Sprintf(" %s drops: %d x %s", dropper, qty, name)))
} else {
- sess.WriteLine(fmt.Sprintf(" %s drops: %s", dropper, name))
+ sess.WriteLine(g.colorize(sess, "drop_message", fmt.Sprintf(" %s drops: %s", dropper, name)))
}
}
}
@@ -476,7 +476,7 @@ func (g *Game) respawnMob(instanceID string) {
if p, ok := sess.Player.(*player.Player); ok && p.OptionBool("mob_spawn") {
mobLvl := mobCombatLevel(inst)
levelStr := g.levelColorize(sess, p.CombatLevel(), mobLvl, fmt.Sprintf("(level %d)", mobLvl))
- sess.WriteLine(fmt.Sprintf("\n%s %s spawns in the area.", mobDisplayName(inst, false), levelStr))
+ sess.WriteLine(g.colorize(sess, "broadcast", fmt.Sprintf("\n%s %s spawns in the area.", mobDisplayName(inst, false), levelStr)))
}
}
}