コード例 #1
0
 public static Captive Create(GameScenario scenario, Person person, Faction capturingFaction)
 {
     if (person.BelongedFaction == null)
     {
         return null;
     }
     if (person.BelongedFaction == capturingFaction)
     {
         return null;
     }
     Captive captive = new Captive();
     captive.Scenario = scenario;
     captive.ID = scenario.Captives.GetFreeGameObjectID();
     captive.CaptivePerson = person;
     person.DecreaseReputation(50);
     captive.CaptiveFaction = person.BelongedFaction;
     person.SetBelongedCaptive(captive, GameObjects.PersonDetail.PersonStatus.Captive);
     person.HeldCaptiveCount++;
     scenario.Captives.AddCaptiveWithEvent(captive);
     return captive;
 }