-
Notifications
You must be signed in to change notification settings - Fork 245
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
Add Battlers and Combat logic #218
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
b4f51c3
Update Godot to 4.3b2, add battlers
food-please 9789c8e
Setup the active turn queue
food-please 28f7e5c
Add battler stats (L8)
food-please 74b7ec3
Add stat bonuses & penalties (L9)
food-please 5d22850
Implement stat multipliers (L11)
food-please c082a20
Clean up ghost.atlastex, battler stat checks, combat arena battler types
food-please ad539cf
Add BattlerAnim class and replace static Battler images
food-please 228862b
Design ActionData to specify action properties
food-please 65f7f0e
Allow Battlers to act, rework actions to single resource
food-please 439a34c
Add temporary player battler
food-please 89798ad
Flesh out melee attack action
food-please c740aac
Updgade to Godot 4.3 (beta3)
food-please 6d73364
Add default 'die' and 'hurt' battler animations
food-please bc5613e
Finish combat once one side has fallen and animations finished
food-please 6da44b1
Fix missing battler animations, win/lost combat appropriately
food-please 650e622
Update changelog for 0.3.1 release
food-please f3b31b7
Update project code documentation
food-please dbf2a31
Add specific stats and actions for Battler types
food-please 80d6979
start refactoring combat code
NathanLovato 88c94b9
refactor combat.gd
NathanLovato 0d625ea
refactor battler.gd
NathanLovato 157988b
minor changes
NathanLovato 942eba6
minor changes 2
NathanLovato File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
This is the main area where I made changes in this first refactor commit. You can simplify the code and group it by using first class functions. Back in Godot 3, you had to separate the signals and the functions called from the signals. If you needed to pass extra data to the signal callback, you had to bind arguments when connecting the signals.
You can still do that in Godot 4 and it's completely fine, but you can also use first-class functions to create closures and capture the data you need. The thing I like most about this is that now the signal connection and the callback function are not on either end of the script, but they are grouped in one place. This makes it easier to understand the code and see what is connected to what.