It is currently 11 Sep 2025, 23:14
   
Text Size

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

Postby 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

Postby slapshot5 » 15 Jun 2011, 21:45

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

Postby friarsol » 15 Jun 2011, 21:52

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

Postby jeffwadsworth » 16 Jun 2011, 00:34

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

Postby friarsol » 16 Jun 2011, 01:37

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

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

Postby Sloth » 20 Jun 2011, 10:07

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()?
User avatar
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

Postby friarsol » 20 Jun 2011, 12:09

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

Postby 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

Postby 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

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 36 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 36 users online :: 0 registered, 0 hidden and 36 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 36 guests

Login Form