It is currently 13 Nov 2025, 00:00
   
Text Size

Card Contributions

Post MTG Forge Related Programming Questions Here

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

Re: Card Contributions

Postby Zirbert » 28 Sep 2012, 00:05

Also tested and working: Detritivore.

Code: Select all
Name:Detritivore
ManaCost:2 R R
Types:Creature Lhurgoyf
Text:X can't be 0.
PT:*/*
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ Y | SetToughness$ Y | References$ Y | Description$ CARDNAME's power and toughness are each equal to the number of nonbasic land cards in your opponents' graveyards.
K:Suspend:X:XCantBe0 X 3 R
T:Mode$ CounterRemoved | ValidCard$ Card.Self  | TriggerZones$ Exile | CounterType$ TIME | Execute$ TrigDestroy | TriggerDescription$ Whenever a time counter is removed from CARDNAME while it's exiled, destroy target nonbasic land.
SVar:TrigDestroy:DB$Destroy | ValidTgts$ Land.nonBasic | TgtPrompt$ Select a nonbasic land.
SVar:X:Count$xPaid
SVar:Y:Count$ValidGrave Land.nonBasic+YouDontCtrl
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/detritivore.jpg
SetInfo:PLC|Rare|http://magiccards.info/scans/en/pc/96.jpg
Oracle:Detritivore's power and toughness are each equal to the number of nonbasic land cards in your opponents' graveyards.\nSuspend X-{X}{3}{R}. X can't be 0. (Rather than cast this card from your hand, you may pay {X}{3}{R} and exile it with X time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.)\nWhenever a time counter is removed from Detritivore while it's exiled, destroy target nonbasic land.
End
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Contributions

Postby Zirbert » 28 Sep 2012, 01:55

And Roiling Horror, tested and working. Fungal Behemoth turns out to have been the tough one. I have no idea how to calculate "power and toughness equal to the number of +1/+1 counters on creatures you control." Suggestions are welcome.

Anyway, here's Roiling Horror, bringing us three cards closer to completing Planar Chaos as soon as somebody commits them (hint, hint). If I'd known that these would be so easy, I would have posted them as a pack.

Code: Select all
Name:Roiling Horror
ManaCost:3 B B
Types:Creature Horror
Text:X can't be 0.
PT:*/*
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ Y | SetToughness$ Y | References$ Y | Description$ CARDNAME's power and toughness are each equal to your life total minus the life total of an opponent with the most life.
K:Suspend:X:XCantBe0 X B B B
T:Mode$ CounterRemoved | ValidCard$ Card.Self  | TriggerZones$ Exile | CounterType$ TIME | Execute$ TrigLoseLife | TriggerDescription$ Whenever a time counter is removed from CARDNAME while it's exiled, target player loses 1 life and you gain 1 life.
SVar:TrigLoseLife:AB$ LoseLife | Cost$ 0 | ValidTgts$ Player | TgtPrompt$ Choose a player | LifeAmount$ 1 | SubAbility$ DBGainLife
SVar:DBGainLife:DB$ GainLife | Cost$ 0 | Defined$ You | LifeAmount$ 1
SVar:X:Count$xPaid
SVar:Y:Count$YourLifeTotal/Minus.Z
SVar:Z:Count$OppLifeTotal
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/roiling_horror.jpg
SetInfo:PLC|Rare|http://magiccards.info/scans/en/pc/79.jpg
Oracle:Roiling Horror's power and toughness are each equal to your life total minus the life total of an opponent with the most life.\nSuspend X—{X}{B}{B}{B}. X can't be 0. (Rather than cast this card from your hand, you may pay {X}{B}{B}{B} and exile it with X time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.)\nWhenever a time counter is removed from Roiling Horror while it's exiled, target player loses 1 life and you gain 1 life.
End
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Contributions

Postby moomarc » 28 Sep 2012, 08:04

Zirbert wrote:And Roiling Horror, tested and working. Fungal Behemoth turns out to have been the tough one. I have no idea how to calculate "power and toughness equal to the number of +1/+1 counters on creatures you control." Suggestions are welcome.
Thanks Zirbert! Just committed your cards (although accidentally attributed them to ZzzzSleep :oops: )

For Fungal Behemoth, the reason you don't know how to calculate the total counters is because Forge doesn't have a methot for that yet. Should be easy enough to add though.

EDIT: It does now. Fungal Behemoth added!
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Card Contributions

Postby Zirbert » 29 Sep 2012, 01:43

I'm having a minor card-scripting relapse. Because absolutely no one demanded it, even as a joke, here's Ignoble Soldier. Tested and working, although the AI doesn't seem to know how to deal with it, choosing to let it in rather than "chump block" it with a 1/1 in the early game.

I'm also not sure whether it should have RemAIDeck - I left it out, because it's always a useful blocker even if it's not a great attacker sometimes. Whoever commits this, feel free to overrule me on that.

Code: Select all
Name:Ignoble Soldier
ManaCost:2 W
Types:Creature Human Soldier
Text:no text
PT:3/1
T:Mode$ AttackerBlocked | ValidCard$ Card.Self | Execute$ TrigNodamage | TriggerDescription$ Whenever CARDNAME becomes blocked, prevent all combat damage that would be dealt by it this turn.
SVar:TrigNodamage:AB$ Pump | Cost$ 0 | KW$ HIDDEN Prevent all combat damage that would be dealt by CARDNAME. | SpellDescription$ Prevent all combat damage that would be dealt by CARDNAME this turn.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/ignoble_soldier.jpg
SetInfo:MMQ|Common|http://magiccards.info/scans/en/mm/22.jpg
Oracle:Whenever Ignoble Soldier becomes blocked, prevent all combat damage that would be dealt by it this turn.
End
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Contributions

Postby Hellfish » 29 Sep 2012, 08:25

Might be 'good enough' to give it the MustBeBlocked SVar thst Phage has?
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Card Contributions

Postby Sloth » 29 Sep 2012, 10:51

Zirbert wrote:I'm having a minor card-scripting relapse. Because absolutely no one demanded it, even as a joke, here's Ignoble Soldier. Tested and working, although the AI doesn't seem to know how to deal with it, choosing to let it in rather than "chump block" it with a 1/1 in the early game.

I'm also not sure whether it should have RemAIDeck - I left it out, because it's always a useful blocker even if it's not a great attacker sometimes. Whoever commits this, feel free to overrule me on that.

Code: Select all
Name:Ignoble Soldier
ManaCost:2 W
Types:Creature Human Soldier
Text:no text
PT:3/1
T:Mode$ AttackerBlocked | ValidCard$ Card.Self | Execute$ TrigNodamage | TriggerDescription$ Whenever CARDNAME becomes blocked, prevent all combat damage that would be dealt by it this turn.
SVar:TrigNodamage:AB$ Pump | Cost$ 0 | KW$ HIDDEN Prevent all combat damage that would be dealt by CARDNAME. | SpellDescription$ Prevent all combat damage that would be dealt by CARDNAME this turn.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/ignoble_soldier.jpg
SetInfo:MMQ|Common|http://magiccards.info/scans/en/mm/22.jpg
Oracle:Whenever Ignoble Soldier becomes blocked, prevent all combat damage that would be dealt by it this turn.
End
Added! Thanks Zirbert.

Hellfish wrote:Might be 'good enough' to give it the MustBeBlocked SVar thst Phage has?
Excellent idea Hellfish!

(But what a crappy card...)
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Contributions

Postby friarsol » 02 Oct 2012, 01:14

I just converted Mox Diamond to a replacement event. The following cards should be able to be converted in a similar fashion if someone is interested:

Lotus Vale
Scorched Ruins

Kjeldoran Outpost
Balduvian Trading Post
Heart of Yavimaya
Lake of the Dead
Soldevi Excavations

Sheltered Valley (SacrificeAll + Card.namedSheltered Valley)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Contributions

Postby friarsol » 06 Oct 2012, 01:29

In celebration of finishing RtR on release day, I went through for Ravnica cards to see which are scriptable

http://www.slightlymagic.net/wiki/Forge ... _of_Guilds
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Contributions

Postby swordshine » 07 Oct 2012, 05:39

This is my first time to script a card.
Tested and working: Nature's Will
Code: Select all
Name:Nature's Will
ManaCost:2 G G
Types:Enchantment
Text:no text
T:Mode$ DamageDone | ValidSource$ Creature.YouCtrl | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigTapAll | TriggerZones$ Battlefield | TriggerDescription$ Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control.
SVar:TrigTapAll:DB$ TapAll | ValidCards$ Land | SubAbility$ DBUntapAll
SVar:DBUntapAll:DB$ UntapAll | ValidCards$ Land.YouCtrl
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/natures_will.jpg
SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/230.jpg
Oracle:Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control.
End
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Card Contributions

Postby moomarc » 07 Oct 2012, 06:08

swordshine wrote:This is my first time to script a card.
Tested and working: Nature's Will
Code: Select all
Name:Nature's Will
ManaCost:2 G G
Types:Enchantment
Text:no text
T:Mode$ DamageDone | ValidSource$ Creature.YouCtrl | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigTapAll | TriggerZones$ Battlefield | TriggerDescription$ Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control.
SVar:TrigTapAll:DB$ TapAll | ValidCards$ Land | SubAbility$ DBUntapAll
SVar:DBUntapAll:DB$ UntapAll | ValidCards$ Land.YouCtrl
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/natures_will.jpg
SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/230.jpg
Oracle:Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control.
End
It's not quite right yet. This would tap all your lands before untapping them. This slight difference means that if any of your lands have an enchantment on them that trigger whenever it becomes tapped, those triggers will fire.
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Card Contributions

Postby swordshine » 15 Oct 2012, 00:31

Code: Select all
Name:Vectis Dominator
ManaCost:1 W B
Types:Artifact Creature Human Wizard
PT:0/2
Text:no text
A:AB$ Tap | Cost$ T | ValidTgts$ Creature | TgtPrompt$ Select target creature | UnlessCost$ PayLife<2> | UnlessPayer$ TargetedController | SpellDescription$ Tap target creature unless its controller pays 2 life.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/vectis_dominator.jpg
SetInfo:ARB|Common|http://magiccards.info/scans/en/arb/84.jpg
Oracle:{T}: Tap target creature unless its controller pays 2 life.
End
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Card Contributions

Postby ArsenalNut » 15 Oct 2012, 03:48

moomarc wrote:
swordshine wrote:This is my first time to script a card.
Tested and working: Nature's Will
Code: Select all
Name:Nature's Will
ManaCost:2 G G
Types:Enchantment
Text:no text
T:Mode$ DamageDone | ValidSource$ Creature.YouCtrl | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigTapAll | TriggerZones$ Battlefield | TriggerDescription$ Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control.
SVar:TrigTapAll:DB$ TapAll | ValidCards$ Land | SubAbility$ DBUntapAll
SVar:DBUntapAll:DB$ UntapAll | ValidCards$ Land.YouCtrl
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/natures_will.jpg
SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/230.jpg
Oracle:Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control.
End
It's not quite right yet. This would tap all your lands before untapping them. This slight difference means that if any of your lands have an enchantment on them that trigger whenever it becomes tapped, those triggers will fire.
Adding YouDontCtrl to the ValidCards in the TapAll subability would fix that.
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 Contributions

Postby swordshine » 15 Oct 2012, 04:06

ArsenalNut wrote:
moomarc wrote:
swordshine wrote:This is my first time to script a card.
Tested and working: Nature's Will
Code: Select all
Name:Nature's Will
ManaCost:2 G G
Types:Enchantment
Text:no text
T:Mode$ DamageDone | ValidSource$ Creature.YouCtrl | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigTapAll | TriggerZones$ Battlefield | TriggerDescription$ Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control.
SVar:TrigTapAll:DB$ TapAll | ValidCards$ Land | SubAbility$ DBUntapAll
SVar:DBUntapAll:DB$ UntapAll | ValidCards$ Land.YouCtrl
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/natures_will.jpg
SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/230.jpg
Oracle:Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control.
End
It's not quite right yet. This would tap all your lands before untapping them. This slight difference means that if any of your lands have an enchantment on them that trigger whenever it becomes tapped, those triggers will fire.
Adding YouDontCtrl to the ValidCards in the TapAll subability would fix that.
The card says "Whenever one or more creatures you control deal combat damage to a player...", so it only triggers once when two or more creatures deal damage. This script cannot do it.
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Card Contributions

Postby swordshine » 15 Oct 2012, 04:21

Here is Brine Seer, copyed from Scent of Brine.
Code: Select all
Name:Brine Seer
ManaCost:3 U
Types:Creature Human Wizard
PT:1/1
Text:no text
A:AB$ Reveal | Cost$ 2 U T | Defined$ You | RevealValid$ Card.Blue | AnyNumber$ True | RememberRevealed$ True | SubAbility$ DBCounter | SpellDescription$ Reveal any number of blue cards in your hand. Counter target spell unless its controller pays 1 for each card revealed this way.
SVar:DBCounter:DB$ Counter | Cost$ 0 | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | UnlessCost$ X | SubAbility$ DBCleanup | References$ X
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/brine_seer.jpg
SetInfo:UDS|Uncommon|http://magiccards.info/scans/en/ud/28.jpg
Oracle:{2}{U}, {T}: Reveal any number of blue cards in your hand. Counter target spell unless its controller pays {1} for each card revealed this way.
End
And some “Unless Pay Life” cards, I think they worked.
Code: Select all
Name:Mundungu
ManaCost:1 U B
Types:Creature Human Wizard
PT:1/1
Text:no text
A:AB$ Counter | Cost$ T | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | UnlessCost$ 1 PayLife<1> | SpellDescription$ Counter target spell unless its controller pays {1} and 1 life.
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/mundungu.jpg
SetInfo:VIS|Uncommon|http://magiccards.info/scans/en/vi/132.jpg
Oracle:{T}: Counter target spell unless its controller pays {1} and 1 life.
End
Code: Select all
Name:Tyrannize
ManaCost:3 BR BR
Types:Sorcery
Text:no text
A:SP$ Discard | Cost$ 3 BR BR | ValidTgts$ Player | TgtPrompt$ Select target player | Mode$ Hand | UnlessCost$ PayLife<7> | UnlessPayer$ Targeted | SpellDescription$ Target player discards his or her hand unless he or she pays 7 life.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/tyrannize.jpg
SetInfo:SHM|Rare|http://magiccards.info/scans/en/shm/201.jpg
Oracle:Target player discards his or her hand unless he or she pays 7 life.
End
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Card Contributions

Postby friarsol » 15 Oct 2012, 15:07

Now that Sloth added "SharesColorWith MostProminentColor"

http://svn.slightlymagic.net/websvn/log ... &peg=17512

The invasion Djinni should be scriptable (if he hasn't already finished them)

http://magiccards.info/query?q=o%3Adjin ... t+o%3Atied
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 24 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 24 users online :: 0 registered, 0 hidden and 24 guests (based on users active over the past 10 minutes)
Most users ever online was 9824 on 10 Nov 2025, 04:33

Users browsing this forum: No registered users and 24 guests

Login Form