Пример #1
0
        private void ConsequenceKillPrisoner(Companion companion, Hero hero)
        {
            if (hero.IsPrisoner && companion.MultipleRestrictedListOfConsequences.Contains(RestrictedListOfConsequences.KillPrisoner))
            {
                if (hero?.PartyBelongedToAsPrisoner?.LeaderHero != null)
                {
                    KillCharacterAction.ApplyByExecution(hero, hero?.PartyBelongedToAsPrisoner?.LeaderHero);
                }
                else
                {
                    KillCharacterAction.ApplyByMurder(hero);
                }
            }

            if (companion.MultipleRestrictedListOfConsequences.Contains(RestrictedListOfConsequences.KillCaptor))
            {
                if (!hero.IsPrisoner)
                {
                    KillCharacterAction.ApplyByMurder(hero);
                }
                else if (hero?.PartyBelongedToAsPrisoner?.LeaderHero != null)
                {
                    KillCharacterAction.ApplyByMurder(hero?.PartyBelongedToAsPrisoner?.LeaderHero);
                }
            }
        }
Пример #2
0
        internal static void EndFailedRevolt(Revolt revolt)
        {
            var textObject = new TextObject(Localization.GameTexts.RevoltsRevoltEnd);

            textObject.SetTextVariable("SETTLEMENT", revolt.Settlement.Name);
            InformationManager.AddQuickInformation(textObject);

            revolt.SettlementInfo.CurrentFactionInfo.CityRevoltionFailed(revolt.Settlement);

            if (revolt.IsMinorFaction)
            {
                Managers.Kingdom.DestroyKingdom(revolt.Party.Owner.Clan.Kingdom);
                KillCharacterAction.ApplyByExecution(revolt.Party.Owner, revolt.Settlement.OwnerClan?.Kingdom?.Leader ?? revolt.Settlement.OwnerClan.Leader, true);

                if (revolt.Party?.MobileParty != null)
                {
                    DestroyPartyAction.Apply(revolt.SettlementInfo.Garrision, revolt.Party.MobileParty);
                }
            }

            Managers.Revolt.Revolts.Remove(revolt);
        }