It is currently 06 Jun 2025, 15:48
   
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 ArsenalNut » 05 Sep 2011, 06:58

friarsol wrote:Funnily enough, Flashback doesn't need to be hardcoded, but Rebound needs two primary additions.
Could you explain what you meant by Flashback doesn't need to be hardcoded? Did you mean that it really didn't need a separate button? Or is there a currently supported way to make cards playable from the graveyard that I am just not aware of?
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 » 05 Sep 2011, 13:18

ArsenalNut wrote:
friarsol wrote:Funnily enough, Flashback doesn't need to be hardcoded, but Rebound needs two primary additions.
Could you explain what you meant by Flashback doesn't need to be hardcoded? Did you mean that it really didn't need a separate button? Or is there a currently supported way to make cards playable from the graveyard that I am just not aware of?
I guess I had misunderstood what you meant by hardcoded. What I was saying was Flashback could be scripted without having code for a "Flashback" keyword in CardFactory. (Accessing non-Hand/Battlefield abilities is a different story.)

Whereas Rebound would need code to properly start the Rebound, and properly trigger the Rebound from exile. This isn't related to accessing Flashback/Unearth/Hammer of Bogardan
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 » 05 Sep 2011, 14:39

Iran wrote:How do works the CostChange:{params} keyword?.Which params this keyword use?. Is possible make a spell you cast cost B G W B U with this keyword?. Is possible to script Fist of Suns with this keyword?

thanks
slapshot5 wrote:You'd want the AltCost SVar for this. Look at the script for Bringer of the Black Dawn for an example. I don't think Fist of Suns would currently be doable.
-slapshot5
I see the script of the card Grand Arbiter Augustin IV.
Because of this i asked about CostChange keyword.

I'm trying to script Rooftop Storm (Innistrad Set) and Fist of Suns with this keyword, but I think it will be need changes in code.

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

Re: Card Development Questions

Postby Iran » 08 Sep 2011, 03:22

I'm trying to script Malfegor. i made this script, but i found a problem.
Code: Select all
Name:Malfegor
ManaCost:2 B B R R
Types:Legendary Creature Demon Dragon
Text:no text
PT:6/6
K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ DBDisc | TriggerDescription$ When CARDNAME comes into play, discard your hand. Each opponent sacrifices a creature for each card discarded this way.
SVar:DBDisc: DB$ Discard | Cost$ 0 | Mode$ Hand | SubAbility$ DBSacri
SVar:DBSacri:DB$ Sacrifice | Cost$ 0 | ValidTgts$ Opponent | SacValid$ Creature |SacMessage$ Creature | Amount$ X
SVar:X:Count$InYourHandS
End
The problem is: the computer does not sacrifice any creature. What can be wrong?
Is there another way to script it?
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby friarsol » 08 Sep 2011, 03:31

We need RememberDiscard in AF_Discard. By the time X is counted in your script, your hand is empty.
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 » 08 Sep 2011, 03:44

friarsol wrote:We need RememberDiscard in AF_Discard. By the time X is counted in your script, your hand is empty.
I'm trying script with RememberTargets$ True but the forge generates an error. I think this parameter don't exist in AF_Discard.
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby ArsenalNut » 08 Sep 2011, 07:00

Iran wrote:
friarsol wrote:We need RememberDiscard in AF_Discard. By the time X is counted in your script, your hand is empty.
I'm trying script with RememberTargets$ True but the forge generates an error. I think this parameter don't exist in AF_Discard.
RememberTargets won't help in this situation since you need to remember the number of cards that were in your hand before you discarded it. RememberTargets only puts things you've targeted in the remembered list.

I am already adding RememberDrawn to the Draw AF so I'll look at adding RememberDiscard to the Discard AF which is in the same file.

Another comment on your script, for the opponent sacrifice, use "Defined$ Opponent" instead of "ValidTgt$ Opponent". It's not a targeted ability.
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 » 08 Sep 2011, 11:53

Arsenal,
RememberDiscard is probably the most complicated of Remember functions. The way I was thinking about handling it is to have all the Player.discard() functions return what cards were actually discarded. This way they can be added into RememberDiscarded.
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 » 08 Sep 2011, 12:34

friarsol wrote:Arsenal,
RememberDiscard is probably the most complicated of Remember functions. The way I was thinking about handling it is to have all the Player.discard() functions return what cards were actually discarded. This way they can be added into RememberDiscarded.
I took a quick look after I posted the message. All the discard methods are void methods except for the random discard. I'll need to change them to return a CardList with the discarded cards. Then adding RememberDiscard will following the same pattern the other Remember keys have.
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 » 10 Sep 2011, 00:29

Anyone interested in a Scripting challenge? I believe it's possible to actually Script Fireball (using some tricks, including the one used for Blasphemous Act viewtopic.php?f=52&t=5315&start=45#p69971 )

Here are a few things to consider: Fireball can have a ton of targets. Fireball's cost is increased based on the Number of Targets - 1. Fireball deals damage equal to XPaid / Number of Targets (rounded down).
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Max mtg » 10 Sep 2011, 00:46

maybe let's better rewrite the scripting system to use xml and mathematical expressions? ;)

I could not figure out how to script some simple cards, tried Bazaar Trader, but nothing came out of it
And now I am sad because don't know how to learn that magic language
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Card Development Questions

Postby friarsol » 10 Sep 2011, 01:00

Max mtg wrote:maybe let's better rewrite the scripting system to use xml and mathematical expressions? ;)

I could not figure out how to script some simple cards, tried Bazaar Trader, but nothing came out of it
And now I am sad because don't know how to learn that magic language
Funny guy. Bazaar Trader isn't possible right now due to how GainControl works and the double targeting.
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 » 10 Sep 2011, 04:37

Is possible to script Springjack Pasture? Anyone has some ideia how to script the last mana ability of it.
" Tap, Sacrifice X Goats: Add X mana of any one color to your mana pool. You gain X life. "

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

Re: Card Development Questions

Postby ArsenalNut » 10 Sep 2011, 05:26

Iran wrote:Is possible to script Springjack Pasture? Anyone has some ideia how to script the last mana ability of it.
" Tap, Sacrifice X Goats: Add X mana of any one color to your mana pool. You gain X life. "

Thanks
You have to setup it up as five different choices, look at Black Lotus for an example of five choices. Copper-Leaf Angel is another card that uses the sacrifice x cost mechanic.
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 ZzzzSleep » 10 Sep 2011, 14:44

Does anybody have an opinion whether Millikin is implemented well enough to be used as a base for Deranged Assistant? 99% of the time it works the same, but I can think of some exceptions.
* With the current Millikin implementation, you can still generate mana with an empty library.
* The cost should be paid immediately, which might make a difference if the opposing player responds with some form of milling/shuffling effect.

Any thoughts/suggestions?
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 41 guests


Who is online

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

Login Form