Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select a group of enemy when entering a combat depending on map position #134

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

Turtyo
Copy link
Collaborator

@Turtyo Turtyo commented Sep 26, 2024

Description

Choose an enemy group when entering a new fight, depending on a given distribution of enemy groups

Related issue(s)

Closes #128

List of changes

  • Add a function to choose an enemy group based on player position in the map
  • Add an EnemyGroup which holds a list of enemies and their position in the scene (this is still not great, because there is no way to check for enemy position in the scene apart from launching the game, open to suggestion on how to handle positions)
  • Add a background and a few enemies / enemy groups
  • Save data if needed

Tests

None yet, an idea for a test could be to launch the function to choose an enemy a few time and compare to an expected output

Additional notes

The enemies are a bit strong now, you can use the instantWinDeck (at "res://Cards/CardSets/InstantWinDeck.tres") and use it by modifying the _ready of the CardManager (by switching out the default deck).

An idea regarding this deck switching, I found out you can use a tscn as an autoloaded singleton (which I did here). So we could make the default deck an @export and autoload a tscn file, so we could change the deck from the inspector to test, instead of having to change it in the code.

Note: some were not put in because their role as item is ambiguous
This will allow using the export variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select a group of enemy when entering a combat depending on map position
1 participant