Page 7 of 7

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

PostPosted: 15 Jun 2011, 21:37
by jeffwadsworth
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

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

PostPosted: 15 Jun 2011, 21:45
by slapshot5
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
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.

-slapshot5

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

PostPosted: 15 Jun 2011, 21:52
by friarsol
jeffwadsworth wrote:If we had a Drawback version of GainControl, we should be able to get Political Trickery scripted.
Exchange control is a bit trickier than that, since it requires both targets to be legal for the Exchange to happen.

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

PostPosted: 16 Jun 2011, 00:34
by jeffwadsworth
friarsol wrote:
jeffwadsworth wrote:If we had a Drawback version of GainControl, we should be able to get Political Trickery scripted.
Exchange control is a bit trickier than that, since it requires both targets to be legal for the Exchange to happen.
What about making both Mandatory$ True

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

PostPosted: 16 Jun 2011, 01:37
by friarsol
jeffwadsworth wrote:
friarsol wrote:
jeffwadsworth wrote:If we had a Drawback version of GainControl, we should be able to get Political Trickery scripted.
Exchange control is a bit trickier than that, since it requires both targets to be legal for the Exchange to happen.
What about making both Mandatory$ True
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.

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

PostPosted: 19 Jun 2011, 22:05
by jeffwadsworth
A GainControlAll AB would allow Insurrection to be scripted.
A CopyPermanentAll AB would allow Parallel Evolution to be scripted.

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

PostPosted: 20 Jun 2011, 10:07
by Sloth
friarsol wrote:
Sloth wrote:
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?
Actually they have to be checked at other times too:
- Card draw (Akki Underling)
- Add Mana to Manapool (Omnath, Locus of Mana)
- Something becomes tapped (Maraxus of Keld)
- Counters get removed
Not all Card Draw though right? Just the State based effect at the beginning of your turn?
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?
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()?

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

PostPosted: 20 Jun 2011, 12:09
by friarsol
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()?
Yep, I think handleBeginPhase is the right place for that. Considering the recent bug reports of Weakstone and Moat that should do the trick.

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

PostPosted: 28 Jun 2011, 23:28
by jeffwadsworth
An AB ProtectionAll would allow Glory to be converted. That is a big chunk of code.

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

PostPosted: 04 Jul 2011, 18:23
by jeffwadsworth
Vampire Hexmage could be done if CounterType$ Any was coded.