C# Class OpenRA.Mods.Common.AI.HackyAI

Inheritance: ITick, IBot, INotifyDamage
Exibir arquivo Open project: cjshmyr/OpenRA Class Usage Examples

Public Properties

Property Type Description
Info HackyAIInfo
IsEnabled bool
Squads List
World World

Private Properties

Property Type Description
ChooseEnemyTarget Actor
ChooseRallyLocationNear CPos
ChooseRandomUnitToBuild ActorInfo
ChooseUnitToBuild ActorInfo
CountBuilding int
CountBuildingByCommonName int
CountUnits int
FindClosestEnemy Actor
FindClosestEnemy Actor
FindCoarseAttackLocationToSupportPower CPos?
FindEnemyConstructionYards List
FindFineAttackLocationToSupportPower CPos?
FindNextResource CPos
FindQueues IEnumerable
GetSquadOfType Squad
HasAdequateAirUnitReloadBuildings bool
IsRallyPointValid bool
RegisterNewSquad Squad

Public Methods

Method Description
Activate ( Player p ) : void
AssignRolesToIdleUnits ( Actor self ) : void
BotDebug ( string s ) : void
BuildUnit ( string category, bool buildRandom ) : void
BuildUnit ( string category, string name ) : void
ChooseBuildLocation ( string actorType, bool distanceToBaseIsImportant, BuildingType type ) : CPos?
CleanSquads ( ) : void
CloseEnoughToWater ( ) : bool
CreateAttackForce ( ) : void
Damaged ( Actor self, OpenRA.Traits.AttackInfo e ) : void
EnoughWaterToBuildNaval ( ) : bool
FindAndDeployBackupMcv ( Actor self ) : void
FindNewUnits ( Actor self ) : void
GetInfoByCommonName ( HashSet names, Player owner ) : ActorInfo
GetRandomBaseCenter ( ) : CPos
GiveOrdersToIdleHarvesters ( ) : void
HackyAI ( HackyAIInfo info, ActorInitializer init ) : System
HasAdequateFact ( ) : bool
HasAdequateProc ( ) : bool
HasMinimumProc ( ) : bool
InitializeBase ( Actor self ) : void
ProductionUnits ( Actor self ) : void
ProtectOwn ( Actor attacker ) : void
QueueOrder ( Order order ) : void
SetRallyPointsForNewProductionBuildings ( Actor self ) : void
Tick ( Actor self ) : void
TryToRushAttack ( ) : void
TryToUseSupportPower ( Actor self ) : void

Private Methods

Method Description
ChooseEnemyTarget ( ) : Actor
ChooseRallyLocationNear ( Actor producer ) : CPos
ChooseRandomUnitToBuild ( ProductionQueue queue ) : ActorInfo
ChooseUnitToBuild ( ProductionQueue queue ) : ActorInfo
CountBuilding ( string frac, Player owner ) : int
CountBuildingByCommonName ( HashSet buildings, Player owner ) : int
CountUnits ( string unit, Player owner ) : int
FindClosestEnemy ( WPos pos ) : Actor
FindClosestEnemy ( WPos pos, WDist radius ) : Actor
FindCoarseAttackLocationToSupportPower ( SupportPowerInstance readyPower ) : CPos?

Scans the map in chunks, evaluating all actors in each.

FindEnemyConstructionYards ( ) : List
FindFineAttackLocationToSupportPower ( SupportPowerInstance readyPower, CPos checkPos, int extendedRange = 1 ) : CPos?

Detail scans an area, evaluating positions.

FindNextResource ( Actor harvester ) : CPos
FindQueues ( string category ) : IEnumerable
GetSquadOfType ( SquadType type ) : Squad
HasAdequateAirUnitReloadBuildings ( ActorInfo actorInfo ) : bool
IsRallyPointValid ( CPos x, OpenRA.Traits.BuildingInfo info ) : bool
RegisterNewSquad ( SquadType type, Actor target = null ) : Squad

Method Details

Activate() public method

public Activate ( Player p ) : void
p Player
return void

AssignRolesToIdleUnits() public method

public AssignRolesToIdleUnits ( Actor self ) : void
self Actor
return void

BotDebug() public static method

public static BotDebug ( string s ) : void
s string
return void

BuildUnit() public method

public BuildUnit ( string category, bool buildRandom ) : void
category string
buildRandom bool
return void

BuildUnit() public method

public BuildUnit ( string category, string name ) : void
category string
name string
return void

ChooseBuildLocation() public method

public ChooseBuildLocation ( string actorType, bool distanceToBaseIsImportant, BuildingType type ) : CPos?
actorType string
distanceToBaseIsImportant bool
type BuildingType
return CPos?

CleanSquads() public method

public CleanSquads ( ) : void
return void

CloseEnoughToWater() public method

public CloseEnoughToWater ( ) : bool
return bool

CreateAttackForce() public method

public CreateAttackForce ( ) : void
return void

Damaged() public method

public Damaged ( Actor self, OpenRA.Traits.AttackInfo e ) : void
self Actor
e OpenRA.Traits.AttackInfo
return void

EnoughWaterToBuildNaval() public method

public EnoughWaterToBuildNaval ( ) : bool
return bool

FindAndDeployBackupMcv() public method

public FindAndDeployBackupMcv ( Actor self ) : void
self Actor
return void

FindNewUnits() public method

public FindNewUnits ( Actor self ) : void
self Actor
return void

GetInfoByCommonName() public method

public GetInfoByCommonName ( HashSet names, Player owner ) : ActorInfo
names HashSet
owner Player
return ActorInfo

GetRandomBaseCenter() public method

public GetRandomBaseCenter ( ) : CPos
return CPos

GiveOrdersToIdleHarvesters() public method

public GiveOrdersToIdleHarvesters ( ) : void
return void

HackyAI() public method

public HackyAI ( HackyAIInfo info, ActorInitializer init ) : System
info HackyAIInfo
init ActorInitializer
return System

HasAdequateFact() public method

public HasAdequateFact ( ) : bool
return bool

HasAdequateProc() public method

public HasAdequateProc ( ) : bool
return bool

HasMinimumProc() public method

public HasMinimumProc ( ) : bool
return bool

InitializeBase() public method

public InitializeBase ( Actor self ) : void
self Actor
return void

ProductionUnits() public method

public ProductionUnits ( Actor self ) : void
self Actor
return void

ProtectOwn() public method

public ProtectOwn ( Actor attacker ) : void
attacker Actor
return void

QueueOrder() public method

public QueueOrder ( Order order ) : void
order Order
return void

SetRallyPointsForNewProductionBuildings() public method

public SetRallyPointsForNewProductionBuildings ( Actor self ) : void
self Actor
return void

Tick() public method

public Tick ( Actor self ) : void
self Actor
return void

TryToRushAttack() public method

public TryToRushAttack ( ) : void
return void

TryToUseSupportPower() public method

public TryToUseSupportPower ( Actor self ) : void
self Actor
return void

Property Details

Info public_oe property

public HackyAIInfo,OpenRA.Mods.Common.AI Info
return HackyAIInfo

IsEnabled public_oe property

public bool IsEnabled
return bool

Squads public_oe property

public List Squads
return List

World public_oe property

public World World
return World