From d1017bea611aa824c85c06d5f05570ed55bd6199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Gim=C3=A9nez?= Date: Sat, 13 May 2023 15:09:12 +0900 Subject: [PATCH] skip good npcs from monster enemy list --- pkg/data/npc.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg/data/npc.go b/pkg/data/npc.go index a158d4d..df3df8e 100644 --- a/pkg/data/npc.go +++ b/pkg/data/npc.go @@ -50,7 +50,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() { + if !mo.IsMerc() && !mo.IsGoodNPC() { monsters = append(monsters, mo) } } @@ -113,3 +113,13 @@ func (m Monster) IsMerc() bool { return false } + +func (m Monster) IsGoodNPC() bool { + switch m.Name { + case 146, 154, 147, 150, 155, 148, 244, 210, 175, 199, 198, 177, 178, 201, 202, 200, 331, 245, 264, 255, 176, + 252, 254, 253, 297, 246, 251, 367, 521, 257, 405, 265, 520, 512, 527, 515, 513, 511, 514, 266, 408, 406: + return true + } + + return false +}