open-mtg icon indicating copy to clipboard operation
open-mtg copied to clipboard

Abstract spell effects

Open hlynurd opened this issue 7 years ago • 0 comments

Currently, the few implemented spells are enumerated in "make_move" and "get_legal_moves". Returning legal moves associated with the spell and handling the spell effect should be handled by the card objects rather than long rows of 'player.casting_spell == "Vengeance": [...]'. Consider passing lambda functions as card creation parameters, cf. [lambda self: self.owner.add_mana({"Green": 1})] in current Land card instantiation.

hlynurd avatar Apr 27 '18 10:04 hlynurd