sgastudio / wagic

Automatically exported from code.google.com/p/wagic
Other
0 stars 0 forks source link

Sacrifice event doesn't trigger in cost #922

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Have a card in play with @sacrificed in their ability like Mortician Beetle
2. Produce an Eldrazi Spawn token (from Nest Invader) then sacrifice the token 
to produce 1 colorless mana

What is the expected output? What do you see instead?

Mortician Bettle must get a +1/+1 counter because the sacrifice event triggered 
when we use the Eldrazi spawn token ability to produce mana( {S}:Add{1} ).

What version of the product are you using? On what operating system?
Windows 7 and Android 2.3.4 - Wagic 0.18.6 SVN

Please provide any additional information below.
last time it works on old revision of Wagic but I forgot what version it was. 
maybe it has something to do in SacrificeCost::doPay() under ExtraCost.cpp but 
I'm not really sure.

-kevlahnota

Original issue reported on code.google.com by honeyemo...@yahoo.com on 23 Nov 2012 at 8:43

GoogleCodeExporter commented 9 years ago
do you think this is the culprit?

//event when card is sacrificed.
struct WEventCardSacrifice : public WEventCardUpdate {
    MTGCardInstance * cardAfter;
    WEventCardSacrifice(MTGCardInstance * card,MTGCardInstance * afterCard);

change afterCard to cardAfter?

-kevlahnota

Original comment by honeyemo...@yahoo.com on 23 Nov 2012 at 2:12

GoogleCodeExporter commented 9 years ago
Additional: it also affects tokens that are sacrificed as a cost or not, 
doesn't update the WEventCardSacrifice (it seems null).

Original comment by honeyemo...@yahoo.com on 24 Nov 2012 at 2:26

GoogleCodeExporter commented 9 years ago
no thats not the culprit. those variables are set elsewhere.

Original comment by omegabla...@gmail.com on 25 Nov 2012 at 4:22

GoogleCodeExporter commented 9 years ago
fixed

Original comment by omegabla...@gmail.com on 25 Nov 2012 at 5:00

GoogleCodeExporter commented 9 years ago

Original comment by omegabla...@gmail.com on 25 Nov 2012 at 5:01