mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- 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:
@@ -8470,7 +8470,14 @@ public class CardFactory implements NewConstants {
|
|||||||
public void selectCard(Card card, PlayerZone zone) {
|
public void selectCard(Card card, PlayerZone zone) {
|
||||||
if(!card.isLand() && zone.is(Constant.Zone.Play) && CardFactoryUtil.canTarget(spell, card)) {
|
if(!card.isLand() && zone.is(Constant.Zone.Play) && CardFactoryUtil.canTarget(spell, card)) {
|
||||||
spell.setTargetCard(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
|
};//Input
|
||||||
@@ -8533,7 +8540,15 @@ public class CardFactory implements NewConstants {
|
|||||||
|
|
||||||
else if(card.isCreature() && zone.is(Constant.Zone.Play)) {
|
else if(card.isCreature() && zone.is(Constant.Zone.Play)) {
|
||||||
spell.setTargetCard(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
|
};//Input
|
||||||
@@ -8595,7 +8610,14 @@ public class CardFactory implements NewConstants {
|
|||||||
|
|
||||||
else if(card.isCreature() && zone.is(Constant.Zone.Play)) {
|
else if(card.isCreature() && zone.is(Constant.Zone.Play)) {
|
||||||
spell.setTargetCard(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
|
};//Input
|
||||||
@@ -9564,7 +9586,14 @@ public class CardFactory implements NewConstants {
|
|||||||
if(card.isCreature() && zone.is(Constant.Zone.Play)
|
if(card.isCreature() && zone.is(Constant.Zone.Play)
|
||||||
&& CardUtil.getConvertedManaCost(card.getManaCost()) <= 3) {
|
&& CardUtil.getConvertedManaCost(card.getManaCost()) <= 3) {
|
||||||
spell.setTargetCard(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
|
};//Input
|
||||||
@@ -9695,8 +9724,15 @@ public class CardFactory implements NewConstants {
|
|||||||
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
|
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
|
||||||
}
|
}
|
||||||
if(card.isCreature() && zone.is(Constant.Zone.Play) && card.getNetDefense() <= 3) {
|
if(card.isCreature() && zone.is(Constant.Zone.Play) && card.getNetDefense() <= 3) {
|
||||||
spell.setTargetCard(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
|
};//Input
|
||||||
@@ -9771,7 +9807,14 @@ public class CardFactory implements NewConstants {
|
|||||||
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
|
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
|
||||||
} else if(card.isCreature() && zone.is(Constant.Zone.Play)) {
|
} else if(card.isCreature() && zone.is(Constant.Zone.Play)) {
|
||||||
spell.setTargetCard(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
|
};//Input
|
||||||
@@ -9890,8 +9933,14 @@ public class CardFactory implements NewConstants {
|
|||||||
else {
|
else {
|
||||||
spell.setStackDescription("Return " + o + " to its owner's hand");
|
spell.setStackDescription("Return " + o + " to its owner's hand");
|
||||||
spell.setTargetCard((Card) o);
|
spell.setTargetCard((Card) o);
|
||||||
|
if(this.isFree())
|
||||||
stopSetNext(new Input_PayManaCost(spell));
|
{
|
||||||
|
this.setFree(false);
|
||||||
|
AllZone.Stack.add(spell);
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
stopSetNext(new Input_PayManaCost(spell));
|
||||||
}
|
}
|
||||||
}//showMessage()
|
}//showMessage()
|
||||||
};
|
};
|
||||||
@@ -10709,7 +10758,14 @@ public class CardFactory implements NewConstants {
|
|||||||
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
|
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection?).");
|
||||||
} else if(zone.is(Constant.Zone.Play)) {
|
} else if(zone.is(Constant.Zone.Play)) {
|
||||||
spell.setTargetCard(c);
|
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
|
};//Input
|
||||||
@@ -14521,7 +14577,14 @@ public class CardFactory implements NewConstants {
|
|||||||
&& (CardUtil.getColors(crd).contains(Constant.Color.Black) || CardUtil.getColors(crd).contains(
|
&& (CardUtil.getColors(crd).contains(Constant.Color.Black) || CardUtil.getColors(crd).contains(
|
||||||
Constant.Color.Red))) {
|
Constant.Color.Red))) {
|
||||||
spell.setTargetCard(crd);
|
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
|
};//Input
|
||||||
@@ -16558,7 +16621,14 @@ public class CardFactory implements NewConstants {
|
|||||||
public void selectCard(Card c, PlayerZone zone) {
|
public void selectCard(Card c, PlayerZone zone) {
|
||||||
if(zone.is(Constant.Zone.Play) && c.isCreature() && (c.getNetAttack() > 3)) {
|
if(zone.is(Constant.Zone.Play) && c.isCreature() && (c.getNetAttack() > 3)) {
|
||||||
spell.setTargetCard(c);
|
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
|
};//input
|
||||||
|
|||||||
@@ -1782,6 +1782,94 @@ class CardFactory_Auras {
|
|||||||
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
|
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
|
||||||
}//*************** END ************ END **************************
|
}//*************** 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 **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Paralyzing Grasp")) {
|
else if(cardName.equals("Paralyzing Grasp")) {
|
||||||
final SpellAbility spell = new Spell(card) {
|
final SpellAbility spell = new Spell(card) {
|
||||||
|
|||||||
Reference in New Issue
Block a user