Scripting custom card
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Scripting custom card
by Djebb » 23 Jan 2015, 19:07
Hi there !
I'm adding a set i made myself on forge and i've got a problem with one of my creature.
That creature has an activated abilities whose cost is "Shuffle a random card from your hand into your library :" .
Is it somehow possible to do this ? And if it is, may someone help me ?
Thanks a lot !
Djebb
I'm adding a set i made myself on forge and i've got a problem with one of my creature.
That creature has an activated abilities whose cost is "Shuffle a random card from your hand into your library :" .
Is it somehow possible to do this ? And if it is, may someone help me ?
Thanks a lot !
Djebb
Re: Scripting custom card
by friarsol » 23 Jan 2015, 19:23
I doubt that's possible, since I don't believe any card in Magic has that cost. Probably the closest we have is Hidden Retreat.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Scripting custom card
by Djebb » 23 Jan 2015, 21:37
Weird. I don't have Hidden Retreat on my computer O.o. Seems like forge is missing 2 cards from Stronghold including Hidden Retreat. How may this happen ? o.O
Re: Scripting custom card
by friarsol » 23 Jan 2015, 21:54
Ah sorry, I didn't mean Forge had it. I meant the closest thing in Magic. Leashling has that same cost though, and it is supported by Forge.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Scripting custom card
by Djebb » 23 Jan 2015, 22:40
xD That's why.friarsol wrote:Ah sorry, I didn't mean Forge had it.
Thanks for the Leashling card. I think it'd be better if I remove the 'random' part.
I just need to add a 'shuffle' fonction to make it work i guess.
Re: Scripting custom card
by Djebb » 25 Jan 2015, 01:44
Yop there.
I've got a litle probleme here
I've made a pretty weird creature :
1st ability : Whenever an opponent casts a spell during your turn, if this spell is the 1st that opponent has cast this turn, the spell is countered
2nd ability (named 'Psionic') : Whenever an opponent casts a spell during your turn, if you have more cards in your hand than this opponent, the spell is countered.
The thing is, when my opp casts a spell during my turn, the game doesn't seem to care about the 1st ability (it just doens't trigger)
Plus, all the spell my opp casts during my turn is countered, even if he has more cards than me.
I just don't get where my mistakes are.
Here's my code if someone can help me
I've got a litle probleme here
I've made a pretty weird creature :
1st ability : Whenever an opponent casts a spell during your turn, if this spell is the 1st that opponent has cast this turn, the spell is countered
2nd ability (named 'Psionic') : Whenever an opponent casts a spell during your turn, if you have more cards in your hand than this opponent, the spell is countered.
The thing is, when my opp casts a spell during my turn, the game doesn't seem to care about the 1st ability (it just doens't trigger)
Plus, all the spell my opp casts during my turn is countered, even if he has more cards than me.
I just don't get where my mistakes are.
Here's my code if someone can help me
- Code: Select all
T:Mode$ SpellCast | ValidActivatingPlayer$ Player.Opponent | TriggerZones$ Battlefield | PlayerTurn$ True | CheckSVar$ HeCastThisTurn | SVarCompare$ EQ2 | Execute$ TrigCounter | TriggerDescription$ Whenever an opponent casts a spell during your turn, if this spell is the first that opponent has cast this turn, the spell is countered
T:Mode$ SpellCast | ValidActivatingPlayer$ Player.Opponent | TriggerZones$ Battlefield | PlayerTurn$ True | ConditionCheckSVar$ Y | ConditionSVarCompare$ LE0 | References$ X,Y | Execute$ TrigCounter | TriggerDescription$ Psionic - Whenever an opponent casts a spell during your turn, if you have more cards in your hand than this opponent, the spell is countered.
SVar:X:Count$CardsInHand
SVar:Y:TriggeredSourceController$InYourHand/Minus.X
SVar:HeCastThisTurn:TriggeredSourceController$ThisTurnCast_Card.
SVar:TrigCounter:AB$ Pump | Cost$ 0 | RememberObjects$ TriggeredCard | SubAbility$ DBCounter
SVar:DBCounter:DB$ Counter | Defined$ TriggeredSpellAbility | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:RemRandomDeck:True
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 125 guests