Public Member Functions | Public Attributes

CZone Class Reference

Inherits IZone.

List of all members.

Public Member Functions

 CZone (uint x, uint y)
uint GetX ()
uint GetY ()
uint GetLocationPids (array< uint16 >& pids)
bool ContainsFlag (uint flag)
 Checks if zone is flagged with given flag.
uint GetQuantity (uint group)
 Retrieves quantity of the given group in zone, taking the day/night modifiers into account.
uint GetBaseQuantity (uint group)
 Retrieves base quantity of the given group in zone (without their day/night mods).
void SetQuantity (uint group, uint quantity)
 Sets the quantity for given group.
void ChangeQuantity (uint group, int mod)
 Changes the quantity for given group.
uint GetChance ()
 Chance (to be tested as percentage) of the encounter in given zone, depending on the groups and their quantities, and the current time.
int GetValue ()
 Retrieves the value for that zone.
void SetValue (int val)
void AddValue (int val)
void SubValue (uint val)
 Decreases value for given zone.
uint GetTerrain ()
 Retrieves the type of terrain for given world-coordinates.
uint8 GetFactor ()
 Gets the random factor that decides about special discoveries.
void SetFactor (uint8 factor)
 Sets the random factor that decides about special discoveries.
void AddLocationPid (uint16 locationPid)
void ChooseGroups (Critter& leader, CEncounter& enc)
 Chooses groups for an encounter.
 CZone ()
void AddPlayer (Critter@ player)
 Gets the array of players in that zone.
void RemovePlayer (Critter@ player)
 Removes player from the zone.

Public Attributes

array< uint > Groups
array< int > Quantities
array< uint > Flags
uint x
uint y
int Difficulty
array< uint16 > LocationPids
uint Terrain
uint Fill
uint MorningChance
uint AfternoonChance
uint NightChance
uint8 Factor
int value
array< uint > players

Constructor & Destructor Documentation

CZone ( uint  x,
uint  y 
)
CZone (  ) 

Member Function Documentation

uint GetX (  ) 

Implements IZone.

uint GetY (  ) 

Implements IZone.

uint GetLocationPids ( array< uint16 >&  pids  ) 

Implements IZone.

bool ContainsFlag ( uint  flag  ) 

Checks if zone is flagged with given flag.

Implements IZone.

uint GetQuantity ( uint  group  ) 

Retrieves quantity of the given group in zone, taking the day/night modifiers into account.

Implements IZone.

uint GetBaseQuantity ( uint  group  ) 

Retrieves base quantity of the given group in zone (without their day/night mods).

Implements IZone.

void SetQuantity ( uint  group,
uint  quantity 
)

Sets the quantity for given group.

Implements IZone.

void ChangeQuantity ( uint  group,
int  mod 
)

Changes the quantity for given group.

Implements IZone.

uint GetChance (  ) 

Chance (to be tested as percentage) of the encounter in given zone, depending on the groups and their quantities, and the current time.

int GetValue (  ) 

Retrieves the value for that zone.

Implements IZone.

void SetValue ( int  val  ) 

Implements IZone.

void AddValue ( int  val  ) 

Implements IZone.

void SubValue ( uint  val  ) 

Decreases value for given zone.

Implements IZone.

uint GetTerrain (  ) 

Retrieves the type of terrain for given world-coordinates.

Implements IZone.

uint8 GetFactor (  ) 

Gets the random factor that decides about special discoveries.

Implements IZone.

void SetFactor ( uint8  factor  ) 

Sets the random factor that decides about special discoveries.

Implements IZone.

void AddLocationPid ( uint16  locationPid  ) 
void ChooseGroups ( Critter leader,
CEncounter enc 
)

Chooses groups for an encounter.

void AddPlayer ( Critter player  ) 

Gets the array of players in that zone.

Adds player to the zone.

void RemovePlayer ( Critter player  ) 

Removes player from the zone.


Member Data Documentation

array<uint> Groups
array<int> Quantities
array<uint> Flags
uint x
uint y
array<uint16> LocationPids
uint Terrain
uint Fill
uint8 Factor
int value
array<uint> players