mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Converted Tithe to script.
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
Name:Tithe
|
||||
ManaCost:W
|
||||
Types:Instant
|
||||
Text:Search your library for a Plains card. If you control fewer lands than an opponent, you may search your library for an additional Plains card. Put them into your hand.
|
||||
Text:no text
|
||||
A:SP$ ChangeZone | Cost$ W | Origin$ Library | Destination$ Hand | ChangeType$ Plains | ChangeNum$ 1 | Shuffle$ True | SpellDescription$ Search your library for a Plains card.
|
||||
A:SP$ ChangeZone | Cost$ W | Origin$ Library | Destination$ Hand | ChangeType$ Plains | ChangeNum$ 2 | Shuffle$ True | IsPresent$ Land.YouCtrl | PresentCompare$ LTX | SpellDescription$ If you control fewer lands than an opponent, you may search your library for an additional Plains card. Reveal those cards and put them into your hand. Then shuffle your library.
|
||||
SVar:X:Count$Valid Land.YouDontCtrl
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://resources.wizards.com/magic/cards/vi/en-us/card3730.jpg
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/tithe.jpg
|
||||
SetInfo:VIS|Rare|http://magiccards.info/scans/en/vi/123.jpg
|
||||
End
|
||||
@@ -456,35 +456,6 @@ public class CardFactory_Instants {
|
||||
card.setSVar("PlayMain1", "TRUE");
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Hidetsugu's Second Rite")) {
|
||||
Target t = new Target(card, "Select target player", "Player");
|
||||
Cost cost = new Cost("3 R", cardName, false);
|
||||
final SpellAbility spell = new Spell(card, cost, t) {
|
||||
private static final long serialVersionUID = 176857775451818523L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
if(getTargetPlayer().getLife() == 10) {
|
||||
getTargetPlayer().addDamage(10, card);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return AllZone.HumanPlayer.getLife() == 10;
|
||||
}
|
||||
|
||||
};
|
||||
spell.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
|
||||
|
||||
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
|
||||
card.clearFirstSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
|
||||
card.setSVar("PlayMain1", "TRUE");
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
@@ -789,36 +760,7 @@ public class CardFactory_Instants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Tithe")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 1504792204536793942L;
|
||||
|
||||
public boolean oppMoreLand() {
|
||||
Player player = card.getController();
|
||||
CardList self = AllZoneUtil.getPlayerLandsInPlay(player);
|
||||
CardList opp = AllZoneUtil.getPlayerLandsInPlay(player.getOpponent());
|
||||
|
||||
return (self.size() < opp.size()); // && super.canPlay();
|
||||
}//oppoMoreLand()
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
CardList plains = AllZoneUtil.getPlayerCardsInLibrary(card.getController());
|
||||
plains = plains.getType("Plains");
|
||||
|
||||
if(0 < plains.size()) AllZone.GameAction.moveToHand(plains.get(0));
|
||||
|
||||
if(oppMoreLand() && 1 < plains.size()) AllZone.GameAction.moveToHand(plains.get(1));
|
||||
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
|
||||
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
|
||||
card.clearFirstSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Echoing Courage"))
|
||||
|
||||
Reference in New Issue
Block a user