It is currently 10 Jun 2025, 21:28
   
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 » 11 Feb 2011, 01:01

Zirbert wrote:I've been trying Kookus (and there are a few similar "if you do / don't control a___" cards that could follow if this works). Can this line be tweaked to check for Keeper of Kookus during upkeep? Right now, it crashes Forge. I'm not sure about (a) using "IsNotPresent" in a trigger check; (b) whether IsNotPresent can look for a specific card name; (c) the syntax of the card name ("Keeper of Kookus" vs. "keeper_of_kookus", etc.):

Code: Select all
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsNotPresent$ Permanent.Named.Keeper of Kookus | Execute$ TrigNoKeeper
IsNotPresent$ does not exist yet.
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 Zirbert » 11 Feb 2011, 01:55

Thanks, Jeff - I'll add Kookus to my "Not Gonna Work (Yet)" folder.
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Development Questions

Postby friarsol » 11 Feb 2011, 03:20

jeffwadsworth wrote:IsNotPresent$ does not exist yet.
It might work with IsPresent$ Card.namedKeeper of Kookus | PresentCompare$ EQ0
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Zirbert » 11 Feb 2011, 03:48

friarsol wrote:
jeffwadsworth wrote:IsNotPresent$ does not exist yet.
It might work with IsPresent$ Card.namedKeeper of Kookus | PresentCompare$ EQ0
Thanks, but no go - it crashes on my upkeep when the trigger check goes off. The error starts with:

Code: Select all
AbilityFactory : SpellAbility was not created for Kookus. Did you add the API section?


Version:
Forge -- official beta: $Date: 2011-01-06 11:34:48 -0500 (Thu, 06 Jan 2011) $, SVN revision: $Revision: 4891 $

OS: Linux Version: 2.6.31-9-rt Architecture: amd64

Java Version: 1.6.0_20 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.RuntimeException: AbilityFactory : SpellAbility was not created for Kookus. Did you add the API section?
   at forge.AbilityFactory.getAbility(AbilityFactory.java:506)
   at forge.TriggerHandler.runSingleTrigger(TriggerHandler.java:237)
   at forge.TriggerHandler.runTrigger(TriggerHandler.java:188)
   at forge.PhaseUtil.handleUpkeep(PhaseUtil.java:320)
   at forge.Phase.handleBeginPhase(Phase.java:160)
Here's my check line:

Code: Select all
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Card.namedKeeper of Kookus | PresentCompare$ EQ0 | Execute$ TrigNoKeeper | TriggerDescription$ At the beginning of your upkeep, if you don't control a creature named Keeper of Kookus, CARDNAME deals 3 damage to you and attacks this turn if able.
Edited to include test results. And for typos. Always for typos.
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Development Questions

Postby friarsol » 11 Feb 2011, 04:11

And what does TrigNoKeeper look like?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby jeffwadsworth » 11 Feb 2011, 04:42

friarsol wrote:
jeffwadsworth wrote:IsNotPresent$ does not exist yet.
It might work with IsPresent$ Card.namedKeeper of Kookus | PresentCompare$ EQ0
That is clever.
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 friarsol » 11 Feb 2011, 04:44

jeffwadsworth wrote:That is clever.
http://www.youtube.com/watch?v=TO5wryDdEI0
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby jeffwadsworth » 11 Feb 2011, 05:26

friarsol wrote:And what does TrigNoKeeper look like?
Probably like this:

Code: Select all
Name:Kookus
ManaCost:3 R R
Types:Creature Djinn
Text:no text
PT:3/5
K:Trample
A:AB$Pump | Cost$ R | NumAtt$ +1
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Card.namedKeeper of Kookus | PresentCompare$ EQ0 | Execute$ TrigNoKeeper | TriggerDescription$ At the beginning of your upkeep, if you don't control a creature named Keeper of Kookus, CARDNAME deals 3 damage to you and attacks this turn if able.
SVar:TrigNoKeeper:AB$DealDamage | Cost$ 0 | NumDmg$ 3 | Defined$ You | SubAbility$ SVar=DBAttacks
SVar:DBAttacks:DB$Pump | KW$ HIDDEN CARDNAME attacks each turn if able. | Defined$ Self
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/kookus.jpg
End
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 Zirbert » 11 Feb 2011, 11:29

Here's my version of Kookus. It's like Jeff can see into my house. Must increase the tinfoil shielding.

Code: Select all
Name:Kookus
ManaCost:R R 3
Types:Creature Djinn
Text:no text
PT:3/5
K:Trample
A:AB$Pump | Cost$ R | NumAtt$ +1 | SpellDescription$ CARDNAME gets +1/+0 until end of turn.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Card.namedKeeper of Kookus | PresentCompare$ EQ0 | Execute$ TrigNoKeeper | TriggerDescription$ At the beginning of your upkeep, if you don't control a creature named Keeper of Kookus, CARDNAME deals 3 damage to you and attacks this turn if able.
SVar:TrigNoKeeper:DB$DealDamage | NumDmg$ 3 | Defined$ You | SubAbility$ SVar=MustAttack
SVar:TrigMustAttack:DB$Pump | KW$ HIDDEN CARDNAME attacks each turn if able. | SpellDescription$ CARDNAME attacks this turn if able.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/kookus.jpg
SetInfo:VIS|Rare|http://magiccards.info/scans/en/vi/86.jpg
End
Edit: I must have had a typo in my last version. I retyped the whole thing, instead of copy-and-pasting, and Forge stopped crashing. Now Kookus deals 3 if the Keeper is missing, but doesn't have to attack. That's probably just because I don't have the Self parameter that Jeff put in that subability. And if I didn't need to be at work in 10 minutes I'd test that idea. This message will probably get edited again in, oh, nine hours or so.
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Development Questions

Postby lazylockie » 11 Feb 2011, 12:13

I tried to do some of those, but I have some questions before making them:

friarsol wrote:Here are a few more blocks of what look like doable cards:

Alara Reborn
Code: Select all
Bant Sojourners <- is there a "whenever you cycle" trigger? (Sojourners, Lightning Rift , Astral Slide, Decree of Justice, etc)
Glory of Warfare
Gloryscale Viashino <- I've made it already
Grixis Sojourners
Illusory Demon
Jund Sojourners
Kathari Bomber
Mage Slayer <- I've tried, but Card.AttachedBy+CardPower doesn't work
Naya Sojourners
Nulltread Gargantuan <- Tried also, the tricky part is that it doesn't target
Retaliator Griffin?
Soul Manipulation
Spellbound Dragon
Wargate
Conflux
Code: Select all
Beacon Behemoth
Blood Tyrant(we can't do the second ability, but since we don't support multiplayer we don't need to)
Cylian Sunsinger
Elder Mastery
Esperzoa
Nacatl Hunt-Pride (Pump "CARDNAME blocks each turn if able.")
Scornful AEther-Lich
Suicidal Charge
Yoke of the Damned
Shards of Alara
Code: Select all
Banewasp Affliction
Blister Beetle
Bloodthorn Taunter
Branching Bolt
Cradle of Vitality?
Empyrial Archangel
Fatestitcher
Flameblast Dragon <- I've also tried, crashes on paying X. I'll try him again
Fleshbag Marauder
Gustrider Exuberant
Mosstodon
Ooze Garden
Puppet Conjurer
Qasali Ambusher
Rakeclaw Gargantuan
Realm Razer?
Relic of Progenitus?
Resounding Roar
Resounding Scream
Resounding Silence
Resounding Thunder
Resounding Wave
Scourge Devil
Sharding Sphinx
Sigil Blessing (trick: target creature gets +2/+2 creatures you control get +1/+1)
Skeletal Kathari
Soul's Might
Spearbreaker Behemoth
Sphinx Sovereign
Steelclad Serpent
Viashino Skeleton
Welkin Guide
lazylockie
 
Posts: 508
Joined: 13 Jul 2010, 22:44
Has thanked: 74 times
Been thanked: 15 times

Re: Card Development Questions

Postby Hellfish » 11 Feb 2011, 12:57

The "Cycled" trigger mode just wasn't on the wiki. Sorry about that. It is now though!

Mage Slayer can be done using the Attacks mode and something like
Code: Select all
SVar:X:Triggered$CardPower
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Card Development Questions

Postby friarsol » 11 Feb 2011, 14:22

Nulltread Gargantuan needs to use the Hidden$ True flag like other things that ChangeZone but don't choose until resolution.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby jeffwadsworth » 11 Feb 2011, 14:57

Cheers.
Last edited by jeffwadsworth on 12 Feb 2011, 16:41, edited 1 time in total.
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 Zirbert » 12 Feb 2011, 02:16

Thanks, guys - Kookus is now tested and working fine. I'm posting the completed version over on Card Contributions. Between the suggested logic test, fixing my boneheaded typos, and fixing my boneheaded failure to sync up the SubAbility names from one line to the next, we got it working.

Now, after all that work, I'm struck more than ever by the fact that Kookus, well, just isn't a very good card.

-Zirbert
Zirbert
 
Posts: 512
Joined: 13 Oct 2010, 16:04
Has thanked: 104 times
Been thanked: 19 times

Re: Card Development Questions

Postby jeffwadsworth » 13 Feb 2011, 05:53

Does anyone see an issue with this script? It does not deal any damage to blocking creatures. Perhaps it is a timing issue.

Code: Select all
Name:Electryte
ManaCost:3 R R
Types:Creature Beast
Text:no text
PT:3/3
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Opponent | CombatDamage$ True | Execute$ TrigDamage | TriggerDescription$ Whenever CARDNAME deals combat damage to defending player, it deals damage equal to its power to each blocking creature.
SVar:TrigDamage:AB$DamageAll | Cost$ 0 | ValidCards$ Creature.blocking | NumDmg$ X
SVar:X:Count$CardPower
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/electryte.jpg
End
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 18 guests


Who is online

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

Login Form