Public Member Functions | Public Attributes

common.gamesys.attktab.AttackTable Class Reference

List of all members.

Public Member Functions

def __init__
def buildTable
 this is the central function for determining the outcome of any melee attack this is done by buidling a table (based on the attacker and defender stats&skills) that assigns probabilities for the various possible outcomes
def getHit
 make a random roll and determine the 'hit type' by comparing it against the attack table (which needs to have been set up with buildTable()) prior to calling getHit() returns the type of the hit

Public Attributes

 table
 owner

Detailed Description

Definition at line 12 of file attktab.py.


Member Function Documentation

def common.gamesys.attktab.AttackTable.__init__ (   self,
  i_owner = None 
)

Definition at line 14 of file attktab.py.

def common.gamesys.attktab.AttackTable.buildTable (   self,
  atkSkills,
  defSkills 
)

this is the central function for determining the outcome of any melee attack this is done by buidling a table (based on the attacker and defender stats&skills) that assigns probabilities for the various possible outcomes

the table will contain a list of 4 numbers, these are the limits for MISS, EVADE, CRIT, CRUSH an attack roll is tested vs these values in the listed order if its<MISS the attack missed, elseif < EVADE the attack has been evaded by the opponent and so on

AttackTable needs to be rebuilt whenever

  • the target changes
  • any of the stats involved in building it changes

Definition at line 34 of file attktab.py.

def common.gamesys.attktab.AttackTable.getHit (   self  ) 

make a random roll and determine the 'hit type' by comparing it against the attack table (which needs to have been set up with buildTable()) prior to calling getHit() returns the type of the hit

Definition at line 57 of file attktab.py.


Member Data Documentation

Definition at line 16 of file attktab.py.

Definition at line 15 of file attktab.py.


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