-
Notifications
You must be signed in to change notification settings - Fork 3
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
'Self' targeting strategy #585
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality is great! Tests have a couple of issues though 😔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are still not doing what they are supposed to do! You can check what's going on for the battle in a test by changing the logger config in file tests.exs
to:
config :logger, level: :info
This will let you see info logs in tests.
You can run specific tests like:
mix test apps/champions/test/battle_test.exs:749
Also, you marked some comments from my last review as resolved but didn't commit the suggestion/address the comment, be careful there!
Closes [TargetingStrategy] Self
Motivation
Implement new strategy to target the caster unit of a skill.
Summary of changes
New choose_targets function clause with the 'self' type of targeting strategy, it returns the caster unit id.
How to test it?
Set the targeting strategy for one of your unit character's skills to "self", you can do so in the skills.json file, running Champions.Config.import_skill_config() to update the running backend. Then run a battle and verify when the modified skill is cast, it targeted the same unit that casted it. You can check battle.md on how to run battles.
Checklist