It is currently 05 Jun 2025, 07:26
   
Text Size

Card Development Questions

Post MTG Forge Related Programming Questions Here

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

Re: Card Development Questions

Postby Iran » 16 Sep 2011, 20:26

Phyrexian Unlife combos well with Melira, Sylvok Outcast (Added recently to SVN)
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby Sloth » 16 Sep 2011, 20:37

Iran wrote:Exists one Trigger that triggers when a I would lose the game? (Trying to script Lich's Mirror)
Lich's Mirror has a replacement ability, not a triggered one (it starts with "if..." and not with "when..." or "as...").
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Development Questions

Postby Iran » 17 Sep 2011, 06:26

About auras that enchant player. Is possible to script them in forge?
Cards like Wheel of Sun and Moon, Paradox Haze and the new cards Curse of the innistrad will by possible to script.

Thanks
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby friarsol » 17 Sep 2011, 13:51

Iran wrote:About auras that enchant player. Is possible to script them in forge?
Cards like Wheel of Sun and Moon, Paradox Haze and the new cards Curse of the innistrad will by possible to script.
Not quite yet. Although the Attach structure has a fair amount of code in place for this, there's still a few more strings to tie up for it to actually work. I'll take a look this weekend and see if I can add it.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby friarsol » 17 Sep 2011, 21:24

Iran wrote:About auras that enchant player. Is possible to script them in forge?
Cards like Wheel of Sun and Moon, Paradox Haze and the new cards Curse of the innistrad will by possible to script.
Alright. I added support for this today. Lemme know if something seems weird with it.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby ArsenalNut » 18 Sep 2011, 22:37

friarsol wrote:
Iran wrote:About auras that enchant player. Is possible to script them in forge?
Cards like Wheel of Sun and Moon, Paradox Haze and the new cards Curse of the innistrad will by possible to script.
Alright. I added support for this today. Lemme know if something seems weird with it.
I am trying to script Curse of the Bloody Tome from the Innistrad set. To get the phase trigger to work, I need a way to tell which player is enchanted. I added supported for "EnchantedPlayer" to matchesValid in Trigger.java. Is there another way to do this without adding code? If not, I think I also need to add support for "EnchantedPlayer" to getDefinedPlayers.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Development Questions

Postby friarsol » 18 Sep 2011, 23:05

ArsenalNut wrote:
I am trying to script Curse of the Bloody Tome from the Innistrad set. To get the phase trigger to work, I need a way to tell which player is enchanted. I added supported for "EnchantedPlayer" to matchesValid in Trigger.java. Is there another way to do this without adding code? If not, I think I also need to add support for "EnchantedPlayer" to getDefinedPlayers.
It needs to be added. The only thing I did was enable support for Attaching to the Player, not interacting with the Attached player.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby ArsenalNut » 20 Sep 2011, 04:02

friarsol wrote:
ArsenalNut wrote:
I am trying to script Curse of the Bloody Tome from the Innistrad set. To get the phase trigger to work, I need a way to tell which player is enchanted. I added supported for "EnchantedPlayer" to matchesValid in Trigger.java. Is there another way to do this without adding code? If not, I think I also need to add support for "EnchantedPlayer" to getDefinedPlayers.
It needs to be added. The only thing I did was enable support for Attaching to the Player, not interacting with the Attached player.
Any chance you could look at attachAuraOnIndirectEnterBattlefield? If this worked for player targets, I think I could script Bitterheart Witch.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Card Development Questions

Postby friarsol » 20 Sep 2011, 14:58

ArsenalNut wrote:Any chance you could look at attachAuraOnIndirectEnterBattlefield? If this worked for player targets, I think I could script Bitterheart Witch.
Sure I'll take a look tonight. It looks the AI is mostly setup, so it's just about grabbing the right human choices before giving the dialog.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Iran » 20 Sep 2011, 21:09

Trying to script Wheel of Sun and Moon.

Wheel of Sun and Moon | Open
Name:Wheel of Sun and Moon
ManaCost:GW GW
Types:Enchantment Aura
Text:Enchant player
A:SP$ Attach | Cost$ GW GW | ValidTgts$ Player
T:Mode$ ChangesZone | Defined$ EnchantedPlayer | Origin$ Any | Destination$ Graveyard | ValidCard$ Card | Execute$ TrigLib | TriggerDescription$ If a card would be put into enchanted player's graveyard from anywhere, instead that card is revealed and put on the bottom of that player's library.
SVar:TrigLib:AB$ChangeZone | Cost$ 0 | Defined$ TriggeredTarget | Origin$ Graveyard | Destination$ Exile
End


This script is correct?

thanks
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby friarsol » 20 Sep 2011, 21:21

Well, Wheel of Sun and Moon isn't a trigger. It's a replacement ability. We don't really have scripted replacement abilities.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Iran » 21 Sep 2011, 01:48

friarsol wrote:Well, Wheel of Sun and Moon isn't a trigger. It's a replacement ability. We don't really have scripted replacement abilities.
Oh, it's true

thanks
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby Iran » 22 Sep 2011, 14:17

I see in forge not exists cards like Comet Storm, Conflagrate, Rock Slide, Magmatic Core, Meteor Shower, etc...
Cards that deals X damage divided as you choose among any number of target creatures (and/or players)

Exists any impediments to script then?

Thanks
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby jeffwadsworth » 22 Sep 2011, 14:56

Iran wrote:I see in forge not exists cards like Comet Storm, Conflagrate, Rock Slide, Magmatic Core, Meteor Shower, etc...
Cards that deals X damage divided as you choose among any number of target creatures (and/or players)

Exists any impediments to script then?

Thanks
Check out the java-coded Fireball. No way to script these just yet.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby friarsol » 22 Sep 2011, 16:28

jeffwadsworth wrote:
Iran wrote:I see in forge not exists cards like Comet Storm, Conflagrate, Rock Slide, Magmatic Core, Meteor Shower, etc...
Cards that deals X damage divided as you choose among any number of target creatures (and/or players)

Exists any impediments to script then?

Thanks
Check out the java-coded Fireball. No way to script these just yet.
Fireball is actually a different scenario since the number is divided evenly. (I think Fireball might be actually scriptable)

The cards Iran is talking about are "Divide as you choose." We do have a few cards that "fake" this like Pyrotechnics, but this only works for a known amount of damage. It'd be nice to have a "Divided" parameter for Damage and for any other AF that uses it. (PutCounter I think, maybe Pump)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 44 guests


Who is online

In total there are 44 users online :: 0 registered, 0 hidden and 44 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 44 guests

Login Form