Looking at adding an AF to do looping
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
7 posts
• Page 1 of 1
Looking at adding an AF to do looping
by ArsenalNut » 04 May 2012, 23:35
Since two of the new Avacyn Restored set use looping, I am interested in writing code to support looping. My thought is to create a Repeat AF with a "RepeatSubAbility" that works similar to WinSubAbility and LoseSubAbilitiy in Clash and FlipACoin AFs. The first thing I want to do is make a list of the cards that need looping so I can get an overall sense of what is needed. I searched for "repeat" in the rules text and came up with the following list that use looping.
Ad Nauseam
Crooked Scales
Eureka
Forbidden Ritual
Forgotten Lore
Grindstone - (currently hardcoded)
Hoarder's Greed - already scripted without looping AF
Hypergenesis
Kindle the Carnage
Mana Clash
Plague of Vermin
Primal Surge
Rally the Horde
Scalpelexis - (currently hardcoded)
Shrouded Lore
Struggle for Sanity
Tainted Pact
Thieves' Auction
Timesifter
Trade Secrets
Tyrant of Discord
Are there any cards I am missing?
Edit: noted cards already in Forge
Ad Nauseam
Crooked Scales
Eureka
Forbidden Ritual
Forgotten Lore
Grindstone - (currently hardcoded)
Hypergenesis
Kindle the Carnage
Mana Clash
Plague of Vermin
Primal Surge
Rally the Horde
Scalpelexis - (currently hardcoded)
Shrouded Lore
Struggle for Sanity
Tainted Pact
Thieves' Auction
Timesifter
Trade Secrets
Tyrant of Discord
Are there any cards I am missing?
Edit: noted cards already in Forge
Last edited by ArsenalNut on 09 May 2012, 05:47, edited 1 time in total.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Looking at adding an AF to do looping
by slowe » 05 May 2012, 00:19
First of all, sweet! Thanks for working on this.
Second, a couple more cards that use this:
- Countryside Crusher is currently scripted with DigUntil, but would more correctly in some corner cases with repetition/looping
- Game of Chaos, a real funky one which might just need its own code
.. and I assume you saw Development (of Research // Development) but didn't list it because split cards are currently out of reach.
Second, a couple more cards that use this:
- Countryside Crusher is currently scripted with DigUntil, but would more correctly in some corner cases with repetition/looping
- Game of Chaos, a real funky one which might just need its own code
.. and I assume you saw Development (of Research // Development) but didn't list it because split cards are currently out of reach.
Re: Looking at adding an AF to do looping
by friarsol » 05 May 2012, 04:22
Possibly Helm of Obedience
Target opponent, Pay X.
Mill the top card of target's library. If the card is a creature, and it's still in the graveyard (no replacement effects), put onto Battlefield under your control and stop. If the amount of cards put into the graveyard (no replacement effects) equals X, stop. If the library is empty, stop. Otherwise, loop to the beginning.
Target opponent, Pay X.
Mill the top card of target's library. If the card is a creature, and it's still in the graveyard (no replacement effects), put onto Battlefield under your control and stop. If the amount of cards put into the graveyard (no replacement effects) equals X, stop. If the library is empty, stop. Otherwise, loop to the beginning.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Looking at adding an AF to do looping
by Iran » 05 May 2012, 23:07
.Alliance of Arms
Collective Voyage
Shared Trauma
Minds Aglow
Mana-Charged
Killing Wave
I think these cards enter in this category
Collective Voyage
Shared Trauma
Minds Aglow
Mana-Charged
Killing Wave
I think these cards enter in this category
Re: Looking at adding an AF to do looping
by ArsenalNut » 09 May 2012, 03:27
Killing Wave might be possible. I don't think just paying mana is supported as an ability so I don't think the other are possible right now.Iran wrote:.Alliance of Arms
Collective Voyage
Shared Trauma
Minds Aglow
Mana-Charged Dragon
Killing Wave
I think these cards enter in this category
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Looking at adding an AF to do looping
by ArsenalNut » 09 May 2012, 06:17
I checked in the an initial version of the Repeat AF in revision 15487. I also checked in the following cards I used to test the AF:
Ad Nauseam
Primal Surge
Tyrant of Discord
I didn't really test what the AI would do with the cards. The only thing I did was make the AI always choose not to repeat the process for cards like Ad Nauseam. The AI side of things will definitely need work.
I didn't script a card that uses it but the AF also supports the use of
RepeatCheckSVar and RepeatSVarCompare to setup conditions for repeating.
Ad Nauseam
Primal Surge
Tyrant of Discord
I didn't really test what the AI would do with the cards. The only thing I did was make the AI always choose not to repeat the process for cards like Ad Nauseam. The AI side of things will definitely need work.
I didn't script a card that uses it but the AF also supports the use of
RepeatCheckSVar and RepeatSVarCompare to setup conditions for repeating.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Looking at adding an AF to do looping
by Sloth » 09 May 2012, 18:19
Good work ArsenalNut. I saw no problem with Primal Surge and Tyrant of Discord, so i removed SVar:RemAIDeck:True from them.ArsenalNut wrote:I checked in the an initial version of the Repeat AF in revision 15487. I also checked in the following cards I used to test the AF:
Ad Nauseam
Primal Surge
Tyrant of Discord
I didn't really test what the AI would do with the cards. The only thing I did was make the AI always choose not to repeat the process for cards like Ad Nauseam. The AI side of things will definitely need work.
I didn't script a card that uses it but the AF also supports the use of
RepeatCheckSVar and RepeatSVarCompare to setup conditions for repeating.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 33 guests