Fixed incorrect calculation of mana percentage (#6)
* Fixed incorrect calculation of mana percentage * Check for some monsters that need to be skipped * Fixed incorrect values when not a pointer function Co-authored-by: Héctor Giménez <hector.fwbz@gmail.com> --------- Co-authored-by: Héctor Giménez <hector.fwbz@gmail.com>
This commit is contained in:
@@ -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.Name != npc.BaalTaunt && mo.Name != npc.Act5Combatant && mo.Name != npc.Act5Combatant2 && !mo.IsGoodNPC() && mo.Stats[stat.Life] > 0 {
|
||||
if !mo.IsMerc() && mo.Name != npc.BaalTaunt && mo.Name != npc.Act5Combatant && mo.Name != npc.Act5Combatant2 && !mo.IsSkip() && !mo.IsGoodNPC() && mo.Stats[stat.Life] > 0 {
|
||||
monsters = append(monsters, mo)
|
||||
}
|
||||
}
|
||||
@@ -153,3 +153,13 @@ func (m Monster) IsMonsterRaiser() bool {
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// Monster can`t be targeted normally
|
||||
func (m Monster) IsSkip() bool {
|
||||
switch m.Name {
|
||||
case npc.WaterWatcherLimb, npc.WaterWatcherHead:
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user