Page 55 of 141

Re: Card Development Questions

PostPosted: 05 Sep 2011, 06:58
by ArsenalNut
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?

Re: Card Development Questions

PostPosted: 05 Sep 2011, 13:18
by friarsol
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

Re: Card Development Questions

PostPosted: 05 Sep 2011, 14:39
by Iran
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

Re: Card Development Questions

PostPosted: 08 Sep 2011, 03:22
by Iran
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?

Re: Card Development Questions

PostPosted: 08 Sep 2011, 03:31
by friarsol
We need RememberDiscard in AF_Discard. By the time X is counted in your script, your hand is empty.

Re: Card Development Questions

PostPosted: 08 Sep 2011, 03:44
by Iran
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.

Re: Card Development Questions

PostPosted: 08 Sep 2011, 07:00
by ArsenalNut
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.

Re: Card Development Questions

PostPosted: 08 Sep 2011, 11:53
by friarsol
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.

Re: Card Development Questions

PostPosted: 08 Sep 2011, 12:34
by ArsenalNut
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.

Re: Card Development Questions

PostPosted: 10 Sep 2011, 00:29
by friarsol
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).

Re: Card Development Questions

PostPosted: 10 Sep 2011, 00:46
by Max mtg
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

Re: Card Development Questions

PostPosted: 10 Sep 2011, 01:00
by friarsol
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.

Re: Card Development Questions

PostPosted: 10 Sep 2011, 04:37
by Iran
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

Re: Card Development Questions

PostPosted: 10 Sep 2011, 05:26
by ArsenalNut
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.

Re: Card Development Questions

PostPosted: 10 Sep 2011, 14:44
by ZzzzSleep
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?