Exemple #1
0
        private void UpdateActionAvailability()
        {
            this.IsMessengerAvailable = MessengerManager.CanSendMessengerWithInfluenceCost(Faction2Leader.Hero, this.SendMessengerInfluenceCost);
            this.IsOptionAvailable    = WarAndPeaceConditions.CanMakePeaceExceptions(this).IsEmpty();
            string makePeaceException = WarAndPeaceConditions.CanMakePeaceExceptions(this).FirstOrDefault()?.ToString();

            this.ActionHint = makePeaceException != null ? new HintViewModel(makePeaceException) : new HintViewModel();
        }
Exemple #2
0
        protected virtual void UpdateActionAvailability()
        {
            this.IsMessengerAvailable = MessengerManager.CanSendMessengerWithInfluenceCost(Faction2Leader.Hero, this.SendMessengerInfluenceCost);
            this.IsOptionAvailable    = WarAndPeaceConditions.CanDeclareWarExceptions(this).IsEmpty();
            string allianceException = AllianceConditions.CanFormAllianceExceptions(this, true).FirstOrDefault()?.ToString();

            this.IsAllianceAvailable = allianceException == null;
            string declareWarException = WarAndPeaceConditions.CanDeclareWarExceptions(this).FirstOrDefault()?.ToString();

            this.ActionHint            = declareWarException != null ? new HintViewModel(declareWarException) : new HintViewModel();
            this.AllianceHint          = allianceException != null ? new HintViewModel(allianceException) : new HintViewModel();
            this.AllianceInfluenceCost = (int)DiplomacyCostCalculator.DetermineInfluenceCostForFormingAlliance(Faction1 as Kingdom, Faction2 as Kingdom, true);
        }
Exemple #3
0
 private void UpdateIsMessengerAvailable()
 {
     IsMessengerAvailable = MessengerManager.CanSendMessengerWithInfluenceCost(this._hero, SendMessengerInfluenceCost);
 }