Rewrite enchantment system to use cards #275
Labels
No labels
breaking change
duplicate
good first issue
help wanted
invalid
question
scope: card
scope: docs
scope: game
scope: registry
scope: script
scope: tool
scope: universe
tracker
type: bug
type: card request
type: documentation
type: enhancement
type: improvement
type: parity
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
LunarTides/Hearthstone.js#275
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rewrite enchantments to use cards instead of the current stupid system that sucks.
The enchantment cards should get their own type, and should have
enchantmentApply(self, owner, other)andenchantmentRemove(self, owner, other)abilities.When the enchantment is applied to a card, the
enchantmentApplyability on the enchantment is called, and the card which the enchantment should be applied to is passed in as theotherargument.When the enchantment is removed from a card, the same should happen expect using the
enchantmentRemoveability.This should make enchantments much more flexible, and more in line with what Hearthstone.gd does.
I'm not entirely sure if adding the
otherargument is possible at the moment tho, since it clashes with thekeyandvaluearguments ofpassiveand the like, and abilities are very soft-coded. Just figure it out, it can't be that hard! :')I don't really know why we would need to do this. The enchantment system was added for cards to not override each other's mana cost changes, but i don't think this applies to anything else, or atleast i haven't encountered another situation where cards would clash like this.Edit: If cards always uses enchantments instead of directly changing fields, blueprints don't need to exist. I've already started working on this in Hearthstone.gd, so this might also apply here. Don't know if it's worth it anymore...Another edit: Blueprints are essential in Hearthstone.js since there is no other way to create cards properly. In Godot (Hearthstone.gd), it is possible for both to be in one class because of how godot works.No longer applies after adding a more concrete description.
Changed the
otherin the abilities tohostto be more distinguishable fromownerat a glance. Also becausehostis cooler :)