mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Fixing issue with Mana Abilities and Undoable timing
- Convert Undiscovered Paradise to script
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
Name:Undiscovered Paradise
|
Name:Undiscovered Paradise
|
||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Land
|
Types:Land
|
||||||
Text:Whenever you tap CARDNAME for mana, return it to it's owner's hand during the controller's next untap phase.
|
Text:no text
|
||||||
A:AB$ Mana | Cost$ T | Produced$ Any | SpellDescription$ Add one mana of any color to your mana pool
|
A:AB$ Mana | Cost$ T | Produced$ Any | SpellDescription$ Add one mana of any color to your mana pool | SubAbility$ DBReturn
|
||||||
|
SVar:DBReturn:DB$ Pump | Defined$ Self | KW$ HIDDEN During your next untap step, as you untap your permanents, return CARDNAME to its owner's hand. | Permanent$ True
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/undiscovered_paradise.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/undiscovered_paradise.jpg
|
||||||
SetInfo:VIS|Rare|http://magiccards.info/scans/en/vi/167.jpg
|
SetInfo:VIS|Rare|http://magiccards.info/scans/en/vi/167.jpg
|
||||||
|
|||||||
@@ -150,7 +150,6 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
private boolean evoked = false;
|
private boolean evoked = false;
|
||||||
|
|
||||||
private boolean levelUp = false;
|
private boolean levelUp = false;
|
||||||
private boolean bounceAtUntap = false;
|
|
||||||
|
|
||||||
private boolean unearth = false;
|
private boolean unearth = false;
|
||||||
private boolean unearthed;
|
private boolean unearthed;
|
||||||
@@ -1202,29 +1201,6 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
return this.hasKeyword("At the beginning of the end step, sacrifice CARDNAME.");
|
return this.hasKeyword("At the beginning of the end step, sacrifice CARDNAME.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* Getter for the field <code>bounceAtUntap</code>.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @return a boolean.
|
|
||||||
*/
|
|
||||||
public final boolean getBounceAtUntap() {
|
|
||||||
return this.bounceAtUntap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* Setter for the field <code>bounceAtUntap</code>.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @param bounce
|
|
||||||
* a boolean.
|
|
||||||
*/
|
|
||||||
public final void setBounceAtUntap(final boolean bounce) {
|
|
||||||
this.bounceAtUntap = bounce;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* hasFirstStrike.
|
* hasFirstStrike.
|
||||||
|
|||||||
@@ -1783,12 +1783,18 @@ public final class GameActionUtil {
|
|||||||
amount += bonus;
|
amount += bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
if (sa.getSubAbility() != null) {
|
||||||
if ((sa.getParam("Amount") != null) && (amount != Integer.parseInt(sa.getParam("Amount")))) {
|
// Mark SAs with subAbilities as undoable. These are generally things like damage, and other stuff
|
||||||
|
// that's hard to track and remove
|
||||||
|
sa.setUndoable(false);
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
if ((sa.getParam("Amount") != null) && (amount != Integer.parseInt(sa.getParam("Amount")))) {
|
||||||
|
sa.setUndoable(false);
|
||||||
|
}
|
||||||
|
} catch (final NumberFormatException n) {
|
||||||
sa.setUndoable(false);
|
sa.setUndoable(false);
|
||||||
}
|
}
|
||||||
} catch (final NumberFormatException n) {
|
|
||||||
sa.setUndoable(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
|||||||
@@ -126,13 +126,6 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
// add the mana produced to the mana pool
|
// add the mana produced to the mana pool
|
||||||
manaPool.addManaToFloating(this.lastProduced);
|
manaPool.addManaToFloating(this.lastProduced);
|
||||||
|
|
||||||
// TODO all of the following would be better as trigger events
|
|
||||||
// "tapped for mana"
|
|
||||||
if (source.getName().equals("Undiscovered Paradise")) {
|
|
||||||
// Probably best to conver this to an Extrinsic Ability
|
|
||||||
source.setBounceAtUntap(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Run triggers
|
// Run triggers
|
||||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|||||||
@@ -114,10 +114,9 @@ public class Untap extends Phase {
|
|||||||
|
|
||||||
List<Card> list = new ArrayList<Card>(player.getCardsIn(ZoneType.Battlefield));
|
List<Card> list = new ArrayList<Card>(player.getCardsIn(ZoneType.Battlefield));
|
||||||
|
|
||||||
for (final Card c : list) {
|
List<Card> bounceList = CardLists.getKeyword(list, "During your next untap step, as you untap your permanents, return CARDNAME to its owner's hand.");
|
||||||
if (c.getBounceAtUntap() && c.getName().contains("Undiscovered Paradise")) {
|
for (final Card c : bounceList) {
|
||||||
Singletons.getModel().getGame().getAction().moveToHand(c);
|
Singletons.getModel().getGame().getAction().moveToHand(c);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list = CardLists.filter(list, new Predicate<Card>() {
|
list = CardLists.filter(list, new Predicate<Card>() {
|
||||||
|
|||||||
Reference in New Issue
Block a user