protected override string UpdateState() { if (HouseInSight()) { if (Adjacent(destination)) { return(AIHelper.CreateStealAction(Direction(brain.playerInfo.Position, destination))); } else { return(GoTo(destination)); } } else { if (destination != null && Adjacent(destination)) { if (destinationType == TileContent.Resource) { return(AIHelper.CreateCollectAction(Direction(brain.playerInfo.Position, destination))); } else //(destinationType == TileContent.Wall) { return(AIHelper.CreateMeleeAttackAction(Direction(brain.playerInfo.Position, destination))); } } else { return(SearchDirection(new Point(-1, 0))); } } }
string StealthRessource() { if (Adjacent(stealthDestination)) { return(AIHelper.CreateStealAction(stealthDestination)); } else { return(GoTo(stealthDestination)); } }