Select a group of enemy when entering a combat depending on map position #134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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)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 theCardManager
(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 atscn
file, so we could change the deck from the inspector to test, instead of having to change it in the code.