Page 1 of 1

Converting Keywords to Factories

PostPosted: 22 Apr 2012, 18:56
by friarsol
Certain Keywords we have are hardcoded, where they could be integrated into the Ability/Trigger/Static system that exists. Now I'm less familiar with the Trigger and Static system, so maybe the guys who have coded them up can chime in to say which of these are feasible.

Here's an incomplete list and how I'd picture them working:

Cycling - AB$ Draw | Cost$ Cost + Discard<1/Card.Self> | ActivationZone$ Hand. Set isCycling flag.
Typecycling - AB$ ChangeZone | Cost$ Cost + Discard<1/Card.Self> | Origin$ Library | Destination$ Hand | ChangeType$ <Type>. Set isCycling flag.
Transmute - AB$ ChangeZone | Cost$ Cost + Discard<1/Card.Self> | Origin$ Library | Destination$ Hand | ChangeType$ <Card.cmcEQX>.
Suspend - Both Triggers should be able to be converted. The actual Suspend action will have to stay hardcoded
Fading - Fading is basically: etbCounter:Fade:X and a Trigger that removes a fade counter during the upkeep if it has one. Or Sacrificing the card if it doesn't have one.
Vanishing - etbCounter:Time:X. Trigger that remove a fade counter if it has one. Trigger that sacrifices the permanent when the last counter is removed (not sure if this trigger exists)
Split Second - Static Ability that grants CantBeCast on both players and CantBeActivated (except Mana) on both players. EffectZone is only on the Stack.

Re: Converting Keywords to Factories

PostPosted: 22 Apr 2012, 19:38
by Hellfish
I'm all for it. Forgive me if I only cheer from the sidelines,though, my codebase is a *little* dirty 8-[
friarsol wrote:Vanishing - etbCounter:Time:X. Trigger that remove a fade counter if it has one. Trigger that sacrifices the permanent when the last counter is removed (not sure if this trigger exists)
A CounterRemoved trigger with IsPresent$ Card+Self+counters_TIME_EQ0 might well work.

Fading - Fading is basically: etbCounter:Fade:X and a Trigger that removes a fade counter during the upkeep if it has one. Or Sacrificing the card if it doesn't have one.
Maybe two triggers at worst. One for when the card has a counter that subtracts one and one that sacs the card when there's none.

Re: Converting Keywords to Factories

PostPosted: 22 Apr 2012, 19:53
by friarsol
Hellfish wrote:Maybe two triggers at worst. One for when the card has a counter that subtracts one and one that sacs the card when there's none.
Should be able to do it with one trigger and conditionals, since it might be possible to remove counters after the trigger hits the stack.

I know what you mean about dirty code. I have a few half started ideas, that didn't flesh out that I probably should just nuke, but can't quite do it.