Return to repo list

heart-of-gold

Tactical RPG written in python, using pygame.
Return to HMagellan.com

commit 72a64ac5abe037c008f8971eda23aadfde2c6cde
parent caea4fd44304546ecb051af0c95447da85c3af83
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Thu,  4 Feb 2021 17:59:46 -0600

some setup for menu expansion

Diffstat:
Msrc/constants.py | 1+
Msrc/menu.py | 6++++++
Msrc/turn.py | 1+
3 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/constants.py b/src/constants.py @@ -92,6 +92,7 @@ STATE_MODES = enum.Enum('STATE_MODES', 'Main_Menu_Mode Base_Mode Battle_Mode Sti CTRL_MODES = enum.Enum('CTRL_MODES', 'No_Control Main_Menu_Normal Base_Normal Base_Dialog Turn_Normal Turn_Select_Move Turn_Select_Attack Turn_Watch_Move Turn_Watch_Attack Turn_Display_Stats Turn_Watch_Guard Battle_Dialog Battle_Intro Battle_Resolve Still_Scene_Normal') FACE_DIR = enum.Enum('FACE_DIR', 'U D L R') GAME_EFFECTS = enum.Enum('GAME_EFFECTS', 'ef_game_dummy ef_game_quit ef_game_switch_mode ef_game_switch_control') +MENU_EFFECTS = enum.Enum('MENU_EFFECTS', 'ef_menu_dummy') SCENE_EFFECTS = enum.Enum('SCENE_EFFECTS', 'ef_scene_dummy ef_scene_delay ef_scene_fade ef_scene_scroll_camera ef_scene_snap_camera ef_scene_spawn_piece') TEAMS = enum.Enum('TEAMS', 'Player Ally Neutral Enemy Other') ATTACK_NOTATIONS = enum.Enum('ATTACK_NOTATIONS', 'backattack critical counter opposite weakness resist riposte ignoredef parry block sweep miss onetwo stun') diff --git a/src/menu.py b/src/menu.py @@ -49,6 +49,12 @@ class MenuManager(manager.Manager): if b.rect.collidepoint(pos): self.trigger_effects(b.effects) + def effect_extension(self, effect): + """ + MenuManager-only effects for trigger_effects. + """ + pass + def expose(self): """ Expose menu info to the ManagerBus. diff --git a/src/turn.py b/src/turn.py @@ -314,6 +314,7 @@ class TurnManager(manager.Manager): Check if a battle is over. This is checked in the refresh_turn_state method. """ + # Begin by counting up the pieces on each team numplayer = 0 numenemy = 0 for p in self.in_play_pieces: