Dark Ascension spoiler season
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Dark Ascension spoiler season
by Sloth » 09 Jan 2012, 08:49
Good work moomarc. It looks like Dark Ascension will be an easy set to script.moomarc wrote:I've just added Undying keyword to svn. It was just a copy of Persist with the relevant variables renamed and the change of counter type. I've tested and Undying works (and Persist still works so I'm sure nothing was done wrong), but I wouldn't mind someone else checking it.
The changes are in:
CombatUtil.java, lines 1840-1842 and 1974-1976
GameAction.java, lines 1184-1185 and 1216-1232
And here's the script for the first Undying card:
- Strangleroot Geist | Open
- Code: Select all
Name:Strangleroot Geist
ManaCost:G G
Types:Creature Spirit
Text:no text
PT:2/1
K:Haste
K:Undying
SVar:PlayMain1:TRUE
SVar:Rarity:uncommon
SVar:Picture:http://media.wizards.com/images/magic/tcg/products/dka/ykcv734set_en.jpg
Oracle:Haste\nUndying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.)
End
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Dark Ascension spoiler season
by Hellfish » 09 Jan 2012, 09:33
Just added a FatefulHour mode to Count$ and as a parameter to static abilities (Yes, I know a CheckSVar would work but we have helper parameters for Threshold, Hellbent and such which could also be done with CheckSVar). Also, added a count mode that returns the life a player started the game with, allowing me to add this:
- Code: Select all
Name:Chalice of Life
ManaCost:3
Types:Artifact
Text:no text
A:AB$ GainLife | Cost$ T | LifeAmount$ 1 | Defined$ You | SubAbility$ DBTransform | SpellDescription$ You gain 1 life. Then if you have at least 10 more life than your starting life total, transform CARDNAME.
SVar:DBTransform:DB$SetState | Defined$ Self | Mode$ Transform | ConditionCheckSVar$ X | ConditionSVarCompare$ GEY
SVar:X:Count$YourLifeTotal
SVar:Y:Count$YourStartingLife/Plus.10
AlternateMode:DoubleFaced
ALTERNATE
Name:Chalice of Death
ManaCost:no cost
Types:Artifact
Text:no text
A:AB$ LoseLife | Cost$ T | ValidTgts$ Player | TgtPrompt$Target a player to lose 5 life | LifeAmount$ 5 | SpellDescription$ Target player loses 5 life.
End
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Dark Ascension spoiler season
by moomarc » 09 Jan 2012, 09:59
Thanks Hellfish. Saw the commit already an added Thraben Doomsayer with it.Hellfish wrote:Just added a FatefulHour mode to Count$ and as a parameter to static abilities (Yes, I know a CheckSVar would work but we have helper parameters for Threshold, Hellbent and such which could also be done with CheckSVar). Also, added a count mode that returns the life a player started the game with, allowing me to add this:
- Code: Select all
Name:Chalice of Life
ManaCost:3
Types:Artifact
Text:no text
A:AB$ GainLife | Cost$ T | LifeAmount$ 1 | Defined$ You | SubAbility$ DBTransform | SpellDescription$ You gain 1 life. Then if you have at least 10 more life than your starting life total, transform CARDNAME.
SVar:DBTransform:DB$SetState | Defined$ Self | Mode$ Transform | ConditionCheckSVar$ X | ConditionSVarCompare$ GEY
SVar:X:Count$YourLifeTotal
SVar:Y:Count$YourStartingLife/Plus.10
AlternateMode:DoubleFaced
ALTERNATE
Name:Chalice of Death
ManaCost:no cost
Types:Artifact
Text:no text
A:AB$ LoseLife | Cost$ T | ValidTgts$ Player | TgtPrompt$Target a player to lose 5 life | LifeAmount$ 5 | SpellDescription$ Target player loses 5 life.
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: Dark Ascension spoiler season
by Hellfish » 09 Jan 2012, 10:50
As a bit of motivation, if we hit 69% of Dark Ascension, we'll have 10000 cards supported in Forge!
Of course, that's assuming we add nothing from older sets.
(We're at about 2.5% currently)
EDIT: ~4%


EDIT: ~4%
Last edited by Hellfish on 09 Jan 2012, 11:19, edited 1 time in total.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Dark Ascension spoiler season
by ZzzzSleep » 09 Jan 2012, 10:59
Here's Nearheath Stalker and Zombie Apocalypse
- Code: Select all
Name:Nearheath Stalker
ManaCost:4 R
Types:Creature Vampire
Text:no text
PT:4/1
K:Undying
SVar:Rarity:Common
Oracle:Undying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.)
End
- Code: Select all
Name:Zombie Apocalypse
ManaCost:3 B B B
Types:Sorcery
Text:no text
A:SP$ ChangeZoneAll | Cost$ 3 B B B | SubAbility$ SVar=DBDestroy | ChangeType$ Creature.Zombie | Tapped$ True | Origin$ Graveyard | Destination$ Battlefield | SpellDescription$ Return all Zombie creature cards from your graveyard to the battlefield tapped, then destroy all Humans.
SVar:DBDestroy:DB$DestroyAll | ValidCards$ Creature.Human
Oracle:Return all Zombie creature cards from your graveyard to the battlefield tapped, then destroy all Humans.
End
Re: Dark Ascension spoiler season
by Sloth » 09 Jan 2012, 13:45
It should be "ChangeType$ Creature.Zombie+YouCtrl" and "ValidCards$ Human".ZzzzSleep wrote:Here's Nearheath Stalker and Zombie ApocalypseIf somebody could check these in when the time is right, I'd greatly appreciate it.
- Code: Select all
Name:Zombie Apocalypse
ManaCost:3 B B B
Types:Sorcery
Text:no text
A:SP$ ChangeZoneAll | Cost$ 3 B B B | SubAbility$ SVar=DBDestroy | ChangeType$ Creature.Zombie | Tapped$ True | Origin$ Graveyard | Destination$ Battlefield | SpellDescription$ Return all Zombie creature cards from your graveyard to the battlefield tapped, then destroy all Humans.
SVar:DBDestroy:DB$DestroyAll | ValidCards$ Creature.Human
Oracle:Return all Zombie creature cards from your graveyard to the battlefield tapped, then destroy all Humans.
End
Here are my contributions:
- Gravecrawler | Open
- Code: Select all
Name:Gravecrawler
ManaCost:B
Types:Creature Zombie
Text:no text
PT:2/1
K:CARDNAME can't block.
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Graveyard | AddHiddenKeyword$ HIDDEN May be played | CheckSVar$ X | SVarCompare$ GE1 | Description$ You may cast CARDNAME from you graveyard as long as you control a Zombie.
SVar:X:Count$Valid Zombie.YouCtrl
SVar:DiscardMe:3
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/gravecrawler.jpg
End
- Hunger of the Howlpack | Open
- Code: Select all
Name:Hunger of the Howlpack
ManaCost:G
Types:Instant
Text:no text
A:SP$ PutCounter | Cost$ G | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ X | SpellDescription$ Put a +1/+1 counter on target creature. Morbid - Put three +1/+1 counters on that creature instead if a creature died this turn.
SVar:X:Count$Morbid.3.1
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/hunger_of_the_howlpack.jpg
End
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Dark Ascension spoiler season
by moomarc » 09 Jan 2012, 14:07
Thanks Sloth. Added your card to first post and updated the script on Zombie Apocalypse there too.Sloth wrote:It should be "ChangeType$ Creature.Zombie+YouCtrl" and "ValidCards$ Human".
Here are my contributions:
- Gravecrawler | Open
- Code: Select all
Name:Gravecrawler
ManaCost:B
Types:Creature Zombie
Text:no text
PT:2/1
K:CARDNAME can't block.
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ Graveyard | AddHiddenKeyword$ HIDDEN May be played | CheckSVar$ X | SVarCompare$ GE1 | Description$ You may cast CARDNAME from you graveyard as long as you control a Zombie.
SVar:X:Count$Valid Zombie.YouCtrl
SVar:DiscardMe:3
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/gravecrawler.jpg
End
- Hunger of the Howlpack | Open
- Code: Select all
Name:Hunger of the Howlpack
ManaCost:G
Types:Instant
Text:no text
A:SP$ PutCounter | Cost$ G | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ X | SpellDescription$ Put a +1/+1 counter on target creature. Morbid - Put three +1/+1 counters on that creature instead if a creature died this turn.
SVar:X:Count$Morbid.3.1
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/hunger_of_the_howlpack.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: Dark Ascension spoiler season
by friarsol » 09 Jan 2012, 19:55
I wonder if it would be worth it to add an "unreleased" folder into the SVN cardsfolder. This would allow the files to sit in the SVN (instead of the forum) to allow more testing prior to the full release, and then once the cards are available I can tweak the SetInfo script to move them to their appropriate folder. I kinda keep going back and forth about whether Unreleased cards should be in the SVN, and while I don't really like the idea of having cards in the system that don't have automated SetInfo or Picture data, we had a bunch of cards go out without really being playtested last set release.
Does anyone else have any strong opinion about this?
Does anyone else have any strong opinion about this?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Dark Ascension spoiler season
by moomarc » 09 Jan 2012, 20:14
I think its a good idea. Playtesting always helps (especially my scripts it seemsfriarsol wrote:I wonder if it would be worth it to add an "unreleased" folder into the SVN cardsfolder. This would allow the files to sit in the SVN (instead of the forum) to allow more testing prior to the full release, and then once the cards are available I can tweak the SetInfo script to move them to their appropriate folder. I kinda keep going back and forth about whether Unreleased cards should be in the SVN, and while I don't really like the idea of having cards in the system that don't have automated SetInfo or Picture data, we had a bunch of cards go out without really being playtested last set release.
Does anyone else have any strong opinion about this?

On another note, no-one had claimed a card for hours now so I helped myself to Mondronen Shaman // Tovolar's Magehunter.
-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: Dark Ascension spoiler season
by silly freak » 09 Jan 2012, 20:20
That would be exactly one use case for a branchfriarsol wrote:I wonder if it would be worth it to add an "unreleased" folder into the SVN cardsfolder. This would allow the files to sit in the SVN (instead of the forum) to allow more testing prior to the full release, and then once the cards are available I can tweak the SetInfo script to move them to their appropriate folder. I kinda keep going back and forth about whether Unreleased cards should be in the SVN, and while I don't really like the idea of having cards in the system that don't have automated SetInfo or Picture data, we had a bunch of cards go out without really being playtested last set release.
Does anyone else have any strong opinion about this?

Well, I might be a little spoiled by git - I use it exclusively at the moment and I'm very fond of it - which makes branching dummy easy. I'm just saying that if you find an additional folder to be clumsy, this could be an alternative.
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: Dark Ascension spoiler season
by ZzzzSleep » 09 Jan 2012, 21:32
I didn't want to be greedy and take too many.moomarc wrote:On another note, no-one had claimed a card for hours now so I helped myself to Mondronen Shaman // Tovolar's Magehunter.

Re: Dark Ascension spoiler season
by ArsenalNut » 09 Jan 2012, 22:56
I think the pros of adding them to SVN outweigh the cons.silly freak wrote:That would be exactly one use case for a branchfriarsol wrote:I wonder if it would be worth it to add an "unreleased" folder into the SVN cardsfolder. This would allow the files to sit in the SVN (instead of the forum) to allow more testing prior to the full release, and then once the cards are available I can tweak the SetInfo script to move them to their appropriate folder. I kinda keep going back and forth about whether Unreleased cards should be in the SVN, and while I don't really like the idea of having cards in the system that don't have automated SetInfo or Picture data, we had a bunch of cards go out without really being playtested last set release.
Does anyone else have any strong opinion about this?
Well, I might be a little spoiled by git - I use it exclusively at the moment and I'm very fond of it - which makes branching dummy easy. I'm just saying that if you find an additional folder to be clumsy, this could be an alternative.
I like Silly Freak's idea of a branch even better. I know branches in SVN kind of suck but in this situation I think they would work pretty well. With a branch, the cards could be put into the proper folder to begin with. People could point just their cardsfolder to the branch and keep everything else pointed at the trunk. Any code mods related to DKA cards could be checked into the trunk so we don't have keep the actual source code in the branch in sync with the trunk. Merging cards would be much easier than trying to deal with code.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Dark Ascension spoiler season
by ArsenalNut » 10 Jan 2012, 02:10
I tried the corner case example used in the Dark Ascension mechanics article of putting the three -1/-1 counters from a Skinrender on to a Strangleroot Geist with a +1/+1 counter already on it. The article says that Undying is not activated in this case but it is in Forge.moomarc wrote:I've just added Undying keyword to svn. It was just a copy of Persist with the relevant variables renamed and the change of counter type. I've tested and Undying works (and Persist still works so I'm sure nothing was done wrong), but I wouldn't mind someone else checking it.
The changes are in:
CombatUtil.java, lines 1840-1842 and 1974-1976
GameAction.java, lines 1184-1185 and 1216-1232
And here's the script for the first Undying card:
- Strangleroot Geist | Open
- Code: Select all
Name:Strangleroot Geist
ManaCost:G G
Types:Creature Spirit
Text:no text
PT:2/1
K:Haste
K:Undying
SVar:PlayMain1:TRUE
SVar:Rarity:uncommon
SVar:Picture:http://media.wizards.com/images/magic/tcg/products/dka/ykcv734set_en.jpg
Oracle:Haste\nUndying (When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.)
End
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Dark Ascension spoiler season
by ArsenalNut » 10 Jan 2012, 04:30
- Ravenous Demon // Archdemon of Greed | Open
- Name:Ravenous Demon
ManaCost:3 B B
Types:Creature Demon
Text:no text
PT:4/4
A:AB$SetState | Cost$ Sac<1/Human> | Defined$ Self | SorcerySpeed$ True | Mode$ Transform | SpellDescription$ Transform CARDNAME. Activate this only any time you could cast a sorcery.
SVar:Picture:http://www.wizards.com/global/images/magic/general/ravenous_demon.jpg
AlternateMode:DoubleFaced
ALTERNATE
Name:Archdemon of Greed
ManaCost:no cost
Colors:black
Types:Creature Demon
Text:no text
PT:9/9
K:Flying
K:Trample
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ At the beginning of your upkeep, sacrifice a Human. If you can't, tap CARDNAME and it deals 9 damage to you.
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ You | SacValid$ Creature.Human | SubAbility$ DBTap | RememberSacrificed$ True
SVar:DBTap:DB$ Tap | Cost$ 0 | Defined$ Self | ConditionCheckSVar$ X | ConditionSVarCompare$ LT1 | SubAbility$ DBDamage
SVar:DBDamage:DB$ DealDamage | Cost$ 0 | Defined$ You | NumDmg$ 9 | ConditionCheckSVar$ X | ConditionSVarCompare$ LT1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Picture1:http://www.wizards.com/global/images/magic/general/archdemon_of_greed.jpg
End
Lord of the Pit meets DFC

I believe Lord of the Pit and Liege of the Pit can be converted to scripts using this logic.
- Gather the Townsfolk | Open
- Name:Gather the Townsfolk
ManaCost:1 W
Types:Sorcery
Text:no text
A:SP$ Token | Cost$ 1 W | TokenImage$ W 1 1 Human | TokenAmount$ X | TokenName$ Human | TokenTypes$ Creature,Human | TokenOwner$ You | TokenColors$ White | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put two 1/1 white Human creature tokens onto the battlefield. Fateful Hour - If you have 5 or less life, put 5 of those tokens onto the battlefield instead.
SVar:X:Count$FatefulHour.5.2
SVar:Picture:http://www.wizards.com/global/images/magic/general/gather_the_townsfolk.jpg
End
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Dark Ascension spoiler season
by ArsenalNut » 10 Jan 2012, 06:46
I took the initiative to create a branch specifically for the Dark Ascension pre-release scripts. The branch contains only the contents of the "cardsfolder" directory so there is no code to keep in sync.
For those of you unfamiliar with working with branches, here's a mini how-to in Eclipse
To switch to the Dark Ascension branch
1) Navigate to the "res/cardsfolder" in either the package explorer or project explorer
2) right click on "cardsfolder", this should bring up the menu with "Team"
3) select "Switch..." from the "Team" submenu. This will bring up the "Switch to" GUI
4) Enter "http://svn.slightlymagic.net/forge/branches/Dark_Ascension_Cards" in the "URL:" box or you can browse to it by clicking on the the "Browse..." button.
To switch back to the trunk
repeat step 1-3 from above
4) Enter "http://svn.slightlymagic.net/forge/trunk/res/cardsfolder" in the "URL:" box
Once you have done this once, the pull down for the URL should be populated with these two choices.
The steps are virtually the same if you use TortoiseSVN outside of Eclipse.
I checked the two scripts I finished tonight into the branch. I put them into the correct letter folders rather than a special folder. This will make it easier to merge the cards into the trunk when we're ready.
Another note, SVN will handle updating your working directory correctly when you are using the branch i.e. it will update "cardsfolder" from the branch and everthing else from the trunk.
For those of you unfamiliar with working with branches, here's a mini how-to in Eclipse
To switch to the Dark Ascension branch
1) Navigate to the "res/cardsfolder" in either the package explorer or project explorer
2) right click on "cardsfolder", this should bring up the menu with "Team"
3) select "Switch..." from the "Team" submenu. This will bring up the "Switch to" GUI
4) Enter "http://svn.slightlymagic.net/forge/branches/Dark_Ascension_Cards" in the "URL:" box or you can browse to it by clicking on the the "Browse..." button.
To switch back to the trunk
repeat step 1-3 from above
4) Enter "http://svn.slightlymagic.net/forge/trunk/res/cardsfolder" in the "URL:" box
Once you have done this once, the pull down for the URL should be populated with these two choices.
The steps are virtually the same if you use TortoiseSVN outside of Eclipse.
I checked the two scripts I finished tonight into the branch. I put them into the correct letter folders rather than a special folder. This will make it easier to merge the cards into the trunk when we're ready.
Another note, SVN will handle updating your working directory correctly when you are using the branch i.e. it will update "cardsfolder" from the branch and everthing else from the trunk.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Who is online
Users browsing this forum: No registered users and 29 guests