コード例 #1
0
ファイル: Batch.cs プロジェクト: GrognardsFromHell/OpenTemple
    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();
    }
コード例 #2
0
ファイル: T.cs プロジェクト: GrognardsFromHell/OpenTemple
    // test adding PC via follower_add()

    public static void tpca()
    {
        var a = fpn("va"); // vadania

        SelectedPartyLeader.AddFollower(a);
    }