It is currently 16 Nov 2018, 15:55
   
Text Size

Card Contributions

Post MTG Forge Related Programming Questions Here

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

Re: Card Contributions

Postby Jobexi » 03 May 2017, 18:28

By Force was previously nonfunctional (could not target artifacts), and had an anomaly where it referenced snow lands. The following code was functional in my testing.

I had to remove the line where it fetches the image, because I'm classified as a new user.

Code: Select all
Name:By Force
ManaCost:X R
Types:Sorcery
A:SP$ Destroy | Cost$ X R | TargetMin$ 0 | TargetMax$ MaxTgts | ValidTgts$ Artifact | TgtPrompt$ Select target artifacts | References$ X,MaxTgts | SpellDescription$ Destroy X target artifacts.
SVar:X:Targeted$Amount
SVar:MaxTgts:Count$Valid Artifact

Oracle:Destroy X target artifacts.
Jobexi
 
Posts: 7
Joined: 03 May 2017, 16:31
Has thanked: 3 times
Been thanked: 2 times

Re: Card Contributions

Postby Jobexi » 05 May 2017, 17:44

Benefactor's Draught previously crashed the game on cast. The version below should fix that problem.

I had to remove the line that grabs the image, because I'm classified as a new user.

Code: Select all
Name:Benefactor's Draught
ManaCost:1 G
Types:Instant
A:SP$ UntapAll | Cost$ 1 G | ValidCards$ Creature | SubAbility$ DBEffect | SpellDescription$ Untap all creatures. Until end of turn, whenever a creature an opponent controls blocks, draw a card. Draw a card.
SVar:DBEffect:DB$ Effect | Name$ Benefactor's Draught Effect | Triggers$ TrigBlock | SVars$ EffDraw | SubAbility$ DBDraw
SVar:TrigBlock:Mode$ Blocks | ValidCard$ Creature.OppCtrl | Execute$ EffDraw | TriggerDescription$ Whenever a creature an opponent controls blocks, draw a card.
SVar:EffDraw:DB$ Draw | NumCards$ 1
SVar:DBDraw:DB$ Draw | NumCards$ 1

Oracle:Untap all creatures. Until end of turn, whenever a creature an opponent controls blocks, draw a card.\nDraw a card.
Jobexi
 
Posts: 7
Joined: 03 May 2017, 16:31
Has thanked: 3 times
Been thanked: 2 times

Re: Card Contributions

Postby schnautzr » 11 Jul 2017, 04:31

Code: Select all
Name:Meddle
ManaCost:1 U
Types:Instant
A:SP$ ChangeTargets | Cost$ 1 U | TargetType$ Spell | ValidTgts$ Spell | ConditionTargetValidTargeting$ Creature | ConditionTargetsSingleTarget$ True | TargetRestriction$ Creature.Other | SpellDescription$ If target spell has only one target and that target is a creature, change that spell's target to another creature.
Oracle:If target spell has only one target and that target is a creature, change that spell's target to another creature.
User avatar
schnautzr
 
Posts: 105
Joined: 23 Aug 2012, 01:13
Location: UTC -6/-5
Has thanked: 27 times
Been thanked: 7 times

Re: Card Contributions

Postby fsecco » 03 Oct 2018, 19:58

This is a working Mission Briefing
Code: Select all
Name:Mission Briefing
ManaCost:U U
Types:Instant
A:SP$ Dig | Cost$ U U | DigNum$ 2 | AnyNumber$ True | DestinationZone$ Graveyard | LibraryPosition2$ 0 | SubAbility$ DBChooseCard | SpellDescription$ Look at the top two cards of your library, then put any number of them into your graveyard and the rest on top of your library in any order.

SVar:DBChooseCard:DB$ ChooseCard | Choices$ Instant.YouCtrl,Sorcery.YouCtrl | ChoiceZone$ Graveyard | AILogic$ CastFromGraveThisTurn | Mandatory$ True | RememberChosen$ True | SubAbility$ DBEffect | SpellDescription$ You may cast that card this turn. If that card would be put into your graveyard this turn, exile it instead.

SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ Play |  SubAbility$ DBCleanup | ExileOnMoved$ Stack | ReplacementEffects$ ReplaceGraveyard | SVars$ MoveExile

SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Graveyard | Description$ You may play remembered card.


SVar:ReplaceGraveyard:Event$ Moved | ValidCard$ Card.IsRemembered | Origin$ Stack | Destination$ Graveyard | ReplaceWith$ MoveExile | Description$ If that card would be put into your graveyard this turn, exile it instead.

SVar:MoveExile:DB$ ChangeZone | Defined$ ReplacedCard | Origin$ Stack | Destination$ Exile
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/mission_briefing.jpg
Oracle:Surveil 2, then choose an instant or sorcery card in your graveyard. You may cast that card this turn. If that card would be put into your graveyard this turn, exile it instead.
fsecco
 
Posts: 23
Joined: 11 Jul 2014, 18:37
Has thanked: 0 time
Been thanked: 3 times

Re: Card Contributions

Postby austinio7116 » 04 Oct 2018, 16:13

We have Surveil coded - so no need to use dig - in fact it needs to be surveil so that it triggers "whenever you surveil..." etc.
User avatar
austinio7116
 
Posts: 380
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 124 times

Re: Card Contributions

Postby austinio7116 » 04 Oct 2018, 16:19

I updated the script and submitted an MR: https://git.cardforge.org/core-develope ... quests/987
User avatar
austinio7116
 
Posts: 380
Joined: 10 Mar 2017, 11:59
Has thanked: 47 times
Been thanked: 124 times

Re: Card Contributions

Postby stormcat » 04 Oct 2018, 17:30

Because it will not be fixed, I contribute the cards that I manually repaired.
If its helpful then happy.

1.House Guildmage
Amount -> Amount$
Code: Select all
Name:House Guildmage
ManaCost:U B
Types:Creature Human Wizard
PT:2/2
A:AB$ Pump | Cost$ 1 U T | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ HIDDEN This card doesn't untap during your next untap step. | Permanent$ True | IsCurse$ True | SpellDescription$ Target creature doesn't untap during its controller's next untap step.
A:AB$ Surveil | Cost$ 2 B T | Amount$ 2 | SpellDescription$ Surveil 2. (Look at the top two cards of your library, then put any number of them into your graveyard and the rest on top of your library in any order.)
Oracle:{1}{U}, {T}: Target creature doesn't untap during its controller's next untap step.\n{2}{B}, {T}: Surveil 2. (Look at the top two cards of your library, then put any number of them into your graveyard and the rest on top of your library in any order.)
2.Suspicious Bookcase
In oracle {3}{T} -> {3}, {T}
Code: Select all
Name:Suspicious Bookcase
ManaCost:2
Types:Artifact Creature Wall
PT:0/4
K:Defender
A:AB$ Pump | Cost$ 3 T | ValidTgts$ Creature | KW$ HIDDEN Unblockable | SpellDescription$ Target creature can't be blocked this turn. | TgtPrompt$ Select target creature.
SVar:Picture:http://www.wizards.com/global/images/magic/general/suspicious_bookcase.jpg
Oracle:Defender\n{3}, {T}: Target creature can't be blocked this turn.
3.Vivien's Jaguar
add K:Reach
Code: Select all
Name:Vivien's Jaguar
ManaCost:2 G
Types:Creature Cat Spirit
K:Reach
A:AB$ ChangeZone | Cost$ 2 G | Origin$ Graveyard | Destination$ Hand | ActivationZone$ Graveyard | IsPresent$ Planeswalker.Vivien+YouCtrl | SpellDescription$ Return CARDNAME from your graveyard to your hand. Activate this ability only if you control a Vivien planeswalker.
Oracle:Reach\n{2}{G}: Return Vivien's Jaguar from your graveyard to your hand. Activate this ability only if you control a Vivien planeswalker.
PT:3/2
stormcat
 
Posts: 308
Joined: 17 Jun 2015, 05:32
Has thanked: 0 time
Been thanked: 5 times

Re: Card Contributions

Postby Eehoe » 14 Oct 2018, 15:47

Working Godsend - AI doesn't cast exiled cards anymore
(used Circu, Dimir Lobotomist for reference)

Updated

From
Code: Select all
S:Mode$ CantBeCast | ValidCard$ Card.sharesNameWith Remembered+ExiledWithSource | Caster$ Opponent


To

Code: Select all
S:Mode$ CantBeCast | ValidCard$ Card.nonLand+sharesNameWith Remembered.ExiledWithSource | Caster$ Opponent


Code: Select all
Name:Godsend
ManaCost:1 W W
Types:Legendary Artifact Equipment
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 3 | AddToughness$ 3 | Description$ Equipped creature gets +3/+3.
T:Mode$ Blocks | ValidCard$ Card.EquippedBy | ValidBlocked$ Creature | Execute$ TrigChooseAttackers | OptionalDecider$ You | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by one or more creatures, you may exile one of those creatures.
T:Mode$ AttackerBlocked | ValidCard$ Card.EquippedBy | ValidBlocker$ Creature | Execute$ TrigChooseBlockers | OptionalDecider$ You | Secondary$ True | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by one or more creatures, you may exile one of those creatures.
SVar:TrigChooseAttackers:DB$ ChooseCard | DefinedCards$ TriggeredAttackers | SubAbility$ DBExile
SVar:TrigChooseBlockers:DB$ ChooseCard | DefinedCards$ TriggeredBlockers | SubAbility$ DBExile
SVar:DBExile:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True
S:Mode$ CantBeCast | ValidCard$ Card.nonLand+sharesNameWith Remembered.ExiledWithSource | Caster$ Opponent |  Description$ Your opponents can't cast spells with the same name as a card exiled with CARDNAME.
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget
SVar:DBForget:DB$ Pump | ForgetObjects$ TriggeredCard
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Any | Execute$ DBCleanup | Static$ True | Secondary$ True | TriggerDescription$ Forget all remembered cards.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
K:Equip:3
SVar:Picture:http://www.wizards.com/global/images/magic/general/godsend.jpg
Oracle:Equipped creature gets +3/+3.\nWhenever equipped creature blocks or becomes blocked by one or more creatures, you may exile one of those creatures.\nYour opponents can't cast spells with the same name as a card exiled with Godsend.\nEquip {3}
Eehoe
 
Posts: 19
Joined: 20 May 2018, 01:54
Has thanked: 1 time
Been thanked: 9 times

Re: Card Contributions

Postby stormcat » 18 Oct 2018, 22:16

Generous Patron's second triggered ability does not matter the type of counter.
It works correctly by deleting the part to check the type of counter.

Code: Select all
Name:Generous Patron
ManaCost:2 G
Types:Creature Elf Advisor
PT:1/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPut | TriggerDescription$ When CARDNAME enters the battlefield, support 2. (Put a +1/+1 counter on each of up to two other target creatures.)
SVar:TrigPut:DB$PutCounter | ValidTgts$ Creature.Other | TgtPrompt$ Select target creature other than CARDNAME | TargetMin$ 0 | TargetMax$ 2 | CounterType$ P1P1 | CounterNum$ 1
T:Mode$ CounterAddedOnce | ValidCard$ Creature.YouDontCtrl | ValidSource$ You | TriggerZones$ Battlefield | Execute$ DBDraw | TriggerDescription$ Whenever you put one or more counters on a creature you don't control, draw a card.
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 1
DeckHas:Ability$Counters
DeckHints:Ability$Counters
Oracle:When Generous Patron enters the battlefield, support 2. (Put a +1/+1 counter on each of up to two other target creatures.)\nWhenever you put one or more counters on a creature you don't control, draw a card.
stormcat
 
Posts: 308
Joined: 17 Jun 2015, 05:32
Has thanked: 0 time
Been thanked: 5 times

Re: Card Contributions

Postby gos » 08 Nov 2018, 14:44

Is there any interest in adding the Arena exclusive cards? I made an attempt at scripting them - I think they're correct.

Angelic Reward
Blinding Radiance
Confront the Assault
Cruel Cut
Feral Roar
Goblin Bruiser
Goblin Gang Leader
Inspiring Commander
Nimble Pilferer
Ogre Painbringer
River's Favor
Shorecomber Crab
Shrine Keeper
Soulhunter Rakshasa
Tactical Advantag
Titanic Pelagosaur
Treetop Warden
Zephyr Gull
Attachments
ana.zip
(6.22 KiB) Downloaded 5 times
gos
 
Posts: 3372
Joined: 03 Mar 2011, 15:21
Location: Reykjavík, Iceland
Has thanked: 216 times
Been thanked: 199 times

Re: Card Contributions

Postby friarsol » 11 Nov 2018, 01:30

Eehoe wrote:Working Godsend - AI doesn't cast exiled cards anymore
(used Circu, Dimir Lobotomist for reference)

Updated

From
Code: Select all
S:Mode$ CantBeCast | ValidCard$ Card.sharesNameWith Remembered+ExiledWithSource | Caster$ Opponent


To

Code: Select all
S:Mode$ CantBeCast | ValidCard$ Card.nonLand+sharesNameWith Remembered.ExiledWithSource | Caster$ Opponent


Code: Select all
Name:Godsend
ManaCost:1 W W
Types:Legendary Artifact Equipment
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 3 | AddToughness$ 3 | Description$ Equipped creature gets +3/+3.
T:Mode$ Blocks | ValidCard$ Card.EquippedBy | ValidBlocked$ Creature | Execute$ TrigChooseAttackers | OptionalDecider$ You | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by one or more creatures, you may exile one of those creatures.
T:Mode$ AttackerBlocked | ValidCard$ Card.EquippedBy | ValidBlocker$ Creature | Execute$ TrigChooseBlockers | OptionalDecider$ You | Secondary$ True | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by one or more creatures, you may exile one of those creatures.
SVar:TrigChooseAttackers:DB$ ChooseCard | DefinedCards$ TriggeredAttackers | SubAbility$ DBExile
SVar:TrigChooseBlockers:DB$ ChooseCard | DefinedCards$ TriggeredBlockers | SubAbility$ DBExile
SVar:DBExile:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True
S:Mode$ CantBeCast | ValidCard$ Card.nonLand+sharesNameWith Remembered.ExiledWithSource | Caster$ Opponent |  Description$ Your opponents can't cast spells with the same name as a card exiled with CARDNAME.
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget
SVar:DBForget:DB$ Pump | ForgetObjects$ TriggeredCard
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Any | Execute$ DBCleanup | Static$ True | Secondary$ True | TriggerDescription$ Forget all remembered cards.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
K:Equip:3
SVar:Picture:http://www.wizards.com/global/images/magic/general/godsend.jpg
Oracle:Equipped creature gets +3/+3.\nWhenever equipped creature blocks or becomes blocked by one or more creatures, you may exile one of those creatures.\nYour opponents can't cast spells with the same name as a card exiled with Godsend.\nEquip {3}
I pushed the change here:

https://git.cardforge.org/core-develope ... uests/1089
friarsol
Global Moderator
 
Posts: 7306
Joined: 15 May 2010, 04:20
Has thanked: 235 times
Been thanked: 904 times

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 5 guests


Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 5 guests

Login Form