Esempio n. 1
0
    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);
    }
Esempio n. 2
0
 public void StartSpecialPreparation()
 {
     specialCompetenceTeleportTyped = specialCompetence as CompetenceSpecialTeleportation;
     if (specialCompetenceTeleportTyped != null)
     {
         StartTeleportationPreparation();
     }
 }