mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Convert Harbingers to Trigger
- Warning/moveTo cleanups
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
Name:Boggart Harbinger
|
Name:Boggart Harbinger
|
||||||
ManaCost:2 B
|
ManaCost:2 B
|
||||||
Types:Creature Goblin Shaman
|
Types:Creature Goblin Shaman
|
||||||
Text:When Boggart Harbinger enters the battlefield, you may search your library for a Goblin card, reveal it, then shuffle your library and put that card on top of it.
|
Text:no text
|
||||||
PT:2/1
|
PT:2/1
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for a Goblin card, reveal it, then shuffle your library and put that card on top of it.
|
||||||
|
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | ChangeType$ Goblin | ChangeNum$ 1
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/boggart_harbinger.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/boggart_harbinger.jpg
|
||||||
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/102.jpg
|
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/102.jpg
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
Name:Elvish Harbinger
|
Name:Elvish Harbinger
|
||||||
ManaCost:2 G
|
ManaCost:2 G
|
||||||
Types:Creature Elf Druid
|
Types:Creature Elf Druid
|
||||||
Text:When Elvish Harbinger enters the battlefield, you may search your library for an Elf card, reveal it, then shuffle your library and put that card on top of it.
|
Text:no text
|
||||||
PT:1/2
|
PT:1/2
|
||||||
A:AB$Mana|Cost$T|Produced$W|SpellDescription$Add W to your mana pool.
|
A:AB$Mana | Cost$T | Produced$W | SpellDescription$Add W to your mana pool.
|
||||||
A:AB$Mana|Cost$T|Produced$B|SpellDescription$Add B to your mana pool.
|
A:AB$Mana | Cost$T | Produced$B | SpellDescription$Add B to your mana pool.
|
||||||
A:AB$Mana|Cost$T|Produced$U|SpellDescription$Add U to your mana pool.
|
A:AB$Mana | Cost$T | Produced$U | SpellDescription$Add U to your mana pool.
|
||||||
A:AB$Mana|Cost$T|Produced$R|SpellDescription$Add R to your mana pool.
|
A:AB$Mana | Cost$T | Produced$R | SpellDescription$Add R to your mana pool.
|
||||||
A:AB$Mana|Cost$T|Produced$G|SpellDescription$Add G to your mana pool.
|
A:AB$Mana | Cost$T | Produced$G | SpellDescription$Add G to your mana pool.
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for an Elf card, reveal it, then shuffle your library and put that card on top of it.
|
||||||
|
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | ChangeType$ Elf | ChangeNum$ 1
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/elvish_harbinger.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/elvish_harbinger.jpg
|
||||||
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/207.jpg
|
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/207.jpg
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
Name:Faerie Harbinger
|
Name:Faerie Harbinger
|
||||||
ManaCost:3 U
|
ManaCost:3 U
|
||||||
Types:Creature Faerie Wizard
|
Types:Creature Faerie Wizard
|
||||||
Text:When Faerie Harbinger enters the battlefield, you may search your library for a Faerie card, reveal it, then shuffle your library and put that card on top of it.
|
Text:no text
|
||||||
PT:2/2
|
PT:2/2
|
||||||
K:Flying
|
K:Flying
|
||||||
K:Flash
|
K:Flash
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for a Merfolk card, reveal it, then shuffle your library and put that card on top of it.
|
||||||
|
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | ChangeType$ Merfolk | ChangeNum$ 1
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/faerie_harbinger.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/faerie_harbinger.jpg
|
||||||
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/61.jpg
|
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/61.jpg
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
Name:Flamekin Harbinger
|
Name:Flamekin Harbinger
|
||||||
ManaCost:R
|
ManaCost:R
|
||||||
Types:Creature Elemental Shaman
|
Types:Creature Elemental Shaman
|
||||||
Text:When Flamekin Harbinger enters the battlefield, you may search your library for an Elemental card, reveal it, then shuffle your library and put that card on top of it.
|
Text:no text
|
||||||
PT:1/1
|
PT:1/1
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for a Elemental card, reveal it, then shuffle your library and put that card on top of it.
|
||||||
|
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | ChangeType$ Elemental | ChangeNum$ 1
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/flamekin_harbinger.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/flamekin_harbinger.jpg
|
||||||
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/167.jpg
|
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/167.jpg
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
Name:Giant Harbinger
|
Name:Giant Harbinger
|
||||||
ManaCost:4 R
|
ManaCost:4 R
|
||||||
Types:Creature Giant
|
Types:Creature Giant
|
||||||
Text:When Giant Harbinger enters the battlefield, you may search your library for a Giant card, reveal it, then shuffle your library and put that card on top of it.
|
Text:no text
|
||||||
PT:3/4
|
PT:3/4
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for a Giant card, reveal it, then shuffle your library and put that card on top of it.
|
||||||
|
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | ChangeType$ Giant | ChangeNum$ 1
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/giant_harbinger.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/giant_harbinger.jpg
|
||||||
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/169.jpg
|
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/169.jpg
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
Name:Kithkin Harbinger
|
Name:Kithkin Harbinger
|
||||||
ManaCost:2 W
|
ManaCost:2 W
|
||||||
Types:Creature Kithkin Wizard
|
Types:Creature Kithkin Wizard
|
||||||
Text:When CARDNAME enters the battlefield, you may search your library for a Kithkin card, reveal it, then shuffle your library and put that card on top of it.
|
Text:no text
|
||||||
PT:1/3
|
PT:1/3
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for a Goblin card, reveal it, then shuffle your library and put that card on top of it.
|
||||||
|
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | ChangeType$ Kithkin | ChangeNum$ 1
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/kithkin_harbinger.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/kithkin_harbinger.jpg
|
||||||
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/26.jpg
|
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/26.jpg
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
Name:Merrow Harbinger
|
Name:Merrow Harbinger
|
||||||
ManaCost:3 U
|
ManaCost:3 U
|
||||||
Types:Creature Merfolk Wizard
|
Types:Creature Merfolk Wizard
|
||||||
Text:When Merrow Harbinger enters the battlefield, you may search your library for a Merfolk card, reveal it, then shuffle your library and put that card on top of it.
|
Text:no text
|
||||||
PT:2/3
|
PT:2/3
|
||||||
K:Islandwalk
|
K:Islandwalk
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for a Merfolk card, reveal it, then shuffle your library and put that card on top of it.
|
||||||
|
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | ChangeType$ Merfolk | ChangeNum$ 1
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/merrow_harbinger.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/merrow_harbinger.jpg
|
||||||
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/73.jpg
|
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/73.jpg
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
Name:Treefolk Harbinger
|
Name:Treefolk Harbinger
|
||||||
ManaCost:G
|
ManaCost:G
|
||||||
Types:Creature Treefolk Druid
|
Types:Creature Treefolk Druid
|
||||||
Text:When CARDNAME enters the battlefield, you may search your library for a Treefolk or Forest card, reveal it, then shuffle your library and put that card on top of it.
|
Text:no text
|
||||||
PT:0/3
|
PT:0/3
|
||||||
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for a Treefolk or Forest card, reveal it, then shuffle your library and put that card on top of it.
|
||||||
|
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | ChangeType$ Treefolk,Forest | ChangeNum$ 1
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/treefolk_harbinger.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/treefolk_harbinger.jpg
|
||||||
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/239.jpg
|
SetInfo:LRW|Uncommon|http://magiccards.info/scans/en/lw/239.jpg
|
||||||
|
|||||||
@@ -710,7 +710,6 @@ public class AbilityFactory {
|
|||||||
String defined = (def == null) ? "Self" : def;
|
String defined = (def == null) ? "Self" : def;
|
||||||
|
|
||||||
if (defined.equals("Targeted")){
|
if (defined.equals("Targeted")){
|
||||||
Target tgt = sa.getTarget();
|
|
||||||
SpellAbility parent = sa;
|
SpellAbility parent = sa;
|
||||||
do{
|
do{
|
||||||
parent = ((Ability_Sub)parent).getParent();
|
parent = ((Ability_Sub)parent).getParent();
|
||||||
|
|||||||
@@ -5992,10 +5992,7 @@ public class CardFactory implements NewConstants {
|
|||||||
final Ability ability1 = new Ability(card, "0") {
|
final Ability ability1 = new Ability(card, "0") {
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
|
|
||||||
//String player = card.getController();
|
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, AllZone.HumanPlayer);
|
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, AllZone.HumanPlayer);
|
||||||
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, AllZone.HumanPlayer);
|
|
||||||
|
|
||||||
if(hand.size() == 0) return;
|
if(hand.size() == 0) return;
|
||||||
|
|
||||||
@@ -6013,9 +6010,7 @@ public class CardFactory implements NewConstants {
|
|||||||
creatures.toArray());
|
creatures.toArray());
|
||||||
if(o != null) {
|
if(o != null) {
|
||||||
Card c = (Card) o;
|
Card c = (Card) o;
|
||||||
hand.remove(c);
|
AllZone.Stack.add(c.getSpellPermanent());
|
||||||
play.add(c);
|
|
||||||
c.setSickness(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -968,7 +968,6 @@ public class CardFactoryUtil {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public static SpellAbility ability_Morph_Down(final Card sourceCard) {
|
public static SpellAbility ability_Morph_Down(final Card sourceCard) {
|
||||||
final Player player = sourceCard.getController();
|
|
||||||
final SpellAbility morph_down = new Spell(sourceCard) {
|
final SpellAbility morph_down = new Spell(sourceCard) {
|
||||||
private static final long serialVersionUID = -1438810964807867610L;
|
private static final long serialVersionUID = -1438810964807867610L;
|
||||||
|
|
||||||
|
|||||||
@@ -5864,114 +5864,6 @@ public class CardFactory_Creatures {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Kithkin Harbinger")) {
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
if(AllZone.GameAction.isCardInZone(getTargetCard(), lib)) {
|
|
||||||
Card c = getTargetCard();
|
|
||||||
card.getController().shuffle();
|
|
||||||
lib.remove(c);
|
|
||||||
lib.add(c, 0);
|
|
||||||
if (card.getController().isPlayer(AllZone.ComputerPlayer))
|
|
||||||
GuiUtils.getChoiceOptional(card + " - Computer picked:", c);
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
};
|
|
||||||
Command intoPlay = new Command() {
|
|
||||||
private static final long serialVersionUID = 4022442363194287539L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
CardList cards = new CardList(lib.getCards());
|
|
||||||
CardList kithkin = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if(cards.get(i).isType("Kithkin")) {
|
|
||||||
kithkin.add(cards.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Player controller = card.getController();
|
|
||||||
|
|
||||||
if(kithkin.size() == 0) return;
|
|
||||||
|
|
||||||
if(controller.equals(AllZone.HumanPlayer)) {
|
|
||||||
Object o = GuiUtils.getChoiceOptional("Select target card", kithkin.toArray());
|
|
||||||
if(o != null) {
|
|
||||||
ability.setTargetCard((Card) o);
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
} else //computer
|
|
||||||
{
|
|
||||||
kithkin.shuffle();
|
|
||||||
ability.setTargetCard(kithkin.get(0));
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};//Command
|
|
||||||
card.addComesIntoPlayCommand(intoPlay);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Treefolk Harbinger")) {
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
if(AllZone.GameAction.isCardInZone(getTargetCard(), lib)) {
|
|
||||||
Card c = getTargetCard();
|
|
||||||
card.getController().shuffle();
|
|
||||||
lib.remove(c);
|
|
||||||
lib.add(c, 0);
|
|
||||||
if (card.getController().isPlayer(AllZone.ComputerPlayer))
|
|
||||||
GuiUtils.getChoiceOptional(card + " - Computer picked:", c);
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
};
|
|
||||||
Command intoPlay = new Command() {
|
|
||||||
private static final long serialVersionUID = 9170723718484515120L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
CardList cards = new CardList(lib.getCards());
|
|
||||||
CardList treefolkForests = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if((cards.get(i).getType().contains("Treefolk") || cards.get(i).getKeyword().contains(
|
|
||||||
"Changeling"))
|
|
||||||
|| cards.get(i).getType().contains("Forest")) {
|
|
||||||
treefolkForests.add(cards.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Player controller = card.getController();
|
|
||||||
|
|
||||||
if(treefolkForests.size() == 0) return;
|
|
||||||
|
|
||||||
if(controller.equals(AllZone.HumanPlayer)) {
|
|
||||||
Object o = GuiUtils.getChoiceOptional("Select target card",
|
|
||||||
treefolkForests.toArray());
|
|
||||||
if(o != null) {
|
|
||||||
ability.setTargetCard((Card) o);
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
} else //computer
|
|
||||||
{
|
|
||||||
treefolkForests.shuffle();
|
|
||||||
ability.setTargetCard(treefolkForests.get(0));
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};//Command
|
|
||||||
card.addComesIntoPlayCommand(intoPlay);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Knight of the White Orchid")) {
|
else if(cardName.equals("Knight of the White Orchid")) {
|
||||||
final Ability ability = new Ability(card, "0") {
|
final Ability ability = new Ability(card, "0") {
|
||||||
@@ -8431,168 +8323,6 @@ public class CardFactory_Creatures {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Boggart Harbinger")) {
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
if(AllZone.GameAction.isCardInZone(getTargetCard(), lib)) {
|
|
||||||
Card c = getTargetCard();
|
|
||||||
card.getController().shuffle();
|
|
||||||
lib.remove(c);
|
|
||||||
lib.add(c, 0);
|
|
||||||
if (card.getController().isPlayer(AllZone.ComputerPlayer))
|
|
||||||
GuiUtils.getChoiceOptional(card + " - Computer picked:", c);
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
};
|
|
||||||
Command intoPlay = new Command() {
|
|
||||||
private static final long serialVersionUID = 4022442363194287539L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
CardList cards = new CardList(lib.getCards());
|
|
||||||
CardList goblins = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if(cards.get(i).getType().contains("Goblin")
|
|
||||||
|| cards.get(i).getKeyword().contains("Changeling")) {
|
|
||||||
goblins.add(cards.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Player controller = card.getController();
|
|
||||||
|
|
||||||
if(goblins.size() == 0) return;
|
|
||||||
|
|
||||||
if(controller.equals(AllZone.HumanPlayer)) {
|
|
||||||
Object o = GuiUtils.getChoiceOptional("Select target card", goblins.toArray());
|
|
||||||
if(o != null) {
|
|
||||||
ability.setTargetCard((Card) o);
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
} else //computer
|
|
||||||
{
|
|
||||||
goblins.shuffle();
|
|
||||||
ability.setTargetCard(goblins.get(0));
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};//Command
|
|
||||||
card.addComesIntoPlayCommand(intoPlay);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Merrow Harbinger")) {
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
if(AllZone.GameAction.isCardInZone(getTargetCard(), lib)) {
|
|
||||||
Card c = getTargetCard();
|
|
||||||
card.getController().shuffle();
|
|
||||||
lib.remove(c);
|
|
||||||
lib.add(c, 0);
|
|
||||||
if (card.getController().isPlayer(AllZone.ComputerPlayer))
|
|
||||||
GuiUtils.getChoiceOptional(card + " - Computer picked:", c);
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
};
|
|
||||||
Command intoPlay = new Command() {
|
|
||||||
private static final long serialVersionUID = 4022442363194287539L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
CardList cards = new CardList(lib.getCards());
|
|
||||||
CardList merfolk = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if(cards.get(i).getType().contains("Merfolk")
|
|
||||||
|| cards.get(i).getKeyword().contains("Changeling")) {
|
|
||||||
merfolk.add(cards.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Player controller = card.getController();
|
|
||||||
|
|
||||||
if(merfolk.size() == 0) return;
|
|
||||||
|
|
||||||
if(controller.equals(AllZone.HumanPlayer)) {
|
|
||||||
Object o = GuiUtils.getChoiceOptional("Select target card", merfolk.toArray());
|
|
||||||
if(o != null) {
|
|
||||||
ability.setTargetCard((Card) o);
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
} else //computer
|
|
||||||
{
|
|
||||||
merfolk.shuffle();
|
|
||||||
ability.setTargetCard(merfolk.get(0));
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};//Command
|
|
||||||
card.addComesIntoPlayCommand(intoPlay);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Elvish Harbinger")) {
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
if(AllZone.GameAction.isCardInZone(getTargetCard(), lib)) {
|
|
||||||
Card c = getTargetCard();
|
|
||||||
card.getController().shuffle();
|
|
||||||
lib.remove(c);
|
|
||||||
lib.add(c, 0);
|
|
||||||
if (card.getController().isPlayer(AllZone.ComputerPlayer))
|
|
||||||
GuiUtils.getChoiceOptional(card + " - Computer picked:", c);
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
};
|
|
||||||
Command intoPlay = new Command() {
|
|
||||||
private static final long serialVersionUID = 4022442363194287539L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
CardList cards = new CardList(lib.getCards());
|
|
||||||
CardList elves = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if(cards.get(i).getType().contains("Elf")
|
|
||||||
|| cards.get(i).getKeyword().contains("Changeling")) {
|
|
||||||
elves.add(cards.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Player controller = card.getController();
|
|
||||||
|
|
||||||
if(elves.size() == 0) return;
|
|
||||||
|
|
||||||
if(controller.equals(AllZone.HumanPlayer)) {
|
|
||||||
Object o = GuiUtils.getChoiceOptional("Select target card", elves.toArray());
|
|
||||||
if(o != null) {
|
|
||||||
ability.setTargetCard((Card) o);
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
} else //computer
|
|
||||||
{
|
|
||||||
elves.shuffle();
|
|
||||||
ability.setTargetCard(elves.get(0));
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};//Command
|
|
||||||
card.addComesIntoPlayCommand(intoPlay);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Vendilion Clique")) {
|
else if(cardName.equals("Vendilion Clique")) {
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
final SpellAbility ability = new Ability(card, "0") {
|
||||||
@@ -8652,169 +8382,6 @@ public class CardFactory_Creatures {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Faerie Harbinger")) {
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
if(AllZone.GameAction.isCardInZone(getTargetCard(), lib)) {
|
|
||||||
Card c = getTargetCard();
|
|
||||||
card.getController().shuffle();
|
|
||||||
lib.remove(c);
|
|
||||||
lib.add(c, 0);
|
|
||||||
if (card.getController().isPlayer(AllZone.ComputerPlayer))
|
|
||||||
GuiUtils.getChoiceOptional(card + " - Computer picked:", c);
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
};
|
|
||||||
Command intoPlay = new Command() {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = -708639335039567945L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
CardList cards = new CardList(lib.getCards());
|
|
||||||
CardList faeries = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if(cards.get(i).getType().contains("Faerie")
|
|
||||||
|| cards.get(i).getKeyword().contains("Changeling")) {
|
|
||||||
faeries.add(cards.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Player controller = card.getController();
|
|
||||||
|
|
||||||
if(faeries.size() == 0) return;
|
|
||||||
|
|
||||||
if(controller.equals(AllZone.HumanPlayer)) {
|
|
||||||
Object o = GuiUtils.getChoiceOptional("Select target card", faeries.toArray());
|
|
||||||
if(o != null) {
|
|
||||||
ability.setTargetCard((Card) o);
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
} else //computer
|
|
||||||
{
|
|
||||||
faeries.shuffle();
|
|
||||||
ability.setTargetCard(faeries.get(0));
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};//Command
|
|
||||||
card.addComesIntoPlayCommand(intoPlay);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Flamekin Harbinger")) {
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
if(AllZone.GameAction.isCardInZone(getTargetCard(), lib)) {
|
|
||||||
Card c = getTargetCard();
|
|
||||||
card.getController().shuffle();
|
|
||||||
lib.remove(c);
|
|
||||||
lib.add(c, 0);
|
|
||||||
if (card.getController().isPlayer(AllZone.ComputerPlayer))
|
|
||||||
GuiUtils.getChoiceOptional(card + " - Computer picked:", c);
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
};
|
|
||||||
Command intoPlay = new Command() {
|
|
||||||
private static final long serialVersionUID = 7114265436722599216L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
CardList cards = new CardList(lib.getCards());
|
|
||||||
CardList ele = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if(cards.get(i).getType().contains("Elemental")
|
|
||||||
|| cards.get(i).getKeyword().contains("Changeling")) {
|
|
||||||
ele.add(cards.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Player controller = card.getController();
|
|
||||||
|
|
||||||
if(ele.size() == 0) return;
|
|
||||||
|
|
||||||
if(controller.equals(AllZone.HumanPlayer)) {
|
|
||||||
Object o = GuiUtils.getChoiceOptional("Select target card", ele.toArray());
|
|
||||||
if(o != null) {
|
|
||||||
ability.setTargetCard((Card) o);
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
} else //computer
|
|
||||||
{
|
|
||||||
ele.shuffle();
|
|
||||||
ability.setTargetCard(ele.get(0));
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};//Command
|
|
||||||
card.addComesIntoPlayCommand(intoPlay);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Giant Harbinger")) {
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
if(AllZone.GameAction.isCardInZone(getTargetCard(), lib)) {
|
|
||||||
Card c = getTargetCard();
|
|
||||||
card.getController().shuffle();
|
|
||||||
lib.remove(c);
|
|
||||||
lib.add(c, 0);
|
|
||||||
if (card.getController().isPlayer(AllZone.ComputerPlayer))
|
|
||||||
GuiUtils.getChoiceOptional(card + " - Computer picked:", c);
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
};
|
|
||||||
Command intoPlay = new Command() {
|
|
||||||
private static final long serialVersionUID = -2671592749882297551L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
CardList cards = new CardList(lib.getCards());
|
|
||||||
CardList giants = new CardList();
|
|
||||||
|
|
||||||
for(int i = 0; i < cards.size(); i++) {
|
|
||||||
if(cards.get(i).getType().contains("Giant")
|
|
||||||
|| cards.get(i).getKeyword().contains("Changeling")) {
|
|
||||||
giants.add(cards.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Player controller = card.getController();
|
|
||||||
|
|
||||||
if(giants.size() == 0) return;
|
|
||||||
|
|
||||||
if(controller.equals(AllZone.HumanPlayer)) {
|
|
||||||
Object o = GuiUtils.getChoiceOptional("Select target card", giants.toArray());
|
|
||||||
if(o != null) {
|
|
||||||
ability.setTargetCard((Card) o);
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
} else //computer
|
|
||||||
{
|
|
||||||
giants.shuffle();
|
|
||||||
ability.setTargetCard(giants.get(0));
|
|
||||||
AllZone.Stack.add(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};//Command
|
|
||||||
card.addComesIntoPlayCommand(intoPlay);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Kor Cartographer")) {
|
else if(cardName.equals("Kor Cartographer")) {
|
||||||
final Ability ab1 = new Ability(card, "no cost") {
|
final Ability ab1 = new Ability(card, "no cost") {
|
||||||
|
|||||||
@@ -1630,7 +1630,6 @@ class CardFactory_Planeswalkers {
|
|||||||
|
|
||||||
public void humanResolve() {
|
public void humanResolve() {
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, AllZone.HumanPlayer);
|
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, AllZone.HumanPlayer);
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, AllZone.HumanPlayer);
|
|
||||||
|
|
||||||
CardList putOnTop = new CardList(hand.getCards());
|
CardList putOnTop = new CardList(hand.getCards());
|
||||||
|
|
||||||
|
|||||||
@@ -2430,19 +2430,14 @@ public class CardFactory_Sorceries {
|
|||||||
}//computerResolve()
|
}//computerResolve()
|
||||||
|
|
||||||
public void resolve(Card selectedCard) {
|
public void resolve(Card selectedCard) {
|
||||||
Player opponent = card.getController().getOpponent();
|
Player opponent = card.getController().getOpponent();
|
||||||
PlayerZone library = AllZone.getZone(Constant.Zone.Library, opponent);
|
|
||||||
|
|
||||||
Card c = selectedCard;
|
Card c = selectedCard;
|
||||||
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, card.getController());
|
|
||||||
|
|
||||||
//need to set controller before adding it to "play"
|
//need to set controller before adding it to "play"
|
||||||
c.setController(card.getController());
|
c.setController(card.getController());
|
||||||
c.setSickness(true);
|
c.setSickness(true);
|
||||||
|
|
||||||
library.remove(c);
|
AllZone.GameAction.moveToPlay(c, card.getController());
|
||||||
play.add(c);
|
|
||||||
|
|
||||||
|
|
||||||
opponent.shuffle();
|
opponent.shuffle();
|
||||||
}//resolve()
|
}//resolve()
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package forge;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
|
|
||||||
public class ComputerUtil
|
public class ComputerUtil
|
||||||
|
|||||||
@@ -223,6 +223,11 @@ public class GameAction {
|
|||||||
return moveTo(play, c);
|
return moveTo(play, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Card moveToPlay(Card c, Player p) {
|
||||||
|
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, p);
|
||||||
|
return moveTo(play, c);
|
||||||
|
}
|
||||||
|
|
||||||
public Card moveToBottomOfLibrary(Card c) {
|
public Card moveToBottomOfLibrary(Card c) {
|
||||||
return moveToLibrary(c, -1);
|
return moveToLibrary(c, -1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4071,23 +4071,20 @@ public class GameActionUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
// should check if Genesis is still there
|
// should check if Genesis is still there
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
|
|
||||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
|
||||||
if(player.equals(AllZone.HumanPlayer) && grave.size() > 0) {
|
if(player.equals(AllZone.HumanPlayer) && grave.size() > 0) {
|
||||||
CardList creatures = AllZoneUtil.getPlayerGraveyard(player);
|
CardList creatures = AllZoneUtil.getPlayerGraveyard(player);
|
||||||
creatures = creatures.filter(creatureFilter);
|
creatures = creatures.filter(creatureFilter);
|
||||||
Object creatureChoice = GuiUtils.getChoice("Creature to move to hand", creatures.toArray());
|
Object creatureChoice = GuiUtils.getChoice("Creature to move to hand", creatures.toArray());
|
||||||
Card creatureCard = (Card) creatureChoice;
|
Card creatureCard = (Card) creatureChoice;
|
||||||
graveyard.remove(creatureCard);
|
;
|
||||||
hand.add(creatureCard);
|
AllZone.GameAction.moveToHand(creatureCard);
|
||||||
//}//end choice="Yes"
|
//}//end choice="Yes"
|
||||||
}
|
}
|
||||||
else{ //computer resolve
|
else{ //computer resolve
|
||||||
CardList compCreatures = AllZoneUtil.getPlayerGraveyard(player);
|
CardList compCreatures = AllZoneUtil.getPlayerGraveyard(player);
|
||||||
compCreatures = compCreatures.filter(creatureFilter);
|
compCreatures = compCreatures.filter(creatureFilter);
|
||||||
Card target = CardFactoryUtil.AI_getBestCreature(compCreatures);
|
Card target = CardFactoryUtil.AI_getBestCreature(compCreatures);
|
||||||
graveyard.remove(target);
|
AllZone.GameAction.moveToHand(target);
|
||||||
hand.add(target);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -7859,7 +7856,6 @@ public class GameActionUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player);
|
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player);
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
|
|
||||||
|
|
||||||
CardList rats = new CardList(lib.getCards());
|
CardList rats = new CardList(lib.getCards());
|
||||||
rats = rats.getType("Rat");
|
rats = rats.getType("Rat");
|
||||||
@@ -7870,14 +7866,13 @@ public class GameActionUtil {
|
|||||||
rats.toArray());
|
rats.toArray());
|
||||||
if(o != null) {
|
if(o != null) {
|
||||||
Card card = (Card) o;
|
Card card = (Card) o;
|
||||||
lib.remove(card);
|
|
||||||
hand.add(card);
|
AllZone.GameAction.moveToHand(card);
|
||||||
}
|
}
|
||||||
} else if(player.equals(AllZone.ComputerPlayer)) {
|
} else if(player.equals(AllZone.ComputerPlayer)) {
|
||||||
Card card = rats.get(0);
|
Card card = rats.get(0);
|
||||||
lib.remove(card);
|
|
||||||
hand.add(card);
|
|
||||||
|
|
||||||
|
AllZone.GameAction.moveToHand(card);
|
||||||
}
|
}
|
||||||
player.shuffle();
|
player.shuffle();
|
||||||
}
|
}
|
||||||
@@ -8215,7 +8210,6 @@ public class GameActionUtil {
|
|||||||
if (player.isHuman()) {
|
if (player.isHuman()) {
|
||||||
Card c = library.get(0);
|
Card c = library.get(0);
|
||||||
AllZone.GameAction.playCardNoCost(c);
|
AllZone.GameAction.playCardNoCost(c);
|
||||||
library.remove(c);
|
|
||||||
}
|
}
|
||||||
// player isComputer()
|
// player isComputer()
|
||||||
else {
|
else {
|
||||||
@@ -9113,8 +9107,6 @@ public class GameActionUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
CardList graveyardCreatures = AllZoneUtil.getPlayerTypeInGraveyard(player, "Creature");
|
CardList graveyardCreatures = AllZoneUtil.getPlayerTypeInGraveyard(player, "Creature");
|
||||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
|
|
||||||
|
|
||||||
if(graveyardCreatures.size() >= 4) {
|
if(graveyardCreatures.size() >= 4) {
|
||||||
if(player.equals(AllZone.HumanPlayer)) {
|
if(player.equals(AllZone.HumanPlayer)) {
|
||||||
@@ -9122,14 +9114,13 @@ public class GameActionUtil {
|
|||||||
graveyardCreatures.toArray());
|
graveyardCreatures.toArray());
|
||||||
if(o != null) {
|
if(o != null) {
|
||||||
Card card = (Card) o;
|
Card card = (Card) o;
|
||||||
graveyard.remove(card);
|
|
||||||
hand.add(card);
|
AllZone.GameAction.moveToHand(card);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(player.equals(AllZone.ComputerPlayer)) {
|
else if(player.equals(AllZone.ComputerPlayer)) {
|
||||||
Card card = graveyardCreatures.get(0);
|
Card card = graveyardCreatures.get(0);
|
||||||
graveyard.remove(card);
|
AllZone.GameAction.moveToHand(card);
|
||||||
hand.add(card);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9156,7 +9147,6 @@ public class GameActionUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
|
||||||
|
|
||||||
CardList creatures = new CardList(graveyard.getCards());
|
CardList creatures = new CardList(graveyard.getCards());
|
||||||
creatures = creatures.getType("Creature");
|
creatures = creatures.getType("Creature");
|
||||||
@@ -9166,14 +9156,12 @@ public class GameActionUtil {
|
|||||||
creatures.toArray());
|
creatures.toArray());
|
||||||
if(o != null) {
|
if(o != null) {
|
||||||
Card card = (Card) o;
|
Card card = (Card) o;
|
||||||
graveyard.remove(card);
|
|
||||||
playZone.add(card);
|
AllZone.GameAction.moveToPlay(card);
|
||||||
}
|
}
|
||||||
} else if(player.equals(AllZone.ComputerPlayer)) {
|
} else if(player.equals(AllZone.ComputerPlayer)) {
|
||||||
Card card = creatures.get(0);
|
Card card = creatures.get(0);
|
||||||
graveyard.remove(card);
|
AllZone.GameAction.moveToPlay(card);
|
||||||
playZone.add(card);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9186,7 +9174,6 @@ public class GameActionUtil {
|
|||||||
private static void upkeep_Nether_Spirit() {
|
private static void upkeep_Nether_Spirit() {
|
||||||
final Player player = AllZone.Phase.getPlayerTurn();
|
final Player player = AllZone.Phase.getPlayerTurn();
|
||||||
final PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
final PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||||
final PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
|
||||||
|
|
||||||
CardList all = new CardList(graveyard.getCards());
|
CardList all = new CardList(graveyard.getCards());
|
||||||
all = all.getType("Creature");
|
all = all.getType("Creature");
|
||||||
@@ -9199,8 +9186,7 @@ public class GameActionUtil {
|
|||||||
Ability ability = new Ability(list.get(0), "0") {
|
Ability ability = new Ability(list.get(0), "0") {
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
graveyard.remove(nether);
|
AllZone.GameAction.moveToHand(nether);
|
||||||
playZone.add(nether);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -9507,8 +9493,6 @@ public class GameActionUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
CardList graveyardCreatures = AllZoneUtil.getPlayerTypeInGraveyard(player, "Creature");
|
CardList graveyardCreatures = AllZoneUtil.getPlayerTypeInGraveyard(player, "Creature");
|
||||||
PlayerZone graveyard = AllZone.getZone(Constant.Zone.Graveyard, player);
|
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
|
|
||||||
|
|
||||||
if(AllZoneUtil.compareTypeAmountInGraveyard(player, "Creature") > 0) {
|
if(AllZoneUtil.compareTypeAmountInGraveyard(player, "Creature") > 0) {
|
||||||
if(player.equals(AllZone.HumanPlayer)) {
|
if(player.equals(AllZone.HumanPlayer)) {
|
||||||
@@ -9516,14 +9500,14 @@ public class GameActionUtil {
|
|||||||
graveyardCreatures.toArray());
|
graveyardCreatures.toArray());
|
||||||
if(o != null) {
|
if(o != null) {
|
||||||
Card card = (Card) o;
|
Card card = (Card) o;
|
||||||
graveyard.remove(card);
|
|
||||||
hand.add(card);
|
AllZone.GameAction.moveToHand(card);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(player.equals(AllZone.ComputerPlayer)) {
|
else if(player.equals(AllZone.ComputerPlayer)) {
|
||||||
Card card = graveyardCreatures.get(0);
|
Card card = graveyardCreatures.get(0);
|
||||||
graveyard.remove(card);
|
|
||||||
hand.add(card);
|
AllZone.GameAction.moveToHand(card);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10320,6 +10304,7 @@ public class GameActionUtil {
|
|||||||
}//upkeep_Shapeshifter
|
}//upkeep_Shapeshifter
|
||||||
|
|
||||||
private static void upkeep_Vesuvan_Doppelganger_Keyword() {
|
private static void upkeep_Vesuvan_Doppelganger_Keyword() {
|
||||||
|
// todo: what about enchantments? i dont know how great this solution is
|
||||||
final Player player = AllZone.Phase.getPlayerTurn();
|
final Player player = AllZone.Phase.getPlayerTurn();
|
||||||
final String keyword = "At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color. If you do, this creature gains this ability.";
|
final String keyword = "At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color. If you do, this creature gains this ability.";
|
||||||
CardList list = AllZoneUtil.getPlayerCardsInPlay(player);
|
CardList list = AllZoneUtil.getPlayerCardsInPlay(player);
|
||||||
|
|||||||
@@ -328,7 +328,6 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, c.getController());
|
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, c.getController());
|
||||||
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, c.getController());
|
|
||||||
CardList meek = new CardList(grave.getCards());
|
CardList meek = new CardList(grave.getCards());
|
||||||
|
|
||||||
meek = meek.getName("Sword of the Meek");
|
meek = meek.getName("Sword of the Meek");
|
||||||
@@ -338,7 +337,7 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone {
|
|||||||
final Card crd = meek.get(i);
|
final Card crd = meek.get(i);
|
||||||
final Card creat = c;
|
final Card creat = c;
|
||||||
final PlayerZone graveZone = grave;
|
final PlayerZone graveZone = grave;
|
||||||
final PlayerZone playZone = play;
|
|
||||||
Ability ability = new Ability(meek.get(i), "0") {
|
Ability ability = new Ability(meek.get(i), "0") {
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
@@ -347,8 +346,7 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone {
|
|||||||
if(AllZone.GameAction.isCardInZone(crd, graveZone)
|
if(AllZone.GameAction.isCardInZone(crd, graveZone)
|
||||||
&& AllZone.GameAction.isCardInPlay(creat) && creat.isCreature()
|
&& AllZone.GameAction.isCardInPlay(creat) && creat.isCreature()
|
||||||
&& creat.getNetAttack() == 1 && creat.getNetDefense() == 1) {
|
&& creat.getNetAttack() == 1 && creat.getNetDefense() == 1) {
|
||||||
graveZone.remove(crd);
|
AllZone.GameAction.moveToPlay(crd);
|
||||||
playZone.add(crd);
|
|
||||||
|
|
||||||
crd.equipCard(creat);
|
crd.equipCard(creat);
|
||||||
}
|
}
|
||||||
@@ -359,8 +357,7 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone {
|
|||||||
if(AllZone.GameAction.isCardInZone(crd, graveZone)
|
if(AllZone.GameAction.isCardInZone(crd, graveZone)
|
||||||
&& AllZone.GameAction.isCardInPlay(creat) && creat.isCreature()
|
&& AllZone.GameAction.isCardInPlay(creat) && creat.isCreature()
|
||||||
&& creat.getNetAttack() == 1 && creat.getNetDefense() == 1) {
|
&& creat.getNetAttack() == 1 && creat.getNetDefense() == 1) {
|
||||||
graveZone.remove(crd);
|
AllZone.GameAction.moveToPlay(crd);
|
||||||
playZone.add(crd);
|
|
||||||
|
|
||||||
crd.equipCard(creat);
|
crd.equipCard(creat);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ public class SpellAbility_Requirements {
|
|||||||
// cancel ability during target choosing
|
// cancel ability during target choosing
|
||||||
Card c = ability.getSourceCard();
|
Card c = ability.getSourceCard();
|
||||||
if (bCasting && !c.isCopiedSpell()){ // and not a copy
|
if (bCasting && !c.isCopiedSpell()){ // and not a copy
|
||||||
// add back to hand
|
// add back to where it came from
|
||||||
AllZone.GameAction.moveToHand(c);
|
AllZone.GameAction.moveTo(fromZone, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
select.resetTargets();
|
select.resetTargets();
|
||||||
@@ -78,8 +78,8 @@ public class SpellAbility_Requirements {
|
|||||||
else if (payment.isCanceled()){
|
else if (payment.isCanceled()){
|
||||||
Card c = ability.getSourceCard();
|
Card c = ability.getSourceCard();
|
||||||
if (bCasting && !c.isCopiedSpell()){ // and not a copy
|
if (bCasting && !c.isCopiedSpell()){ // and not a copy
|
||||||
// add back to hand
|
// add back to Previous Zone
|
||||||
AllZone.GameAction.moveToHand(c);
|
AllZone.GameAction.moveTo(fromZone, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (select != null)
|
if (select != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user