- Added support for targeting in AF DestroyAll.

- Added Primeval Light by Night Shadow.
This commit is contained in:
Sloth
2011-09-27 18:09:25 +00:00
parent aab40f617a
commit 589b69f3eb
3 changed files with 28 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -5900,6 +5900,7 @@ res/cardsfolder/p/primal_plasma.txt svneol=native#text/plain
res/cardsfolder/p/primal_rage.txt svneol=native#text/plain res/cardsfolder/p/primal_rage.txt svneol=native#text/plain
res/cardsfolder/p/primal_whisperer.txt svneol=native#text/plain res/cardsfolder/p/primal_whisperer.txt svneol=native#text/plain
res/cardsfolder/p/primalcrux.txt svneol=native#text/plain res/cardsfolder/p/primalcrux.txt svneol=native#text/plain
res/cardsfolder/p/primeval_light.txt -text
res/cardsfolder/p/primeval_shambler.txt svneol=native#text/plain res/cardsfolder/p/primeval_shambler.txt svneol=native#text/plain
res/cardsfolder/p/primeval_titan.txt svneol=native#text/plain res/cardsfolder/p/primeval_titan.txt svneol=native#text/plain
res/cardsfolder/p/primoc_escapee.txt svneol=native#text/plain res/cardsfolder/p/primoc_escapee.txt svneol=native#text/plain

View File

@@ -0,0 +1,10 @@
Name:Primeval Light
ManaCost:3 G
Types:Sorcery
Text:no text
A:SP$ DestroyAll | Cost$ 3 G | ValidTgts$ Player | TgtPrompt$ Select target player | ValidCards$ Enchantment | SpellDescription$ Destroy all Enchantments target player controls.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/primeval_light.jpg
SetInfo:GPT|Uncommon|http://magiccards.info/scans/en/gp/93.jpg
Oracle:Destroy all enchantments target player controls.
End

View File

@@ -619,6 +619,14 @@ public class AbilityFactory_Destroy {
CardList humanlist = AllZone.getHumanPlayer().getCardsIn(Zone.Battlefield); CardList humanlist = AllZone.getHumanPlayer().getCardsIn(Zone.Battlefield);
CardList computerlist = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield); CardList computerlist = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield);
Target tgt = sa.getTarget();
if (sa.getTarget() != null) {
tgt.resetTargets();
sa.getTarget().addTarget(AllZone.getHumanPlayer());
computerlist.clear();
}
humanlist = humanlist.getValidCards(Valid.split(","), source.getController(), source); humanlist = humanlist.getValidCards(Valid.split(","), source.getController(), source);
computerlist = computerlist.getValidCards(Valid.split(","), source.getController(), source); computerlist = computerlist.getValidCards(Valid.split(","), source.getController(), source);
@@ -666,6 +674,11 @@ public class AbilityFactory_Destroy {
Card card = sa.getSourceCard(); Card card = sa.getSourceCard();
Target tgt = af.getAbTgt();
Player targetPlayer = null;
if (tgt != null)
targetPlayer = tgt.getTargetPlayers().get(0);
String Valid = ""; String Valid = "";
if (params.containsKey("ValidCards")) if (params.containsKey("ValidCards"))
@@ -678,6 +691,10 @@ public class AbilityFactory_Destroy {
CardList list = AllZoneUtil.getCardsIn(Zone.Battlefield); CardList list = AllZoneUtil.getCardsIn(Zone.Battlefield);
if (targetPlayer != null) {
list = list.getController(targetPlayer);
}
list = AbilityFactory.filterListByType(list, Valid, sa); list = AbilityFactory.filterListByType(list, Valid, sa);
boolean remDestroyed = params.containsKey("RememberDestroyed"); boolean remDestroyed = params.containsKey("RememberDestroyed");