C# Class DivineRightGame.ActorHandling.ActorGeneration

Class for generating actor attributes
Show file Open project: Haedrian/Divine-Right

Public Methods

Method Description
CreateActor ( OwningFactions owner, int skillLevel ) : Actor

Creates an actor owned by a particular faction having a level +- 25% of the level passed. The actual actor will be chosen according to the actual level The worth of the equipment the actor is as described in the database for the chosen actor Actors chosen will be of the warrior profession

CreateActor ( string enemyType, string enemyTag, bool intelligent, int level, int gearCost, Gender gender, int &enemyID, ActorProfession profession = null ) : Actor

Creates an Enemy of a paticular type (optional), having a particular tag (optional) and having a particular intelligence (optional). Will return the enemy ID so that you can get the actual item from the crea

CreateActors ( OwningFactions owner, ActorProfession profession, int total ) : DRObjects.Actor[]

Creates a number of actors for a particular owner and profession. It will also balance the level and difficulty of acctors, and will create a hierarchy of warriors. Do not use this for animals If there are no actors of that particular type for that profession, will not create anything

CreateAnimalHerds ( GlobalBiome biome, bool domesticated, string tag, int herds ) : List>

Create a number of herds of particular types of animal. This could be limited to just one animal per herd depending on the type of animal

GenerateAnatomy ( string race ) : IAnatomy
GenerateAttributes ( string race, ActorProfession profession, int level, Actor actor ) : SkillsAndAttributes
GenerateEquippedItems ( int totalCost, ActorProfession profession = null ) : InventoryItem>.Dictionary

Generates a set of equipped items, not exceeding the total cost. If actor profession is not passed, will assume a balanced warrior, otherwise will emphasise on the profession

GetEnemyData ( int enemyID ) : EnemyData

Gets enemy data for a particular enemy with a particular ID Will also calculate any random effects as required, so this will not be deterministic if you run it more than once.

GetEnemyType ( bool intelligent ) : string

Picks a random enemy type which is either intelligent or unintelligent

ReadRaceData ( int raceID ) : RaceData
RegenerateBandit ( Actor actor, int level, int gearCost ) : void

Regenerate the stats of a human bandit such that it retains any missions it has, however it will be of a particular level with a particular gear cost Will also pick the correct bandit icon depending on level

RegenerateOrc ( Actor actor, int level, int gearCost ) : void

Regenerates the stats of an orc such that it retains any missions it has, however will be of a particular level with a particular gear cost Will also pick the correct orc icon depending on level

Private Methods

Method Description
ReadRaceData ( string race ) : RaceData

Reads the race data for a particular race

Method Details

CreateActor() public static method

Creates an actor owned by a particular faction having a level +- 25% of the level passed. The actual actor will be chosen according to the actual level The worth of the equipment the actor is as described in the database for the chosen actor Actors chosen will be of the warrior profession
public static CreateActor ( OwningFactions owner, int skillLevel ) : Actor
owner OwningFactions
skillLevel int
return DRObjects.Actor

CreateActor() public static method

Creates an Enemy of a paticular type (optional), having a particular tag (optional) and having a particular intelligence (optional). Will return the enemy ID so that you can get the actual item from the crea
public static CreateActor ( string enemyType, string enemyTag, bool intelligent, int level, int gearCost, Gender gender, int &enemyID, ActorProfession profession = null ) : Actor
enemyType string
enemyTag string
intelligent bool
level int The skill level of this enemy
gearCost int The total cost of this unit's equipped items
gender Gender
enemyID int
profession ActorProfession
return DRObjects.Actor

CreateActors() public static method

Creates a number of actors for a particular owner and profession. It will also balance the level and difficulty of acctors, and will create a hierarchy of warriors. Do not use this for animals If there are no actors of that particular type for that profession, will not create anything
public static CreateActors ( OwningFactions owner, ActorProfession profession, int total ) : DRObjects.Actor[]
owner OwningFactions
profession ActorProfession
total int
return DRObjects.Actor[]

CreateAnimalHerds() public static method

Create a number of herds of particular types of animal. This could be limited to just one animal per herd depending on the type of animal
public static CreateAnimalHerds ( GlobalBiome biome, bool domesticated, string tag, int herds ) : List>
biome GlobalBiome The biome the animal lives in. If it is null, it'll be ignored
domesticated bool Whether the animal is domesticated or not. If null, it'll be ignored
tag string If contains a tag, will ignore all other values and generate one having the right tag
herds int The total amount of herds to be created
return List>

GenerateAnatomy() public static method

public static GenerateAnatomy ( string race ) : IAnatomy
race string
return IAnatomy

GenerateAttributes() public static method

public static GenerateAttributes ( string race, ActorProfession profession, int level, Actor actor ) : SkillsAndAttributes
race string
profession ActorProfession
level int
actor DRObjects.Actor
return DRObjects.ActorHandling.SkillsAndAttributes

GenerateEquippedItems() public static method

Generates a set of equipped items, not exceeding the total cost. If actor profession is not passed, will assume a balanced warrior, otherwise will emphasise on the profession
public static GenerateEquippedItems ( int totalCost, ActorProfession profession = null ) : InventoryItem>.Dictionary
totalCost int
profession ActorProfession
return InventoryItem>.Dictionary

GetEnemyData() public static method

Gets enemy data for a particular enemy with a particular ID Will also calculate any random effects as required, so this will not be deterministic if you run it more than once.
public static GetEnemyData ( int enemyID ) : EnemyData
enemyID int
return DRObjects.ActorHandling.EnemyData

GetEnemyType() public static method

Picks a random enemy type which is either intelligent or unintelligent
public static GetEnemyType ( bool intelligent ) : string
intelligent bool
return string

ReadRaceData() public static method

public static ReadRaceData ( int raceID ) : RaceData
raceID int
return DRObjects.ActorHandling.RaceData

RegenerateBandit() public static method

Regenerate the stats of a human bandit such that it retains any missions it has, however it will be of a particular level with a particular gear cost Will also pick the correct bandit icon depending on level
public static RegenerateBandit ( Actor actor, int level, int gearCost ) : void
actor DRObjects.Actor
level int
gearCost int
return void

RegenerateOrc() public static method

Regenerates the stats of an orc such that it retains any missions it has, however will be of a particular level with a particular gear cost Will also pick the correct orc icon depending on level
public static RegenerateOrc ( Actor actor, int level, int gearCost ) : void
actor DRObjects.Actor
level int
gearCost int
return void