- Echoing Truth, Smother, Celestial Purge and Unsummon should be cascadable, and usable by Isochron Scepter.

- Repulse, Strangling Soot, Ichor Slick, Regrowth and Temporal Spring should be cascadable.
- Fixed Giant Strength (the code for it never existed).
This commit is contained in:
jendave
2011-08-06 03:41:00 +00:00
parent 481f0b8231
commit e044b89fa8
2 changed files with 170 additions and 12 deletions

View File

@@ -8470,7 +8470,14 @@ public class CardFactory implements NewConstants {
public void selectCard(Card card, PlayerZone zone) {
if(!card.isLand() && zone.is(Constant.Zone.Play) && CardFactoryUtil.canTarget(spell, card)) {
spell.setTargetCard(card);
stopSetNext(new Input_PayManaCost(spell));
if (this.isFree())
{
this.setFree(false);
AllZone.Stack.add(spell);
stop();
}
else
stopSetNext(new Input_PayManaCost(spell));
}
}
};//Input
@@ -8533,7 +8540,15 @@ public class CardFactory implements NewConstants {
else if(card.isCreature() && zone.is(Constant.Zone.Play)) {
spell.setTargetCard(card);
stopSetNext(new Input_PayManaCost(spell));
if(this.isFree())
{
this.setFree(false);
AllZone.Stack.add(spell);
stop();
}
else
stopSetNext(new Input_PayManaCost(spell));
}
}
};//Input
@@ -8595,7 +8610,14 @@ public class CardFactory implements NewConstants {
else if(card.isCreature() && zone.is(Constant.Zone.Play)) {
spell.setTargetCard(card);
stopSetNext(new Input_PayManaCost(spell));
if(this.isFree())
{
this.setFree(false);
AllZone.Stack.add(spell);
stop();
}
else
stopSetNext(new Input_PayManaCost(spell));
}
}
};//Input
@@ -9564,7 +9586,14 @@ public class CardFactory implements NewConstants {
if(card.isCreature() && zone.is(Constant.Zone.Play)
&& CardUtil.getConvertedManaCost(card.getManaCost()) <= 3) {
spell.setTargetCard(card);
stopSetNext(new Input_PayManaCost(spell));
if(this.isFree())
{
this.setFree(false);
AllZone.Stack.add(spell);
stop();
}
else
stopSetNext(new Input_PayManaCost(spell));
}
}
};//Input
@@ -9695,8 +9724,15 @@ public class CardFactory implements NewConstants {
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
}
if(card.isCreature() && zone.is(Constant.Zone.Play) && card.getNetDefense() <= 3) {
spell.setTargetCard(card);
stopSetNext(new Input_PayManaCost(spell));
spell.setTargetCard(card);
if(this.isFree())
{
this.setFree(false);
AllZone.Stack.add(spell);
stop();
}
else
stopSetNext(new Input_PayManaCost(spell));
}
}
};//Input
@@ -9771,7 +9807,14 @@ public class CardFactory implements NewConstants {
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
} else if(card.isCreature() && zone.is(Constant.Zone.Play)) {
spell.setTargetCard(card);
stopSetNext(new Input_PayManaCost(spell));
if(this.isFree())
{
this.setFree(false);
AllZone.Stack.add(spell);
stop();
}
else
stopSetNext(new Input_PayManaCost(spell));
}
}
};//Input
@@ -9890,8 +9933,14 @@ public class CardFactory implements NewConstants {
else {
spell.setStackDescription("Return " + o + " to its owner's hand");
spell.setTargetCard((Card) o);
stopSetNext(new Input_PayManaCost(spell));
if(this.isFree())
{
this.setFree(false);
AllZone.Stack.add(spell);
stop();
}
else
stopSetNext(new Input_PayManaCost(spell));
}
}//showMessage()
};
@@ -10709,7 +10758,14 @@ public class CardFactory implements NewConstants {
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
} else if(zone.is(Constant.Zone.Play)) {
spell.setTargetCard(c);
stopSetNext(new Input_PayManaCost(spell));
if(this.isFree())
{
this.setFree(false);
AllZone.Stack.add(spell);
stop();
}
else
stopSetNext(new Input_PayManaCost(spell));
}
}
};//Input
@@ -14521,7 +14577,14 @@ public class CardFactory implements NewConstants {
&& (CardUtil.getColors(crd).contains(Constant.Color.Black) || CardUtil.getColors(crd).contains(
Constant.Color.Red))) {
spell.setTargetCard(crd);
stopSetNext(new Input_PayManaCost(spell));
if(this.isFree())
{
this.setFree(false);
AllZone.Stack.add(spell);
stop();
}
else
stopSetNext(new Input_PayManaCost(spell));
}
}
};//Input
@@ -16558,7 +16621,14 @@ public class CardFactory implements NewConstants {
public void selectCard(Card c, PlayerZone zone) {
if(zone.is(Constant.Zone.Play) && c.isCreature() && (c.getNetAttack() > 3)) {
spell.setTargetCard(c);
stopSetNext(new Input_PayManaCost(spell));
if(this.isFree())
{
this.setFree(false);
AllZone.Stack.add(spell);
stop();
}
else
stopSetNext(new Input_PayManaCost(spell));
}
}
};//input

View File

@@ -1782,6 +1782,94 @@ class CardFactory_Auras {
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Giant Strength")) {
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = -5737672424075567628L;
@Override
public boolean canPlayAI() {
CardList list = new CardList(AllZone.Computer_Play.getCards());
list = list.getType("Creature");
if(list.isEmpty()) return false;
//else
CardListUtil.sortAttack(list);
CardListUtil.sortFlying(list);
for(int i = 0; i < list.size(); i++) {
if(CardFactoryUtil.canTarget(card, list.get(i))) {
setTargetCard(list.get(i));
return true;
}
}
return false;
}//canPlayAI()
@Override
public void resolve() {
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(card);
Card c = getTargetCard();
if(AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c)) {
card.enchantCard(c);
}
}//resolve()
};//SpellAbility
card.clearSpellAbility();
card.addSpellAbility(spell);
Command onEnchant = new Command() {
private static final long serialVersionUID = -5842396926996677438L;
public void execute() {
if(card.isEnchanting()) {
Card crd = card.getEnchanting().get(0);
crd.addSemiPermanentAttackBoost(2);
crd.addSemiPermanentDefenseBoost(2);
}
}//execute()
};//Command
Command onUnEnchant = new Command() {
private static final long serialVersionUID = -1936034468811893757L;
public void execute() {
if(card.isEnchanting()) {
Card crd = card.getEnchanting().get(0);
crd.addSemiPermanentAttackBoost(-2);
crd.addSemiPermanentDefenseBoost(-2);
}
}//execute()
};//Command
Command onLeavesPlay = new Command() {
private static final long serialVersionUID = -2519887209491512000L;
public void execute() {
if(card.isEnchanting()) {
Card crd = card.getEnchanting().get(0);
card.unEnchantCard(crd);
}
}
};
card.addEnchantCommand(onEnchant);
card.addUnEnchantCommand(onUnEnchant);
card.addLeavesPlayCommand(onLeavesPlay);
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Paralyzing Grasp")) {
final SpellAbility spell = new Spell(card) {