mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
convert Grim Tutor to AF_ChangeZone
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
Name:Grim Tutor
|
Name:Grim Tutor
|
||||||
ManaCost:1 B B
|
ManaCost:1 B B
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
Text:Search your library for a card and put that card into your hand. Then shuffle your library. You lose 3 life.
|
Text:no text
|
||||||
|
A:SP$ChangeZone | Cost$ 1 B B| Origin$ Library | Destination$ Hand | ChangeType$ Card | ChangeNum$ 1 | SpellDescription$ Search your library for a card and put that card into your hand, then shuffle your library. You lose 3 life.| SubAbility$YouLoseLife/3
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/grim_tutor.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/grim_tutor.jpg
|
||||||
SetInfo:S99|Rare|http://magiccards.info/scans/en/st/79.jpg
|
SetInfo:S99|Rare|http://magiccards.info/scans/en/st/79.jpg
|
||||||
|
|||||||
@@ -416,72 +416,6 @@ public class CardFactory_Sorceries {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Grim Tutor")) {
|
|
||||||
final SpellAbility spell = new Spell(card) {
|
|
||||||
private static final long serialVersionUID = 1481169060428051519L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
Player player = card.getController();
|
|
||||||
if(player.equals(AllZone.HumanPlayer)) humanResolve();
|
|
||||||
else computerResolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void humanResolve() {
|
|
||||||
Object check = AllZone.Display.getChoiceOptional("Select card",
|
|
||||||
AllZone.Human_Library.getCards());
|
|
||||||
if(check != null) {
|
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
|
|
||||||
AllZone.GameAction.moveTo(hand, (Card) check);
|
|
||||||
}
|
|
||||||
AllZone.HumanPlayer.shuffle();
|
|
||||||
|
|
||||||
//lose 3 life
|
|
||||||
if(cardName.equals("Grim Tutor")) {
|
|
||||||
Player player = AllZone.HumanPlayer;
|
|
||||||
player.loseLife(3, card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void computerResolve() {
|
|
||||||
Card[] library = AllZone.Computer_Library.getCards();
|
|
||||||
CardList list = new CardList(library);
|
|
||||||
|
|
||||||
//pick best creature
|
|
||||||
Card c = CardFactoryUtil.AI_getBestCreature(list);
|
|
||||||
if(c == null) c = library[0];
|
|
||||||
AllZone.Computer_Library.remove(c);
|
|
||||||
AllZone.Computer_Hand.add(c);
|
|
||||||
|
|
||||||
//lose 3 life
|
|
||||||
if(cardName.equals("Grim Tutor")) {
|
|
||||||
Player player = AllZone.ComputerPlayer;
|
|
||||||
player.loseLife(3, card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlay() {
|
|
||||||
PlayerZone library = AllZone.getZone(Constant.Zone.Library, card.getController());
|
|
||||||
|
|
||||||
return library.getCards().length != 0
|
|
||||||
&& Phase.canCastSorcery(card.getController()) && super.canPlay();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
CardList creature = new CardList();
|
|
||||||
creature.addAll(AllZone.Computer_Library.getCards());
|
|
||||||
creature = creature.getType("Creature");
|
|
||||||
return creature.size() != 0;
|
|
||||||
}
|
|
||||||
};//SpellAbility
|
|
||||||
card.clearSpellAbility();
|
|
||||||
card.addSpellAbility(spell);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Do or Die")) {
|
else if(cardName.equals("Do or Die")) {
|
||||||
final SpellAbility spell = new Spell(card) {
|
final SpellAbility spell = new Spell(card) {
|
||||||
|
|||||||
Reference in New Issue
Block a user