public override void Trigger()
    {
        Territory encompassingTerritory = Group.Cell.EncompassingTerritory;

        Tribe tribe = new Tribe(Group);

        tribe.Initialize();

        World.AddPolityInfo(tribe.Info);
        World.AddPolityToUpdate(tribe);

        World.AddGroupToUpdate(Group);

        PolityFormationEventMessage formationEventMessage = new PolityFormationEventMessage(tribe, TriggerDate);

        if (!World.HasEventMessage(WorldEvent.PolityFormationEventId))
        {
            World.AddEventMessage(formationEventMessage);
            formationEventMessage.First = true;
        }

        if (encompassingTerritory != null)
        {
            encompassingTerritory.Polity.AddEventMessage(formationEventMessage);
        }
    }
コード例 #2
0
    public static void LeaderAllowsSplit(Clan splitClan, Clan dominantClan, Tribe originalTribe)
    {
        Tribe newTribe = new Tribe(splitClan, originalTribe);

        newTribe.Initialize();

        splitClan.World.AddPolityInfo(newTribe.Info);

        splitClan.SetToUpdate();
        dominantClan.SetToUpdate();

        originalTribe.AddEventMessage(new TribeSplitEventMessage(splitClan, originalTribe, newTribe, splitClan.World.CurrentDate));
    }