Avacyn Restored Spoilers
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Avacyn Restored Spoilers
by friarsol » 03 Apr 2012, 00:40
Hey folks,
Looks like it's the beginning of spoiler season again.
https://fbcdn-sphotos-a.akamaihd.net/hp ... 7884_n.jpg
Branching for the set worked really well last time, so I think we should stick with that.
I've reset the claimed page, http://www.slightlymagic.net/wiki/Forge_Upcoming but everyone was pretty civil last time around. So just stick with that.
Looks like it's the beginning of spoiler season again.
https://fbcdn-sphotos-a.akamaihd.net/hp ... 7884_n.jpg
Branching for the set worked really well last time, so I think we should stick with that.
I've reset the claimed page, http://www.slightlymagic.net/wiki/Forge_Upcoming but everyone was pretty civil last time around. So just stick with that.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Avacyn Restored Spoilers
by moomarc » 03 Apr 2012, 01:47
Thanks Sol. Miss Avacyn is pretty impressive, but she give you the impression there's going to be a fair amount of mass exile in the set (or just normal targeted exile I guess)friarsol wrote:Hey folks,
Looks like it's the beginning of spoiler season again.
https://fbcdn-sphotos-a.akamaihd.net/hp ... 7884_n.jpg
Branching for the set worked really well last time, so I think we should stick with that.
I've reset the claimed page, http://www.slightlymagic.net/wiki/Forge_Upcoming but everyone was pretty civil last time around. So just stick with that.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Avacyn Restored Spoilers
by moomarc » 04 Apr 2012, 17:16
Nobody else took up the offer, so without further ado, here's Avacyn, Angel of Hope
Has a branch been started for the new scripts yet?
Edit: Oops, spelled her name wrong in the script. Fixed.
- Avacyn, Angel of Hope | Open
- Name:Avacyn, Angel of Hope
ManaCost:5 W W W
Types:Legendary Creature Angel
Text:no text
PT:8/8
K:Flying
K:Vigilance
K:Indestructible
S:Mode$ Continuous | Affected$ Permanent.Other+YouCtrl | AddHiddenKeyword$ HIDDEN Indestructible | Description$ CARDNAME and other permanents you control are indestructible.
SVar:Rarity:Mythic
SVar:Picture:http://resources.wizards.com/global/images/magic/general/avacyn_angel_of_hope.jpg
End
Has a branch been started for the new scripts yet?
Edit: Oops, spelled her name wrong in the script. Fixed.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Avacyn Restored Spoilers
by friarsol » 07 Apr 2012, 21:03
They are announcing a bunch of spoils today at Pax East. A new mechanic is Soulbond, here's an example of how it works.
Silverblade Paladin - 1WW, 2/2, Soulbond (You may pair this creature with another unpaired creature when either enters the battlefield. They remain paired as long as you control both of them). As long as Silverblade Paladin is paired with another creature, both creatures have double strike.
Also Miracle is a new mechanic:
Thunderous Wrath - 4RR, Instant, Thunderous Wrath deals 5 damage to target creature or player. Miracle R (You may cast this card for its Miracle cost when you draw it if it's the first card you drew this turn)
Silverblade Paladin - 1WW, 2/2, Soulbond (You may pair this creature with another unpaired creature when either enters the battlefield. They remain paired as long as you control both of them). As long as Silverblade Paladin is paired with another creature, both creatures have double strike.
Also Miracle is a new mechanic:
Thunderous Wrath - 4RR, Instant, Thunderous Wrath deals 5 damage to target creature or player. Miracle R (You may cast this card for its Miracle cost when you draw it if it's the first card you drew this turn)
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Avacyn Restored Spoilers
by friarsol » 07 Apr 2012, 21:50
I just Branched /res/cardsfolder into branches/AvacynRestoredCards for people who want to check in cards, now that we have a handful more.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Avacyn Restored Spoilers
by jeffwadsworth » 07 Apr 2012, 23:10
Soulbond is how that horrific mechanic Banding should have been done.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Avacyn Restored Spoilers
by ZzzzSleep » 09 Apr 2012, 06:48
New cards time!
Yay!
ZzzzSleep.
Yay!
- Demonic Taskmaster | Open
- Code: Select all
Name:Demonic Taskmaster
ManaCost:2 B
Types:Creature Demon
Text:no text
PT:4/3
K:Flying
K:Trample
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ At the beginning of your upkeep, sacrifice a creature other than CARDNAME.
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ You | SacValid$ Creature.Other
SVar:RemRandomDeck:True
SVar:Rarity:Uncommon
End
- Griselbrand | Open
- Code: Select all
Name:Griselbrand
ManaCost:4 B B B B
Types:Legendary Creature Demon
Text:no text
PT:7/7
K:Flying
K:Lifelink
A:AB$ Draw | Cost$ PayLife<7> | NumCards$ 7 | SpellDescription$ Draw seven cards.
SVar:Rarity:Mythic
End
ZzzzSleep.
Re: Avacyn Restored Spoilers
by moomarc » 09 Apr 2012, 14:20
Here's Restoration Angel and the fixed script for Cloudshift:
- Cloudshift | Open
- Code: Select all
Name:Cloudshift
ManaCost:W
Types:Instant
Text:no text
A:SP$ ChangeZone | Cost$ W | ValidTgts$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Exile | TgtPrompt$ Select target creature you control | SubAbility$ DBReturn | SpellDescription$ Exile target creature you control, then return that card to the battlefield under your control.
SVar:DBReturn:DB$ChangeZone | Defined$ Targeted | Origin$ Exile | Destination$ Battlefield | GainControl$ True
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/cloudshift.jpg
End
- Restoration Angel | Open
- Code: Select all
Name:Restoration Angel
ManaCost:3 W
Types:Creature Angel
Text:no text
PT:3/4
K:Flash
K:Flying
T:Mode$ ChangesZone | ValidCard$ Creature.Self | Origin$ Any | Destination$ Battlefield | Execute$ RestorationExile | TriggerDescription$ When CARDNAME enters the battlefield, you may exile target non-Angel creature you control, then return that creature to the battlefield under your control.
SVar:RestorationExile:DB$ChangeZone | ValidTgts$ Creature.nonAngel+YouCtrl | Mandatory$ True | TgtPrompt$ Select target non-Angel creature you control | Origin$ Battlefield | Destination$ Exile | SubAbility$ RestorationReturn
SVar:RestorationReturn:DB$ChangeZone | Defined$ Targeted | Origin$ Exile | Destination$ Battlefield | GainControl$ True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/restoration_angel.jpg
End
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Avacyn Restored Spoilers
by moomarc » 09 Apr 2012, 20:34
Here's Banishing Stroke and a patch to enable the Miracle keyword:
- Banishing Stroke | Open
- Code: Select all
Name:Banishing Stroke
ManaCost:5 W
Types:Instant
Text:no text
K:Miracle:W
A:SP$ ChangeZone | Cost$ 5 W | ValidTgts$ Artifact,Creature,Enchantment | IsCurse$ True | TgtPrompt$ Select target artifact, creature or enchantment | Origin$ Battlefield | Destination$ Library | LibraryPosition$ -1 | SpellDescription$ Put target artifact, creature or enchantment on the bottom of its owner's library.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/banishing_stroke.jpg
End
- Miracle Patch | Open
- Code: Select all
### Eclipse Workspace Patch 1.0
#P Forge
Index: src/main/java/forge/card/cardfactory/CardFactoryUtil.java
===================================================================
--- src/main/java/forge/card/cardfactory/CardFactoryUtil.java (revision 15107)
+++ src/main/java/forge/card/cardfactory/CardFactoryUtil.java (working copy)
@@ -5103,6 +5103,19 @@
}
} // madness
+ if (CardFactoryUtil.hasKeyword(card, "Miracle") != -1) {
+ final int n = CardFactoryUtil.hasKeyword(card, "Miracle");
+ if (n != -1) {
+ final String parse = card.getKeyword().get(n).toString();
+ // card.removeIntrinsicKeyword(parse);
+
+ final String[] k = parse.split(":");
+
+ card.setMiracle(true);
+ card.setMiracleCost(k[1]);
+ }
+ } // miracle
+
if (CardFactoryUtil.hasKeyword(card, "Devour") != -1) {
final int n = CardFactoryUtil.hasKeyword(card, "Devour");
if (n != -1) {
Index: src/main/java/forge/GameAction.java
===================================================================
--- src/main/java/forge/GameAction.java (revision 15107)
+++ src/main/java/forge/GameAction.java (working copy)
@@ -698,6 +698,60 @@
/**
* <p>
+ * drawMiracle.
+ * </p>
+ *
+ * @param c
+ * a {@link forge.Card} object.
+ */
+ public final void drawMiracle(final Card c) {
+ // Whenever a card with miracle is the first card drawn in a turn,
+ // you may cast it for it's miracle cost
+ if (!c.hasMiracle()) {
+ return;
+ }
+
+ final Card miracle = c;
+ final Ability cast = new Ability(miracle, miracle.getMiracleCost()) {
+ @Override
+ public void resolve() {
+ GameAction.this.playCardNoCost(miracle);
+ System.out.println("Miracle cost paid");
+ }
+ };
+
+ final StringBuilder sb = new StringBuilder();
+ sb.append(miracle.getName()).append(" - Cast via Miracle");
+ cast.setStackDescription(sb.toString());
+
+ final Ability activate = new Ability(miracle, "0") {
+ @Override
+ public void resolve() {
+ // pay miracle cost here.
+ if (miracle.getOwner().isHuman()) {
+ if (GameActionUtil.showYesNoDialog(miracle, miracle + " - Drawn. Pay Miracle Cost?")) {
+ if (cast.getManaCost().equals("0")) {
+ AllZone.getStack().add(cast);
+ } else {
+ AllZone.getInputControl().setInput(new InputPayManaCost(cast));
+ }
+ }
+ } else {
+ // computer will ALWAYS pay a miracle cost if he has the mana.
+ ComputerUtil.playStack(cast);
+ }
+ }
+ };
+
+ final StringBuilder sbAct = new StringBuilder();
+ sbAct.append(miracle.getName()).append(" - Drawn. Pay Miracle Cost?");
+ activate.setStackDescription(sbAct.toString());
+
+ AllZone.getStack().add(activate);
+ }
+
+ /**
+ * <p>
* discardPutIntoPlayInstead.
* </p>
*
Index: src/main/java/forge/Card.java
===================================================================
--- src/main/java/forge/Card.java (revision 15107)
+++ src/main/java/forge/Card.java (working copy)
@@ -144,6 +144,7 @@
private boolean unearthed;
private boolean madness = false;
+ private boolean miracle = false;
private boolean suspendCast = false;
private boolean suspend = false;
@@ -194,6 +195,7 @@
private String text = "";
private String echoCost = "";
private String madnessCost = "";
+ private String miracleCost = "";
private String chosenType = "";
// private String chosenColor = "";
private ArrayList<String> chosenColor = new ArrayList<String>();
@@ -5868,6 +5870,52 @@
/**
* <p>
+ * hasMiracle.
+ * </p>
+ *
+ * @return a boolean.
+ */
+ public final boolean hasMiracle() {
+ return this.miracle;
+ }
+
+ /**
+ * <p>
+ * Setter for the field <code>miracle</code>.
+ * </p>
+ *
+ * @param b
+ * a boolean.
+ */
+ public final void setMiracle(final boolean b) {
+ this.miracle = b;
+ }
+
+ /**
+ * <p>
+ * Getter for the field <code>miracleCost</code>.
+ * </p>
+ *
+ * @return a {@link java.lang.String} object.
+ */
+ public final String getMiracleCost() {
+ return this.miracleCost;
+ }
+
+ /**
+ * <p>
+ * Setter for the field <code>miracleCost</code>.
+ * </p>
+ *
+ * @param cost
+ * a {@link java.lang.String} object.
+ */
+ public final void setMiracleCost(final String cost) {
+ this.miracleCost = cost;
+ }
+
+ /**
+ * <p>
* hasSuspend.
* </p>
*
Index: src/main/java/forge/game/player/Player.java
===================================================================
--- src/main/java/forge/game/player/Player.java (revision 15107)
+++ src/main/java/forge/game/player/Player.java (working copy)
@@ -1304,6 +1304,10 @@
c.setDrawnThisTurn(true);
this.numDrawnThisTurn++;
+ if ((this.numDrawnThisTurn == 1) && (Singletons.getModel().getGameState().getPhaseHandler().getTurn() != 1)) {
+ Singletons.getModel().getGameAction().drawMiracle(c);
+ }
+
// Run triggers
final HashMap<String, Object> runParams = new HashMap<String, Object>();
runParams.put("Card", c);
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Avacyn Restored Spoilers
by friarsol » 09 Apr 2012, 20:56
Miracles don't trigger for your opening hand since this occurs during the "Start of the Game" and not during the first turn. "As you draw an instant or sorcery with miracle, if it's the first card you've drawn this turn..."moomarc wrote:I've based Miracle on Madness, just a few small relevant changes. It works as it should, except that it won't trigger on the first turn because if it's drawn as the first card of your opening hand, the trigger goes to stack before the mulligan choice and you can't proceed with the game after finishing mulligans, possibly because you don't then get to choose whether you want to use the miracle ability or not. I'm not actually sure how it should interact in this situation, but either way it doesn't work at the moment. I'm pretty sure this is how the keyword has to be implemented so hopefully I've saved one of the devs a few minutes with this starting point. It just needs to have the first turn interaction finalised.
However, if you manage to draw a card in your first turn, you should be able to Miracle cost that draw, since you haven't drawn anything that turn.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Avacyn Restored Spoilers
by moomarc » 10 Apr 2012, 05:34
Thanks Sol. It should just be a case of checking whether the player has mulliganed if its the first turn. I should be able to find how to make it work then. Hopefully I'll get a chance today to finish this (and one or two pet art sets).
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Avacyn Restored Spoilers
by ZzzzSleep » 10 Apr 2012, 22:11
An easy one to code, it's Latch Seeker!
- Latch Seeker | Open
- Code: Select all
Name:Latch Seeker
ManaCost:1 U U
Types:Creature Spirit
Text:no text
PT:3/1
K:Unblockable
SVar:Rarity:Uncommon
End
Re: Avacyn Restored Spoilers
by Iran » 11 Apr 2012, 19:33
Is very difficult to implement Soulbond mechanic in forge?
I think this mechanic is very interesting.
I think this mechanic is very interesting.
Re: Avacyn Restored Spoilers
by moomarc » 11 Apr 2012, 21:52
I don't think it'll be too difficult, for the most part copying equip or enchant with a few extra checks and restrictions. The biggest holdback is that the main code developers are busy with work and family outside of Forge at the moment. Its out of my comfort zone, but I am doing what I can for Miracle (but there's just one last kink in it I'm trying to smooth out.)Iran wrote:Is very difficult to implement Soulbond mechanic in forge?
I think this mechanic is very interesting.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Avacyn Restored Spoilers
by moomarc » 12 Apr 2012, 11:21
@friarsol: What would be the correct way to make NumDrawnThisTurn only start counting once the game has begun, or how can I get the value of num drawn this turn only post-mulligans? My best try was this (Player.java; ll 1308):
- Code: Select all
// Miracle draws
if (PhaseHandler.getGameBegins() == 1) {
if (Singletons.getModel().getGameState().getPhaseHandler().getTurn() == 1) {
if (this.numDrawnThisTurn - Singletons.getModel().getGameSummary().getPlayerRating(this.getName()).getOpeningHandSize() == 1) {
Singletons.getModel().getGameAction().drawMiracle(c);
}
} else {
if (this.numDrawnThisTurn == 1) {
Singletons.getModel().getGameAction().drawMiracle(c);
}
}
}
- Code: Select all
// Miracle draws
if (PhaseHandler.getGameBegins() == 1) {
if (this.numDrawnThisTurn == 1) {
Singletons.getModel().getGameAction().drawMiracle(c);
}
}
Last edited by moomarc on 12 Apr 2012, 11:35, edited 1 time in total.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Who is online
Users browsing this forum: No registered users and 70 guests