Package pajammin :: Package entity :: Package agent :: Module agent :: Class Effect
[show private | hide private]
[frames | no frames]

Type Effect

object --+
         |
        Effect

Known Subclasses:
DoctorShirtBoost, DoctorShirtEffect, FireSpirit, FlashPantsBoost, FlashPantsEffect, Freeze, HalflingShortsEffect, ImmobilizeEffect, ManaDrain, SuspendManaRegen, WindSpirit

A temporary change to the "fixed" properties of an Agent, such as a buff or a magical spell.
Method Summary
  __init__(self)
  affect(self, agent)
Make this effect's change to the given agent's fixed properties.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
Return repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Class Variable Summary
NoneType affected_properties: A list of names of the fixed properties that this effect affects.
NoneType duration: How much longer should this effect be active? Use None for effects that don't expire after a fixed time.
int mana_cost: How much mana does it take to use this effect (mp/sec)? If mana reaches zero, the effect will automatically be cancelled.
NoneType sprite_category: The category of the sprite that should be displayed when this effect is active.

Method Details

__init__(self)
(Constructor)

Overrides:
__builtin__.object.__init__

affect(self, agent)

Make this effect's change to the given agent's fixed properties.

Class Variable Details

affected_properties

A list of names of the fixed properties that this effect affects. This is used when removing the effect, to allow the agent to revert its fixed properties to their natural values.
Type:
NoneType
Value:
None                                                                  

duration

How much longer should this effect be active? Use None for effects that don't expire after a fixed time.
Type:
NoneType
Value:
None                                                                  

mana_cost

How much mana does it take to use this effect (mp/sec)? If mana reaches zero, the effect will automatically be cancelled. (Positive mana regeneration is suspended when a effect with a mana cost is active.)
Type:
int
Value:
0                                                                     

sprite_category

The category of the sprite that should be displayed when this effect is active. If None, then no sprite will be displayed.
Type:
NoneType
Value:
None