Search in sources :

Example 1 with BehavioralTree

use of org.iaie.btree.BehavioralTree in project Ecgberht by Jabbo16.

the class Ecgberht method initIslandTree.

private void initIslandTree() {
    CheckIslands chI = new CheckIslands("Check islands", gs);
    CheckExpandingIsland cEI = new CheckExpandingIsland("Check Expanding To Island", gs);
    CheckDropped chD = new CheckDropped("Check Dropped", gs);
    CheckBlockingMinerals cBM = new CheckBlockingMinerals("Check Blocking minerals", gs);
    CheckResourcesIsland cRI = new CheckResourcesIsland("Check resources Island", gs);
    MoveIsland mI = new MoveIsland("Move Island", gs);
    ChooseDropShip cD = new ChooseDropShip("Choose DropShip", gs);
    ChooseIsland cI = new ChooseIsland("Choose Island", gs);
    ChooseWorkerDrop cWD = new ChooseWorkerDrop("Choose Worker Drop", gs);
    SendToDrop sD = new SendToDrop("Send To Drop", gs);
    Sequence chooseThings = new Sequence("Choose things", cD, cI, cWD, sD);
    Sequence expand = new Sequence("Island expand", cEI, chD, cBM, cRI, mI);
    Selector expanding = new Selector("Check if already expanding", expand, cEI, chooseThings);
    Sequence islandExpansion = new Sequence("island expansion", chI, expanding);
    islandTree = new BehavioralTree("islandTree");
    islandTree.addChild(islandExpansion);
}
Also used : Sequence(org.iaie.btree.task.composite.Sequence) BehavioralTree(org.iaie.btree.BehavioralTree) Selector(org.iaie.btree.task.composite.Selector)

Example 2 with BehavioralTree

use of org.iaie.btree.BehavioralTree in project Ecgberht by Jabbo16.

the class Ecgberht method initScanTree.

private void initScanTree() {
    CheckScan cScan = new CheckScan("Check scan", gs);
    Scan s = new Scan("Scan", gs);
    Sequence Scanning = new Sequence("Scanning", cScan, s);
    scannerTree = new BehavioralTree("Scanner Tree");
    scannerTree.addChild(Scanning);
}
Also used : CheckScan(ecgberht.BehaviourTrees.Scanner.CheckScan) CheckScan(ecgberht.BehaviourTrees.Scanner.CheckScan) Scan(ecgberht.BehaviourTrees.Scanner.Scan) Sequence(org.iaie.btree.task.composite.Sequence) BehavioralTree(org.iaie.btree.BehavioralTree)

Example 3 with BehavioralTree

use of org.iaie.btree.BehavioralTree in project Ecgberht by Jabbo16.

the class Ecgberht method initScoutingTree.

private void initScoutingTree() {
    CheckScout cSc = new CheckScout("Check Scout", gs);
    ChooseScout chSc = new ChooseScout("Choose Scouter", gs);
    SendScout sSc = new SendScout("Send Scout", gs);
    CheckMineralWalk cMW = new CheckMineralWalk("Check Mineral Walk", gs);
    CheckVisibleBase cVB = new CheckVisibleBase("Check visible Base", gs);
    CheckEnemyBaseVisible cEBV = new CheckEnemyBaseVisible("Check Enemy Base Visible", gs);
    Sequence scoutFalse = new Sequence("Scout ", cSc, chSc, sSc);
    Selector EnemyFound = new Selector("Enemy found in base location", cEBV, sSc);
    Sequence scoutTrue = new Sequence("Scout True", cMW, cVB, EnemyFound);
    Selector Scouting = new Selector("Select Scouting Plan", scoutFalse, scoutTrue);
    scoutingTree = new BehavioralTree("Movement Tree");
    scoutingTree.addChild(Scouting);
}
Also used : Sequence(org.iaie.btree.task.composite.Sequence) BehavioralTree(org.iaie.btree.BehavioralTree) Selector(org.iaie.btree.task.composite.Selector)

Example 4 with BehavioralTree

use of org.iaie.btree.BehavioralTree in project Ecgberht by Jabbo16.

the class Ecgberht method initCollectTree.

private void initCollectTree() {
    CollectGas cg = new CollectGas("Collect Gas", gs);
    CollectMineral cm = new CollectMineral("Collect Mineral", gs);
    FreeWorker fw = new FreeWorker("No Union", gs);
    Selector collectResources = new Selector("Collect Melted Cash", cg, cm);
    Sequence collect = new Sequence("Collect", fw, collectResources);
    collectTree = new BehavioralTree("Recollection Tree");
    collectTree.addChild(collect);
}
Also used : CollectGas(ecgberht.BehaviourTrees.Recollection.CollectGas) FreeWorker(ecgberht.BehaviourTrees.Recollection.FreeWorker) Sequence(org.iaie.btree.task.composite.Sequence) CollectMineral(ecgberht.BehaviourTrees.Recollection.CollectMineral) BehavioralTree(org.iaie.btree.BehavioralTree) Selector(org.iaie.btree.task.composite.Selector)

Example 5 with BehavioralTree

use of org.iaie.btree.BehavioralTree in project Ecgberht by Jabbo16.

the class Ecgberht method initTrainTree.

private static void initTrainTree() {
    ChooseSituationalUnit cSU = new ChooseSituationalUnit("Choose situational unit", gs);
    ChooseNothingTrain cNT = new ChooseNothingTrain("Choose Nothing To Train", gs);
    ChooseSCV cSCV = new ChooseSCV("Choose SCV", gs);
    ChooseFireBat cFir = new ChooseFireBat("Choose Firebat", gs);
    ChooseMarine cMar = new ChooseMarine("Choose Marine", gs);
    ChooseMedic cMed = new ChooseMedic("Choose Medic", gs);
    ChooseTank cTan = new ChooseTank("Choose Tank", gs);
    ChooseVulture cVul = new ChooseVulture("Choose vulture", gs);
    ChooseGoliath cGol = new ChooseGoliath("Choose Goliath", gs);
    ChooseWraith cWra = new ChooseWraith("Choose Wraith", gs);
    CheckResourcesUnit cr = new CheckResourcesUnit("Check Cash", gs);
    TrainUnit tr = new TrainUnit("Train Unit", gs);
    Selector chooseUnit = new Selector("Choose Recruit", cNT, cSU, cSCV);
    if (gs.getStrat().trainUnits.contains(UnitType.Terran_Goliath))
        chooseUnit.addChild(cGol);
    if (gs.getStrat().trainUnits.contains(UnitType.Terran_Siege_Tank_Tank_Mode))
        chooseUnit.addChild(cTan);
    if (gs.getStrat().trainUnits.contains(UnitType.Terran_Vulture))
        chooseUnit.addChild(cVul);
    if (gs.getStrat().trainUnits.contains(UnitType.Terran_Wraith))
        chooseUnit.addChild(cWra);
    if (gs.getStrat().trainUnits.contains(UnitType.Terran_Medic))
        chooseUnit.addChild(cMed);
    if (gs.getStrat().trainUnits.contains(UnitType.Terran_Firebat) && gs.enemyRace == Race.Zerg)
        chooseUnit.addChild(cFir);
    if (gs.getStrat().trainUnits.contains(UnitType.Terran_Marine))
        chooseUnit.addChild(cMar);
    Sequence train = new Sequence("Train", chooseUnit, cr, tr);
    trainTree = new BehavioralTree("Training Tree");
    trainTree.addChild(train);
}
Also used : Sequence(org.iaie.btree.task.composite.Sequence) BehavioralTree(org.iaie.btree.BehavioralTree) Selector(org.iaie.btree.task.composite.Selector)

Aggregations

BehavioralTree (org.iaie.btree.BehavioralTree)12 Sequence (org.iaie.btree.task.composite.Sequence)12 Selector (org.iaie.btree.task.composite.Selector)8 AddonBuild (ecgberht.BehaviourTrees.AddonBuild)1 Build (ecgberht.BehaviourTrees.Build)1 CheckBuildingsLot (ecgberht.BehaviourTrees.BuildingLot.CheckBuildingsLot)1 ChooseBlotWorker (ecgberht.BehaviourTrees.BuildingLot.ChooseBlotWorker)1 ChooseBuildingLot (ecgberht.BehaviourTrees.BuildingLot.ChooseBuildingLot)1 FinishBuilding (ecgberht.BehaviourTrees.BuildingLot.FinishBuilding)1 CheckPerimeter (ecgberht.BehaviourTrees.Defense.CheckPerimeter)1 ChooseDefensePosition (ecgberht.BehaviourTrees.Defense.ChooseDefensePosition)1 SendDefenders (ecgberht.BehaviourTrees.Defense.SendDefenders)1 CollectGas (ecgberht.BehaviourTrees.Recollection.CollectGas)1 CollectMineral (ecgberht.BehaviourTrees.Recollection.CollectMineral)1 FreeWorker (ecgberht.BehaviourTrees.Recollection.FreeWorker)1 CheckBuildingFlames (ecgberht.BehaviourTrees.Repair.CheckBuildingFlames)1 ChooseRepairer (ecgberht.BehaviourTrees.Repair.ChooseRepairer)1 Repair (ecgberht.BehaviourTrees.Repair.Repair)1 CheckScan (ecgberht.BehaviourTrees.Scanner.CheckScan)1 Scan (ecgberht.BehaviourTrees.Scanner.Scan)1