public bool GetSpecialCompetenceUsable(int currentActionPoints) { bool usable = true; if (specialCompetence.GetActionPointsCost > currentActionPoints) { return(false); } else { CompetenceSpecialTeleportation foundTeleportationCompetence = specialCompetence as CompetenceSpecialTeleportation; if (foundTeleportationCompetence != null) { if (foundTeleportationCompetence.GetTeleportationMode == TeleportationMode.Exchange) { if (foundTeleportationCompetence.GetTeleportationTarget == TeleportationTarget.NewestDisc || foundTeleportationCompetence.GetTeleportationTarget == TeleportationTarget.OldestDisc) { if (DiscManager.Instance.GetInRangeDiscsCount == 0) { return(false); } } } } } return(usable); }
public void StartSpecialPreparation() { specialCompetenceTeleportTyped = specialCompetence as CompetenceSpecialTeleportation; if (specialCompetenceTeleportTyped != null) { StartTeleportationPreparation(); } }