Re: Progress towards v0.7.1c
Posted: 19 Jul 2011, 20:25
actualy with mat's solution i got the errorMageKing17 wrote:Actually, Mat's solution was an elegant implementation that was merely missing four letters ("Card", BTW). But good for you to notice it wasn't working; at least somebody's testing cards.
Technically, I suppose, Mat's solution is incorrect because it's not actually paying a cost, which could theoretically come back to bite us in the ass, but I can't think of anything that could care about a cost paid in the middle of a triggered ability's activation. Usually, abilities just care about costs paid to cast spells or activate abilities.
Actually, that doesn't quite work. If you choose to discard a card but have no cards in your hand, under your implementation, Balduvian Horde would live, despite the fact that it needs to be sacrificed in that case. Also, your use of list comprehension and random.sample is redundant when you're only picking one card. Here is how the card should look.
But thank you for testing cards and coming up with code; if you want access to the web editor, PM me your email address.
- Code: Select all
NameError: global name 'DisardCost' is not defined
Also, you misstyped in "discard a card and random", and it wont work in "B" version without the "import random". Adding the line it works perfectly... thx MK