use of org.iaie.btree.task.composite.Sequence in project Ecgberht by Jabbo16.
the class Ecgberht method initUpgradeTree.
private static void initUpgradeTree() {
CheckResourcesUpgrade cRU = new CheckResourcesUpgrade("Check Resources Upgrade", gs);
ChooseIrradiate cI = new ChooseIrradiate("Choose Irradiate", gs);
ChooseEMP cEMP = new ChooseEMP("Choose EMP", gs);
ChooseArmorMechUp cAMU = new ChooseArmorMechUp("Choose Armor mech upgrade", gs);
ChooseWeaponMechUp cWMU = new ChooseWeaponMechUp("Choose weapon mech upgrade", gs);
ChooseArmorInfUp cAIU = new ChooseArmorInfUp("Choose Armor inf upgrade", gs);
ChooseWeaponInfUp cWIU = new ChooseWeaponInfUp("Choose Weapon inf upgrade", gs);
ChooseMarineRange cMR = new ChooseMarineRange("Choose Marine Range upgrade", gs);
ChooseStimUpgrade cSU = new ChooseStimUpgrade("Choose Stimpack upgrade", gs);
ChooseSiegeMode cSM = new ChooseSiegeMode("Choose Siege Mode", gs);
ChooseCharonBoosters cCB = new ChooseCharonBoosters("Choose Charon Boosters", gs);
ChooseVultureSpeed cVS = new ChooseVultureSpeed("Choose Vulture Speed", gs);
ResearchUpgrade rU = new ResearchUpgrade("Research Upgrade", gs);
Selector ChooseUP = new Selector("Choose Upgrade");
ChooseUP.addChild(cI);
ChooseUP.addChild(cEMP);
if (gs.getStrat().upgradesToResearch.contains(UpgradeType.Terran_Infantry_Weapons))
ChooseUP.addChild(cWIU);
if (gs.getStrat().upgradesToResearch.contains(UpgradeType.Terran_Infantry_Armor))
ChooseUP.addChild(cAIU);
if (gs.getStrat().techToResearch.contains(TechType.Stim_Packs))
ChooseUP.addChild(cSU);
if (gs.getStrat().upgradesToResearch.contains(UpgradeType.U_238_Shells))
ChooseUP.addChild(cMR);
if (gs.getStrat().techToResearch.contains(TechType.Tank_Siege_Mode))
ChooseUP.addChild(cSM);
if (gs.getStrat().upgradesToResearch.contains(UpgradeType.Ion_Thrusters))
ChooseUP.addChild(cVS);
if (gs.getStrat().upgradesToResearch.contains(UpgradeType.Charon_Boosters))
ChooseUP.addChild(cCB);
if (gs.getStrat().upgradesToResearch.contains(UpgradeType.Terran_Vehicle_Weapons))
ChooseUP.addChild(cWMU);
if (gs.getStrat().upgradesToResearch.contains(UpgradeType.Terran_Vehicle_Plating))
ChooseUP.addChild(cAMU);
Sequence Upgrader = new Sequence("Upgrader", ChooseUP, cRU, rU);
upgradeTree = new BehavioralTree("Technology");
upgradeTree.addChild(Upgrader);
}
use of org.iaie.btree.task.composite.Sequence in project Ecgberht by Jabbo16.
the class Ecgberht method initBuildingLotTree.
private void initBuildingLotTree() {
CheckBuildingsLot chBL = new CheckBuildingsLot("Check Buildings Lot", gs);
ChooseBlotWorker cBW = new ChooseBlotWorker("Choose Building Lot worker", gs);
ChooseBuildingLot cBLot = new ChooseBuildingLot("Choose Building Lot building", gs);
FinishBuilding fB = new FinishBuilding("Finish Building", gs);
Sequence BLot = new Sequence("Building Lot", chBL, cBLot, cBW, fB);
buildingLotTree = new BehavioralTree("Building Lot Tree");
buildingLotTree.addChild(BLot);
}
use of org.iaie.btree.task.composite.Sequence in project Ecgberht by Jabbo16.
the class Ecgberht method initHarassTree.
private void initHarassTree() {
CheckHarasser cH = new CheckHarasser("Check Harasser", gs);
CheckExplorer cE = new CheckExplorer("Check Explorer", gs);
ChooseWorkerToHarass cWTH = new ChooseWorkerToHarass("Check Worker to Harass", gs);
ChooseBuilderToHarass cWTB = new ChooseBuilderToHarass("Check Worker to Harass", gs);
CheckHarasserAttacked cHA = new CheckHarasserAttacked("Check Harasser Attacked", gs);
ChooseBuildingToHarass cBTH = new ChooseBuildingToHarass("Check Building to Harass", gs);
Explore E = new Explore("Explore", gs);
HarassWorker hW = new HarassWorker("Bother SCV", gs);
Selector bOw = new Selector("Choose Builder or Worker or Building", cWTH, cWTB, cBTH);
Sequence harassAttack = new Sequence("Harass", cHA, bOw, hW);
Sequence explorer = new Sequence("Explorer", cE, E);
Selector eOh = new Selector("Explorer or harasser", explorer, harassAttack);
Sequence harass = new Sequence("Harass", cH, eOh);
botherTree = new BehavioralTree("Harass Tree");
botherTree.addChild(harass);
}
use of org.iaie.btree.task.composite.Sequence in project Ecgberht by Jabbo16.
the class Ecgberht method initBuildTree.
private static void initBuildTree() {
Build b = new Build("Build", gs);
WorkerWalkBuild wwB = new WorkerWalkBuild("worker walk build", gs);
CheckMineralWalkGoldRush cMWGR = new CheckMineralWalkGoldRush("Mineral Walk Gold Rush", gs);
ChooseNothingBuilding cNB = new ChooseNothingBuilding("Choose Nothing", gs);
ChooseExpand cE = new ChooseExpand("Choose Expansion", gs);
ChooseSupply cSup = new ChooseSupply("Choose Supply Depot", gs);
ChooseBunker cBun = new ChooseBunker("Choose Bunker", gs);
ChooseBarracks cBar = new ChooseBarracks("Choose Barracks", gs);
ChooseFactory cFar = new ChooseFactory("Choose Factory", gs);
ChoosePort cPor = new ChoosePort("Choose Star Port", gs);
ChooseScience cSci = new ChooseScience("Choose Science Facility", gs);
ChooseRefinery cRef = new ChooseRefinery("Choose Refinery", gs);
ChooseBay cBay = new ChooseBay("Choose Bay", gs);
ChooseTurret cTur = new ChooseTurret("Choose Turret", gs);
ChooseAcademy cAca = new ChooseAcademy("Choose Academy", gs);
ChooseArmory cArm = new ChooseArmory("Choose Armory", gs);
CheckResourcesBuilding crb = new CheckResourcesBuilding("Check Cash", gs);
ChoosePosition cp = new ChoosePosition("Choose Position", gs);
ChooseWorker cw = new ChooseWorker("Choose Worker", gs);
Move m = new Move("Move to chosen building position", gs);
Selector chooseBuildingBuild = new Selector("Choose Building to build", cNB, cE, cBun, cSup);
chooseBuildingBuild.addChild(cTur);
chooseBuildingBuild.addChild(cRef);
if (gs.getStrat().buildUnits.contains(UnitType.Terran_Academy))
chooseBuildingBuild.addChild(cAca);
if (gs.getStrat().buildUnits.contains(UnitType.Terran_Engineering_Bay))
chooseBuildingBuild.addChild(cBay);
if (gs.getStrat().buildUnits.contains(UnitType.Terran_Armory))
chooseBuildingBuild.addChild(cArm);
if (gs.getStrat().buildUnits.contains(UnitType.Terran_Factory))
chooseBuildingBuild.addChild(cFar);
if (gs.getStrat().buildUnits.contains(UnitType.Terran_Starport))
chooseBuildingBuild.addChild(cPor);
if (gs.getStrat().buildUnits.contains(UnitType.Terran_Science_Facility))
chooseBuildingBuild.addChild(cSci);
chooseBuildingBuild.addChild(cBar);
Sequence buildMove;
if (bw.getBWMap().mapHash().equals("83320e505f35c65324e93510ce2eafbaa71c9aa1"))
buildMove = new Sequence("BuildMove", wwB, b, chooseBuildingBuild, cp, cw, crb, m);
else if (// GoldRush
bw.getBWMap().mapHash().equals("666dd28cd3c85223ebc749a481fc281e58221e4a"))
buildMove = new Sequence("BuildMove", cMWGR, b, chooseBuildingBuild, cp, cw, crb, m);
else
buildMove = new Sequence("BuildMove", b, chooseBuildingBuild, cp, cw, crb, m);
buildTree = new BehavioralTree("Building Tree");
buildTree.addChild(buildMove);
}
use of org.iaie.btree.task.composite.Sequence in project Ecgberht by Jabbo16.
the class Ecgberht method initDefenseTree.
private void initDefenseTree() {
CheckPerimeter cP = new CheckPerimeter("Check Perimeter", gs);
ChooseDefensePosition cDP = new ChooseDefensePosition("Choose Defence Position", gs);
SendDefenders sD = new SendDefenders("Send Defenders", gs);
Sequence Defense = new Sequence("Defence", cP, cDP, sD);
defenseTree = new BehavioralTree("Defence Tree");
defenseTree.addChild(Defense);
}
Aggregations