It is currently 23 May 2025, 15:22
   
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 » 18 Mar 2012, 19:33

Good catch. It looks fine now.
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 moomarc » 19 Mar 2012, 07:52

There's been no further feedback on the "can't be equipped/enchanted" issue and my testing hasn't revealed any issues, so I'm going to commit what I've done. The only unresolved issue is trying to equip a creature that "can't be equipped" with equipment that's already attached to another creature. The equipment falls off instead of remaining attached to the current equipee. But that only affects one card (Goblin Brawler) and only in the event that the human tries to equip it for some reason.
-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 moomarc » 19 Mar 2012, 10:57

It looks like Crashing Boars is just a generic 4/4 with "This creature must be blocked if able" but the oracle text hasn't been updated to this newer wording. Am I reading this right or is there a difference?
-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 squee1968 » 19 Mar 2012, 12:56

I think it's not exactly the same, because when the first trigger resolves, your opponent could choose a creature, but then use another card (or it's own tap ablility, if it has one and is able to use it) to tap the chosen creature before blockers are declared. Must be blocked if able is a little different.
squee1968
 
Posts: 254
Joined: 18 Nov 2011, 03:28
Has thanked: 110 times
Been thanked: 45 times

Re: Card Development Questions

Postby moomarc » 19 Mar 2012, 13:01

True. Also realised that you could select a creature with "CARDNAME can't block" for instance.
-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 moomarc » 30 Mar 2012, 17:45

@Sloth (I think): There seems to be something strange in the way RememberObjects works for Pump and Effect when the object is 'Self'. I've used this script for Kjeldoran Elite Guard and everything works perfectly except that the guards aren't sacrificed. If you look at the console output it says I'm trying to sacrifice an immutable, so the remembered/imprinted Self still refers to the actual self, not the self named in the card info panel. Very weird. Any idea if it can be fixed?(I haven't tested but it probably affects the damage source in Soltari Guerrillas too).
Code: Select all
Name:Kjeldoran Elite Guard
ManaCost:3 W
Types:Creature Human Soldier
Text:no text
PT:2/2
A:AB$ Pump | Cost$ T | NumAtt$ +2 | NumDef$ +2 | ValidTgts$ Creature | TgtPrompt$ Select target creature | ActivationPhases$ BeginCombat->EndCombat | SubAbility$ EliteGuardEffect | SpellDescription$ Target creature gets +2/+2 until end of turn. When that creature leaves the battlefield this turn, sacrifice CARDNAME. Activate this ability only during combat.
SVar:EliteGuardEffect:DB$ Effect | Name$ Elite Guard Escort | Triggers$ LostTheGuarded | SVars$ ExileEffect,EliteDefence | RememberObjects$ Targeted | ImprintCards$ Self
SVar:LostTheGuarded:Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Battlefield | Destination$ Any | Execute$ EliteDefence | TriggerDescription$ When the targeted creature leaves the battlefield this turn, sacrifice Kjeldoran Elite Guard.
SVar:EliteDefence:DB$ Sacrifice | Defined$ Imprinted | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/kjeldoran_elite_guard.jpg
SetInfo:ICE|Uncommon|http://magiccards.info/scans/en/ia/258.jpg
Oracle:{T}: Target creature gets +2/+2 until end of turn. When that creature leaves the battlefield this turn, sacrifice Kjeldoran Elite Guard. Activate this ability only during combat.
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 Development Questions

Postby Sloth » 30 Mar 2012, 19:04

moomarc wrote:@Sloth (I think): There seems to be something strange in the way RememberObjects works for Pump and Effect when the object is 'Self'. I've used this script for Kjeldoran Elite Guard and everything works perfectly except that the guards aren't sacrificed. If you look at the console output it says I'm trying to sacrifice an immutable, so the remembered/imprinted Self still refers to the actual self, not the self named in the card info panel. Very weird. Any idea if it can be fixed?(I haven't tested but it probably affects the damage source in Soltari Guerrillas too).
| Open
Code: Select all
Name:Kjeldoran Elite Guard
ManaCost:3 W
Types:Creature Human Soldier
Text:no text
PT:2/2
A:AB$ Pump | Cost$ T | NumAtt$ +2 | NumDef$ +2 | ValidTgts$ Creature | TgtPrompt$ Select target creature | ActivationPhases$ BeginCombat->EndCombat | SubAbility$ EliteGuardEffect | SpellDescription$ Target creature gets +2/+2 until end of turn. When that creature leaves the battlefield this turn, sacrifice CARDNAME. Activate this ability only during combat.
SVar:EliteGuardEffect:DB$ Effect | Name$ Elite Guard Escort | Triggers$ LostTheGuarded | SVars$ ExileEffect,EliteDefence | RememberObjects$ Targeted | ImprintCards$ Self
SVar:LostTheGuarded:Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Battlefield | Destination$ Any | Execute$ EliteDefence | TriggerDescription$ When the targeted creature leaves the battlefield this turn, sacrifice Kjeldoran Elite Guard.
SVar:EliteDefence:DB$ Sacrifice | Defined$ Imprinted | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/kjeldoran_elite_guard.jpg
SetInfo:ICE|Uncommon|http://magiccards.info/scans/en/ia/258.jpg
Oracle:{T}: Target creature gets +2/+2 until end of turn. When that creature leaves the battlefield this turn, sacrifice Kjeldoran Elite Guard. Activate this ability only during combat.
End
It looks like AF Sacrifice doesn't support Defined cards. SacrificeAll does though and Kjeldoran Elite Guard works fine.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Development Questions

Postby ZzzzSleep » 09 Apr 2012, 04:49

I've been coding up Cloudshift (see http://www.wizards.com/Magic/Magazine/A ... ature/190a ). At first I thought it was just a slight tweak on Flicker, but then I realised that if you steal a creature until end of turn, then Cloudshift it, you'll keep control of it. To cut a long story short, is there some way to say that the exiled card should return under the casters control instead of the owner of the card?
Code: Select all
Name:Cloudshift
ManaCost:W
Types:Instant
Text:no text
A:SP$ ChangeZone | Cost$ W | ValidTgts$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Exile | TgtPrompt$ Select target creature you control | SubAbility$ DBReturn | RememberTargets$ True | SpellDescription$ Exile target creature you control, then return that card to the battlefield under your control.
SVar:DBReturn:DB$ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield
SVar:RemAIDeck:True
SVar:Rarity:Common
End
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Card Development Questions

Postby moomarc » 09 Apr 2012, 09:36

ZzzzSleep wrote:I've been coding up Cloudshift (see http://www.wizards.com/Magic/Magazine/A ... ature/190a ). At first I thought it was just a slight tweak on Flicker, but then I realised that if you steal a creature until end of turn, then Cloudshift it, you'll keep control of it. To cut a long story short, is there some way to say that the exiled card should return under the casters control instead of the owner of the card?
Code: Select all
Name:Cloudshift
ManaCost:W
Types:Instant
Text:no text
A:SP$ ChangeZone | Cost$ W | ValidTgts$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Exile | TgtPrompt$ Select target creature you control | SubAbility$ DBReturn | RememberTargets$ True | SpellDescription$ Exile target creature you control, then return that card to the battlefield under your control.
SVar:DBReturn:DB$ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield
SVar:RemAIDeck:True
SVar:Rarity:Common
End
You should just need to add the parameter "GainControl$ True" to the return to battlefield line. Will also have to clear the remembered cards so that it doesn't cause problems if you're able to cast it again at a later stage.
-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 ZzzzSleep » 09 Apr 2012, 13:40

moomarc wrote:
ZzzzSleep wrote:I've been coding up Cloudshift (see http://www.wizards.com/Magic/Magazine/A ... ature/190a ). At first I thought it was just a slight tweak on Flicker, but then I realised that if you steal a creature until end of turn, then Cloudshift it, you'll keep control of it. To cut a long story short, is there some way to say that the exiled card should return under the casters control instead of the owner of the card?
Code: Select all
Name:Cloudshift
ManaCost:W
Types:Instant
Text:no text
A:SP$ ChangeZone | Cost$ W | ValidTgts$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Exile | TgtPrompt$ Select target creature you control | SubAbility$ DBReturn | RememberTargets$ True | SpellDescription$ Exile target creature you control, then return that card to the battlefield under your control.
SVar:DBReturn:DB$ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield
SVar:RemAIDeck:True
SVar:Rarity:Common
End
You should just need to add the parameter "GainControl$ True" to the return to battlefield line. Will also have to clear the remembered cards so that it doesn't cause problems if you're able to cast it again at a later stage.
Could you give me an example of how to clear the remembered cards?
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Card Development Questions

Postby moomarc » 09 Apr 2012, 14:16

ZzzzSleep wrote:
moomarc wrote:
ZzzzSleep wrote:I've been coding up Cloudshift (see http://www.wizards.com/Magic/Magazine/A ... ature/190a ). At first I thought it was just a slight tweak on Flicker, but then I realised that if you steal a creature until end of turn, then Cloudshift it, you'll keep control of it. To cut a long story short, is there some way to say that the exiled card should return under the casters control instead of the owner of the card?
Cloudshift | Open
Code: Select all
Name:Cloudshift
ManaCost:W
Types:Instant
Text:no text
A:SP$ ChangeZone | Cost$ W | ValidTgts$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Exile | TgtPrompt$ Select target creature you control | SubAbility$ DBReturn | RememberTargets$ True | SpellDescription$ Exile target creature you control, then return that card to the battlefield under your control.
SVar:DBReturn:DB$ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield
SVar:RemAIDeck:True
SVar:Rarity:Common
End
[/
quote]You should just need to add the parameter "GainControl$ True" to the return to battlefield line. Will also have to clear the remembered cards so that it doesn't cause problems if you're able to cast it again at a later stage.
Could you give me an example of how to clear the remembered cards?
It tends to depend on the card. The preferred method would normally have this as a subability of the final ability line (see Admonition Angel as a sample script)
Code: Select all
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
There are some instances where this method has timing problems so for targeted spells you might use "ForgetOtherTargets$True" in the same line as you've used "RememberTargets$True" (see Flickerwisp as a sample script). The best method for this card though (and for Flicker which I've fixed now) is to just use Targeted as the Defined card for the subability. The corrected script is this:
Cloudshift | Open
Code: Select all
Name:Cloudshift
ManaCost:W
Types:Instant
Text:no text
A:SP$ ChangeZone | Cost$ W | ValidTgts$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Exile | TgtPrompt$ Select target creature you control | SubAbility$ DBReturn | SpellDescription$ Exile target creature you control, then return that card to the battlefield under your control.
SVar:DBReturn:DB$ChangeZone | Defined$ Targeted | Origin$ Exile | Destination$ Battlefield | GainControl$ True
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/cloudshift.jpg
End
I've also posted Restoration Angel's script in the AVR spoiler thread seeing as it looks like it's going to be a common theme in the set (according to this article.
-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 ZzzzSleep » 10 Apr 2012, 10:51

Thanks for the help Marc, but it looks like Forge needs some tweaking here. Especially if this is going to be a major theme of the set. Even with the new script, there are some problems. (Testing with v.1.2.6)

1/ Enchantments don't fall off the targeted creature. (I was testing with Holy Strength , just in case it matters).
2/ Using Act of Treason to steal a creature, then Cloudshifting it should mean it stays on my side of the battlefield. Sadly, at the end of turn, it jumps back to my opponent's control. I'm pretty sure I've got the rules correct here, but if I haven't please let me know.

Thanks!
ZzzzSleep.
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Card Development Questions

Postby moomarc » 10 Apr 2012, 14:49

ZzzzSleep wrote:Thanks for the help Marc, but it looks like Forge needs some tweaking here. Especially if this is going to be a major theme of the set. Even with the new script, there are some problems. (Testing with v.1.2.6)

1/ Enchantments don't fall off the targeted creature. (I was testing with Holy Strength , just in case it matters).
2/ Using Act of Treason to steal a creature, then Cloudshifting it should mean it stays on my side of the battlefield. Sadly, at the end of turn, it jumps back to my opponent's control. I'm pretty sure I've got the rules correct here, but if I haven't please let me know.

Thanks!
ZzzzSleep.
If that's the case I'll try revert to using remembered, then have the return use a conditionCheckSvar. I'll just have to try tweak it. But it might be a deeper problem where state based effects aren't checked in between the exile and return in which case one of the experienced guys will have to look into 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 Development Questions

Postby moomarc » 10 Apr 2012, 16:53

Hmmm, I've tried the different methods that might affect the resolution in any way but the problem with Flicker type cards still persists in these two cases. So all I can think is that state based actions aren't checked here in time. One of the other devs will have to say what the best way forward is. I think that exiling a creature might have to trigger a checkStateEffects, but there's probably reasons why this wouldn't work. With regards to the treasonous creature still returning at end of turn I think is due to this as well, but I could be wrong in which case it will also need to be handled differently.
-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 » 10 Apr 2012, 17:04

moomarc wrote:Hmmm, I've tried the different methods that might affect the resolution in any way but the problem with Flicker type cards still persists in these two cases. So all I can think is that state based actions aren't checked here in time. One of the other devs will have to say what the best way forward is. I think that exiling a creature might have to trigger a checkStateEffects, but there's probably reasons why this wouldn't work. With regards to the treasonous creature still returning at end of turn I think is due to this as well, but I could be wrong in which case it will also need to be handled differently.
The main issue is the card is coming back as the same game object as it was, instead of coming back as a different game object. Once that's resolved all of these other issues should be fixed. The main issue is LKI and ChangeZone = new Game Object sometimes interfere with each other, which is why one and/or the other seem to be slightly incorrect at all times.
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 31 guests


Who is online

In total there are 31 users online :: 0 registered, 0 hidden and 31 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 31 guests

Login Form