public class CTFBot extends UT2004BotModuleController<UT2004Bot>
| Modifier and Type | Field and Description |
|---|---|
int |
deaths
how many times the hunter died
|
protected Player |
enemy
Used internally to maintain the information about the bot we're currently
hunting, i.e., should be firing at.
|
protected boolean |
firstLogic |
int |
frags
how many bot the hunter killed other bots (i.e., bot has fragged them /
got point for killing somebody)
|
protected GameInfo |
gameInfo |
protected GetItems |
getItemsGoal |
protected GoalManager |
goalManager |
int |
healthLevel
how low the health level should be to start collecting health items
|
protected int |
notMoving
Global anti-stuck mechanism.
|
protected cz.cuni.amis.pogamut.base3d.worldview.object.Location |
pathTarget |
boolean |
shouldCollectHealth
boolean switch to activate collect health behavior
|
boolean |
shouldCollectItems
boolean switch to activate collect items behavior
|
boolean |
shouldEngage
boolean switch to activate engage behavior
|
boolean |
shouldPursue
boolean switch to activate pursue behavior
|
boolean |
shouldRearm
boolean switch to activate rearm behavior
|
protected TabooSet<Item> |
tabooItems
Taboo list of items that are forbidden for some time.
|
protected cz.cuni.amis.utils.Heatup |
targetHU |
act, body, combo, config, ctf, descriptors, fwMap, game, getBackToNavGraph, info, items, listenerRegistrator, move, navBuilder, navigation, pathExecutor, pathPlanner, players, random, raycasting, runStraight, senses, shoot, stats, visibility, weaponPrefs, weaponry, worldlogicModulebot, log, USER_LOG_CATEGORY_ID| Constructor and Description |
|---|
CTFBot() |
| Modifier and Type | Method and Description |
|---|---|
void |
botFirstSpawn(GameInfo gameInfo,
ConfigChange currentConfig,
InitedMessage init,
Self self) |
void |
botInitialized(GameInfo gameInfo,
ConfigChange currentConfig,
InitedMessage init) |
void |
botKilled(BotKilled event) |
void |
botShutdown() |
Player |
getEnemy() |
FlagInfo |
getEnemyFlag() |
NavPoint |
getEnemyFlagBase() |
Initialize |
getInitializeCommand()
Here we can modify initialization-command for our bot.
|
FlagInfo |
getOurFlag() |
NavPoint |
getOurFlagBase() |
CTFBotParams |
getParams()
Returns parameters of the bot.
|
cz.cuni.amis.pogamut.base3d.worldview.object.Location |
getPathTarget() |
TabooSet<Item> |
getTaboo() |
boolean |
goTo(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated target) |
boolean |
goTo(cz.cuni.amis.pogamut.base3d.worldview.object.Location target) |
boolean |
holdingOrSupporting() |
void |
logic()
Main method that controls the bot - makes decisions what to do next.
|
static void |
main(String[] args) |
void |
playerKilled(PlayerKilled event)
PlayerKilled listener that provides "frag" counting + is switches
the state of the hunter. |
void |
prepareBot(UT2004Bot bot)
Bot's preparation - called before the bot is connected to GB2004 and
launched into UT2004.
|
protected void |
reset()
Resets the state of the Hunter.
|
void |
shoot() |
void |
updateFight() |
void |
updateFight(Player newEnemy) |
finishControllerInitialization, getBody, getCombo, getConfig, getDescriptors, getFwMap, getGame, getInfo, getItems, getMove, getNavBuilder, getNavigation, getPathExecutor, getPathPlanner, getPlayers, getRandom, getRaycasting, getSenses, getShoot, getStats, getVisibility, getWeaponPrefs, getWeaponry, getWorld, initializeController, initializeListeners, initializeModules, initializePathFindingbeforeFirstLogic, getLogicInitializeTime, getLogicShutdownTime, initializeLogic, logicInitialize, logicShutdowngetAct, getBot, getLog, getPassword, getWorldViewclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAct, getBot, getLog, getPassword, getWorldViewpublic boolean shouldEngage
public boolean shouldPursue
public boolean shouldRearm
public boolean shouldCollectItems
public boolean shouldCollectHealth
public int healthLevel
public int frags
public int deaths
protected GameInfo gameInfo
protected cz.cuni.amis.pogamut.base3d.worldview.object.Location pathTarget
protected Player enemy
protected TabooSet<Item> tabooItems
protected GetItems getItemsGoal
protected boolean firstLogic
protected GoalManager goalManager
protected final cz.cuni.amis.utils.Heatup targetHU
protected int notMoving
reset().public CTFBotParams getParams()
public cz.cuni.amis.pogamut.base3d.worldview.object.Location getPathTarget()
public void playerKilled(PlayerKilled event)
PlayerKilled listener that provides "frag" counting + is switches
the state of the hunter.event - public void prepareBot(UT2004Bot bot)
prepareBot in interface IUT2004BotController<UT2004Bot>prepareBot in class UT2004BotController<UT2004Bot>public void botInitialized(GameInfo gameInfo, ConfigChange currentConfig, InitedMessage init)
botInitialized in interface IUT2004BotController<UT2004Bot>botInitialized in class UT2004BotController<UT2004Bot>public Initialize getInitializeCommand()
getInitializeCommand in interface IUT2004BotController<UT2004Bot>getInitializeCommand in class UT2004BotController<UT2004Bot>public void botFirstSpawn(GameInfo gameInfo, ConfigChange currentConfig, InitedMessage init, Self self)
botFirstSpawn in interface IUT2004BotController<UT2004Bot>botFirstSpawn in class UT2004BotController<UT2004Bot>public void botShutdown()
botShutdown in interface IUT2004BotController<UT2004Bot>botShutdown in class UT2004BotController<UT2004Bot>public boolean goTo(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated target)
public boolean goTo(cz.cuni.amis.pogamut.base3d.worldview.object.Location target)
public boolean holdingOrSupporting()
public void updateFight()
public void updateFight(Player newEnemy)
public void shoot()
protected void reset()
public NavPoint getOurFlagBase()
public NavPoint getEnemyFlagBase()
public FlagInfo getOurFlag()
public FlagInfo getEnemyFlag()
public Player getEnemy()
public void logic()
logic in interface cz.cuni.amis.pogamut.base.agent.module.IAgentLogic<cz.cuni.amis.pogamut.base.agent.module.LogicModule>logic in class UT2004BotLogicController<UT2004Bot>cz.cuni.amis.pogamut.base.exceptions.PogamutExceptionpublic void botKilled(BotKilled event)
botKilled in interface IUT2004BotController<UT2004Bot>botKilled in class UT2004BotController<UT2004Bot>public static void main(String[] args) throws cz.cuni.amis.utils.exception.PogamutException
cz.cuni.amis.utils.exception.PogamutExceptionCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.