From 619d1253783809d4fa3426231f437e4292a5d0c3 Mon Sep 17 00:00:00 2001 From: CarlPoppa Date: Wed, 18 Feb 2026 08:17:46 +0000 Subject: [PATCH 1/5] Amend monster categorisation Ignore monsters with alignment != 0 (non-hostile) --- pkg/data/npc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/data/npc.go b/pkg/data/npc.go index eb3774a..8eb390f 100644 --- a/pkg/data/npc.go +++ b/pkg/data/npc.go @@ -82,7 +82,7 @@ func (m Monsters) FindOne(id npc.ID, t MonsterType) (Monster, bool) { func (m Monsters) Enemies(filters ...MonsterFilter) []Monster { monsters := make([]Monster, 0) for _, mo := range m { - if !mo.IsMerc() && !mo.IsSkip() && !mo.IsGoodNPC() && !mo.IsPet() && mo.Stats[stat.Life] > 0 { + if !mo.IsMerc() && !mo.IsSkip() && !mo.IsGoodNPC() && !mo.IsPet() && mo.Stats[stat.Life] > 0 && mo.Stats[stat.Alignment] == 0 { monsters = append(monsters, mo) } } From ffbc3dc39a77b2fb5021daf3d976a89f96951712 Mon Sep 17 00:00:00 2001 From: CarlPoppa Date: Sat, 21 Feb 2026 12:56:35 +0000 Subject: [PATCH 2/5] Add warlock summons to IsPet --- pkg/data/npc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/data/npc.go b/pkg/data/npc.go index 8eb390f..67f938a 100644 --- a/pkg/data/npc.go +++ b/pkg/data/npc.go @@ -162,7 +162,7 @@ func (m Monster) IsMerc() bool { func (m Monster) IsPet() bool { // Necromancer revive. - if m.States.HasState(state.Revive) { + if m.States.HasState(state.Revive) || m.States.HasState(state.BindDemon) { return true } @@ -171,7 +171,7 @@ func (m Monster) IsPet() bool { npc.OakSage, npc.DruBear, npc.DruPlaguePoppy, npc.VineCreature, npc.DruCycleOfLife, npc.ClayGolem, npc.BloodGolem, npc.IronGolem, npc.FireGolem, npc.NecroSkeleton, npc.NecroMage, npc.Valkyrie, npc.Decoy, - npc.ShadowWarrior, npc.ShadowMaster: + npc.ShadowWarrior, npc.ShadowMaster, npc.Tainted3, npc.WarGoatman, npc.WarDefiler: return true } From 831d004c3302352f8e9284047552271798d5e581 Mon Sep 17 00:00:00 2001 From: CarlPoppa Date: Sat, 21 Feb 2026 12:58:18 +0000 Subject: [PATCH 3/5] Revert alignment check in Enemies() (doesn't work) --- pkg/data/npc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/data/npc.go b/pkg/data/npc.go index 67f938a..00fb67d 100644 --- a/pkg/data/npc.go +++ b/pkg/data/npc.go @@ -82,7 +82,7 @@ func (m Monsters) FindOne(id npc.ID, t MonsterType) (Monster, bool) { func (m Monsters) Enemies(filters ...MonsterFilter) []Monster { monsters := make([]Monster, 0) for _, mo := range m { - if !mo.IsMerc() && !mo.IsSkip() && !mo.IsGoodNPC() && !mo.IsPet() && mo.Stats[stat.Life] > 0 && mo.Stats[stat.Alignment] == 0 { + if !mo.IsMerc() && !mo.IsSkip() && !mo.IsGoodNPC() && !mo.IsPet() && mo.Stats[stat.Life] > 0 { monsters = append(monsters, mo) } } From e1805d76ab5b2f530f7a12c1b64ec72e31653b8b Mon Sep 17 00:00:00 2001 From: CarlPoppa Date: Mon, 23 Feb 2026 09:09:26 +0000 Subject: [PATCH 4/5] Increase GetStates to 8 iterations --- pkg/memory/player.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/memory/player.go b/pkg/memory/player.go index cc6d02d..e96dc34 100644 --- a/pkg/memory/player.go +++ b/pkg/memory/player.go @@ -212,7 +212,7 @@ func (gd *GameReader) getSkills(skillListPtr uintptr) map[skill.ID]skill.Points func (gd *GameReader) GetStates(statsListExPtr uintptr) state.States { var states state.States - for i := 0; i < 6; i++ { + for i := 0; i < 8; i++ { offset := i * 4 stateByte := gd.Process.ReadUInt(statsListExPtr+0xAF0+uintptr(offset), Uint32) From 1059ee7d3cb1b097206cb8374278468d47717182 Mon Sep 17 00:00:00 2001 From: CarlPoppa Date: Mon, 23 Feb 2026 09:10:02 +0000 Subject: [PATCH 5/5] Add BindDemonUnderling to IsPet check --- pkg/data/npc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/data/npc.go b/pkg/data/npc.go index 00fb67d..e7ad26e 100644 --- a/pkg/data/npc.go +++ b/pkg/data/npc.go @@ -162,7 +162,7 @@ func (m Monster) IsMerc() bool { func (m Monster) IsPet() bool { // Necromancer revive. - if m.States.HasState(state.Revive) || m.States.HasState(state.BindDemon) { + if m.States.HasState(state.Revive) || m.States.HasState(state.BindDemon) || m.States.HasState(state.BindDemonUnderling) { return true }