Example #1
0
    public GhoulBossChaseTree(GhoulBossAIBehaviour gBoss)
    {
        moveToPlayer = new MoveAction(gBoss.Move, gBoss.FindPlayer);

        huntKill.OpenBranch(
            //new SetVector(goul.FindPlayer, moveToPlayer.SetTarget),
            moveToPlayer,
            new ConditionalAction(gBoss.PlayerInRange),
            new ActionNode(gBoss.MeleeAttack));
        root.OpenBranch(huntKill);
    }
Example #2
0
    public GhoulBossBehaviourTree(GhoulBossAIBehaviour gBoss)
    {
        becomeVulnerable = new ConditionalAction(gBoss.beginHealthSequence);
        ascend           = new ActionNode(gBoss.Ascend);
        decend           = new ActionNode(gBoss.Decend);
        healthEvent      = new ActionNode(gBoss.ActivateTotem);

        prepareForAttack = new ActionNode(gBoss.CoolDown);

        orbAttackF = new ActionNode(gBoss.AOEAttackFloating);
        aoeAttackF = new ActionNode(gBoss.OrbAttackFloating);

        attackSequenceF.OpenBranch(
            prepareForAttack,
            new ThisOrThat(orbAttackF, aoeAttackF, gBoss.PlayerInView)
            );

        healthSequence.OpenBranch(
            becomeVulnerable,
            ascend,
            attackSequenceF,
            decend,
            healthEvent
            );

        prepareForAttack = new ActionNode(gBoss.CoolDown);
        orbAttack        = new ActionNode(gBoss.OrbAttack);
        aoeAttack        = new ActionNode(gBoss.AOEAttack);

        attackSequence.OpenBranch(
            prepareForAttack,
            new ThisOrThat(orbAttack, aoeAttack, gBoss.PlayerInView)
            );

        determineAction.OpenBranch(
            healthSequence,
            attackSequence
            );

        root = new Root();
        root.OpenBranch(determineAction);
    }