It is currently 25 May 2025, 16:13
   
Text Size

Card Development Questions

Post MTG Forge Related Programming Questions Here

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

Re: Card Development Questions

Postby jeffwadsworth » 17 Jan 2012, 20:35

SoulStorm wrote:Anyone have an idea why permanents enchanted by Reality Acid aren't sacrificed when Reality Acid leaves the battlefield?

Code: Select all
Name:Reality Acid
ManaCost:2 U
Types:Enchantment Aura
Text:no text
K:Enchant permanent
K:Vanishing:3
A:SP$ Attach | Cost$ 2 U | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | AILogic$ Curse
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigSac | TriggerDescription$ When CARDNAME leaves the battlefield, enchanted permanent's controller sacrifices it.
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ Enchanted
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/reality_acid.jpg
End
Because the enchanted card is no longer enchanted when Reality Acid leaves the battlefield.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby SoulStorm » 17 Jan 2012, 20:43

Arrgh!!! I should have realized that would be a problem. Is there a way to make it work, or am I going to have to wait for further code support?
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby jeffwadsworth » 17 Jan 2012, 21:25

SoulStorm wrote:Arrgh!!! I should have realized that would be a problem. Is there a way to make it work, or am I going to have to wait for further code support?
Well, maybe you can sweet-talk one of the devs into supporting it.
Check out Parallax Dementia.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby ArsenalNut » 17 Jan 2012, 23:32

jeffwadsworth wrote:
SoulStorm wrote:Anyone have an idea why permanents enchanted by Reality Acid aren't sacrificed when Reality Acid leaves the battlefield?

Code: Select all
Name:Reality Acid
ManaCost:2 U
Types:Enchantment Aura
Text:no text
K:Enchant permanent
K:Vanishing:3
A:SP$ Attach | Cost$ 2 U | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | AILogic$ Curse
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigSac | TriggerDescription$ When CARDNAME leaves the battlefield, enchanted permanent's controller sacrifices it.
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ Enchanted
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/reality_acid.jpg
End
Because the enchanted card is no longer enchanted when Reality Acid leaves the battlefield.
Another problem is that "Defined" refers to the player that has to make the sacrifice not the permanent that has to be sacrificed.
Sacrifice line should look like
Code: Select all
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ EnchantedController | SacValid$ Permanent.EnchantedBy
Still not sure if this will work though. Depends if last known information works in this situation.

Edit:
I tested it and EnchantedBy won't work but Remember does. Here's the working script
Reality Acid | Open
Name:Reality Acid
ManaCost:2 U
Types:Enchantment Aura
Text:no text
K:Enchant permanent
K:Vanishing:3
A:SP$ Attach | Cost$ 2 U | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | AILogic$ Curse | RememberTargets$ True
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigSac | TriggerDescription$ When CARDNAME leaves the battlefield, enchanted permanent's controller sacrifices it.
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ EnchantedController | SacValid$ Permanent.IsRemembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/reality_acid.jpg
End
Last edited by ArsenalNut on 18 Jan 2012, 05:13, edited 1 time in total.
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 Development Questions

Postby SoulStorm » 18 Jan 2012, 04:20

ArsenalNut, thanks that makes perfect sense. Tried it though, and the necessary support doesn't seem to be there yet. Ok, let me give this sweet-talking thing a try. Sweet-talk, sweet-talk, sweet-talk, and sweet-talk. There, that should do it! :mrgreen:

Nah, I'm not in that much of a hurry to have it, I just thought it might make a fun combo with Reality Strobe or some other bounce effect.

What I'd really like to see support for is Chronomantic Escape. One could make a crazy White/Blue control deck with that card.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby ArsenalNut » 18 Jan 2012, 06:26

moomarc wrote:Two things I've noticed so far though. The licid still doesn't fall off or die if the creature its enchanting is no longer a creature (enchant an animated Celestial Collonade, or enchant another licid then transform that one). Also, they have no image when they're transformed into an aura.
I found a way to fix the unenchant without any code modifications. In the scripts, give the alternate state an attach spell with the correct enchantment restrictions for the ValidTgt. For example, here's the working Quickening Licid script

Quickening Licid | Open
Name:Quickening Licid
ManaCost:1 W
Types:Creature Licid
Text:no text
PT:1/1
A:AB$ SetState | Cost$ 1 W T | Defined$ Self | NewState$ Alternate | SubAbility$ DBAttach | SpellDescription$ CARDNAME loses this ability and becomes an Aura enchantment with enchant creature. Attach it to target creature. You may pay W to end this effect.
SVar:DBAttach:DB$ Attach | Cost$ 0 | ValidTgts$ Creature | AILogic$ Pump
#If the value of AlternateMode isn't Flip or DoubleFaced, it will be the name of the state defined below, so you can switch to it with SetState+NewState$.The name of the first state defined is always "Original".
AlternateMode:Alternate

#Shared
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SetInfo:TMP|Uncommon|http://magiccards.info/scans/en/tp/35.jpg
SVar:Picture:http://www.wizards.com/global/images/magic/general/quickening_licid.jpg
Oracle:{1}{W}, {T}: Quickening Licid loses this ability and becomes an Aura enchantment with enchant creature. Attach it to target creature. You may pay {W} to end this effect.\nEnchanted creature has first strike.

ALTERNATE

Name:Quickening Licid
ManaCost:1 W
Colors:white
Types:Enchantment Aura
Text:Enchanted creature has first strike.
K:Enchant creature
A:SP$ Attach | Cost$ 0 | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ First Strike | Description$ Enchanted creature has first strike.
A:AB$ SetState | Cost$ W | Defined$ Self | NewState$ Original | SpellDescription$ End this effect.
End
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 Development Questions

Postby moomarc » 18 Jan 2012, 06:38

Thanks ArsenalNut. I remember you'd originally left that line in the Dominating Licid script but I thought it was just a leftover from before it was added as a drawback. I feel like a twit now.

I'm halfway through applying Tgt$TgtCP to all the cards still using ValidTgts$Creature,Player (turns out the Flayer of the Hatebound script must have been fixed by another change I made later). So I thought it should be my turn to do some mass cleanup. Up to M so far. Then I'll add the licids at last. Edit2: Don't worry, I'm checking each case to make sure it's not in the ValidTgts form for a reason such as targeting descriptions.
-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 Development Questions

Postby ArsenalNut » 18 Jan 2012, 07:26

moomarc wrote:Thanks ArsenalNut. I remember you'd originally left that line in the Dominating Licid script but I thought it was just a leftover from before it was added as a drawback. I feel like a twit now.

I'm halfway through applying Tgt$TgtCP to all the cards still using ValidTgts$Creature,Player (turns out the Flayer of the Hatebound script must have been fixed by another change I made later). So I thought it should be my turn to do some mass cleanup. Up to M so far. Then I'll add the licids at last. Edit2: Don't worry, I'm checking each case to make sure it's not in the ValidTgts form for a reason such as targeting descriptions.
I would be careful about changing everything. The rules for dealing with noncombat damage and planeswalkers are confusing. I am not sure it is appropriate to change the PreventDamage abilities and spells.

If you're feeling really adventurous, try changing the targeting for Blightning and see what happens. This card should be able to damage a planeswalker (through Forge's implicit redirection), but I bet the discard would not work.
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 Development Questions

Postby moomarc » 18 Jan 2012, 07:33

ArsenalNut wrote:
moomarc wrote:Thanks ArsenalNut. I remember you'd originally left that line in the Dominating Licid script but I thought it was just a leftover from before it was added as a drawback. I feel like a twit now.

I'm halfway through applying Tgt$TgtCP to all the cards still using ValidTgts$Creature,Player (turns out the Flayer of the Hatebound script must have been fixed by another change I made later). So I thought it should be my turn to do some mass cleanup. Up to M so far. Then I'll add the licids at last. Edit2: Don't worry, I'm checking each case to make sure it's not in the ValidTgts form for a reason such as targeting descriptions.
I would be careful about changing everything. The rules for dealing with noncombat damage and planeswalkers are confusing. I am not sure it is appropriate to change the PreventDamage abilities and spells.

If you're feeling really adventurous, try changing the targeting for Blightning and see what happens. This card should be able to damage a planeswalker (through Forge's implicit redirection), but I bet the discard would not work.
Sorry, I wasn't clear: I'm not touching PreventDamage. Purely the DealDamage abilities that specifically state "to target creature or player." I figured that would be the safest. Then when I get to one I'm not sure of I test it specifically or just leave it if it already implicitly lists planeswalkers in the ValidTgts list. I've also picked up a few Tgt$CP that I've corrected to Tgt$TgtCP
-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 Development Questions

Postby friarsol » 18 Jan 2012, 13:18

moomarc wrote:I've also picked up a few Tgt$CP that I've corrected to Tgt$TgtCP
That's not really incorrect. The prefix "Tgt" isn't necessary anymore. Also, please be careful as the ValidTgts is the newer of the targeting methods and we (slapshot and I mostly) were trying to figure out a way to deprecate this usage but never figured out a way to do it. Hopefully sometime soon (now that Replacement effects are here) we could have some type of global Replacement effect that would allow non-combat damage to be redirected to Planeswalkers.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby moomarc » 18 Jan 2012, 13:27

friarsol wrote:
moomarc wrote:I've also picked up a few Tgt$CP that I've corrected to Tgt$TgtCP
That's not really incorrect. The prefix "Tgt" isn't necessary anymore. Also, please be careful as the ValidTgts is the newer of the targeting methods and we (slapshot and I mostly) were trying to figure out a way to deprecate this usage but never figured out a way to do it. Hopefully sometime soon (now that Replacement effects are here) we could have some type of global Replacement effect that would allow non-combat damage to be redirected to Planeswalkers.
#-o Sorry about that. Should I revert the changes? I could change them all back to either Creature,Player or Creature,Player,Planeswalker. I thought the Tgt method was preferred after it was suggested that I use that for the Flayer of the Hatebound script.
-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 Development Questions

Postby ArsenalNut » 18 Jan 2012, 14:47

friarsol wrote:
moomarc wrote:I've also picked up a few Tgt$CP that I've corrected to Tgt$TgtCP
That's not really incorrect. The prefix "Tgt" isn't necessary anymore. Also, please be careful as the ValidTgts is the newer of the targeting methods and we (slapshot and I mostly) were trying to figure out a way to deprecate this usage but never figured out a way to do it. Hopefully sometime soon (now that Replacement effects are here) we could have some type of global Replacement effect that would allow non-combat damage to be redirected to Planeswalkers.
Couldn't the replacement effect be handled in the Damage AF resolve methods? Some check on the source of the damage and the existence of planeswalkers to the damaged opponent. If the conditions are met, the user gets prompt with a "redirect damage to planeswalker" menu of choices that they can cancel out. It might be more annoying for the user to deal with one more menu but it would reflect the rules. Also, things like PreventDamage and players being hexproof would work without code modifications. Both of these situations don't work properly right now.

Just out curiosity, how does UI handle this in MTGO?
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 Development Questions

Postby friarsol » 18 Jan 2012, 14:57

moomarc wrote:
friarsol wrote:
moomarc wrote:I've also picked up a few Tgt$CP that I've corrected to Tgt$TgtCP
That's not really incorrect. The prefix "Tgt" isn't necessary anymore. Also, please be careful as the ValidTgts is the newer of the targeting methods and we (slapshot and I mostly) were trying to figure out a way to deprecate this usage but never figured out a way to do it. Hopefully sometime soon (now that Replacement effects are here) we could have some type of global Replacement effect that would allow non-combat damage to be redirected to Planeswalkers.
#-o Sorry about that. Should I revert the changes? I could change them all back to either Creature,Player or Creature,Player,Planeswalker. I thought the Tgt method was preferred after it was suggested that I use that for the Flayer of the Hatebound script.
No we can leave it as you have it for now. Because it'll be easier to convert Tgt$ to ValidTgts$ then go through and figure out if Creature,Player,Planeswalker is really what the legal targets once we have the redirection in place.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby SoulStorm » 18 Jan 2012, 14:58

Thanks for fixing and adding Reality Acid ArsenalNut.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby friarsol » 18 Jan 2012, 15:04

ArsenalNut wrote:Couldn't the replacement effect be handled in the Damage AF resolve methods? Some check on the source of the damage and the existence of planeswalkers to the damaged opponent. If the conditions are met, the user gets prompt with a "redirect damage to planeswalker" menu of choices that they can cancel out. It might be more annoying for the user to deal with one more menu but it would reflect the rules. Also, things like PreventDamage and players being hexproof would work without code modifications. Both of these situations don't work properly right now.
I guess it would depend how it was written up. It's possible for the targeted player to be able to soak up preventable damage before the damage actually gets redirected.

http://draw3cards.com/questions/3972/ca ... /3988#3988
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 68 guests


Who is online

In total there are 68 users online :: 0 registered, 0 hidden and 68 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 68 guests

Login Form