Example #1
0
    public static void follower(int proto_num)
    {
        var npc = GameSystems.MapObject.CreateObject(proto_num, SelectedPartyLeader.GetLocation());

        if (!(SelectedPartyLeader.HasMaxFollowers()))
        {
            SelectedPartyLeader.AddFollower(npc);
        }
        else
        {
            SelectedPartyLeader.AddAIFollower(npc);
        }

        // add familiar_obj to d20initiative, and set initiative to spell_caster's
        var caster_init_value = SelectedPartyLeader.GetInitiative();

        npc.AddToInitiative();
        npc.SetInitiative(caster_init_value);
        UiSystems.Combat.Initiative.UpdateIfNeeded();
    }