It is currently 29 Oct 2025, 02:56
   
Text Size

Converting etbReturnTgt to AF + Trigger

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Converting etbReturnTgt to AF + Trigger

Postby Chris H. » 22 Feb 2011, 21:26

In message:

Re: SVN Bug Reports

friarsol wrote:AI just returned two Absorbs with a single Mnemonic Wall. etbReturnTgt must be buggy, we should convert the 15 or so cards over to Triggers.
`
I converted Anarchist and while the test deck that I put together worked, the Anarchist card with it's new trigger + SVar AB$ChangeZone seems a little odd in operation.

Attached below is the edited card file and a small test deck that can be used to see the oddity that I noticed. The card may be working correctly and it may just be me that is odd today. 8)

Anarchist card | Open
Name:Anarchist
ManaCost:4 R
Types:Creature Human Wizard
Text:no text
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChangeZone | Optional$ True | TriggerDescription$ When CARDNAME enters the battlefield, you may return target sorcery card from your graveyard to your hand.
SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand | ValidTgts$ Sorcery.YouCtrl
SVar:Rarity:Common
SVar:Picture:http://resources.wizards.com/magic/cards/9ed/en-us/card84072.jpg
SetInfo:EXO|Common|http://magiccards.info/scans/en/ex/79.jpg
SetInfo:9ED|Uncommon|http://magiccards.info/scans/en/9e/173.jpg
SetInfo:ODY|Common|http://magiccards.info/scans/en/od/173.jpg
End


`
Attachments
Anarchist file archive.zip
(1.21 KiB) Downloaded 184 times
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: Converting etbReturnTgt to AF + Trigger

Postby friarsol » 22 Feb 2011, 21:48

What is odd about it? It seemed fine to me?

Edit: ChangeZone still needs its trigger hooks. So maybe the oddity you are seeing is the AI deciding not to activate the ChangeZone after it targets?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Converting etbReturnTgt to AF + Trigger

Postby Chris H. » 22 Feb 2011, 22:19

friarsol wrote:What is odd about it? It seemed fine to me?

Edit: ChangeZone still needs its trigger hooks. So maybe the oddity you are seeing is the AI deciding not to activate the ChangeZone after it targets?
`
I went back and replayed the test deck once again. I think that I figured out the oddness.

The TgtPrompt$ no longer appears in the message window and it is appended to the message that is located in the title bar of the list window showing the graveyard contents?
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: Converting etbReturnTgt to AF + Trigger

Postby friarsol » 22 Feb 2011, 22:27

Chris H. wrote:
friarsol wrote:What is odd about it? It seemed fine to me?

Edit: ChangeZone still needs its trigger hooks. So maybe the oddity you are seeing is the AI deciding not to activate the ChangeZone after it targets?
`
I went back and replayed the test deck once again. I think that I figured out the oddness.

The TgtPrompt$ no longer appears in the message window and it is appended to the message that is located in the title bar of the list window showing the graveyard contents?
Well, it can't appear in the message window since the card you are targeting is in the graveyard, and those aren't on display on the screen. The oddness probably has more to do with you not using this type of targeting as much since you've been doing Targeting that for cards on the battlefield.

I'll try to get the hooks for ChangeZone up soon so the AI is better at using these cards.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Converting etbReturnTgt to AF + Trigger

Postby Chris H. » 23 Feb 2011, 17:44

friarsol wrote:
Chris H. wrote:
friarsol wrote:What is odd about it? It seemed fine to me?

Edit: ChangeZone still needs its trigger hooks. So maybe the oddity you are seeing is the AI deciding not to activate the ChangeZone after it targets?
`
I went back and replayed the test deck once again. I think that I figured out the oddness.

The TgtPrompt$ no longer appears in the message window and it is appended to the message that is located in the title bar of the list window showing the graveyard contents?
`
Well, it can't appear in the message window since the card you are targeting is in the graveyard, and those aren't on display on the screen.
`
We apparently have some number of cards which have a non-functional "TgtPrompt$". Raise Dead is an example of this:

Raise Dead card | Open
Name:Raise Dead
ManaCost:B
Types:Sorcery
Text:no text
A:SP$ChangeZone | Cost$ B | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouCtrl | SpellDescription$ Return target creature card from your graveyard to your hand.
SVar:Rarity:Common
SVar:Picture:http://resources.wizards.com/magic/cards/9ed/en-us/card83220.jpg
SetInfo:8ED|Common|http://magiccards.info/scans/en/8e/157.jpg
SetInfo:LEA|Common|http://magiccards.info/scans/en/al/31.jpg
SetInfo:LEB|Common|http://magiccards.info/scans/en/be/31.jpg
SetInfo:7ED|Common|http://magiccards.info/scans/en/7e/157.jpg
SetInfo:PO2|Common|http://magiccards.info/scans/en/po2/26.jpg
SetInfo:4ED|Common|http://magiccards.info/scans/en/4e/40.jpg
SetInfo:POR|Common|http://magiccards.info/scans/en/po/30.jpg
SetInfo:9ED|Common|http://magiccards.info/scans/en/9e/156.jpg
SetInfo:6ED|Common|http://magiccards.info/scans/en/6e/152.jpg
SetInfo:3ED|Common|http://magiccards.info/scans/en/rv/32.jpg
SetInfo:5ED|Common|http://magiccards.info/scans/en/5e/53.jpg
SetInfo:S99|Common|http://magiccards.info/scans/en/st/85.jpg
SetInfo:2ED|Common|http://magiccards.info/scans/en/un/31.jpg
End


If I understand correctly, a card should only use a "TgtPrompt$" if:

Code: Select all
Origin$ = Battlefield
 or
Origin$ = Hand
`
as this is the only zones where we can target using the click on a card image type targeting. As such, there is no need to have a "TgtPrompt$" if:

Code: Select all
Origin$ = Exile
 or
Origin$ = Library
 or
Origin$ = Graveyard
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: Converting etbReturnTgt to AF + Trigger

Postby friarsol » 23 Feb 2011, 17:56

Well, I don't think it's for Origin$ Hand because you wouldn't "Target" a card in a hidden zone.

However, I think they do get used, they just might get cut off in the popup window. Not sure the best way to resolve that is.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Converting etbReturnTgt to AF + Trigger

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

Yeah, I never liked the text being truncated on the title bar, this is why I spent so much time trying to convert cards over to using the newer button type dialog over the older yes/no list format.

I do like the newest AF version of the yes/no button dialog. Another step in the right direction. :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: Converting etbReturnTgt to AF + Trigger

Postby Rob Cashwalker » 26 Feb 2011, 15:50

Speaking of which, is there any chance we can get the longer descriptions to wrap a bit? For example, try playing a transmute card.... The option dialog doesn't fit the entirety of the transmute reminder text, and isn't really necessary to be present in that portion of it. There were a few other instances lately, where I've seen yes/no dialogs with huge strings.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 10 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 10 guests

Login Form