Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by slapshot5 » 07 Jan 2011, 03:17
: Sailmonger as written in your post works fine for me. Is your creature a valid target?
My test deck was just Moxen, Sailmonger and Merfolk of the Pearl Trident.
-slapshot5
My test deck was just Moxen, Sailmonger and Merfolk of the Pearl Trident.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by Jaedayr » 07 Jan 2011, 03:48
I removed the extra hyphen and it works. Thank you for the help!slapshot5 wrote:You don't need to add hyphens in the Types: field. Just list them as:Jaedayr wrote:Also I noticed that the info box in game has an extra hyphen in the name "Creature - - Human Monger"Don't know why that card isn't working for you.
- Code: Select all
Creature Human Monger
-slapshot5
Re: Card Development Questions
by Chris H. » 10 Jan 2011, 00:56
I would like to welcome Sentient6 to the list of committers. We appreciate the help.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Card Development Questions
by sentient6 » 10 Jan 2011, 02:26
Thanks for welcome. I hope my contributions actually help somewhat.
Not sure if this is the right thread to ask this, but it seems that you can't put a SpellDescription on a drawback created from an AbilityFactory without getting a null pointer error.
The code to blame is in AbilityFactory.getAbility. When called for a Drawback, abCost is never instantiated and thus a null pointer error occurs below.
Either way, what is the general consensus on where the description of multi-part abilities/spells should go?
Not sure if this is the right thread to ask this, but it seems that you can't put a SpellDescription on a drawback created from an AbilityFactory without getting a null pointer error.
The code to blame is in AbilityFactory.getAbility. When called for a Drawback, abCost is never instantiated and thus a null pointer error occurs below.
- AbilityFactory.getAbility Snippets | Open
- Code: Select all
if (!isDb){
if (!mapParams.containsKey("Cost"))
throw new RuntimeException("AbilityFact1ory : getAbility -- no Cost in " + hostCard.getName());
abCost = new Ability_Cost(mapParams.get("Cost"), hostCard.getName(), isAb);
}
- Code: Select all
if (hasSpDesc)
{
StringBuilder sb = new StringBuilder();
if (mapParams.containsKey("PrecostDesc"))
sb.append(mapParams.get("PrecostDesc")).append(" ");
if (mapParams.containsKey("CostDesc"))
sb.append(mapParams.get("CostDesc")).append(" ");
else sb.append(abCost.toString());
sb.append(mapParams.get("SpellDescription"));
SA.setDescription(sb.toString());
}
Either way, what is the general consensus on where the description of multi-part abilities/spells should go?
- sentient6
- Posts: 13
- Joined: 03 Jan 2011, 00:48
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Development Questions
by Chris H. » 10 Jan 2011, 02:34
sentient6 wrote:Not sure if this is the right thread to ask this, but it seems that you can't put a SpellDescription on a drawback created from an AbilityFactory without getting a null pointer error.
`Either way, what is the general consensus on where the description of multi-part abilities/spells should go?
I think that you are right, we include the DB description as part of the SpellDescription included in the AF sa.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Card Development Questions
by sentient6 » 10 Jan 2011, 02:37
Alright, that's the way I'll do it from here on out. Perhaps it might make sense to provide some sort of error message, though, to warn people not to put a SpellDescription on a drawback. The thrown exception was not exactly the clearest message.Chris H. wrote:sentient6 wrote:Not sure if this is the right thread to ask this, but it seems that you can't put a SpellDescription on a drawback created from an AbilityFactory without getting a null pointer error.`Either way, what is the general consensus on where the description of multi-part abilities/spells should go?
I think that you are right, we include the DB description as part of the SpellDescription included in the AF sa.
- sentient6
- Posts: 13
- Joined: 03 Jan 2011, 00:48
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Development Questions
by Chris H. » 10 Jan 2011, 03:41
`sentient6 wrote:Alright, that's the way I'll do it from here on out. Perhaps it might make sense to provide some sort of error message, though, to warn people not to put a SpellDescription on a drawback. The thrown exception was not exactly the clearest message.
Easy to read error messages are always a good thing.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Card Development Questions
by friarsol » 10 Jan 2011, 14:32
Drawbacks were written to never have costs, and the full SpellDescription should appear on the the root AF, since it's one whole ability. We can add a section in the
Edit: I'm going to add some code to make this scenario simpler to allow either front-loading of SpellDescription (as we have now) or chaining of the Descriptions
- Code: Select all
if (hasSpDesc)
{
Edit: I'm going to add some code to make this scenario simpler to allow either front-loading of SpellDescription (as we have now) or chaining of the Descriptions
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Jaedayr » 10 Jan 2011, 21:22
I created Zhalfirin Commander and when I checked on rarity at gatherer.wizards.com it says "Special". I am adding it to the SVN as "Rare" but do we or should we have a special tag for rarity? Or do we treat all specials as rare.
Re: Card Development Questions
by friarsol » 10 Jan 2011, 21:32
Zhalfrin Commander was Uncommon in Mirage, so list it as that. It was one of the Timeshifted cards in Time Spiral. The SetInfoScript will handle the Special portion as normal.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 14 Jan 2011, 21:41
Does anyone see an issue with this line for the card Time Spiral?
- Code: Select all
A:SP$Untap | Cost$ 4 U U | TargetMin$ 0 | TargetMax$ 6 | ValidTgts$ Land | TgtPrompt$ Select target land | SpellDescription$ You untap up to six lands.
Last edited by jeffwadsworth on 14 Jan 2011, 21:48, edited 1 time in total.
- jeffwadsworth
- Super Tester Elite
- Posts: 1171
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 69 times
Re: Card Development Questions
by friarsol » 14 Jan 2011, 21:46
This untapping isn't targeted and happens during resolution. It's probably better to just wait until Untap is written to handle this type of untargeted untapping. We probably also need ChangeZoneAll to be written for the card as well.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 15 Jan 2011, 03:40
Fooling with Hellfish's new trigger code and was wondering about Pandemonium.
- Code: Select all
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Creature.YouCtrl | Execute$ TrigDamage | TriggerDescription$ Whenever a creature enters the battlefield, that creature's controller may have it deal damage equal to its power to target creature or player of his or her choice.
SVar:TrigDamage:SP$DealDamage | Tgt$ TgtCP | NumDmg$ X
SVar:X:Count$?Power
- jeffwadsworth
- Super Tester Elite
- Posts: 1171
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 69 times
Re: Card Development Questions
by friarsol » 15 Jan 2011, 03:52
Not currently, but there's another problem with Pandemonium. The controller of the creature doesn't get to choose the target, the controller of Pandemonium does. That card is going to need a decent amount of more work to get it to be 100% scriptable.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 16 Jan 2011, 22:34
Is there a way to script the removal of a keyword like flying? Testing Emerald Charm.
- jeffwadsworth
- Super Tester Elite
- Posts: 1171
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 69 times
Who is online
Users browsing this forum: No registered users and 56 guests