Issue 113 Converting Hardcoded Cards to AFs/Trigger
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger
by jeffwadsworth » 15 Jun 2011, 21:37
If we had a Drawback version of GainControl, we should be able to get Political Trickery scripted.
- | Open
- Name:Political Trickery
ManaCost:2 U
Types:Sorcery
Text:no text
A:SP$ GainControl | Cost$ 2 U | ValidTgts$ Land.YouCtrl | TgtPrompt$ Select target land you control | NewController$ Opponent | SubAbility$ DBGainControl | SpellDescription$ Exchange control of target land you control and target land an opponent controls. (This effect lasts indefinitely.)
SVar:DBGainControl:DB$GainControl | ValidTgts$ Land.YouDontCtrl | TgtPrompt$ Select target land opponent controls
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/political_trickery.jpg
SetInfo:MIR|Rare|http://magiccards.info/scans/en/mr/81.jpg
End
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger
by slapshot5 » 15 Jun 2011, 21:45
Something else got check in recently that should have used a GainControl drawback. Don't remember what it was. I'll work on this tonight.jeffwadsworth wrote:If we had a Drawback version of GainControl, we should be able to get Political Trickery scripted.
- | Open
- Name:Political Trickery
ManaCost:2 U
Types:Sorcery
Text:no text
A:SP$ GainControl | Cost$ 2 U | ValidTgts$ Land.YouCtrl | TgtPrompt$ Select target land you control | NewController$ Opponent | SubAbility$ DBGainControl | SpellDescription$ Exchange control of target land you control and target land an opponent controls. (This effect lasts indefinitely.)
SVar:DBGainControl:DB$GainControl | ValidTgts$ Land.YouDontCtrl | TgtPrompt$ Select target land opponent controls
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/political_trickery.jpg
SetInfo:MIR|Rare|http://magiccards.info/scans/en/mr/81.jpg
End
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger
by friarsol » 15 Jun 2011, 21:52
Exchange control is a bit trickier than that, since it requires both targets to be legal for the Exchange to happen.jeffwadsworth wrote:If we had a Drawback version of GainControl, we should be able to get Political Trickery scripted.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger
by jeffwadsworth » 16 Jun 2011, 00:34
What about making both Mandatory$ Truefriarsol wrote:Exchange control is a bit trickier than that, since it requires both targets to be legal for the Exchange to happen.jeffwadsworth wrote:If we had a Drawback version of GainControl, we should be able to get Political Trickery scripted.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger
by friarsol » 16 Jun 2011, 01:37
I'm not sure if Targets being Mandatory helps if one Fizzles and one doesn't. I guess we could change how fizzling works to handle that.jeffwadsworth wrote:What about making both Mandatory$ Truefriarsol wrote:Exchange control is a bit trickier than that, since it requires both targets to be legal for the Exchange to happen.jeffwadsworth wrote:If we had a Drawback version of GainControl, we should be able to get Political Trickery scripted.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger
by jeffwadsworth » 19 Jun 2011, 22:05
A GainControlAll AB would allow Insurrection to be scripted.
A CopyPermanentAll AB would allow Parallel Evolution to be scripted.
A CopyPermanentAll AB would allow Parallel Evolution to be scripted.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger
by Sloth » 20 Jun 2011, 10:07
I just thought about this again and took a look at the corresponding code. I couldn't find a check for state based effects at the beginning of Phases/Steps, but we really do need them (for cards like Mightstone and Weakstone). Am I missing something or should I add it to handleBeginPhase()?friarsol wrote:Not all Card Draw though right? Just the State based effect at the beginning of your turn?Sloth wrote:Actually they have to be checked at other times too:friarsol wrote:Ah good.
Ideally, state based effects should be checked after each SA finishes resolving completely and at the beginning of Phases/Steps, so it doesn't need to appear 40 times throughout the code. Is there some part of the trigger system that is incapatable with that idea?
- Card draw (Akki Underling)
- Add Mana to Manapool (Omnath, Locus of Mana)
- Something becomes tapped (Maraxus of Keld)
- Counters get removed
Paying costs of non-mana abilities (the last three) shouldn't check state based effects though. Only paying costs of mana abilities should check afterwards (since they don't use the stack).
So really we have:
Phase based effects (card draw/all combat damage is dealt), After an SA resolves, After an SA (and all corresponding triggers) is added to the stack, and after a Mana Ability is activated. Or am I missing some other hidden times?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger
by friarsol » 20 Jun 2011, 12:09
Yep, I think handleBeginPhase is the right place for that. Considering the recent bug reports of Weakstone and Moat that should do the trick.Sloth wrote:I just thought about this again and took a look at the corresponding code. I couldn't find a check for state based effects at the beginning of Phases/Steps, but we really do need them (for cards like Mightstone and Weakstone). Am I missing something or should I add it to handleBeginPhase()?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger
by jeffwadsworth » 28 Jun 2011, 23:28
An AB ProtectionAll would allow Glory to be converted. That is a big chunk of code.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger
by jeffwadsworth » 04 Jul 2011, 18:23
Vampire Hexmage could be done if CounterType$ Any was coded.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Who is online
Users browsing this forum: No registered users and 36 guests