use of org.iaie.btree.task.composite.Sequence 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);
}
use of org.iaie.btree.task.composite.Sequence 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);
}
use of org.iaie.btree.task.composite.Sequence 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);
}
use of org.iaie.btree.task.composite.Sequence 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);
}
use of org.iaie.btree.task.composite.Sequence 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);
}
Aggregations