Unit entities
Description
Unit responsible for NPC stat, initialising enemies and utility functions
Uses
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Variables
Description
Functions and Procedures
procedure spawnPlayer; |
Add player to list of creatures on the map
|
procedure killEntity(id: smallint); |
Handle death of NPC's
|
procedure moveNPC(id, newX, newY: smallint); |
Update NPCs X, Y coordinates
|
function getCreatureHP(x, y: smallint): smallint; |
Get creature currentHP at coordinates
|
function getCreatureMaxHP(x, y: smallint): smallint; |
Get creature maxHP at coordinates
|
function getCreatureID(x, y: smallint): smallint; |
Get creature ID at coordinates
|
function getCreatureName(x, y: smallint): shortstring; |
Get creature name at coordinates
|
function getCreatureDescription(x, y: smallint): shortstring; |
Get creature description
|
function isCreatureVisible(x, y: smallint): boolean; |
Check if creature is visible at coordinates
|
procedure occupyUpdate; |
Ensure all NPC's are correctly occupying tiles
|
procedure redrawMapDisplay(id: smallint); |
Update the map display to show all NPC's
|
procedure newFloorNPCs; |
Clear list of NPC's
|
function countLivingEntities: smallint; |
Count all living NPC's
|
procedure outOfView; |
When the light source goes out
|
procedure initPath(id: smallint); |
Initialise pathfinding array
|
procedure NPCgameLoop; |
Call Creatures.takeTurn procedure
|
Types
Tattitudes = (...); |
NPC attitudes
Values
-
stateNeutral
-
stateHostile
-
stateEscape
|
Tfactions = (...); |
NPC factions / groups
Values
-
redcapFaction
-
bugFaction
-
animalFaction
-
fungusFaction
-
undeadFaction
-
trapFaction
-
npcFaction
|
Variables
Generated by PasDoc 0.16.0.