private Boolean IsMonsterInFrontOfParty() { if (MyController != null) { Monster monster = (Monster)MyController; Party party = LegacyLogic.Instance.WorldManager.Party; GridSlot slot = LegacyLogic.Instance.MapLoader.Grid.GetSlot(party.Position); return(Position.Distance(monster.Position, party.Position) <= 1f && EDirectionFunctions.GetLineOfSightDirection(party.Position, monster.Position) == party.Direction && slot != null && slot.GetConnection(party.Direction, false, true) != null); } return(false); }