C# Класс DivineRightGame.ActorHandling.ActorGeneration

Class for generating actor attributes
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
ReadRaceData ( string race ) : RaceData

Reads the race data for a particular race

Описание методов

CreateActor() публичный статический Метод

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
Результат DRObjects.Actor

CreateActor() публичный статический Метод

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
Результат DRObjects.Actor

CreateActors() публичный статический Метод

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
Результат DRObjects.Actor[]

CreateAnimalHerds() публичный статический Метод

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
Результат List>

GenerateAnatomy() публичный статический Метод

public static GenerateAnatomy ( string race ) : IAnatomy
race string
Результат IAnatomy

GenerateAttributes() публичный статический Метод

public static GenerateAttributes ( string race, ActorProfession profession, int level, Actor actor ) : SkillsAndAttributes
race string
profession ActorProfession
level int
actor DRObjects.Actor
Результат DRObjects.ActorHandling.SkillsAndAttributes

GenerateEquippedItems() публичный статический Метод

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
Результат InventoryItem>.Dictionary

GetEnemyData() публичный статический Метод

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
Результат DRObjects.ActorHandling.EnemyData

GetEnemyType() публичный статический Метод

Picks a random enemy type which is either intelligent or unintelligent
public static GetEnemyType ( bool intelligent ) : string
intelligent bool
Результат string

ReadRaceData() публичный статический Метод

public static ReadRaceData ( int raceID ) : RaceData
raceID int
Результат DRObjects.ActorHandling.RaceData

RegenerateBandit() публичный статический Метод

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
Результат void

RegenerateOrc() публичный статический Метод

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
Результат void