brave-frontier-godot icon indicating copy to clipboard operation
brave-frontier-godot copied to clipboard

Add Scene/Button for Creating New Teams

Open aMytho opened this issue 6 months ago • 0 comments

We have all the logic in place to handle multiple teams, but we only allow the summoner to have one at the moment. Let's fix that.

I think we will need a button on the manage squad page for creating new teams. It will then create the new team. We can give it a default name. We also need an input to change the team name on each team page (manage squads) so it can be changed once created. We created our first team in the introduction scene (Lucius) with the below GDscript/SQL:

Database.query(
		"INSERT INTO teams (name, unit1, unit2, unit3, account_id, leader) VALUES ('Default', %s, %s, %s, %s, 2)"
		% [units_ids[1].id, units_ids[0].id, units_ids[2].id, player_id]
	)

We would modify this to insert 0 units. This may cause an issue if the team is selected for battle and no units exist. We should add a quick check to prevent that from happening.

This isn't a high priority as we have multiple accounts which accomplish the same thing.

aMytho avatar Dec 19 '23 20:12 aMytho