- Fixed a bug with sacrifice and shroud
This commit is contained in:
wagic.the.homebrew
2009-03-01 13:14:01 +00:00
parent b780b66653
commit d10f8ddff7
4 changed files with 53 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ generic/hybrid_mana_3.txt
generic/legendary.txt
generic/persist.txt
generic/persist2.txt
generic/sacrifice.txt
generic/wither.txt
########################
#Specific Cards
@@ -72,6 +73,7 @@ shivan_hellkite.txt
shock.txt
spark_elemental.txt
stasis.txt
sword_to_plowshares.txt
terror.txt
volcanic_island.txt
white_knight1.txt

View File

@@ -0,0 +1,29 @@
#Bug: Creatures with shroud(e.g. Inkwell Leviathan(CFX)) can't be sacrificed by others(e.g. Nantuko Husk(10E))
# text=Sacrifice a creature: Nantuko Husk gets +2/+2 until end of turn. (Nantuko Husk 2/2)
[INIT]
COMBATBEGIN
[PLAYER1]
inplay:154081,129653
[PLAYER2]
[DO]
129653
154081
next
#attackers
129653
choice 0
next
#blockers
next
#damages
next
#endofcombat
[ASSERT]
COMBATEND
[PLAYER1]
life:20
graveyard:154081
inplay:129653
[PLAYER2]
life:16
[END]

View File

@@ -0,0 +1,20 @@
#Bug : removing a persisting creature from the game causes a crahs (swords to plowshares + creature with persist)
# sword to plowshares : 1367
[INIT]
FIRSTMAIN
[PLAYER1]
hand:1367
manapool:{W}
[PLAYER2]
inplay:141935
[DO]
1367
141935
[ASSERT]
FIRSTMAIN
[PLAYER1]
graveyard:1367
manapool:{0}
[PLAYER2]
life:23
[END]

View File

@@ -15,11 +15,13 @@ int ExtraCost::setSource(MTGCardInstance * _source){
}
SacrificeCost::SacrificeCost(TargetChooser *_tc):ExtraCost(_tc){
if (tc) tc->source = NULL; //Sacrificing is not targetting, protections do not apply
target = NULL;
}
int SacrificeCost::setSource(MTGCardInstance * card){
ExtraCost::setSource(card);
if (tc) tc->source = NULL; //Sacrificing is not targetting, protections do not apply
if (!tc) target = card;
return 1;
}