Controllers¶
- class ChooseRoomController(game: Game, parent_scene: WorldScene)[source]¶
Bases:
nqp.base_classes.controller.Controller
Choose next room functionality and data.
Modify game state in accordance with game rules
Do not draw anything
- class CombatController(game: Game, parent_scene: WorldScene)[source]¶
Bases:
nqp.base_classes.controller.Controller
Combat game functionality and combat only data.
Modify game state in accordance with game rules
Do not draw anything
- class EventController(game: Game, parent_scene: WorldScene)[source]¶
Bases:
nqp.base_classes.controller.Controller
Event game functionality and event-only data.
Modify game state in accordance with game rules
Do not draw anything
- get_event(event_id: str, remove_from_pool: bool)[source]¶
Get a specific event. remove_from_pool determines whether the event is removed from the list of possible events.
- get_random_event() Dict [source]¶
Get a random event from those available. This event is then removed from the list of possible events.
- get_result_image(result_key: str, result_value: str, result_target: str) Union[Image, Animation] [source]¶
Get an image for the result key given.
- static parse_event_string(result: str) Tuple[str, str, str] [source]¶
Break event string into component parts. Applicable for Conditions, Resources and Results. (or anything that has a syntax of key:value@target.
Returns a tuple of key, value, target.
- prioritise_event(event_type: str)[source]¶
Move an event from the event_deck to the priority events.
- class InnController(game: Game, parent_scene: WorldScene)[source]¶
Bases:
nqp.base_classes.controller.Controller
Inn game functionality and inn-only data.
Modify game state in accordance with game rules
Do not draw anything
- class TrainingController(game: Game, parent_scene: WorldScene)[source]¶
Bases:
nqp.base_classes.controller.Controller
Training game functionality and training-only data.
Modify game state in accordance with game rules
Do not draw anything