Godot Version
4.3
Question
Still coding that awesome Turn based RPG.
I’m currently coding the logic for firstly selecting the attack then selecting the enemy (Or enemies)
if event.is_action_pressed("ui_accept") and isSelecting:
match currentSelectionType:
SelectionType.SELECTING_ATTACK:
currentSelectionType = SelectionType.SELECTING_ENEMIES
match parent.attackActions[index].targetType:
Action.Target.SINGLE_ENEMY: select_single_enemy()
Action.Target.ALL_ENEMIES: select_all_enemies()
SelectionType.SELECTING_ENEMIES:
parent.deciding_finished.emit()
But I experience a metaphorical stroke every time I try to read this block of code ! How can i rewrite to make it more readable ?