It is currently 11 Sep 2025, 16:10
   
Text Size

Avacyn Restored Spoilers

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Avacyn Restored Spoilers

Postby 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
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Avacyn Restored Spoilers

Postby friarsol » 12 Apr 2012, 12:18

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):
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.

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

Postby 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
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Avacyn Restored Spoilers

Postby moomarc » 12 Apr 2012, 12:50

friarsol wrote:
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):
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.

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.
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):
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);
}
It still has the same issue I described before if you take a mulligan, so the problem lies with where the game thinks it starts. Hope that's some help. I've looked through InputMulligan and NewGame but haven't been able to find the problem. Hopefully you'll have more luck if you do have time to look).
-Marc
User avatar
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

Postby moomarc » 12 Apr 2012, 15:21

\:D/ VICTORY!! Seems like I've got my birthday present afterall! If you remove this second seemingly redundant instance of setting GameBegins (the one in GameNew.java, ll 287) it works perfectly!
Code: Select all
PhaseHandler.setGameBegins(1); // is this needed? It's already in InputMulligan...
I'd tried removing the one in InputMulligan earlier because it seemed the one most likely to cause the problem (at least to me it seemed that way). But I thought I'd have one more look at it and just try removing this one seeing as there was already the question about whether it was needed... and voila! Success!

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
User avatar
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

Postby friarsol » 12 Apr 2012, 15:30

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?
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.

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

Postby moomarc » 12 Apr 2012, 15:37

friarsol wrote:
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?
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.

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.
I'll test those cases, but here's the patch in the meanwhile.
Attachments
miraclePatch.txt
Patch for Miracle
(6.65 KiB) Downloaded 318 times
-Marc
User avatar
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

Postby 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 :-D
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Avacyn Restored Spoilers

Postby moomarc » 12 Apr 2012, 15:55

friarsol wrote:Of course I'm the one who wrote Madness originally so I might be a little biased :-D
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"

Thanks for your time and help working through it.
-Marc
User avatar
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

Postby Milod » 12 Apr 2012, 21:13

the minute is over moomarc! release it now or we wil kill u 8)
Milod
 
Posts: 360
Joined: 20 Jul 2011, 08:57
Has thanked: 4 times
Been thanked: 5 times

Re: Avacyn Restored Spoilers

Postby moomarc » 12 Apr 2012, 22:34

Milod wrote:the minute is over moomarc! release it now or we wil kill u 8)
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. :D
-Marc
User avatar
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

Postby squee1968 » 14 Apr 2012, 08:30

the minute is over moomarc! release it now or we wil kill u 8)
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. :D
You don't want to hog all the miracles? Then I will. :twisted:

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
And I'll throw these in just for the heck of it and round it up to my usual 10.

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
squee1968
 
Posts: 254
Joined: 18 Nov 2011, 03:28
Has thanked: 110 times
Been thanked: 45 times

Re: Avacyn Restored Spoilers

Postby 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. :D But you did have some catching up to do so we'll let you off this time... :twisted:
-Marc
User avatar
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

Postby squee1968 » 14 Apr 2012, 10:02

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. :D But you did have some catching up to do so we'll let you off this time... :twisted:
WELL! I never! :shock: Catching up to do??!! You've still got 4 cards from the other thread to check in, then check in the 20+ cards I haven't posted yet because I've been waitin' on ya to do those first, then the 10 I posted above, then I have a card that needs to be hardcoded, and by the time you get caught up on all that, I'll have even more for ya! So there! :P

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... :mrgreen:
squee1968
 
Posts: 254
Joined: 18 Nov 2011, 03:28
Has thanked: 110 times
Been thanked: 45 times

Re: Avacyn Restored Spoilers

Postby ZzzzSleep » 15 Apr 2012, 02:05

squee1968 wrote:
moomarc wrote:I've done two of the miracle cards but don't want to hog them all. :D
You don't want to hog all the miracles? Then I will.
Squee, would you be able to claim the cards that you've done on the forge upcoming wiki page?
http://www.slightlymagic.net/wiki/Forge_Upcoming
This allows us to work together and prevents multiple people from coding the same cards.

Thanks,
ZzzzSleep.
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 28 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 28 users online :: 0 registered, 0 hidden and 28 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 28 guests

Login Form