aboutsummaryrefslogtreecommitdiff
path: root/internal/game/combat_mob.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-26 02:52:31 -0400
committerhistoria <[not public]>2026-06-26 02:52:31 -0400
commit3102525d97aa6f1ad152c74b2ccfbd4b3a9b83f5 (patch)
tree65610fa4fb8abe1dc7a46d00658e85e0525d397c /internal/game/combat_mob.go
parente2d5b081f27141bb3dd89dbe595860b8a1345d55 (diff)
downloadthehouseoficarus-3102525d97aa6f1ad152c74b2ccfbd4b3a9b83f5.tar.gz
feat: simplified conversation trees and output won't overwrite prompts now
Diffstat (limited to 'internal/game/combat_mob.go')
-rw-r--r--internal/game/combat_mob.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/game/combat_mob.go b/internal/game/combat_mob.go
index 5558578..2abaf81 100644
--- a/internal/game/combat_mob.go
+++ b/internal/game/combat_mob.go
@@ -142,9 +142,9 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
if complete == "" {
complete = fmt.Sprintf("You finish your work on %s!", mobDisplayName(mob, true))
}
- sess.WriteLine(g.colorize(sess, "victory", "\n"+complete))
- } else {
- sess.WriteLine(g.colorize(sess, "victory", fmt.Sprintf("\nYou have defeated %s!", mobDisplayName(mob, true))))
+ sess.WriteLine(g.colorize(sess, "victory", complete))
+ } else {
+ sess.WriteLine(g.colorize(sess, "victory", fmt.Sprintf("You have defeated %s!", mobDisplayName(mob, true))))
g.onAssassinKill(sess, p, mob)
}
@@ -152,12 +152,12 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
for _, other := range g.Hub.PlayersInRoom(p.RoomID) {
if other != sess && other.Player != nil {
if isTask {
- other.WriteLine(g.colorize(other, "broadcast", fmt.Sprintf("\n%s finishes working on %s.", p.Name, mobDisplayName(mob, false))))
+ other.WriteLine(g.colorize(other, "broadcast", fmt.Sprintf("%s finishes working on %s.", p.Name, mobDisplayName(mob, false))))
} else {
op := other.Player
mobLvl := mobCombatLevel(mob)
levelStr := g.levelColorize(other, op.CombatLevel(), mobLvl, fmt.Sprintf("(level %d)", mobLvl))
- other.WriteLine(g.colorize(other, "broadcast", fmt.Sprintf("\n%s has slain %s %s!", p.Name, mobDisplayName(mob, false), levelStr)))
+ other.WriteLine(g.colorize(other, "broadcast", fmt.Sprintf("%s has slain %s %s!", p.Name, mobDisplayName(mob, false), levelStr)))
}
}
}
@@ -242,14 +242,14 @@ func (g *Game) killPlayer(sess *net.Session, p *player.Player, mob *world.MobIns
if mob.HP < 0 {
mob.HP = 0
}
- sess.WriteLine(fmt.Sprintf("\nDead Man's Switch activates! %s takes %d damage!",
- mobDisplayName(mob, true), retDmg))
+ sess.WriteLine(fmt.Sprintf("Dead Man's Switch activates! %s takes %d damage!",
+ mobDisplayName(mob, true), retDmg))
}
}
}
p.DeactivateAllTechs()
p.Stats.RecordDeath()
- sess.WriteLine(g.colorize(sess, "death", "\nOh dear, you are dead!"))
+ sess.WriteLine(g.colorize(sess, "death", "Oh dear, you are dead!"))
p.ClearMoveState()
p.HazardTimer = 0
if ss, ok := g.safespot.Get(p.Name); ok {