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); } } }
internal void CEKillPlayer(Hero killer) { GameMenu.ExitToLast(); try { if (killer != null) { KillCharacterAction.ApplyByMurder(Hero.MainHero, killer); } else { KillCharacterAction.ApplyByMurder(Hero.MainHero); } } catch (Exception e) { CECustomHandler.ForceLogToFile("Failed CEKillPlayer " + e); } }
public void ApplySuccessfulAssassination(Settlement settlement, Hero assassin, Hero victim) { var party = victim.OwnedParties.Where(p => p.LeaderHero == victim).FirstOrDefault(); if (party != null) { party.MobileParty.RemoveParty(); } KillCharacterAction.ApplyByMurder(victim); PrintAssassinatedText(victim); _assassinationHistoryService.AddAssassinationEvent(new AssassinationEvent() { Settlement = settlement, Assassin = assassin, Victim = victim, Succeeded = true, CampaignTime = CampaignTime.Now }); }