Module npc_guard :: Class NoGoodNick
[hide private]
[frames] | no frames]

Class NoGoodNick

source code


A NoGoodNick is an actor who will attack a guard and report when he is (counter-) attacked, and by whom

Instance Methods [hide private]
 
__init__(self, name)
create a new GameActor
source code
 
accept_action(self, action, actor, context)
receive an attack and report who made it
source code

Inherited from gameactor.GameActor: interact, set_context, take_action, take_turn

Inherited from gameactor.GameActor (private): _accept_attack

Inherited from gameobject.GameObject: __str__, add_object, get_object, get_objects, load, possible_actions

Inherited from base.Base: get, set

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Instance Variables [hide private]

Inherited from gameobject.GameObject: objects

Inherited from base.Base: attributes, description, name

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name)
(Constructor)

source code 

create a new GameActor

Parameters:
  • name - (string) name of this actor
Overrides: object.__init__

accept_action(self, action, actor, context)

source code 

receive an attack and report who made it

Parameters:
  • action - GameAction being performed
  • actor - GameActor) initiating the action
  • context - GameContext in which action is being taken
Returns:
(boolean success, string description of the effect)
Overrides: gameobject.GameObject.accept_action