mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Convert Sapling of Colfenor to script
- Reveal inside Dig still needs to reveal to the controlling player
This commit is contained in:
@@ -1,9 +1,15 @@
|
|||||||
Name:Sapling of Colfenor
|
Name:Sapling of Colfenor
|
||||||
ManaCost:3 BG BG
|
ManaCost:3 BG BG
|
||||||
Types:Legendary Creature Treefolk Shaman
|
Types:Legendary Creature Treefolk Shaman
|
||||||
Text:Whenever Sapling of Colfenor attacks, reveal the top card of your library. If it's a creature card, you gain life equal to that card's toughness, lose life equal to its power, then put it into your hand.
|
|
||||||
PT:2/5
|
PT:2/5
|
||||||
K:Indestructible
|
K:Indestructible
|
||||||
|
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ Whenever Sapling of Colfenor attacks, reveal the top card of your library. If it's a creature card, you gain life equal to that card's toughness, lose life equal to its power, then put it into your hand.
|
||||||
|
SVar:TrigDig:DB$ Dig | DigNum$ 1 | Reveal$ True | ChangeNum$ All | ChangeValid$ Creature | DestinationZone$ Hand | RememberChanged$ True | DestinationZone2$ Library | LibraryPosition2$ 0 | SubAbility$ DBGain
|
||||||
|
SVar:DBGain:DB$ GainLife | LifeAmount$ Y | SubAbility$ DBLose | References$ Y
|
||||||
|
SVar:DBLose:DB$ LoseLife | LifeAmount$ X | SubAbility$ DBCleanup | References$ X
|
||||||
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
SVar:Y:Remembered$CardToughness
|
||||||
|
SVar:X:Remembered$CardPower
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/Sapling_of_Colfenor.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/Sapling_of_Colfenor.jpg
|
||||||
Oracle:Sapling of Colfenor is indestructible.\nWhenever Sapling of Colfenor attacks, reveal the top card of your library. If it's a creature card, you gain life equal to that card's toughness, lose life equal to its power, then put it into your hand.
|
Oracle:Sapling of Colfenor is indestructible.\nWhenever Sapling of Colfenor attacks, reveal the top card of your library. If it's a creature card, you gain life equal to that card's toughness, lose life equal to its power, then put it into your hand.
|
||||||
SetInfo:EVE Rare
|
SetInfo:EVE Rare
|
||||||
@@ -115,9 +115,7 @@ public class DigEffect extends SpellAbilityEffect {
|
|||||||
|
|
||||||
boolean hasRevealed = true;
|
boolean hasRevealed = true;
|
||||||
if (sa.hasParam("Reveal")) {
|
if (sa.hasParam("Reveal")) {
|
||||||
game.getAction().reveal(top, p);
|
game.getAction().reveal(top, p, false);
|
||||||
// Singletons.getModel().getGameAction().revealToCopmuter(top.toArray());
|
|
||||||
// - for when it exists
|
|
||||||
} else if (sa.hasParam("RevealOptional")) {
|
} else if (sa.hasParam("RevealOptional")) {
|
||||||
String question = "Reveal: " + Lang.joinHomogenous(top) +"?";
|
String question = "Reveal: " + Lang.joinHomogenous(top) +"?";
|
||||||
|
|
||||||
|
|||||||
@@ -1405,8 +1405,12 @@ public class GameAction {
|
|||||||
} // sacrificeDestroy()
|
} // sacrificeDestroy()
|
||||||
|
|
||||||
public void reveal(List<Card> cards, Player cardOwner) {
|
public void reveal(List<Card> cards, Player cardOwner) {
|
||||||
|
reveal(cards, cardOwner, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reveal(List<Card> cards, Player cardOwner, boolean dontRevealToOwner) {
|
||||||
ZoneType zt = cards.isEmpty() ? ZoneType.Hand : game.getZoneOf(cards.get(0)).getZoneType();
|
ZoneType zt = cards.isEmpty() ? ZoneType.Hand : game.getZoneOf(cards.get(0)).getZoneType();
|
||||||
reveal(cardOwner + " reveals card from " + zt, cards, zt, cardOwner, true);
|
reveal(cardOwner + " reveals card from " + zt, cards, zt, cardOwner, dontRevealToOwner);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reveal(String message, List<Card> cards, ZoneType zt, Player cardOwner, boolean dontRevealToOwner) {
|
public void reveal(String message, List<Card> cards, ZoneType zt, Player cardOwner, boolean dontRevealToOwner) {
|
||||||
|
|||||||
@@ -1092,25 +1092,6 @@ public class CombatUtil {
|
|||||||
|
|
||||||
} // Witch-Maw Nephilim
|
} // Witch-Maw Nephilim
|
||||||
|
|
||||||
else if (c.getName().equals("Sapling of Colfenor") && !c.getDamageHistory().getCreatureAttackedThisCombat()) {
|
|
||||||
final Player player = c.getController();
|
|
||||||
|
|
||||||
final PlayerZone lib = player.getZone(ZoneType.Library);
|
|
||||||
|
|
||||||
if (lib.size() > 0) {
|
|
||||||
final List<Card> cl = new ArrayList<Card>();
|
|
||||||
cl.add(lib.get(0));
|
|
||||||
GuiChoose.oneOrNone("Top card", cl);
|
|
||||||
final Card top = lib.get(0);
|
|
||||||
if (top.isCreature()) {
|
|
||||||
player.gainLife(top.getBaseDefense(), c);
|
|
||||||
player.loseLife(top.getBaseAttack());
|
|
||||||
|
|
||||||
game.getAction().moveToHand(top);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // Sapling of Colfenor
|
|
||||||
|
|
||||||
c.getDamageHistory().setCreatureAttackedThisCombat(true);
|
c.getDamageHistory().setCreatureAttackedThisCombat(true);
|
||||||
c.getController().setAttackedWithCreatureThisTurn(true);
|
c.getController().setAttackedWithCreatureThisTurn(true);
|
||||||
c.getController().incrementAttackersDeclaredThisTurn();
|
c.getController().incrementAttackersDeclaredThisTurn();
|
||||||
|
|||||||
Reference in New Issue
Block a user