convert a few more things to Ability_Cost

This commit is contained in:
jendave
2011-08-06 13:48:09 +00:00
parent 8679e1bdb1
commit 15e19b9ae2
4 changed files with 7 additions and 67 deletions

View File

@@ -1,7 +1,7 @@
Name:Information Dealer
ManaCost:1 U
Types:Creature Human Wizard
Text:Tap: Look at the top X cards of your library, where X is the number of Wizards on the battlefield, then put them back in any order.
Text:no text
PT:1/1
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/information_dealer.jpg

View File

@@ -3,6 +3,7 @@ ManaCost:B R G
Types:Creature Lizard
Text:no text
PT:2/2
A:AB$PutCounter|Cost$ Sac<1/Creature>|CounterType$P1P1|CounterNum$1|SpellDescription$Put a +1/+1 counter on CARDNAME.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/scarland_thrinax.jpg
SetInfo:CFX|Uncommon|http://magiccards.info/scans/en/cfx/123.jpg

View File

@@ -10227,68 +10227,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Scarland Thrinax")) {
final SpellAbility a2 = new Ability(card, "0") {
@Override
public void resolve() {
Card c = getTargetCard();
if(AllZone.GameAction.isCardInPlay(c)) {
//AllZone.getZone(c).remove(c);
AllZone.GameAction.sacrifice(c);
if(AllZone.GameAction.isCardInPlay(card)) card.addCounter(Counters.P1P1, 1);
}
}
@Override
public boolean canPlayAI() {
return false;
}
@Override
public boolean canPlay() {
SpellAbility sa;
//this is a hack, check the stack to see if this card has an ability on the stack
//if so, we can't use the ability: this is to prevent using a limited ability too many times
for(int i = 0; i < AllZone.Stack.size(); i++) {
sa = AllZone.Stack.peek(i);
if(sa.getSourceCard().equals(card)) return false;
}
if(super.canPlay()) return true;
return false;
}
};//SpellAbility
Input runtime = new Input() {
private static final long serialVersionUID = 8445133749305465286L;
@Override
public void showMessage() {
CardList creats = new CardList(
AllZone.getZone(Constant.Zone.Battlefield, card.getController()).getCards());
creats = creats.getType("Creature");
stopSetNext(CardFactoryUtil.input_targetSpecific(a2, creats,
"Select a creature to sacrifice.", false, false));
}
};
card.addSpellAbility(a2);
StringBuilder sbDesc = new StringBuilder();
sbDesc.append("Sacrifice a creature: Put a +1/+1 counter on ").append(card.getName()).append(".");
a2.setDescription(sbDesc.toString());
StringBuilder sbStack = new StringBuilder();
sbStack.append(card.getName()).append(" gets a +1/+1 counter.");
a2.setStackDescription(sbStack.toString());
a2.setBeforePayMana(runtime);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Feral Hydra")) {

View File

@@ -12003,8 +12003,9 @@ public class GameActionUtil {
}
if(!hasAbility) {
final Ability_Tap ability = new Ability_Tap(c)
Ability_Cost abCost = new Ability_Cost("T", c.getName(), true);
Target target = new Target("TgtCP");
final Ability_Activated ability = new Ability_Activated(c, abCost, target)
{
private static final long serialVersionUID = -7560349014757367722L;
public void chooseTargetAI()
@@ -12030,8 +12031,8 @@ public class GameActionUtil {
}//resolve()
};//SpellAbility
ability.setKothThirdAbility(true);
ability.setBeforePayMana(CardFactoryUtil.input_targetCreaturePlayer(ability, true, false));
ability.setDescription("tap: This land deals 1 damage to target creature or player.");
//ability.setBeforePayMana(CardFactoryUtil.input_targetCreaturePlayer(ability, true, false));
ability.setDescription(abCost+"This land deals 1 damage to target creature or player.");
c.addSpellAbility(ability);