Page 72 of 141

Re: Card Development Questions

PostPosted: 03 Nov 2011, 20:03
by jeffwadsworth
Sloth wrote:
jeffwadsworth wrote:Very true. Unfortunately, this card has issues with NPE's even with the first SP$ Counter if you do not pay the UnlessCost. I will leave it alone for now.
Well I did try to fix the NPE you posted. Is it still happening? If yes, this might be a more general problem.
My mistake. The first counter works now. The second triggered counter will still allow the spell to resolve if you cancel the unlesscost. I did not refresh the codebase after your NPE fix.

Re: Card Development Questions

PostPosted: 04 Nov 2011, 16:50
by jeffwadsworth
Testing Overwhelming Instinct:

| Open
Name:Overwhelming Instinct
ManaCost:2 G
Types:Enchantment
Text:no text
T:Mode$ Always | TriggerZones$ Battlefield | IsPresent$ Creature.YouCtrl+attacking | PresentCompare$ GE3 | Execute$ TrigDraw | TriggerDescription$ Whenever you attack with three or more creatures, draw a card.
SVar:TrigDraw:DB$ Draw | NumCards$ 1
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/overwhelming_instinct.jpg
End


Now, this will trigger continuously. Does anyone note a non-hack solution?

Re: Card Development Questions

PostPosted: 04 Nov 2011, 18:44
by Iran
I think I see the AF choose color affects spells too.
Is possible to script Eight-and-a-Half-Tails now?


Thanks

Re: Card Development Questions

PostPosted: 04 Nov 2011, 18:57
by Hellfish
Changing the color of spells is not possible atm, I don't think.

Re: Card Development Questions

PostPosted: 05 Nov 2011, 01:22
by jeffwadsworth
While fooling around with Mindmoil, I notice that the "put them back in any order" part is apparently not operational for AB ChangeZone, etc. Teferi's Puzzle Box suffers from this as well. Am I mistaken?

Re: Card Development Questions

PostPosted: 05 Nov 2011, 01:33
by friarsol
jeffwadsworth wrote:While fooling around with Mindmoil, I notice that the "put them back in any order" part is apparently not operational for AB ChangeZone, etc. Teferi's Puzzle Box suffers from this as well. Am I mistaken?
That's probably true. But it looks like Mindmoil should look basically the same as the Puzzle Box.

Re: Card Development Questions

PostPosted: 05 Nov 2011, 03:02
by slapshot5
jeffwadsworth wrote:
slowe wrote:
friarsol wrote:Ah. Well ChosenX is right for the Variable. CMC (as well as power and toughness) just don't use variables in the right manner.

Code: Select all
            if (property.substring(z).equals("X")) {
                x = CardFactoryUtil.xCount(source, source.getSVar("X"));
            } else if (property.substring(z).equals("Y")) {
                x = CardFactoryUtil.xCount(source, source.getSVar("Y"));
            } else {
                x = Integer.parseInt(property.substring(z));
            }
I just worked through all of these Tezzeret scripting issues myself ... wish I'd checked here in the middle. Anyway, I used Hellfish's ValidCard-counters solution to fix the cmc/p/t comparison:
Code: Select all
else if (property.startsWith("power") ||
                property.startsWith("toughness") || property.startsWith("cmc")) {
            int x = 0;
            int y = 0;
            String rhs = "";

            if (property.startsWith("power")) {
                rhs = property.substring(7);
                y = getNetAttack();
            } else if (property.startsWith("toughness")) {
                rhs = property.substring(11);
                y = getNetDefense();
            } else if (property.startsWith("cmc")) {
                 rhs = property.substring(5);
                y = getCMC();
            }
            try {
                x = Integer.parseInt(rhs);
            } catch (NumberFormatException e) {
                x = CardFactoryUtil.xCount(source, source.getSVar(rhs));
            }

            if (!AllZoneUtil.compare(y, property, x)) {
                return false;
            }
With that, it's worked in the tests I did.
script | Open
Name:Tezzeret the Seeker
ManaCost:3 U U
Types:Planeswalker Tezzeret
Text:no text
Loyalty:4
A:AB$ Untap | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | TargetMin$ 0 | TargetMax$ 2 | SpellDescription$ Untap up to two target artifacts.
A:AB$ ChangeZone | Cost$ SubCounter<X/LOYALTY> | Origin$ Library | Destination$ Battlefield | ChangeType$ Artifact.cmcLEChosenX | ChangeNum$ 1 | Shuffle$ True | Planeswalker$ True | SpellDescription$ Search your library for an artifact with converted mana cost X or less and put it onto the battlefield.
A:AB$ AnimateAll | Cost$ SubCounter<5/LOYALTY> | ValidCards$ Artifact.YouCtrl | Types$ Artifact,Creature | Power$ 5 | Toughness$ 5 | Planeswalker$ True | Ultimate$ True | SpellDescription$ Artifacts you control become 5/5 artifact creatures until end of turn.
#ChosenX SVar created by Cost payment
SVar:X:XChoice
SVar:Rarity:Mythic
SVar:Picture:http://www.wizards.com/global/images/magic/general/tezzeret_the_seeker.jpg
SetInfo:ALA|Mythic|http://magiccards.info/scans/en/ala/60.jpg
Oracle:[+1] Untap up to two target artifacts.\n-X: Search your library for an artifact card with converted mana cost X or less and put it onto the battlefield. Then shuffle your library.\n[-5] Artifacts you control become 5/5 artifact creatures until end of turn.
End
Slowe, are you going to commit your code and script here?
Are we comfortable committing this code now? If all works out, I think this is a very worthwhile improvement. I'm happy to do the commit myself.

-slapshot5

Re: Card Development Questions

PostPosted: 05 Nov 2011, 03:15
by friarsol
slapshot5 wrote:Are we comfortable committing this code now? If all works out, I think this is a very worthwhile improvement. I'm happy to do the commit myself.

-slapshot5
Oh right, that's what happened to Tez. I'm all for adding these changes in for that part of xCount. There's no reason our variables should be limited to certain variable names.

Re: Card Development Questions

PostPosted: 05 Nov 2011, 03:39
by Iran
Are possible to script the cards Ixidron and Vesuvan Shapeshifter?
Is complicate to turn creatures in play face down?

I see a deck that use Ixidron and Vesuvan Shapeshifter

"A Blue Moon Rises" | Open
4 Breeding Pool
8 Forest
4 Hinterland Harbor
7 Island
23 lands

4 Gatstaf Shepherd
3 Ixidron
4 Mayor of Avabruck
3 Ulvenwald Mystics
4 Vesuvan Shapeshifter
4 Villagers of Estwald
22 creatures

3 Cackling Counterpart
3 Harrow
3 Moonmist
4 Ponder
2 Rite of Replication
15 other spells



Thanks

Re: Card Development Questions

PostPosted: 05 Nov 2011, 04:27
by slapshot5
friarsol wrote:
slapshot5 wrote:Are we comfortable committing this code now? If all works out, I think this is a very worthwhile improvement. I'm happy to do the commit myself.

-slapshot5
Oh right, that's what happened to Tez. I'm all for adding these changes in for that part of xCount. There's no reason our variables should be limited to certain variable names.
I've got Tez scripted up locally. I'll add this code, test it out and commit.

-slapshot5

Re: Card Development Questions

PostPosted: 05 Nov 2011, 05:47
by slowe
slapshot5 wrote:
jeffwadsworth wrote:
slowe wrote:[Tezz stuff]
Slowe, are you going to commit your code and script here?
Are we comfortable committing this code now? If all works out, I think this is a very worthwhile improvement. I'm happy to do the commit myself.

-slapshot5
Whoops, sorry about that. :oops:
I don't have commit privileges or a clean build, so I just wanted to get feedback that it was working and let someone else add it, which I wasn't at all clear about. Of course, then work picked back up and I disappeared.
I don't work much on Forge because I get sidetracked or busy too easily ... but I still get sucked in sometimes. :wink:
Thanks for committing.

Re: Card Development Questions

PostPosted: 05 Nov 2011, 21:06
by jeffwadsworth
Testing Crown of Convergence. Does anyone spot the issue with this part of the script?

| Open
S:Mode$ Continuous | Affected$ TopLibrary.SharesColorWith+Creature+YouCtrl | AddPower$ 1 | AddToughness$ 1 | TopCardOfLibraryIs$ Creature | Description$ As long as the top card of your library is a creature card, creatures you control that share a color with that card get +1/+1.


Now this works for something like ValidCards$, but has issues with Affected$.

Re: Card Development Questions

PostPosted: 07 Nov 2011, 19:03
by Iran
I think that can have an AF_AddPhase in forge (cards like Aggravated Assault, Savage Beating, Hellkite Charger, Paradox Haze, etc... can be added to forge). :D

I think this must be hard to implement. Change the order of the phases. :(

Re: Card Development Questions

PostPosted: 07 Nov 2011, 21:03
by jeffwadsworth
Testing Cloud Cover. This fires even if the target of the spell or ability is a permanent you do not control.

| Open
Name:Cloud Cover
ManaCost:2 W U
Types:Enchantment
Text:no text
T:Mode$ BecomesTarget | TargetsValid$ Permanent.YouCtrl+Other | TriggerZones$ Battlefield | Execute$ TrigBounce | OptionalDecider$ You | TriggerDescription$ Whenever another permanent you control becomes the target of a spell or ability an opponent controls, you may return that permanent to its owner's hand.
SVar:TrigBounce:AB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Hand | Defined$ TriggeredTarget
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/cloud_cover.jpg
End


Does anyone see the issue?

Re: Card Development Questions

PostPosted: 08 Nov 2011, 03:58
by slowe
jeffwadsworth wrote:Testing Cloud Cover. This fires even if the target of the spell or ability is a permanent you do not control.

| Open
Name:Cloud Cover
ManaCost:2 W U
Types:Enchantment
Text:no text
T:Mode$ BecomesTarget | TargetsValid$ Permanent.YouCtrl+Other | TriggerZones$ Battlefield | Execute$ TrigBounce | OptionalDecider$ You | TriggerDescription$ Whenever another permanent you control becomes the target of a spell or ability an opponent controls, you may return that permanent to its owner's hand.
SVar:TrigBounce:AB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Hand | Defined$ TriggeredTarget
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/cloud_cover.jpg
End


Does anyone see the issue?
That's strange ... I don't see anything wrong with it. It needs to be ValidTarget, not TargetsValid. I've done the same sort of thing plenty of times.
It does need a ValidSource$ parameter (SpellAbility.YouDontCtrl ?), though, because the card has that restriction.