Help with a keyword

Login or register to post comments
Tue, 2009-07-21 11:45
blackpoe66

Here's the keyword:

Catalyst <cost>: Whenever you play an instant or sorcery, if it shares a color with [c]{if has_pt() then "this creature" else "this permanent"}[/c], you may pay <cost>. If you do, copy that spell. You can choose new targets for the copy.

Now the problem:

I would like to add something in the bit of code in there that makes it so that if the card is an instant or sorcery, it will say something like, "Whenever you play an instant or sorcery, if it shares a color with this spell and this spell is on the stack, you map pay <cost>. If you do, copy that spell. You may choose new targets for the copy.

Unfortunately, after some intense brainstorming, I have determined that that coding is beyond my skill level. Could someone give me a hand?

Tue, 2009-07-21 17:06
Pichoro
Pichoro's picture

First, you asked this over at MSE Custom Script. The rules strictly prohibit that, and its your second offense there. I've suspended you for 1 week there. If you do it again, I'll ban you completely. Please try to understand, I already have to deal with bots practically everytime I log in. You can obey the forum rules, or not use the forum at all.

Change your RT to this:

Whenever you play an instant or sorcery, if it shares a color with {if has_pt() then "this creature" else if contains(card.super_type, match:"Instant") or contains(card.super_type, match:"Sorcery") then this spell and this spell is on the stack" else "this permanent"}, you may pay {param1}. If you do, copy that spell.{if is_targeted() then " You may choose new targets for the copy."}

That'll display your modification for instants and sorceries, and also only displays the last sentence if the spell uses the word "target". That last bit is commonly done on things like Storm and Replicate.

Tue, 2009-07-21 22:42
blackpoe66

thanks for this, pich. also, sorry about the other forum. i was sleep-deprived at the time. no matter. i shall learn not to post like that when I haven't slept yet...

Tue, 2009-07-21 22:50
Rusty Keyes
Administrator
Rusty Keyes's picture

Saying you were tired is not a good excuse.

Administrator

Wed, 2009-07-22 01:04
innuendo
innuendo's picture

Thank you rusty, but don't flame bait.

Current Projects: Siege SCG

Wed, 2009-07-22 01:14
Pichoro
Pichoro's picture

innuendo wrote:
Thank you rusty, but don't flame bait troll.

Fixed. Winking smiley

But seriously, yeah, I can take care of it. Blackpoe and I've dealt with the matter. No more hands are needed in this soup.

Sat, 2009-07-25 11:33
blackpoe66

ok, so I implemented the code you gave me, and it works wonderfully, but I was wondering if you could help me with a further development. I used a similar coding for another keyword, and...well, just look at the code:

Whenever {if has_pt() then "this creature" else if contains(card.sub_type,match:"Aura") then "enchanted {if contains(card.text,match:"Enchant creature") then "creature" else "permanent"}" else "this permanent"} becomes tapped, put a backfire counter on it. When it has {english_number(param1)} or more backfire counters on it, sacrifice it. It deals damage to you equal to its {if has_pt() then "power" else "converted mana cost"}.

If you can tell, i would like it to say "enchanted creature" if the card has "enchant creature" in the text box, or "enchanted permanent" for any other Auras. can this be done? if so, how should I change my coding to make it work?

Sat, 2009-07-25 12:37
Pichoro
Pichoro's picture

Try this out:

Whenever {if has_pt() then "this creature" else if contains(card.sub_type,match:"Aura") then "enchanted "+(if contains(card.rule_text,match:"Enchant creature") then "creature" else if contains(card.rule_text, match:"Enchant ") then "permanent") else "this permanent"} becomes tapped, put a backfire counter on it. When it has {english_number(param1)} or more backfire counters on it, sacrifice it. It deals damage to you equal to its {if has_pt() then "power" else "converted mana cost"}.

I'm not actually sure that'll work. If it doesn't, say so, and I'll try something else.

Sat, 2009-07-25 12:49
blackpoe66

Well, I tried it, got my hopes up, and then had them dashed upon the rocks of dispair like so many tornado-ravaged window-panes. Any other suggestions?

Sat, 2009-07-25 12:51
Pichoro
Pichoro's picture

What was wrong with it?

Sat, 2009-07-25 12:58
blackpoe66

Well, everything works fine, but it will not read the "Enchant creature". All it's saying for this (for the Aura part of it, anyway) is "enchanted permanent".

Sat, 2009-07-25 13:17
Pichoro
Pichoro's picture

Ah, that's cause the card doesn't say "Enchant creature", it says "Enchant <param-name>creature". Winking smiley

Try this, then:
Whenever {if has_pt() then "this creature" else if contains(card.sub_type,match:"Aura") then "enchanted "+(if contains(card.rule_text,match:"Enchant <param-name>creature") then "creature" else if contains(card.rule_text, match:"Enchant ") then "permanent") else "this permanent"} becomes tapped, put a backfire counter on it. When it has {english_number(param1)} or more backfire counters on it, sacrifice it. It deals damage to you equal to its {if has_pt() then "power" else "converted mana cost"}.

This will not work with things like "Enchant blue creature". If I made it work with them, then it wouldn't work with things like "Enchant creature you control" (which currently should work). And if I made it work with things like that, it would go off on cards that don't enchant creatures but do something to creatures. So, you can see, its quite a mess. But it works in most cases currently.

Sat, 2009-07-25 13:27
blackpoe66

Well, it worked, thanks to your brilliant coding skills. If we were on the official MtG forums, I'd give you a cookie, but I can't here, so I hope my sincere graditude is enough.

Sat, 2009-07-25 13:29
Pichoro
Pichoro's picture