|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
cz.cuni.amis.pogamut.base.agent.module.SensorModule<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
nl.tudelft.pogamut.unreal.agent.module.shooting.AbstractWeaponShooting
nl.tudelft.pogamut.ut2004.agent.module.shooting.weapon.ShockRifleShooting
public class ShockRifleShooting
Module to work efficiently with the shock rifle. Will use shock combos when possible.
To create a shock combo
AbstractWeaponShooting.shoot(WeaponPref, ILocated) must be called with a
weaponPref that allows the secondary fire mode to be used. When used through
AdvancedShooting the appropriate weapon preference must be set on
WeaponPrefs.
To avoid self damage the module won't use the secondary firemode when the
projectile may blow up in it's face and won't be able to survive the damage.
Generally WeaponPrefs should handle this but it may not be within
ImprovedShooting.getChangeWeaponCooldown(). When unable to use the
secondary, the primary will be used.
To avoid projectiles being deflected back by a shield gun, the module won't directly shoot at players who have an active shield gun facing them. It will however attempt to detonate a combo above the target if they are in range.
| Field Summary | |
|---|---|
protected cz.cuni.amis.pogamut.base3d.worldview.object.Location |
lastLocation
Last known location of our target. |
protected nl.tudelft.pogamut.unreal.agent.module.sensor.Projectiles |
projectiles
|
protected static int |
SHIELD_GUN_DEFLECT_ANGLE
Angle at which shield gun can deflect projectiles. |
protected static double |
SHOCK_RIFLE_COMBO_RADIUS
Radius of the shock combo blast. |
protected static int |
SHOCK_RIFLE_MIN_DISTANCE_COMBO
Minimum distance in UT units the orb will travel before reload. |
protected static cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref |
SHOCK_RIFLE_PRIMARY
Primary mode preference. |
protected static int |
SHOCK_RIFLE_PROJECTILE_DAMAGE
Damage to self when hit by projectile. |
protected static double |
SHOCK_RIFLE_PROJECTILE_SPLASH_RADIUS
Radius of the shock orb splash damage. |
protected static cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref |
SHOCK_RIFLE_SECONDARY
Secondary mode preference. |
| Fields inherited from class nl.tudelft.pogamut.unreal.agent.module.shooting.AbstractWeaponShooting |
|---|
ABOVE_PLAYER_OFFSET, active, BELOW_PLAYER_OFFSET, endMessageListener, FACING_ANGLE, focus, info, shoot, target, weaponPref, weaponry |
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensorModule |
|---|
worldView |
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
|---|
agent, controller, eventBus, log |
| Constructor Summary | |
|---|---|
ShockRifleShooting(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot<?,?,?> bot,
cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo info,
cz.cuni.amis.pogamut.ut2004.bot.command.ImprovedShooting shoot,
cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry weaponry,
nl.tudelft.pogamut.unreal.agent.module.sensor.Projectiles projectiles)
|
|
| Method Summary | |
|---|---|
protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref |
getDefaultWeaponPref()
|
protected boolean |
isSafeToShoot(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated target,
cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref weaponPref)
Don't shoot unless we are far away enough to avoid damaging ourselves, or healthy enough to survive the damage, or not using the secondary mode. |
protected void |
shoot()
The actual shooting. |
protected boolean |
shootCombo(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated target)
|
protected void |
shootPlayer(boolean safeToSHoot,
boolean canDeflect,
boolean facing)
Shoot without getting splash damage, without our projectiles being deflected and while looking in the right direction. |
protected void |
shootShieldedPlayer(boolean safeToSHoot,
boolean facing)
|
protected void |
shootTarget(boolean safeToSHoot,
boolean facing)
Shoot without getting splash damage and while looking in the right direction. |
| Methods inherited from class nl.tudelft.pogamut.unreal.agent.module.shooting.AbstractWeaponShooting |
|---|
getFocus, getWeaponType, hasTarget, isActive, isWeaponReady, setFocus, shoot, stopShoot |
| Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
|---|
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int SHIELD_GUN_DEFLECT_ANGLE
protected static final cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref SHOCK_RIFLE_PRIMARY
protected static final cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref SHOCK_RIFLE_SECONDARY
protected static final double SHOCK_RIFLE_COMBO_RADIUS
protected static final double SHOCK_RIFLE_PROJECTILE_SPLASH_RADIUS
protected static final int SHOCK_RIFLE_PROJECTILE_DAMAGE
protected static final int SHOCK_RIFLE_MIN_DISTANCE_COMBO
protected nl.tudelft.pogamut.unreal.agent.module.sensor.Projectiles projectiles
protected cz.cuni.amis.pogamut.base3d.worldview.object.Location lastLocation
| Constructor Detail |
|---|
public ShockRifleShooting(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot<?,?,?> bot,
cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo info,
cz.cuni.amis.pogamut.ut2004.bot.command.ImprovedShooting shoot,
cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry weaponry,
nl.tudelft.pogamut.unreal.agent.module.sensor.Projectiles projectiles)
| Method Detail |
|---|
protected void shoot()
shoot in class nl.tudelft.pogamut.unreal.agent.module.shooting.AbstractWeaponShooting
protected void shootPlayer(boolean safeToSHoot,
boolean canDeflect,
boolean facing)
safeToSHoot - canDeflect - facing -
protected void shootShieldedPlayer(boolean safeToSHoot,
boolean facing)
protected void shootTarget(boolean safeToSHoot,
boolean facing)
safeToSHoot - facing -
protected boolean isSafeToShoot(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated target,
cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref weaponPref)
target - to shoot
protected boolean shootCombo(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated target)
protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref getDefaultWeaponPref()
getDefaultWeaponPref in class nl.tudelft.pogamut.unreal.agent.module.shooting.AbstractWeaponShooting
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||