It is currently 12 Sep 2025, 11:56
   
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 Chris H. » 16 Feb 2011, 11:45

jeffwadsworth wrote:I will start with the ? cards.
`
Thank you Jeff. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

Postby friarsol » 17 Feb 2011, 17:09

Here are some Instants in CF_Instant that I think can be moved over

Code: Select all
Pongify
Peel from Reality
Crib Swap
Sprout Swarm (although it's Convoke still doesn't work)
Life Burst
Accumulated Knowledge
Overwhelming Intellect
Stroke of Genius
Windstorm
Starstorm
Vitalizing Cascade (If the Math doesn't work. We can do the ugly GainLife X with a GainLife 3 subability.)
Burst Lightning
Berserk
Agony Warp
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 » 18 Feb 2011, 04:59

friarsol wrote:Here are some Instants in CF_Instant that I think can be moved over

Code: Select all
Pongify
Peel from Reality
Crib Swap
Sprout Swarm (although it's Convoke still doesn't work)
Life Burst
Accumulated Knowledge
Overwhelming Intellect
Stroke of Genius
Windstorm
Starstorm
Vitalizing Cascade (If the Math doesn't work. We can do the ugly GainLife X with a GainLife 3 subability.)
Burst Lightning
Berserk
Agony Warp
I will start with this list. All are done except for Overwhelming Intellect which I can't get to recognize the targeted counted spell. Berserk wasn't in there.
Last edited by jeffwadsworth on 19 Feb 2011, 05:50, edited 1 time in total.
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 Chris H. » 18 Feb 2011, 23:29

I am trying to convert Mongrel Pack but I can't limit the activating phase. The card file is below and it does not not matter when this card hits the graveyard, 4 tokens get put on the battlefield:

Mongrel Pack card | Open
Name:Mongrel Pack
ManaCost:3 G
Types:Creature Hound
Text:no text
PT:4/1
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigToken | ActivatingPhases$ BeginCombat->EndCombat | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield during combat, put four 1/1 green Hound creature tokens onto the battlefield.
SVar:TrigToken:AB$Token | Cost$ 0 | TokenAmount$ 4 | TokenName$ Hound | TokenTypes$ Creature,Hound | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/mongrel_pack.jpg
SetInfo:TMP|Rare|http://magiccards.info/scans/en/tp/131.jpg
End
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

Postby Hellfish » 18 Feb 2011, 23:37

Triggers can't be limited to phases currently. I'll try to implement that tomorrow morning/possibly evening.
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
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

Postby Chris H. » 18 Feb 2011, 23:58

Hellfish wrote:Triggers can't be limited to phases currently. I'll try to implement that tomorrow morning/possibly evening.
`
OK, no problem, I figured that had not yet been implemented. :D
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times


Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

Postby Hellfish » 19 Feb 2011, 10:58

Triggers can now be limited to phases using a comma-separated list of phases in the TriggerPhases$ parameter.Phase names for reference:
Code: Select all
Untap
Upkeep
Draw
Main1
BeginCombat
Declare Attackers
Declare Attackers - Play Instants and Abilities
Declare Blockers
Declare Blockers - Play Instants and Abilities
Combat Damage
First Strike Damage
EndCombat
Main2
End of Turn
Cleanup
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
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

Postby friarsol » 19 Feb 2011, 14:31

Hellfish wrote:Triggers can now be limited to phases using a comma-separated list of phases in the TriggerPhases$ parameter.Phase names for reference:
Could you also handle "->" the way it works for AFs? This would make things like InCombat so much cleaner.
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 Hellfish » 19 Feb 2011, 14:44

Shamelessly copied from AbilityFactory. :P Done!
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
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

Postby Chris H. » 19 Feb 2011, 17:06

Hellfish wrote:Triggers can now be limited to phases using a comma-separated list of phases in the TriggerPhases$ parameter.
`
I updated my local copy to the new r6561 with the TriggerPhases$ code. I re-tried the Mongrel Pack mod and there is still no limitations taking place. The 4 Hound tokens are appearing wether it is during combat or not.

Aha! Eureka! :mrgreen:

I initially failed to see that "ActivatingPhases$' is for normal non-trigged abs and we have to use "TriggerPhases$" for the new triggers. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

Postby Chris H. » 21 Feb 2011, 00:20

I have one here for Hellfish. I have converted sooo many cards over the last couple of months that I may have made a simple mistake ... or the spell counter AF may need some adjustments to make this conversion work:

Mystic Snake | Open
Name:Mystic Snake
ManaCost:1 G U U
Types:Creature Snake
Text:no text
PT:2/2
K:Flash
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigCounterspell | TriggerDescription$ When CARDNAME enters the battlefield, counter target spell.
SVar:TrigCounterspell:AB$Counter | Cost$ 0 | Type$ Spell | Destination$ Graveyard
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/mystic_snake.jpg
SetInfo:APC|Rare|http://magiccards.info/scans/en/ap/112.jpg
SetInfo:TSB|Special|http://magiccards.info/scans/en/tsts/97.jpg
End
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Issue 113 Converting Hardcoded Cards to AFs/Trigger

Postby Hellfish » 21 Feb 2011, 00:41

I think the problem with Mystic Snake lies in how AF_Countermagic uses a custom input state to choose which spellability on the stack to counter. I don't think it plays nice with the trigger system. Gimme a day or so, I'll look into it.
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
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 62 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form