Added pet exclusions (#21)

* Added pet exclusions

* Added druid creepers to pets

---------

Co-authored-by: dmeli <d.melia@outlook.fr>
This commit is contained in:
SoundsLegit
2024-06-25 14:45:29 +02:00
committed by GitHub
parent bd7e821149
commit 3d4b0bc7a4
2 changed files with 14 additions and 16 deletions

View File

@@ -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() && !mo.IsSkip() && !mo.IsGoodNPC() && mo.Stats[stat.Life] > 0 {
if !mo.IsMerc() && !mo.IsSkip() && !mo.IsGoodNPC() && !mo.IsPet() && mo.Stats[stat.Life] > 0 {
monsters = append(monsters, mo)
}
}
@@ -126,6 +126,19 @@ func (m Monster) IsMerc() bool {
return false
}
func (m Monster) IsPet() bool {
switch m.Name {
case npc.DruHawk, npc.DruSpiritWolf, npc.DruFenris, npc.HeartOfWolverine,
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.ShadowWarrior, npc.ShadowMaster:
return true
default:
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,

View File

@@ -138,10 +138,6 @@ func (gd *GameReader) shouldBeIgnored(txtNo uint) bool {
npc.Larva,
npc.Familiar,
npc.Act3Male,
npc.ClayGolem,
npc.BloodGolem,
npc.IronGolem,
npc.FireGolem,
npc.Act3Female,
npc.Snake,
npc.Parrot,
@@ -164,10 +160,7 @@ func (gd *GameReader) shouldBeIgnored(txtNo uint) bool {
npc.Hydra2,
npc.Hydra3,
npc.SevenTombs,
npc.Valkyrie,
npc.IronWolf,
npc.NecroSkeleton,
npc.NecroMage,
npc.CompellingOrbNpc,
npc.SpiritMummy,
npc.Act2Guard4,
@@ -181,14 +174,6 @@ func (gd *GameReader) shouldBeIgnored(txtNo uint) bool {
npc.InvisiblePet,
npc.InfernoSentry,
npc.DeathSentry,
npc.ShadowWarrior,
npc.ShadowMaster,
npc.DruHawk,
npc.DruSpiritWolf,
npc.DruFenris,
npc.HeartOfWolverine,
npc.OakSage,
npc.DruBear,
npc.BaalThrone,
npc.InjuredBarbarian,
npc.InjuredBarbarian2,