Erwan
- Fixed a bug with sacrifice and shroud
This commit is contained in:
@@ -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
|
||||
|
||||
29
projects/mtg/bin/Res/test/generic/sacrifice.txt
Normal file
29
projects/mtg/bin/Res/test/generic/sacrifice.txt
Normal 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]
|
||||
20
projects/mtg/bin/Res/test/sword_to_plowshares.txt
Normal file
20
projects/mtg/bin/Res/test/sword_to_plowshares.txt
Normal 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]
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user