Avacyn Restored Spoilers
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Avacyn Restored Spoilers
by ZzzzSleep » 12 Apr 2012, 11:27
Another quick one (It's just a rebranded Dream Stalker)...
- Emancipation Angel | Open
- Code: Select all
Name:Emancipation Angel
ManaCost:1 W W
Types:Creature Angel
Text:no text
PT:3/3
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, return a permanent you control to its owner's hand.
SVar:TrigChange:AB$ChangeZone | Origin$ Battlefield | Destination$ Hand | Cost$ 0 | Hidden$ True | Mandatory$ True | ChangeType$ Permanent.YouCtrl
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
End
Re: Avacyn Restored Spoilers
by friarsol » 12 Apr 2012, 12:18
Probably the easiest way to do it is checking if they game has started before incrementing the NumDrawnThisTurn variable. This would make sure that mulligans happen before any Cards Are marked drawn during a turn. I don't know specifically when Forge thinks the game has started, but it might be too early right now.moomarc wrote:@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):
Depending on how long I have to stay at work tonight, I might have some time when I get home to peak at the code.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Avacyn Restored Spoilers
by ZzzzSleep » 12 Apr 2012, 12:39
It's Howlgeist!
- Howlgeist | Open
- Code: Select all
Name:Howlgeist
ManaCost:5 G
Types:Creature Spirit Wolf
Text:no text
PT:4/2
K:Creatures with power less than CARDNAME's power can't block it.
K:Undying
SVar:Rarity:Uncommon
End
Re: Avacyn Restored Spoilers
by moomarc » 12 Apr 2012, 12:50
Thanks Sol. That's pretty much what I thought had to happen, but I've tweaked it a little more to what you've said by moving the game start check to encapsulate the draw count increment instead of the miracle draw check(Player.java; ll 1304):friarsol wrote:Probably the easiest way to do it is checking if they game has started before incrementing the NumDrawnThisTurn variable. This would make sure that mulligans happen before any Cards Are marked drawn during a turn. I don't know specifically when Forge thinks the game has started, but it might be too early right now.moomarc wrote:@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):
Depending on how long I have to stay at work tonight, I might have some time when I get home to peak at the code.
- Code: Select all
if (PhaseHandler.getGameBegins() == 1) {
this.setLastDrawnCard(c);
c.setDrawnThisTurn(true);
this.numDrawnThisTurn++;
}
// Miracle draws
if (this.numDrawnThisTurn == 1) {
Singletons.getModel().getGameAction().drawMiracle(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 moomarc » 12 Apr 2012, 15:21

- Code: Select all
PhaseHandler.setGameBegins(1); // is this needed? It's already in InputMulligan...
Should I post a patch so that you can do some final quality checks first, or must I just commit the changes? Or does anyone know if it did indeed need to be there as well for some reason?
-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 » 12 Apr 2012, 15:30
Feel free to post the full patch. I don't have access the SVN here, but I can give any pointers to some of your ideas to clean it up before it goes in.moomarc wrote:Should I post a patch so that you can do some final quality checks first, or must I just commit the changes? Or does anyone know if it did indeed need to be there as well for some reason?
I don't think the earlier one is needed, it just probably wasn't removed when Mulliganing was fleshed out. I may even have been the one to write that comment about removing it. Make sure you test cards that allow you to do things before the game starts: Leylines, Chancellors. Basically any of these http://magiccards.info/query?q=o%3Aopening+o%3Ahand plus Serum Powder.
- 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 » 12 Apr 2012, 15:37
I'll test those cases, but here's the patch in the meanwhile.friarsol wrote:Feel free to post the full patch. I don't have access the SVN here, but I can give any pointers to some of your ideas to clean it up before it goes in.moomarc wrote:Should I post a patch so that you can do some final quality checks first, or must I just commit the changes? Or does anyone know if it did indeed need to be there as well for some reason?
I don't think the earlier one is needed, it just probably wasn't removed when Mulliganing was fleshed out. I may even have been the one to write that comment about removing it. Make sure you test cards that allow you to do things before the game starts: Leylines, Chancellors. Basically any of these http://magiccards.info/query?q=o%3Aopening+o%3Ahand plus Serum Powder.
- Attachments
-
miraclePatch.txt
- Patch for Miracle
- (6.65 KiB) Downloaded 318 times
-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 » 12 Apr 2012, 15:43
Looks fine to me for now. We'll probably need to clean it up if there are any cards that can't grant the Miracle keyword, but I'm not exactly sure how that would work. We should probably also add real AI checks to make sure there are positive targets, but that's something we can worry about after the baseline is functional.
Of course I'm the one who wrote Madness originally so I might be a little biased
Of course I'm the one who wrote Madness originally so I might be a little biased

- 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 » 12 Apr 2012, 15:55
You have my gratitude. Taught me a few things working through it to see what needed to change. Anyway, just tested the Serum Powder, Chancellors and Leylines and they're all still working. So Forge is about a minute away from supporting "Miracles v.1"friarsol wrote:Of course I'm the one who wrote Madness originally so I might be a little biased
Thanks for your time and help working through it.
-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 Milod » 12 Apr 2012, 21:13
the minute is over moomarc! release it now or we wil kill u 

Re: Avacyn Restored Spoilers
by moomarc » 12 Apr 2012, 22:34
My part is done. You just have to wait for the next daily build. I've done two of the miracle cards but don't want to hog them all.Milod wrote:the minute is over moomarc! release it now or we wil kill u

-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 squee1968 » 14 Apr 2012, 08:30
You don't want to hog all the miracles? Then I will.the minute is over moomarc! release it now or we wil kill u
My part is done. You just have to wait for the next daily build. I've done two of the miracle cards but don't want to hog them all.

- Code: Select all
Name:Revenge of the Hunted
ManaCost:4 G G
Types:Sorcery
Text:no text
K:Miracle:G
A:SP$ Pump | Cost$ 4 G G | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +6 | NumDef$ +6 | KW$ Trample & HIDDEN All creatures able to block CARDNAME do so. | SpellDescription$ Until end of turn, target creature gets +6/+6 and gains trample, and all creatures able to block it this turn do so.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/revenge_of_the_hunted.jpg
End
- Code: Select all
Name:Temporal Mastery
ManaCost:5 U U
Types:Sorcery
Text:no text
K:Miracle:1 U
A:SP$ AddTurn | Cost$ 5 U U | NumTurns$ 1 | SubAbility$ DBExile | SpellDescription$ Take an extra turn after this one. Exile Temporal Mastery.
SVar:DBExile:DB$ChangeZone | Origin$ Stack | Destination$ Exile
SVar:RemAIDeck:True
SVar:Rarity:Mythic
SVar:Picture:http://www.wizards.com/global/images/magic/general/temporal_mastery.jpg
End
- Code: Select all
Name:Bonfire of the Damned
ManaCost:X X R
Types:Sorcery
Text:no text
K:Miracle:X R
A:SP$ DamageAll | Cost$ X X R | NumDmg$ X | ValidTgts$ Player | TgtPrompt$ Select a player | ValidCards$ Creature | ValidPlayers$ Targeted | ValidDescription$ target player and each creature he or she controls. | SpellDescription$ CARDNAME deals X damage to target player and each creature he or she controls.
SVar:X:Count$xPaid
SVar:Rarity:Mythic
SVar:Picture:http://www.wizards.com/global/images/magic/general/bonfire_of_the_damned.jpg
End
- Code: Select all
Name:Cathars' Crusade
ManaCost:3 W W
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ CatharsCounters | TriggerDescription$ Whenever a creature enters the battlefield under your control, put a +1/+1 counter on each creature you control.
SVar:CatharsCounters:AB$PutCounterAll | Cost$ 0 | ValidCards$ Creature.YouCtrl | CounterType$ P1P1 | CounterNum$ 1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/cathars_crusade.jpg
End
- Code: Select all
Name:Herald of War
ManaCost:3 W W
Types:Creature Angel
Text:no text
PT:3/3
K:Flying
K:CostChange:Player:Less:X:Spell:All:Creature:Angel/Human:OnlyOneBonus:Angels and Humans you cast cost 1 less for each +1/+1 counter on Herald of War.
T:Mode$ Attacks | ValidCard$ Creature.Self | Execute$ WarCry | TriggerDescription$ Whenever CARDNAME attacks, put a +1/+1 counter on it.
SVar:WarCry:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
SVar:X:Count$NumCounters.P1P1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/herald_of_war.jpg
End
- Code: Select all
Name:Arcane Melee
ManaCost:4 U
Types:Enchantment
Text:no text
K:CostChange:All:Less:1:Spell:All:Instant/Sorcery:NoSpecial:Instant and sorcery spells cost 2 less to cast.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/arcane_melee.jpg
End
- Code: Select all
Name:Ghostly Flicker
ManaCost:2 U
Types:Instant
Text:no text
A:SP$ ChangeZone | Cost$ 2 U | ValidTgts$ Artifact.YouCtrl,Creature.YouCtrl,Land.YouCtrl | TargetMin$ 2 | TargetMax$ 2 | TgtPrompt$ Select 2 target artifacts, creatures, or lands that you control | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBReturn | SpellDescription$ Exile two target artifacts, creatures and/or lands you control, then return those cards to the battlefield under your control.
SVar:DBReturn:DB$ChangeZone | Defined$ Targeted | Origin$ Exile | Destination$ Battlefield | GainControl$ True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/ghostly_flicker.jpg
End
- Code: Select all
Name:Demonlord of Ashmouth
ManaCost:2 B B
Types:Creature Demon
Text:no text
PT:5/4
K:Flying
K:Undying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigSac | TriggerDescription$ When CARDNAME enters the battlefield, exile it unless you sacrifice another creature.
SVar:TrigSac:AB$ Sacrifice | Cost$ 0 | Amount$ 1 | SacValid$ Creature.Other | RememberSacrificed$ True | Optional$ True | SubAbility$ DBExileMe
SVar:DBExileMe:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile | ConditionCheckSVar$ X | ConditionSVarCompare$ LT1 | SubAbility$ DBDemonmicCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:NeedsToPlay:Creature.YouCtrl
SVar:RemRandomDeck:True
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/demonlord_of_ashmouth.jpg
End
- Code: Select all
Name:Harvester of Souls
ManaCost:4 B B
Types:Creature Demon
Text:no text
PT:5/5
K:Deathtouch
T:Mode$ ChangesZone | ValidCard$ Creature.nonToken+Other | Origin$ Battlefield | Destination$ Graveyard | OptionalDecider$ You | Execute$ TrigDraw | TriggerZones$ Battlefield | TriggerDescription$ Whenever another nontoken creature dies, you may draw a card.
SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/harvester_of_souls.jpg
End
- Code: Select all
Name:Tibalt, the Fiend-Blooded
ManaCost:R R
Types:Planeswalker Tibalt
Text:no text
Loyalty:2
A:AB$ Draw | Cost$ AddCounter<1/LOYALTY> | NumCards$ 1 | Planeswalker$ True | SubAbility$ DBDiscard | SpellDescription$ Draw a card, then discard a card at random.
SVar:DBDiscard:DB$Discard | Defined$ You | NumCards$ 1 | Mode$ Random
A:AB$ DealDamage | Cost$ SubCounter<4/LOYALTY> | ValidTgts$ Player | NumDmg$ X | Planeswalker$ True | SpellDescription$ CARDNAME deals damage equal to the number of cards in target player's hand to that player.
SVar:X:TargetedPlayer$CardsInHand
A:AB$ GainControl | Cost$ SubCounter<6/LOYALTY> | AllValid$ Creature | Untap$ True | AddKWs$ Haste | LoseControl$ EOT | Planeswalker$ True | Ultimate$ True | SpellDescription$ Gain control of all creatures until end of turn. Untap them. They gain haste until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Mythic
SVar:Picture:http://www.wizards.com/global/images/magic/general/tibalt_the_fiend_blooded.jpg
End
Re: Avacyn Restored Spoilers
by moomarc » 14 Apr 2012, 09:24
Thanks squee. I'll start checking them on Monday because I don't think I'll have much time today or tomorrow. For new set releases you might want to post one or two a day. It gives everyone a chance to join in the fun of scripting the new cards and picking stuff that they're comfortable doing. Closer to the release there's normally a massive surge once the full spoiler is released, then you can commit bunches at a time.
But you did have some catching up to do so we'll let you off this time... 


-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 squee1968 » 14 Apr 2012, 10:02
WELL! I never!moomarc wrote:Thanks squee. I'll start checking them on Monday because I don't think I'll have much time today or tomorrow. For new set releases you might want to post one or two a day. It gives everyone a chance to join in the fun of scripting the new cards and picking stuff that they're comfortable doing. Closer to the release there's normally a massive surge once the full spoiler is released, then you can commit bunches at a time.But you did have some catching up to do so we'll let you off this time...


EDIT: Then after you get done with those, you still have to mow my lawn, clean out my garage, wash my dishes, do my laundry...

Re: Avacyn Restored Spoilers
by ZzzzSleep » 15 Apr 2012, 02:05
Squee, would you be able to claim the cards that you've done on the forge upcoming wiki page?squee1968 wrote:You don't want to hog all the miracles? Then I will.moomarc wrote:I've done two of the miracle cards but don't want to hog them all.
http://www.slightlymagic.net/wiki/Forge_Upcoming
This allows us to work together and prevents multiple people from coding the same cards.
Thanks,
ZzzzSleep.
Who is online
Users browsing this forum: No registered users and 40 guests