TABLE OF CONTENTS
- 1. Mobs/Mobs
- 1.1. Mobs/Mobs.Inventory_Amount_Range
- 1.2. Mobs/Mobs.MobInventory_Container
- 1.3. Mobs/Mobs.Proto_Mobs_Amount_Range
- 1.4. Mobs/Mobs.Mob_Inventory_Record
- 1.5. Mobs/Mobs.Proto_Mob_Record
- 1.6. Mobs/Mobs.Default_Inventory_Amount
- 1.7. Mobs/Mobs.Default_Proto_Mobs_Amount
- 1.8. Mobs/Mobs.Empty_Mob
- 1.9. Mobs/Mobs.Empty_Mob_Item
- 1.10. Mobs/Mobs.Generate_Mob
Mobs/Mobs [ Packages ]
FUNCTION
Provides code for manipulate mobiles
SOURCE
package Mobs is
Mobs/Mobs.Inventory_Amount_Range [ Types ]
FUNCTION
Used to set the amount of items in mobs inventories
SOURCE
subtype Inventory_Amount_Range is Count_Type range 1 .. 32;
HISTORY
7.0 - Added
Mobs/Mobs.MobInventory_Container [ Types ]
FUNCTION
Used for store mobiles inventories
SOURCE
package MobInventory_Container is new Formal_Vectors (Index_Type => Inventory_Amount_Range, Element_Type => Mob_Inventory_Record);
Mobs/Mobs.Proto_Mobs_Amount_Range [ Types ]
FUNCTION
Used to set the amount of mobiles' prototypes available in the game
SOURCE
subtype Proto_Mobs_Amount_Range is Positive range 1 .. 256;
HISTORY
7.0 - Added
Mobs/Mobs.Mob_Inventory_Record [ Records ]
FUNCTION
Data structure for mobs inventory
SOURCE
type Mob_Inventory_Record is record Proto_Index: Natural := 0; Min_Amount: Natural range 0 .. 100_000 := 0; Max_Amount: Natural range 0 .. 100_000 := 0; end record;
PARAMETERS
Proto_Index - Proto index of item in mob inventory Min_Amount - Minimal amount of item in mob inventory Max_Amount - Maximum amount of item in mob inventory
Mobs/Mobs.Proto_Mob_Record [ Records ]
FUNCTION
Data structure for mobs prototypes
SOURCE
type Proto_Mob_Record is new Mob_Record with record Order: Crew_Orders; Priorities: Natural_Array(1 .. 12); Inventory: MobInventory_Container.Vector (Capacity => Default_Inventory_Amount); Equipment: Equipment_Array; end record;
PARAMETERS
Skills - Names indexes, levels and experience in skills of mob Attributes - Levels and experience in attributes of mob Order - Current order for mob Priorities - Priority of orders of mob Inventory - List of mob inventory Equipment - Items indexes from inventory used by mob.
Mobs/Mobs.Default_Inventory_Amount [ Constants ]
[ Top ] [ Mobs ] [ Constants ]
FUNCTION
The default amount of the items in mobs inventories
SOURCE
Default_Inventory_Amount: constant Inventory_Amount_Range := 32;
HISTORY
7.0 - Added
Mobs/Mobs.Default_Proto_Mobs_Amount [ Constants ]
[ Top ] [ Mobs ] [ Constants ]
FUNCTION
The default amount of mobiles' prototypes in the game
SOURCE
Default_Proto_Mobs_Amount: constant Proto_Mobs_Amount_Range := 113;
HISTORY
7.0 - Added
Mobs/Mobs.Empty_Mob [ Constants ]
[ Top ] [ Mobs ] [ Constants ]
FUNCTION
Empty prototype of mob
SOURCE
Empty_Mob: constant Proto_Mob_Record := (Amount_Of_Attributes => 1, Amount_Of_Skills => 1, others => <>);
Mobs/Mobs.Empty_Mob_Item [ Constants ]
[ Top ] [ Mobs ] [ Constants ]
FUNCTION
Empty item for mobs prototype
SOURCE
Empty_Mob_Item: constant Mob_Inventory_Record := (Proto_Index => 0, Min_Amount => 0, Max_Amount => 0);
Mobs/Mobs.Generate_Mob [ Subprograms ]
[ Top ] [ Mobs ] [ Subprograms ]
FUNCTION
Generate mob from selected prototype and faction.
SOURCE
function Generate_Mob (Mob_Index: Positive; Faction_Index: Tiny_String.Bounded_String) return Member_Data with Pre => Mob_Index > 0 and Mob_Index < Get_Proto_Mobs_Amount, Post => Tiny_String.Length(Source => Generate_Mob'Result.Name) > 0;
PARAMETERS
Mob_Index - Prototype index from ProtoMobs_List from which the mob will be generated Faction_Index - Faction index from Factions_List to which the generated mob will be belong
RESULT
Newly generated mob