Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by moomarc » 21 May 2012, 12:36
I've managed to get Squee's script for Aquamorph Entity working and interacting with cards like Mighty Emergence correctly with the following:
The code for the param in AbilityFactoryAnimate is:
- Code: Select all
Name:Aquamorph Entity
ManaCost:2 U U
Types:Creature Shapeshifter
Text:no text
PT:*/*
K:Morph:2 U
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ MorphChoice | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield or is turned face up, it becomes your choice of 5/1 or 1/5.
T:Mode$ TurnFaceUp | ValidCard$ Card.Self | Execute$ MorphChoice | Secondary$ True | Static$ True | TriggerDescription$ When CARDNAME enters the battlefield or is turned face up, it becomes your choice of 5/1 or 1/5.
SVar:MorphChoice:AB$ Charm | Cost$ 0 | Defined$ You | Choices$ BigPower,BigTough | CharmNum$ 1
SVar:BigPower:DB$ Animate | Defined$ Self | Permanent$ True | Power$ 5 | Toughness$ 1 | CharacteristicDefining$ True | SpellDescription$ CARDNAME is 5/1
SVar:BigTough:DB$ Animate | Defined$ Self | Permanent$ True | Power$ 1 | Toughness$ 5 | CharacteristicDefining$ True | SpellDescription$ CARDNAME is 1/5
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/aquamorph_entity.jpg
SetInfo:PLC|Common|http://magiccards.info/scans/en/pc/33.jpg
Oracle:As Aquamorph Entity enters the battlefield or is turned face up, it becomes your choice of 5/1 or 1/5.\nMorph {2}{U} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)
End
The code for the param in AbilityFactoryAnimate is:
- Code: Select all
if ((power != -1) || (toughness != -1)) {
if (params.containsKey("CharacteristicDefining")) {
if (power != -1) {
c.setBaseAttack(power);
}
if (toughness != -1) {
c.setBaseDefense(toughness);
}
} else {
c.addNewPT(power, toughness, timestamp);
}
}
-Marc
-
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
by ArsenalNut » 22 May 2012, 13:55
Is there any reason that the entering battlefield portion of Primal Beyond shouldn't be handled with the following static trigger?
The other creature lands in this cycle are currently hard coded.
- Primal Beyond script snippet | Open
- T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigReveal | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, you may reveal an Elemental card from your hand. If you don't, CARDNAME enters the battlefield tapped.
SVar:TrigReveal:AB$ Reveal | Cost$ 0 | RememberRevealed$ True | RevealValid$ Card.Elemental | Defined$ You | SubAbility$ DBTap
SVar:DBTap:DB$ Tap | Defined$ Self | SubAbility$ DBCleanup | ConditionCheckSVar$ X | ConditionSVarCompare$ LT1
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
The other creature lands in this cycle are currently hard coded.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by moomarc » 22 May 2012, 14:19
Is Antagonism too unfair on the AI? I've added svars to Squee's script that will only let the AI cast it if he's dealt damage to the player that turn so it won't be burnt first turn. Also made it a RemRandomDeck because I think in the right decks the AI can make it work.
-Marc
-
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
by friarsol » 22 May 2012, 14:37
I guess the main question is: Does this static ability cause a "tapped" trigger? You can test this with putting a Manabarbs in play, and then playing one of those with your script. If it works, then we should be able to replace those.ArsenalNut wrote:Is there any reason that the entering battlefield portion of Primal Beyond shouldn't be handled with the following static trigger?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by squee1968 » 22 May 2012, 15:24
I think it should also be tested with Freyalise's Winds. Because it should enter the battlefield already tapped, not enter and then get tapped because you couldn't reveal.friarsol wrote:I guess the main question is: Does this static ability cause a "tapped" trigger? You can test this with putting a Manabarbs in play, and then playing one of those with your script. If it works, then we should be able to replace those.ArsenalNut wrote:Is there any reason that the entering battlefield portion of Primal Beyond shouldn't be handled with the following static trigger?
Re: Card Development Questions
by ArsenalNut » 22 May 2012, 15:50
Good call on Freyalise's Winds. The static trigger script does cause a wind counter to be added. The bad news is that is the other hard coded lands in this cycle also get a counter if they come into play tapped. I suspect that any of the lands that have a conditional enter the battlefield tapped have the same issue.squee1968 wrote:I think it should also be tested with Freyalise's Winds. Because it should enter the battlefield already tapped, not enter and then get tapped because you couldn't reveal.friarsol wrote:I guess the main question is: Does this static ability cause a "tapped" trigger? You can test this with putting a Manabarbs in play, and then playing one of those with your script. If it works, then we should be able to replace those.ArsenalNut wrote:Is there any reason that the entering battlefield portion of Primal Beyond shouldn't be handled with the following static trigger?
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by Sloth » 22 May 2012, 16:06
I've just fixed the rest of the cycle, maybe AF PermanentState can have a parameter to do this too.ArsenalNut wrote:Good call on Freyalise's Winds. The static trigger script does cause a wind counter to be added. The bad news is that is the other hard coded lands in this cycle also get a counter if they come into play tapped. I suspect that any of the lands that have a conditional enter the battlefield tapped have the same issue.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by ArsenalNut » 22 May 2012, 16:19
I checked the other lands with conditional enter the battlefield tapped and none of them had issues.Sloth wrote:I've just fixed the rest of the cycle, maybe AF PermanentState can have a parameter to do this too.ArsenalNut wrote:Good call on Freyalise's Winds. The static trigger script does cause a wind counter to be added. The bad news is that is the other hard coded lands in this cycle also get a counter if they come into play tapped. I suspect that any of the lands that have a conditional enter the battlefield tapped have the same issue.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Card Development Questions
by friarsol » 22 May 2012, 17:02
Hey moomarc (or someone else), if you have some time can you test a similar script for Clones and this ability? I'd recommend doing it like this: temporarily comment out Clone to go through the codebase it is now. Then use CopyPermanent + Defined$ Self with the same ETB Static that you did for Primal Clay in script form. Test out things like: Dying to being 0/0 when cast, dying to being 0/0 when entering via somewhere else, triggering copied ETB effects. If we could script the Clones this way, it would simplify a lot of repetitive bug reports.moomarc wrote:I've managed to get Squee's script for Aquamorph Entity working and interacting with cards like Mighty Emergence correctly with the following:
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by moomarc » 22 May 2012, 17:46
I'll get on it first thing in the morning. Would be great to stop seeing Clone and Phyrexian Metamorph constantly in the bug reports.friarsol wrote:Hey moomarc (or someone else), if you have some time can you test a similar script for Clones and this ability? I'd recommend doing it like this: temporarily comment out Clone to go through the codebase it is now. Then use CopyPermanent + Defined$ Self with the same ETB Static that you did for Primal Clay in script form. Test out things like: Dying to being 0/0 when cast, dying to being 0/0 when entering via somewhere else, triggering copied ETB effects. If we could script the Clones this way, it would simplify a lot of repetitive bug reports.moomarc wrote:I've managed to get Squee's script for Aquamorph Entity working and interacting with cards like Mighty Emergence correctly with the following:
-Marc
-
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
by moomarc » 23 May 2012, 15:13
@Sol: I had a look and tried a few things this morning but as soon as targeting is involved the P/T seems to be checked so the clone dies. So I spent a few hours trying to add AnimateClone AF to AbilityFactoryAnimate but I couldn't get it to work because of the die-while-targeting issue. I decided to base it on the Animate AF because it seems to handle everything between zones well and has the infrastructure in for the individual cloner abilities like adding extra triggers etc.
Further testing seems to indicate that the issue is with targeting with a static trigger. If I remove the Static$True param (and give a toughness GE1) the clone AF I was working on passes begin. So we might have to add something like:
Further testing seems to indicate that the issue is with targeting with a static trigger. If I remove the Static$True param (and give a toughness GE1) the clone AF I was working on passes begin. So we might have to add something like:
- Code: Select all
SVar:HasTargetedETBEffect | ValidTgts$ Artifact,Creature | TgtPrompt$ Select target artifact or creature to clone
- Code: Select all
Name:Phyrexian Metamorph
ManaCost:3 PU
Types:Artifact Creature Shapeshifter
Text:no text
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ETBMetamorphClone | Static$ True | TriggerDescription$ You may have CARDNAME enter the battlefield as a copy of any artifact or creature on the battlefield, except it's an artifact in addition to its other types.
SVar:ETBMetamorphClone:DB$ AnimateClone | Defined$ ETBTgt | TgtPrompt$ Select target artifact or creature to clone
SVar:HasTargetedETBEffect | ValidTgts$ Artifact,Creature | TgtPrompt$ Select target artifact or creature to clone
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/phyrexian_metamorph.jpg
SetInfo:NPH|Rare|http://magiccards.info/scans/en/nph/42.jpg
Oracle:({U/P} can be paid with either {U} or 2 life.)\nYou may have Phyrexian Metamorph enter the battlefield as a copy of any artifact or creature on the battlefield, except it's an artifact in addition to its other types.
End
-Marc
-
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
by friarsol » 23 May 2012, 15:38
I see you're main problem. Clone doesn't target, but you may be right that it's not possible. You would need to select a valid type (creatures for clone, lands for Vesuva, etc) as part of the resolution, probably through a CloneValid$ or similar parameter.moomarc wrote:@Sol: I had a look and tried a few things this morning but as soon as targeting is involved the P/T seems to be checked so the clone dies. So I spent a few hours trying to add AnimateClone AF to AbilityFactoryAnimate but I couldn't get it to work because of the die-while-targeting issue. I decided to base it on the Animate AF because it seems to handle everything between zones well and has the infrastructure in for the individual cloner abilities like adding extra triggers etc.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Sloth » 23 May 2012, 15:48
Use AF ChooseCard.friarsol wrote:I see you're main problem. Clone doesn't target, but you may be right that it's not possible. You would need to select a valid type (creatures for clone, lands for Vesuva, etc) as part of the resolution, probably through a CloneValid$ or similar parameter.moomarc wrote:@Sol: I had a look and tried a few things this morning but as soon as targeting is involved the P/T seems to be checked so the clone dies. So I spent a few hours trying to add AnimateClone AF to AbilityFactoryAnimate but I couldn't get it to work because of the die-while-targeting issue. I decided to base it on the Animate AF because it seems to handle everything between zones well and has the infrastructure in for the individual cloner abilities like adding extra triggers etc.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by friarsol » 23 May 2012, 15:59
Man I feel so out of the loop with some of these new AbilityFactories.Sloth wrote:Use AF ChooseCard.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by ArsenalNut » 24 May 2012, 04:36
I did a test with the following scriptSloth wrote:Use AF ChooseCard.friarsol wrote:I see you're main problem. Clone doesn't target, but you may be right that it's not possible. You would need to select a valid type (creatures for clone, lands for Vesuva, etc) as part of the resolution, probably through a CloneValid$ or similar parameter.moomarc wrote:@Sol: I had a look and tried a few things this morning but as soon as targeting is involved the P/T seems to be checked so the clone dies. So I spent a few hours trying to add AnimateClone AF to AbilityFactoryAnimate but I couldn't get it to work because of the die-while-targeting issue. I decided to base it on the Animate AF because it seems to handle everything between zones well and has the infrastructure in for the individual cloner abilities like adding extra triggers etc.
- clone test | Open
- Name:Clone Test
ManaCost:1 U
Types:Creature Illusion
Text:no text
PT:0/0
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ChooseCreature | Static$ True | TriggerDescription$ You may have Phantasmal Image enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it."
SVar:ChooseCreature:AB$ ChooseCard | Cost$ 0 | Defined$ You | Amount$ 1 | Choices$ Creature | SubAbility$ DBCopy | RememberChosen$ True
SVar:DBCopy:DB$ Animate | Defined$ Self | Permanent$ True | Power$ 3 | Toughness$ 3
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/phantasmal_image.jpg
SetInfo:M12|Rare|http://magiccards.info/scans/en/m12/72.jpg
Oracle:You may have Phantasmal Image enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it."
End
The test clone did not die immediately when it entered the battlefield. I also tested it with the Restoration Angel flicker ability and I got to choose a new card when it came back. I am going to create a new "Clone" AF based on the clone code in CardFactoryCreatures.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Who is online
Users browsing this forum: No registered users and 41 guests