c2ephp

CreatureHistory Class Reference

Class representing a creature's history. More...

List of all members.

Public Member Functions

 CreatureHistory ($moniker, $name, $gender, $genus, $species)
 Construct a CreatureHistory object.
 Compile ($format=GLST_FORMAT_C3)
 Compiles the CreatureHistory into CreaturesArchive data.
 GuessFormat ()
 Try to work out which game this CreatureHistory is for.
 AddEvent (CreatureHistoryEvent $event)
 Adds an event to the end of a history.
 GetEvent ($n)
 Gets an event from the history.
 RemoveEvent ($n)
 Removes an event from history.
 CountEvents ()
 Counts the events in the history.
 GetEventsByType ($type)
 Gets all events matching the given event type.
 GetEvents ()
 Gets all the events in this history.
 GetCreatureMoniker ()
 Gets the moniker of the creature this history is attached to.
 GetCreatureGenerationNumber ()
 Gets the generation of the creature.
 GetCreatureName ()
 Gets the name of the creature this history is attached to.
 GetCreatureGender ()
 Gets the gender of the creature this history is attached to.
 GetCreatureGenus ()
 Gets the genus of the creature this history is attached to.
 GetCreatureSpecies ()
 Gets the species of the creature this history is attached to.
 GetCreatureIsWarpVeteran ()
 Gets whether the creature this history is attached to has been through the warp.
 GetCreatureMutations ()
 Gets the number of mutation points during conception.
 GetCreatureCrossoverPoints ()
 Gets the number of crossover points during conception.
 SetMutationsAndCrossovers ($mutations, $crossovers)
 SetDSUnknowns ($unknown1, $unknown2)
 Set variables that are currently unknown, specific to DS.
 SetWarpVeteran ($warpveteran)
 Sets whether or not the creature is a veteran of the warp (DS only)

Related Functions

(Note that these are not member functions.)
Gender

CreatureHistory-specific gender constants

enum  CREATUREHISTORY_GENDER_MALE
enum  CREATUREHISTORY_GENDER_FEMALE

Detailed Description

Class representing a creature's history.

As used in the C3 crypt as well as the creature's in-game info.

Definition at line 23 of file CreatureHistory.php.


Member Function Documentation

CreatureHistory::AddEvent ( CreatureHistoryEvent event)

Adds an event to the end of a history.

Parameters:
$eventA CreatureHistoryEvent to add to this CreatureHistory object.

Definition at line 107 of file CreatureHistory.php.

CreatureHistory::Compile ( format = GLST_FORMAT_C3)

Compiles the CreatureHistory into CreaturesArchive data.

Parameters:
$formatGLST_FORMAT_C3 or GLST_FORMAT_DS.
Returns:
A binary string ready for archiving and putting in a GLST block.

Definition at line 65 of file CreatureHistory.php.

CreatureHistory::CountEvents ( )

Counts the events in the history.

Returns:
How many events there currently are in this history

Definition at line 134 of file CreatureHistory.php.

CreatureHistory::CreatureHistory ( moniker,
name,
gender,
genus,
species 
)

Construct a CreatureHistory object.

Parameters:
$monikerThe moniker of the creature
$nameThe creature's name
$genderThe creature's gender
$genusThe creature's genus (Grendel, ettin, norn, geat)
$speciesThe creature's species (unsure of purpose)

Definition at line 52 of file CreatureHistory.php.

CreatureHistory::GetCreatureCrossoverPoints ( )

Gets the number of crossover points during conception.

Definition at line 217 of file CreatureHistory.php.

CreatureHistory::GetCreatureGender ( )

Gets the gender of the creature this history is attached to.

Definition at line 192 of file CreatureHistory.php.

CreatureHistory::GetCreatureGenerationNumber ( )

Gets the generation of the creature.

I cannot guarantee that this function works. However, it does use the same method as the Creatures 3 in-game creature information viewer, so it should work on all creatures made in-game.

Returns:
0 for failure, the generation of the creature otherwise.

Definition at line 174 of file CreatureHistory.php.

CreatureHistory::GetCreatureGenus ( )

Gets the genus of the creature this history is attached to.

Definition at line 197 of file CreatureHistory.php.

CreatureHistory::GetCreatureIsWarpVeteran ( )

Gets whether the creature this history is attached to has been through the warp.

Definition at line 207 of file CreatureHistory.php.

CreatureHistory::GetCreatureMoniker ( )

Gets the moniker of the creature this history is attached to.

Definition at line 163 of file CreatureHistory.php.

CreatureHistory::GetCreatureMutations ( )

Gets the number of mutation points during conception.

Definition at line 212 of file CreatureHistory.php.

CreatureHistory::GetCreatureName ( )

Gets the name of the creature this history is attached to.

Definition at line 187 of file CreatureHistory.php.

CreatureHistory::GetCreatureSpecies ( )

Gets the species of the creature this history is attached to.

Definition at line 202 of file CreatureHistory.php.

CreatureHistory::GetEvent ( n)

Gets an event from the history.

Simply gets the nth event that happened in this history

Parameters:
$nthe event number to get
Returns:
the $nth CreatureHistoryEvent

Definition at line 117 of file CreatureHistory.php.

CreatureHistory::GetEvents ( )

Gets all the events in this history.

Returns:
An array of CreatureHistoryEvents

Definition at line 158 of file CreatureHistory.php.

CreatureHistory::GetEventsByType ( type)

Gets all events matching the given event type.

See also:
agents/CreatureHistory/CreatureHistoryEvent.php Event Types
Parameters:
$typeone of the Event Type constants.
Returns:
an array of CreatureHistoryEvents.

Definition at line 144 of file CreatureHistory.php.

CreatureHistory::GuessFormat ( )

Try to work out which game this CreatureHistory is for.

This is done by working out whether any DS-specific variables are set.

Returns:
GLST_FORMAT_DS or GLST_FORMAT_C3.

Definition at line 98 of file CreatureHistory.php.

CreatureHistory::RemoveEvent ( n)

Removes an event from history.

Removes the nth event from this history

Parameters:
$nthe event number to remove

Definition at line 126 of file CreatureHistory.php.

CreatureHistory::SetDSUnknowns ( unknown1,
unknown2 
)

Set variables that are currently unknown, specific to DS.

This calls SetC3Unknown

Parameters:
$unknown1First unknown variable
$unknown2Second unknown variable

Definition at line 234 of file CreatureHistory.php.

CreatureHistory::SetMutationsAndCrossovers ( mutations,
crossovers 
)

Definition at line 221 of file CreatureHistory.php.

CreatureHistory::SetWarpVeteran ( warpveteran)

Sets whether or not the creature is a veteran of the warp (DS only)

Parameters:
$warpveteranA boolean (I think!)

Definition at line 243 of file CreatureHistory.php.


Friends And Related Function Documentation

Value: 2

Definition at line 16 of file CreatureHistory.php.

Value: 1

Definition at line 13 of file CreatureHistory.php.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations