Item refactor and more (#1)

This commit is contained in:
Héctor Giménez
2023-08-18 22:33:54 +09:00
committed by GitHub
parent 9a3b131826
commit 1c8aab1580
13 changed files with 213 additions and 64 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.IsGoodNPC() {
if !mo.IsMerc() && !mo.IsGoodNPC() && mo.Stats[stat.Life] > 0 {
monsters = append(monsters, mo)
}
}