-
Notifications
You must be signed in to change notification settings - Fork 0
Divine Gift Base Implementation and Scaffold Stealing Spells #13
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
|
|
||
| # TODO: Implement this to interact with party manager | ||
| func steal_spell(): |
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.
We have this here bc we want everything to first go through combat manager right? I wanna see if maybe we can abstract this into trigger_divine_gift and figure out the specific implementation it calls 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.
Yes we want things to go through the combat manager. I think that works too, having a function trigger_divine_gift that gets the correct function to call (for this case, it would just call steal_spell())?
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.
Does this need to be renamed..? I thought this was the general resource
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.
Like it's an overarching attack resource, not a specific one
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.
Yeah do you think general resources should go into resources/ folder? Or in resources/attack folder. Right now I put the general spell and divine gift into their specific folder along with the actual specific resources
| @@ -0,0 +1,4 @@ | |||
| extends DivineGift | |||
|
|
|||
| func _cast() -> void: | |||
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.
ah i see what you're doing here. Do you think this current implementaiton is better or should we go with a "CombatManager is the only interface anything calls in combat"? i.e. the button will call CombatManager::cast_divine_gift() which then calls _cast() which then calls steal_gift() in this case (and steal_gift() implementation is in steal_spells.gd)
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.
I was thinking about that too, but then how do we map the button dynamically based on the divine gift the user has? I think keeping it strictly in CombatManager would involve some kind of hard coded map from DivineGiftType to func.
In my head I think this is kinda cleaner, since we'd abstract that "map" into these resource scripts. Each DivineGift resource script stores which CombatManager function will need to be called, instead of the CombatManager having to figure it out.
Also allows us to extend these _cast() functions in case we want to have divine gifts do things outside of combat (maybe some overworld benefits).
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.
Isn't "what divine gift X character has" defined by their divine gift component?
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.
yeah each characters divine gift component holds the divine gift they have, represented as a resource- and the divine gift resource stores whatever config we need (name, description, what CombatManager func to call, etc)
Changes
uidby godot (new thing in 4.4 I think?)CombatManager::StealSpells()(to be implemented in future PR)Refactoring
attack_rsc.gdscript toresources/attackfolderspells_componentscene to extendNodeinstead ofNode2DclassHow
_cast()function, called when player clicks the Divine Gift button, which will call the correctCombatManagerfunction to execute_cast()function which callsCombatManager::StealSpells()to interact with party manager and character spell componentNext Steps: