Property | Type | Description | |
---|---|---|---|
_quicklist | List |
Property | Type | Description | |
---|---|---|---|
_GUID | string | ||
_abilities | List |
||
_abilityPoints | int | ||
_actorType | ActorType | ||
_aggro | bool | ||
_animationFile | string | ||
_armor | int | ||
_block | int | ||
_charmed | int | ||
_checkPointCoords | Coords | ||
_crazy | bool | ||
_damage | int | ||
_destroyArmor | int | ||
_destroyWeapon | int | ||
_direction | Direction | ||
_evade | int | ||
_exp | int | ||
_expNeeded | int | ||
_fireDamage | int | ||
_fireDefense | int | ||
_friendly | bool | ||
_gold | int | ||
_health | int | ||
_healthReg | int | ||
_iceDamage | int | ||
_iceDefense | int | ||
_id | int | ||
_inventory | List |
||
_lastCheckpoint | int | ||
_level | int | ||
_lives | int | ||
_locked | bool | ||
_mana | int | ||
_manaReg | int | ||
_maxMana | int | ||
_maxhealth | int | ||
_name | string | ||
_newItems | int | ||
_online | bool | ||
_penetrate | int | ||
_random | |||
_ranged | bool | ||
_regCounter | int | ||
_resist | int | ||
_scared | int | ||
_skills | int | ||
_stealHealth | int | ||
_stealMana | int | ||
_stunned | int | ||
_tile | ActorTile | ||
_viewRange | int |
Method | Description | |
---|---|---|
Actor ( ActorType actorType, int health, int armor, int damage, int maxHealth = -1, string name = "", |
The constructor used for actors. Sets default values for the most important properties.
|
|
AddHealth ( int amount ) : void |
Method to let the player get some health back
|
|
AddItem ( Item item ) : void |
Add new item to inventory
|
|
AddProtection ( int amount ) : void |
Method to increase the amount of armor an actor has. Does not change anything if armor>amount
|
|
AddStrength ( int amount ) : void |
Method to directly increase the damage an actor deals. Does nothing if damage>amount.
|
|
FromXML ( string input ) : |
Get character data from an XML-string
|
|
GenerateName ( string filename ) : string |
Method to choose an random actor name from a file.
|
|
GenerateName ( ) : void |
Method to generate a random actor name. Uses GenerateName() for files if a file exists. Otherwise chooses one of six random names.
|
|
HasKey ( int level ) : bool |
Methode to determine if the player has the key to the next level.
|
|
Items ( int i ) : Item |
Method to get the items an actor has.
|
|
LevelUp ( ) : void |
Method called when the exp reach the needed exp. Lets the player level up. The actor gains abilitypoints, skills and his health is set to maxhealth. Also the needed exp increase for the next level.
|
|
Load ( XmlReader reader ) : void |
Method to read actor properties from a XML-file.
|
|
Regen ( ) : void |
Method to let the player regenerate mana and health.
|
|
Save ( |
Method to save an actor in an XML-file. Just writes every property to the file.
|
|
ToString ( ) : string |
Changed ToString Method for the actor's name.
|
|
ToXML ( ) : string |
Write all data as an XML-string
|
|
copyFrom ( Actor a ) : void |
Duplicates the properties of actor a to the current actor.
|
public Actor ( ActorType actorType, int health, int armor, int damage, int maxHealth = -1, string name = "", |
||
actorType | ActorType | Player, NPC oder Enemy |
health | int | Standardwert 15+random(30) or 5+random(maxhealth-5) if maxhealth is passed |
armor | int | default random(10) |
damage | int | default 12+random(10) |
maxHealth | int | default = health |
name | string | uses GenerateName() by default |
rnd | a random used to generate the actors starting values | |
animationFile | string | the file used to display the actor |
level | int | the default starting level is 1 |
return | System |
public AddHealth ( int amount ) : void | ||
amount | int | The amount of healthpoints that should be added |
return | void |
public AddItem ( Item item ) : void | ||
item | Item | The item to add to inventory |
return | void |
public AddProtection ( int amount ) : void | ||
amount | int | the new amount the armor the actor should have |
return | void |
public AddStrength ( int amount ) : void | ||
amount | int | The new amount of damage the actor should deal |
return | void |
public GenerateName ( string filename ) : string | ||
filename | string | The file with one name per line |
return | string |
public HasKey ( int level ) : bool | ||
level | int | The level for which the key is checked. |
return | bool |
public Load ( XmlReader reader ) : void | ||
reader | XmlReader | The used XMLReader for reading the actor. |
return | void |
public Save ( |
||
writer | The writer which should be used to save the data | |
return | void |
public copyFrom ( Actor a ) : void | ||
a | Actor | The actor from which the properties should be cloned |
return | void |