Class MonsterTypeEntity
Class that represents a monster type entity.
Inherited Members
Namespace: Fibula.Data.Entities
Assembly: Fibula.Data.Entities.dll
Syntax
public class MonsterTypeEntity : BaseEntity, IMonsterTypeEntity, IIdentifiableEntity, IEntity, ICreatureCreationMetadata
Constructors
| Improve this Doc View SourceMonsterTypeEntity()
Initializes a new instance of the MonsterTypeEntity class.
Declaration
public MonsterTypeEntity()
Properties
| Improve this Doc View SourceArticle
Gets or sets the article to use with the name.
Declaration
public string Article { get; set; }
Property Value
Type | Description |
---|---|
System.String |
BaseArmorRating
Gets or sets the base armor rating for this type of monster.
Declaration
public ushort BaseArmorRating { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
BaseAttack
Gets or sets the base attack for this type of monster.
Declaration
public ushort BaseAttack { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
BaseDefense
Gets or sets the base defense for this type of monster.
Declaration
public ushort BaseDefense { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
BaseExperienceYield
Gets or sets the amount of experience that this type of monster yields.
Declaration
public uint BaseExperienceYield { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
BaseSpeed
Gets or sets the base movement speed for this type of monster.
Declaration
public ushort BaseSpeed { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
BloodType
Gets or sets the type of blood of this monster type.
Declaration
public BloodType BloodType { get; set; }
Property Value
Type | Description |
---|---|
BloodType |
Capacity
Gets or sets the maximum capacity for this type of monster.
Declaration
public ushort Capacity { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
ConditionInfect
Gets an encoded value containing ConditionTypes, detailing if this type of monster infects upon successfuly dealing basic damange in combat.
Declaration
public ushort ConditionInfect { get; }
Property Value
Type | Description |
---|---|
System.UInt16 |
Corpse
Gets or sets this type of monster's corpse item type id.
Declaration
public ushort Corpse { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
Flags
Gets the flags set for this type of monster.
Declaration
public ulong Flags { get; }
Property Value
Type | Description |
---|---|
System.UInt64 |
Remarks
The flags are stored as bits in a 64 bit unsigned integer.
HitpointFleeThreshold
Gets or sets the threshold value under which this type of monster begins to flee battle.
Declaration
public ushort HitpointFleeThreshold { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
InventoryComposition
Gets the composition of the inventory that this type of monster has a chance to be created with.
Declaration
public IList<(ushort typeId, byte maxAmount, ushort chance)> InventoryComposition { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.ValueTuple<System.UInt16, System.Byte, System.UInt16>> |
Locked
Gets a value indicating whether this type is locked and thus, no changes are allowed.
Declaration
public bool Locked { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LoseTargetDistance
Gets or sets the distance in tiles after which this type of monster looses track of their target.
Declaration
public byte LoseTargetDistance { get; set; }
Property Value
Type | Description |
---|---|
System.Byte |
MaxHitpoints
Gets or sets the maximum hitpoints that this monster type starts with.
Declaration
public ushort MaxHitpoints { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
MaxManapoints
Gets the maximum manapoints that this monster type starts with.
Declaration
public ushort MaxManapoints { get; }
Property Value
Type | Description |
---|---|
System.UInt16 |
Name
Gets or sets the name of the monster type.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Outfit
Gets or sets this type of monster outfit.
Declaration
public Outfit Outfit { get; set; }
Property Value
Type | Description |
---|---|
Outfit |
Phrases
Gets the phrases that this monster type uses.
Declaration
public IList<string> Phrases { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> |
RaceId
Gets or sets the id of the monster race.
Declaration
public ushort RaceId { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
Skills
Gets the skills that this type of monster starts with.
Declaration
public IDictionary<SkillType, (int DefaultLevel, int CurrentLevel, int MaximumLevel, uint TargetCount, uint CountIncreaseFactor, byte IncreaserPerLevel)> Skills { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<SkillType, System.ValueTuple<System.Int32, System.Int32, System.Int32, System.UInt32, System.UInt32, System.Byte>> |
Strategy
Gets or sets the fighting strategy of this type of monster.
Declaration
public (byte switchToClosest, byte switchToLowestHp, byte switchToHigestDmgDealt, byte randomSwitch) Strategy { get; set; }
Property Value
Type | Description |
---|---|
System.ValueTuple<System.Byte, System.Byte, System.Byte, System.Byte> |
SummonCost
Gets or sets the base cost to summon this type of monster.
Declaration
public ushort SummonCost { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
Methods
| Improve this Doc View SourceLock()
Locks this type to protect from further changes.
Declaration
public void Lock()
SetConditionInfect(ConditionType, UInt16)
Sets a type's infection condition flag.
Declaration
public void SetConditionInfect(ConditionType condition, ushort value)
Parameters
Type | Name | Description |
---|---|---|
ConditionType | condition | The type of condition flag. |
System.UInt16 | value | The base value by which to infect. |
SetCreatureFlag(CreatureFlag)
Sets a creature flag in this type's Flags.
Declaration
public void SetCreatureFlag(CreatureFlag creatureFlag)
Parameters
Type | Name | Description |
---|---|---|
CreatureFlag | creatureFlag | The flag to set in the type. |
SetInventory(IEnumerable<(UInt16 typeId, Byte maxAmount, UInt16 dropChance)>)
Sets the type's inventory.
Declaration
public void SetInventory(IEnumerable<(ushort typeId, byte maxAmount, ushort dropChance)> possibleInventory)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.ValueTuple<System.UInt16, System.Byte, System.UInt16>> | possibleInventory | The inventory of the monster type. |
SetPhrases(IEnumerable<String>)
Sets the type's phrases.
Declaration
public void SetPhrases(IEnumerable<string> phrases)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | phrases | The phrases of the monster type. |
SetSkill(SkillType, Int32, Int32, Int32, UInt32, UInt32, Byte)
Sets a given skill for this monster type.
Declaration
public void SetSkill(SkillType skillType, int currentLevel, int defaultLevel, int maximumLevel, uint targetCount, uint countIncreaseFactor, byte increaserPerLevel)
Parameters
Type | Name | Description |
---|---|---|
SkillType | skillType | The type of skill to set. |
System.Int32 | currentLevel | The current skill level. |
System.Int32 | defaultLevel | The default level of the skill. |
System.Int32 | maximumLevel | The maximum skill level. |
System.UInt32 | targetCount | The next target count for skill advancement. |
System.UInt32 | countIncreaseFactor | The factor by which the next target count increases upon advancement. |
System.Byte | increaserPerLevel | The base increase per level upon advancement. |
SetSpells(IEnumerable<(IEnumerable<String> conditions, IEnumerable<String> effects, String chance)>)
Sets the type's spells.
Declaration
public void SetSpells(IEnumerable<(IEnumerable<string> conditions, IEnumerable<string> effects, string chance)> spells)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.ValueTuple<System.Collections.Generic.IEnumerable<System.String>, System.Collections.Generic.IEnumerable<System.String>, System.String>> | spells | The spells of the monster type. |