I have an abstract class called Card, which has two abstract subclasses called Monster & Enhance. Under these subclasses, I have concrete cards (such as Amplify damage & Fire Demon). I would like to use the decorator design pattern to apply enhancements to minions but am not sure how this would work since I also want functionality which allows me to remove all the Enhancements from the Monster when it dies.
Typical enhancements would include doubling the damage of the Monster, doubling it's health, making it invulnerable for one turn etc.
Aucun commentaire:
Enregistrer un commentaire