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

Type Bird

object --+            
         |            
    Entity --+        
             |        
         Agent --+    
                 |    
             Flyer --+
                     |
                    Bird

Known Subclasses:
BlueBird, BrownBird, RedBird, WhiteBird

Birds are flying creatures. Most birds are friendly, but the red ones are hostile. It's possible to ride on brown birds.
Method Summary
    Inherited from Flyer
  __init__(self, x, y)
Create a new agent at the given position.
  current_animation(self)
Return a tuple (basename, speed), indicating the animation name and the animation speed that should be used by this agent's sprite, based on the agent's current state.
  face(self, side)
  fly(self, direction, speed)
  handle_collision(self, obstacle, side)
Called when one of the entity's bodies collides with another body.
  stop(self)
    Inherited from Agent
  add_effect(self, effect)
Apply a temporary change to the "fixed" properties of this agent.
  attack(self, attack_type, **attack_args)
  die(self)
Cause the agent to die.
  heal(self, health)
Increase the health of this agent by the given amount.
  hurt(self, damage, damage_type)
Cause the given amount of damage to this agent.
  icon(cls)
(Class method)
  is_hostile(self, agent)
Return true if this agent is hostile to the given agent.
  play_animation(self, basename, speed)
Change the agent's sprite to display the animation with the given basename, for the duration of the animation (just one time through, if the animation normally loops).
  register(cls)
(Class method)
  remove_effect(self, *effects_to_remove)
Cancel one or more temporary changes to the "fixed" properties of this agent.
  say(self, text, duration)
Say something...
  update(self, duration)
Update the current state of this agent.
  update_animation(self)
Update the animation mode and speed of this agent's sprite(s), based on the agent's state.
  _check_for_expired_effects(self, duration)
Check if any of our effects have expired; and if so, then remove them.
  _clear_speech_bubble(self, speech_bubble)
  _stop_animation(self, animation_counter)
    Inherited from Entity
  __repr__(self)
  add_body(self, body)
  add_sprite(self, sprite)
  after(self, duration, callback, *params, **kwparams)
After the given duration has elapsed, call the given callback function.
  handle_lose_support(self, old_support)
Called when one of the entity's bodies becomes unsupported.
  handle_movement(self, dx, dy)
Called when one of the entity's bodies moves.
  remove_body(self, body)
  remove_sprite(self, sprite)
  use(self)
Define this method for entities that the avatar can 'use'.
  _check_after_callbacks(self, duration)
    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
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Property Summary
    Inherited from Agent
  bottom: The y coordinate of the bottom side of the agent's body.
  center: The (x,y) position of the center of the agent's body.
  left: The x coordinate of the left side of the agent's body.
  right: The x coordinate of the right side of the agent's body.
  top: The y coordinate of the top side of the agent's body.
  x: The x coordinate of the center of the agent's body.
  y: The y coordinate of the center of the agent's body.
    Inherited from Entity
  bodies
  sprites

Instance Variable Summary
    Inherited from Flyer
  facing: Which direction is this flyer facing?
tuple flight_speed: A tuple?
    Inherited from Agent
  attack_cooldown_timer: ...
int attack_speed: A modifier for the rate at which this agent can attack.
  body: The agent's body.
  effects: A list of the Effects (temporary changes to fixed properties) that are currently affecting this agent.
str faction: The name of the faction that this agent belongs to.
  health: The number of health points this agent currently has.
int health_max: The maximum number of health points this agent can have.
int health_regen: The rate at which this agent regains its health, in HP/sec.
bool is_mortal: Determines whether this agent dies when its health reaches zero.
  mana: The number of mana points this agent currently has.
int mana_max: The maximum number of mana points this agent can have.
int mana_regen: The rate at which this agent regains its mana, in MP/sec.
dict resists: A dictionary describing the base amount that this agent resists each damage type.
  _animation_counter: A 'generation counter', used to make sure that the timed callback registered by play_animation() only cancels that animation; if any new animations have been started since, then the timed callback should *not* stop the current animation.
    Inherited from Entity
bool alive: A flag indicating whether the entity is alive or not.
  bodies = pajammin.entity.entity.Entity.bodies
NoneType level: A pointer to the level that contains this entity (if any).
  sprites = pajammin.entity.entity.Entity.sprites
NoneType update_delay: The amount of time that has elapsed since the last time update was called for this entity.

Class Variable Summary
NoneType bbox_size: The default size of the bounding box for agents in this class.
bool can_hover: Can this flyer hover? If not, then its x velocity will never be set to zero.
    Inherited from Flyer
  sprite_category: The category that should be used to create the primary sprites for agents in each Flyer subclass.
    Inherited from Agent
dict attack_types: A dictionary describing the types of attack that agents in this class can make.
list classes = [<class 'pajammin.entity.agent.flyer.WhiteBird...
int solid_sides: The sides of the agent's body which should be solid for agents in this class.
int update_interval: The interval at which entities in a given class should have its update function called.
NoneType _speech_bubble = None                                                                  
    Inherited from Entity
bool autouse = False
bool is_usable = False
tuple _after_callbacks = ()
tuple _bodies = ()
tuple _sprites = ()

Class Variable Details

bbox_size

The default size of the bounding box for agents in this class.
Type:
NoneType
Value:
(46, 23)                                                               

can_hover

Can this flyer hover? If not, then its x velocity will never be set to zero.
Type:
bool
Value:
False