From 8ee8982b8759bcae116647cc993867f4c8b0a6ce Mon Sep 17 00:00:00 2001 From: workhorse Date: Fri, 19 Jun 2026 20:24:52 -0400 Subject: reorganized items, objects, and rooms in directories. oranized module names. added startup checks. --- internal/game/aggro.go | 53 -------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 internal/game/aggro.go (limited to 'internal/game/aggro.go') diff --git a/internal/game/aggro.go b/internal/game/aggro.go deleted file mode 100644 index 2a9fff4..0000000 --- a/internal/game/aggro.go +++ /dev/null @@ -1,53 +0,0 @@ -package game - -import ( - "fmt" - - "thehouseoficarus/internal/combat" - "thehouseoficarus/internal/engine" - "thehouseoficarus/internal/net" -) - -func (g *Game) checkAggro(sess *net.Session) { - p := sess.Player - - if combat.GetCombat(p.Name) != nil { - return - } - - playerLevel := p.CombatLevel() - mobs := g.MobStore.MobsInRoom(p.RoomID) - - for _, mob := range mobs { - if !mob.Aggressive || mob.HP <= 0 || mob.Protected { - continue - } - if combat.IsMobInCombat(mob.InstanceID) { - continue - } - mobLevel := mobCombatLevel(mob) - if playerLevel > mobLevel*2 { - continue - } - aggMob := mob - g.Ticks.Subscribe(engine.ToTicks(1), func() bool { - if combat.GetCombat(p.Name) != nil { - return false - } - if aggMob.HP <= 0 || aggMob.RoomID != p.RoomID { - return false - } - if combat.IsMobInCombat(aggMob.InstanceID) { - return false - } - attacker := aggMob.Name - if !aggMob.Unique { - attacker = "The " + aggMob.Name - } - sess.WriteLine(fmt.Sprintf("\n%s attacks you!", g.colorize(sess, "mob_name", attacker))) - g.startCombat(sess, p, aggMob) - return false - }) - break - } -} -- cgit v1.2.3