Amend monster categorisation

Ignore monsters with alignment != 0 (non-hostile)
This commit is contained in:
CarlPoppa
2026-02-18 08:17:46 +00:00
parent 7d09c0c87f
commit 619d125378

View File

@@ -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)
}
}