It is currently 14 Sep 2025, 17:47
   
Text Size

Card Contributions

Post MTG Forge Related Programming Questions Here

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

Re: Card Contributions

Postby ArsenalNut » 10 Jan 2012, 16:10

Sloth wrote:
moomarc wrote:
ArsenalNut wrote:As to getting Harmonic Sliver to work, try changing the static effect to "Affected$ Sliver.Other" and add a hardcoded ETB trigger that works for the original sliver only.
That's beyond my ability. I just dabble with code where I can see a pattern.
The trigger doesn't have to be hardcoded. Just a normal trigger with "ValidCard$ Sliver.Self" should be enough.
Hardcoded was a poor choice of words #-o I meant a scripted trigger like Sloth suggested as opposed to trying to add the trigger by a static effect.
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 Sloth » 10 Jan 2012, 16:22

xanbie wrote:Here is some cards. One is a real card, the other 3 I made up all using Triggers. Sword I made last year with MSE.

Hedron-Field Purists :

| Open
Code: Select all
Name:Hedron-Field Purists
ManaCost:2 W
Types:Creature Human Cleric
Text:no text
PT:0/3
K:Level up:2 W
K:maxLevel:5
S:Mode$ Continuous | Affected$ Card.Self | SetPower$ 1 | SetToughness$ 4 | CheckSVar$ X | SVarCompare$ EQ1
S:Mode$ Continuous | Affected$ Card.Self | SetPower$ 2 | SetToughness$ 5 | CheckSVar$ Y | SVarCompare$ EQ1
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddKeyword$ Absorb 1 | CheckSVar$ X | SVarCompare$ EQ1 | Description$ LEVEL 1-4 1/4 If a source would deal damage to you or a creature you control prevent 1 of that damage.
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddKeyword$ Absorb 2 | CheckSVar$ Y | SVarCompare$ EQ1 | Description$ LEVEL 5+ 2/5 If a source would deal damage to you or a creature you control prevent 2 of that damage.
S:Mode$ PreventDamage | Target$ You | Source$ Card | Amount$ 1 | CheckSVar$ X | SVarCompare$ EQ1
S:Mode$ PreventDamage | Target$ You | Source$ Card | Amount$ 2 | CheckSVar$ Y | SVarCompare$ EQ1
SVar:Mana:AB$Mana | Cost$ T | Produced$ G | Amount$ 2 | SpellDescription$ Add G G to your mana pool.
SVar:Pself:
SVar:Pc:
SVar:Pselftwo:
SVar:Pctwo:
SVar:X:Count$Valid Card.Self+counters_GE1_LEVEL+counters_LT5_LEVEL
SVar:Y:Count$Valid Card.Self+counters_GE5_LEVEL
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/hedron-field_purists.jpg
SetInfo:ROE|Uncommon|http://magiccards.info/scans/en/roe/25.jpg
Oracle:Level up {1}{G} ({1}{G}: Put a level counter on this. Level up only as a sorcery.)\nLEVEL 1-4\n1/2\n{T}: Add {G}{G} to your mana pool.\nLEVEL 5+\n1/4\nElves you control have "{T}: Add {G}{G} to your mana pool."
End
I've added Hedron-Field Purists (after a little clean up of the script). Thank you xanbie.

Here is the final script:
| Open
Code: Select all
Name:Hedron-Field Purists
ManaCost:2 W
Types:Creature Cleric
Text:no text
PT:0/3
K:Level up:2 W
K:maxLevel:5
S:Mode$ Continuous | Affected$ Card.Self | SetPower$ 1 | SetToughness$ 4 | CheckSVar$ X | SVarCompare$ EQ1 | Description$ LEVEL 1-4 1/4 If a source would deal damage to you or a creature you control prevent 1 of that damage.
S:Mode$ Continuous | Affected$ Card.Self | SetPower$ 2 | SetToughness$ 5 | CheckSVar$ Y | SVarCompare$ EQ1 | Description$ LEVEL 5+ 2/5 If a source would deal damage to you or a creature you control prevent 2 of that damage.
S:Mode$ PreventDamage | Target$ You,Creature.YouCtrl | Amount$ 1 | CheckSVar$ X | SVarCompare$ EQ1
S:Mode$ PreventDamage | Target$ You,Creature.YouCtrl | Amount$ 2 | CheckSVar$ Y | SVarCompare$ EQ1
SVar:X:Count$Valid Card.Self+counters_GE1_LEVEL+counters_LT5_LEVEL
SVar:Y:Count$Valid Card.Self+counters_GE5_LEVEL
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/hedron_field_purists.jpg
SetInfo:ROE|Rare|http://magiccards.info/scans/en/roe/25.jpg
Oracle:Level up {2}{W} ({2}{W}: Put a level counter on this. Level up only as a sorcery.)\nLEVEL 1-4\n1/4\nIf a source would deal damage to you or a creature you control, prevent 1 of that damage.\nLEVEL 5+\n2/5\nIf a source would deal damage to you or a creature you control, prevent 2 of that damage.
End
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Contributions

Postby moomarc » 11 Jan 2012, 10:42

ArsenalNut wrote:
Sloth wrote:
ArsenalNut wrote:As to getting Harmonic Sliver to work, try changing the static effect to "Affected$ Sliver.Other" and add a hardcoded ETB trigger that works for the original sliver only.
The trigger doesn't have to be hardcoded. Just a normal trigger with "ValidCard$ Sliver.Self" should be enough.
Hardcoded was a poor choice of words #-o I meant a scripted trigger like Sloth suggested as opposed to trying to add the trigger by a static effect.
#-o Alrighty then, don't I feel like a fool. I had actually considered that but then reasoned myself into a loop that didn't exist. Anyway, I've tried scripting them like that now but there's still a problem. The ETB trigger is going on the stack multiple times now when another sliver enters the field. And it seems to be an arbitrary number of times because I've seen different amounts go on the stack (possibly depending on mana cost). Its the same issue I reported the other day while trying to script Clash of Realities.

So here's the scripts if you want to test it and see what the problem is.
Harmonic Sliver | Open
Code: Select all
Name:Harmonic Sliver
ManaCost:1 G W
Types:Creature Sliver
Text:no text
PT:1/1
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Sliver.Self | TriggerZones$ Battlefield | Execute$ HarmonicDestroy | TriggerDescription$ When this permanent enters the battlefield, destroy target artifact or enchantment.
S:Mode$ Continuous | Affected$ Sliver | EffectZone$ Battlefield | AffectedZone$ Stack | AddTrigger$ HarmonicETB | AddSVar$ HarmonicDestroy | Description$ All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
SVar:HarmonicETB:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Sliver.Self | TriggerZones$ Battlefield | Execute$ HarmonicDestroy | TriggerDescription$ When this permanent enters the battlefield, destroy target artifact or enchantment.
SVar:HarmonicDestroy:DB$Destroy | Cost$ 0 | ValidTgts$ Artifact,Enchantment | TgtPrompt$ Select target artifact or enchantment.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/harmonic_sliver.jpg
SetInfo:TSP|Uncommon|http://magiccards.info/scans/en/ts/240.jpg
Oracle:All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
End
Mesmeric Sliver | Open
Code: Select all
Name:Mesmeric Sliver
ManaCost:3 U
Types:Creature Sliver
Text:no text
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Sliver.Self | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ MesmFateseal | TriggerDescription$ When this permanent enters the battlefield, you may fateseal 1.
S:Mode$ Continuous | Affected$ Sliver | EffectZone$ Battlefield | AffectedZone$ Stack | AddTrigger$ MesmericETB | AddSVar$ MesmFateseal | Description$ All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
SVar:MesmericETB:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Sliver.Self | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ MesmFateseal | TriggerDescription$ When this permanent enters the battlefield, you may fateseal 1.
SVar:MesmFateseal:AB$Dig | Cost$ 0 | Defined$ Opponent | DigNum$ 1 | AnyNumber$ True | DestinationZone$ Library | LibraryPosition$ -1 | LibraryPosition2$ 0
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/mesmeric_sliver.jpg
SetInfo:FUT|Common|http://magiccards.info/scans/en/fut/53.jpg
Oracle:All Slivers have "When this permanent enters the battlefield, you may fateseal 1." (To fateseal 1, its controller looks at the top card of an opponent's library, then he or she may put that card on the bottom of that library.)
End
Attachments
PumpedETBTriggers.jpg
Multiple pumped ETB triggers on stack
-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 Sloth » 11 Jan 2012, 13:02

moomarc wrote: #-o Alrighty then, don't I feel like a fool. I had actually considered that but then reasoned myself into a loop that didn't exist. Anyway, I've tried scripting them like that now but there's still a problem. The ETB trigger is going on the stack multiple times now when another sliver enters the field. And it seems to be an arbitrary number of times because I've seen different amounts go on the stack (possibly depending on mana cost). Its the same issue I reported the other day while trying to script Clash of Realities.

So here's the scripts if you want to test it and see what the problem is.
Harmonic Sliver | Open
Code: Select all
Name:Harmonic Sliver
ManaCost:1 G W
Types:Creature Sliver
Text:no text
PT:1/1
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Sliver.Self | TriggerZones$ Battlefield | Execute$ HarmonicDestroy | TriggerDescription$ When this permanent enters the battlefield, destroy target artifact or enchantment.
S:Mode$ Continuous | Affected$ Sliver | EffectZone$ Battlefield | AffectedZone$ Stack | AddTrigger$ HarmonicETB | AddSVar$ HarmonicDestroy | Description$ All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
SVar:HarmonicETB:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Sliver.Self | TriggerZones$ Battlefield | Execute$ HarmonicDestroy | TriggerDescription$ When this permanent enters the battlefield, destroy target artifact or enchantment.
SVar:HarmonicDestroy:DB$Destroy | Cost$ 0 | ValidTgts$ Artifact,Enchantment | TgtPrompt$ Select target artifact or enchantment.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/harmonic_sliver.jpg
SetInfo:TSP|Uncommon|http://magiccards.info/scans/en/ts/240.jpg
Oracle:All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
End
Mesmeric Sliver | Open
Code: Select all
Name:Mesmeric Sliver
ManaCost:3 U
Types:Creature Sliver
Text:no text
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Sliver.Self | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ MesmFateseal | TriggerDescription$ When this permanent enters the battlefield, you may fateseal 1.
S:Mode$ Continuous | Affected$ Sliver | EffectZone$ Battlefield | AffectedZone$ Stack | AddTrigger$ MesmericETB | AddSVar$ MesmFateseal | Description$ All Slivers have "When this permanent enters the battlefield, destroy target artifact or enchantment."
SVar:MesmericETB:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Sliver.Self | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ MesmFateseal | TriggerDescription$ When this permanent enters the battlefield, you may fateseal 1.
SVar:MesmFateseal:AB$Dig | Cost$ 0 | Defined$ Opponent | DigNum$ 1 | AnyNumber$ True | DestinationZone$ Library | LibraryPosition$ -1 | LibraryPosition2$ 0
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/mesmeric_sliver.jpg
SetInfo:FUT|Common|http://magiccards.info/scans/en/fut/53.jpg
Oracle:All Slivers have "When this permanent enters the battlefield, you may fateseal 1." (To fateseal 1, its controller looks at the top card of an opponent's library, then he or she may put that card on the bottom of that library.)
End
The Stack is a dangerous zone to mess with. I replaced "AffectedZone$ Stack" with "AffectedZone$ Exile,Graveyard,Hand,Library" and it works when a sliver is cast or put onto the battlefield from anywhere.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Contributions

Postby moomarc » 11 Jan 2012, 13:10

Thanks Sloth. I'm not knowledgeable enough about the inner workings of the triggers so guess I just reasoned that when a card was cast it would have to go onto the stack, and therefore it had to be included in the affected zones. Ever so slowly I'll stop making these mistakes. I'll also apply to Clash of Realities.
-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 friarsol » 19 Jan 2012, 04:57

I just added Arcane Denial and Burnout which were two cards that we were having some issues with due to handling of SpellAbilities with Defined and CalculateAmount. I just tested these and they seem to be working as expected. We should be able to script similar cards like Hydroblast and Pyroblast using these same tricks.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Contributions

Postby moomarc » 19 Jan 2012, 10:59

friarsol wrote:I just added Arcane Denial and Burnout which were two cards that we were having some issues with due to handling of SpellAbilities with Defined and CalculateAmount. I just tested these and they seem to be working as expected. We should be able to script similar cards like Hydroblast and Pyroblast using these same tricks.
Thanks Sol. Committed those two.

I also committed Torture Chamber. Molten Hydra can be converted to script only using the same script, but it would lose all the 'when to use me for what' logic that's been hardcoded. It's not so much of an issue for the TC because it's removed from AI decks anyway, (and even if it weren't it can't really do anything other than use its ability). Here's the scripted version:
Molten Hydra | Open
Code: Select all
Name:Molten Hydra
ManaCost:1 R
Types:Creature Hydra
Text:no text
PT:1/1
A:AB$ PutCounter | Cost$ 1 R R | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Put a +1/+1 counter on CARDNAME.
A:AB$ DealDamage | Cost$ 1 T SubCounter<All/P1P1> | Tgt$ TgtCP | NumDmg$ X | SpellDescription$ CARDNAME deals damage to target creature or player equal to the number of +1/+1 counters removed this way.
SVar:X:SVar$CostCountersRemoved
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/molten_hydra.jpg
SetInfo:ULG|Rare|http://magiccards.info/scans/en/ul/85.jpg
Oracle:{1}{R}{R}: Put a +1/+1 counter on Molten Hydra.\n{T}, Remove all +1/+1 counters from Molten Hydra: Molten Hydra deals damage to target creature or player equal to the number of +1/+1 counters removed this way.
End
-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 moomarc » 19 Jan 2012, 14:32

I've added Trepanation Blade. I had to add RememberRevealed and ForgetOtherRemembered to DigUntil. It works as expected but I wouldn't mind someone double-checking it for me (lines 982-989 in AbilityFactoryReveal.java)

Then go stab people with WotC's idea of a chainsaw... :mrgreen:
-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 friarsol » 19 Jan 2012, 14:57

You shouldn't need ForgetOtherRemembered, just have a final Cleanup SubAbility to clear out the Remembered.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Contributions

Postby moomarc » 20 Jan 2012, 07:53

friarsol wrote:You shouldn't need ForgetOtherRemembered, just have a final Cleanup SubAbility to clear out the Remembered.
Should I change to this? And if so, should I leave the ForgetOtherRemembered in the code seeing as nothing else uses it?
-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 friarsol » 20 Jan 2012, 13:49

I would prefer we use the Cleanup rather than a "ForgetOtherRemembered" ForgetOtherRemembered was added in a few cases before AF Cleanup existed. Using cleanup allows for a few things: no repetition of a code (removing a ForgotOtherRemembered clause in each AF), trustworthiness that the Cleanup will actually be called (instead of guessing if that API has it, clearing out the short-term Remembering immediately instead of waiting for the next usage.

I can't think of any cases where ForgetOtherRemembered is needed over a Cleanup AF. Can anyone else?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Contributions

Postby Sloth » 20 Jan 2012, 21:21

I've looked at missing cards from Odyssey today and was surprised to find so many low hanging fruits. Here are those that are scriptable for sure (there are more i'm not sure about):

| Open
Balshan Beguiler
Bloodcurdler
Bomb Squad
Decaying Soil
Demoralize
Devoted Caretaker
Dreamwinder
Epicenter
Graceful Antelope (use UntilHostLeavesPlay)
Gravestorm
Laquatus's Creativity
Mad Dog
Nantuko Mentor
Nomad Decoy
Painbringer
Patriarch's Desire
Pedantic Learning
Shower of Coals
Spark Mage
Spiritualize
Verdant Succession
Wayward Angel
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Contributions

Postby moomarc » 20 Jan 2012, 21:29

Sloth wrote:I've looked at missing cards from Odyssey today and was surprised to find so many low hanging fruits. Here are those that are scriptable for sure (there are more i'm not sure about):

| Open
Balshan Beguiler
Bloodcurdler
Bomb Squad
Decaying Soil
Demoralize
Devoted Caretaker
Dreamwinder
Epicenter
Graceful Antelope (use UntilHostLeavesPlay)
Gravestorm
Laquatus's Creativity
Mad Dog
Nantuko Mentor
Nomad Decoy
Painbringer
Patriarch's Desire
Pedantic Learning
Shower of Coals
Spark Mage
Spiritualize
Verdant Succession
Wayward Angel
I also noticed this block was rather neglected the other day. I don't think it was the most popular (but that could just be because that's when I stopped playing for a few years). I've been trying to restrict myself from doing too many DKA cards, so make myself do at least one other card or conversion per DKA script. But that became too easy when I found these.
-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 fsntf » 23 Jan 2012, 03:38

I started playing right before this set came out, so I have some fond memories of it. I woul love to see Verdant Succession done, please!!!!!!!
fsntf
 
Posts: 19
Joined: 21 Oct 2009, 08:08
Has thanked: 0 time
Been thanked: 0 time

Re: Card Contributions

Postby jeffwadsworth » 23 Jan 2012, 03:54

Sloth wrote:I've looked at missing cards from Odyssey today and was surprised to find so many low hanging fruits. Here are those that are scriptable for sure (there are more i'm not sure about):

| Open
Balshan Beguiler
Bloodcurdler
Bomb Squad
Decaying Soil
Demoralize
Devoted Caretaker
Epicenter
Laquatus's Creativity
I will start at the bottom.
Last edited by jeffwadsworth on 04 Feb 2012, 19:28, edited 6 times in total.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 55 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 55 users online :: 0 registered, 0 hidden and 55 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 55 guests

Login Form