Package pajammin :: Module consts
[show private | hide private]
[frames | no frames]

Module pajammin.consts

Definitions of shared constants.
Variable Summary
dict DAMAGE_TYPES: A dictionary mapping each damage type constant to a string name for that constant.
int DOWN = 8                                                                     
int GRAVITY: The default downward acceleration for walkers and other entities that are affected by gravity.
  LEFT, RIGHT, TOP, BOTTOM: Constants used to indicate sides of an object.
  PHYSICAL, FIRE, WATER, ICE, ELECTRIC, ACID, POISON: Constants used to indicate types of damage.
int UP = 4                                                                     
    Sides
int LEFT = 1                                                                     
int RIGHT = 2                                                                     
int TOP = 4                                                                     
int BOTTOM = 8                                                                     
dict OPPOSITE_SIDE: A dictionary mapping each side constant to the side constant corresponding to the opposite side.
dict SIDE_NAME: A dictionary mapping each side constant to a string name for that constant.
    Factions
int GOODGUY: A constant used to indicate the faction that the avatar belongs to.
int BADGUY: A constant used to indicate the faction containing agents that will attack agents in the goodguy faction (including the avatar).
int NEUTRAL: A constant used to indicate the faction containing agents that will neither attack nor defend the avatar.
dict FACTION_NAMES: A dictionary mapping each faction constant to a string name for that constant.
    Damage Types
int PHYSICAL = 1                                                                     
int FIRE = 2                                                                     
int WATER = 4                                                                     
int ICE = 8                                                                     
int ELECTRIC = 16                                                                    
int ACID = 32                                                                    
int POISON = 64                                                                    

Variable Details

LEFT

Type:
int
Value:
1                                                                     

RIGHT

Type:
int
Value:
2                                                                     

TOP

Type:
int
Value:
4                                                                     

BOTTOM

Type:
int
Value:
8                                                                     

OPPOSITE_SIDE

A dictionary mapping each side constant to the side constant corresponding to the opposite side.
Type:
dict
Value:
{8: 4, 1: 2, 2: 1, 4: 8}                                               

SIDE_NAME

A dictionary mapping each side constant to a string name for that constant.
Type:
dict
Value:
{8: 'bottom', 1: 'left', 2: 'right', 4: 'top'}                         

GOODGUY

A constant used to indicate the faction that the avatar belongs to. Other agents in the goodguy faction will attack badguys.
Type:
int
Value:
1                                                                     

BADGUY

A constant used to indicate the faction containing agents that will attack agents in the goodguy faction (including the avatar).
Type:
int
Value:
4                                                                     

NEUTRAL

A constant used to indicate the faction containing agents that will neither attack nor defend the avatar.
Type:
int
Value:
2                                                                     

FACTION_NAMES

A dictionary mapping each faction constant to a string name for that constant.
Type:
dict
Value:
{1: 'goodguy', 2: 'neutral', 4: 'badguy'}                              

PHYSICAL

Type:
int
Value:
1                                                                     

FIRE

Type:
int
Value:
2                                                                     

WATER

Type:
int
Value:
4                                                                     

ICE

Type:
int
Value:
8                                                                     

ELECTRIC

Type:
int
Value:
16                                                                    

ACID

Type:
int
Value:
32                                                                    

POISON

Type:
int
Value:
64                                                                    

DAMAGE_TYPES

A dictionary mapping each damage type constant to a string name for that constant.
Type:
dict
Value:
{1: 'physical',
 2: 'fire',
 4: 'water',
 8: 'ice',
 16: 'electric',
 32: 'acid',
 64: 'poison'}                                                         

DOWN

Type:
int
Value:
8                                                                     

GRAVITY

The default downward acceleration for walkers and other entities that are affected by gravity.
Type:
int
Value:
600                                                                   

LEFT, RIGHT, TOP, BOTTOM

Constants used to indicate sides of an object. These constants can be used as flags. (e.g., LEFT+RIGHT can be used to indicate the left or right side.)

PHYSICAL, FIRE, WATER, ICE, ELECTRIC, ACID, POISON

Constants used to indicate types of damage. These constants can be used as flags (e.g., PHYSICAL+FIRE can be used to indicate damage caused by poth physical contact and fire).

UP

Type:
int
Value:
4