Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



Fixing Cascade
Moderator: CCGHQ Admins
Fixing Cascade
by Shatterhouse » 16 May 2011, 02:43
The community set currently has a few attempts at Cascade cards (Bloodbraid Elf, Bituminous Blast). There are some flaws with them:
1.) The spells cascade upon resolution. They're supposed to cascade as soon as they're cast.
2.) The spells you cascade into stay in your hand with a free casting cost forever if you choose not to cast them right away. They should be put on the bottom of the library if they are not cast.
3.) If you cascade into a permanent, say Sprouting Thrinax, cast it, and then Unsummon it back to your hand, its casting cost goes to 0. It should revert to its regular cost of BRG.
4.) The community cascade function shuffles your library. It shouldn't do that.
So I got a working cascade mechanic that fixes all these, but there's a catch. I'll get to that later. Here's the 'fixed' code for Bloodbraid Elf:
Does anyone have any better ideas?
1.) The spells cascade upon resolution. They're supposed to cascade as soon as they're cast.
2.) The spells you cascade into stay in your hand with a free casting cost forever if you choose not to cast them right away. They should be put on the bottom of the library if they are not cast.
3.) If you cascade into a permanent, say Sprouting Thrinax, cast it, and then Unsummon it back to your hand, its casting cost goes to 0. It should revert to its regular cost of BRG.
4.) The community cascade function shuffles your library. It shouldn't do that.
So I got a working cascade mechanic that fixes all these, but there's a catch. I'll get to that later. Here's the 'fixed' code for Bloodbraid Elf:
- Code: Select all
<STATIC_ABILITY layer="0" tag="_COMMONTAG_HASTE">
<EFFECT>
Haste()
</EFFECT>
</STATIC_ABILITY>
<TRIGGERED_ABILITY forced_skip="1" layer="0" zone="any">
<TRIGGER value="ZONECHANGE">
if( Object():GetErstwhileZone() == ZONE_STACK) then
return SelfTriggered()
else
return false
end
</TRIGGER>
<FILTER>
return (OwnedByYou() and InHand() and Subject():Register_Get(7) == 1)
</FILTER>
<EFFECT>
Subject():Register_Set(7,0)
Subject():PutInLibrary( -1 )
</EFFECT>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY tag="BLOODBRAID_ELF_RULE_1" auto_skip="1" layer="0" zone="HAND">
<TRIGGER value="SPELL_PLAYED">
return SelfTriggered()
</TRIGGER>
<EFFECT>
Cascade(4)
</EFFECT>
</TRIGGERED_ABILITY>
- Code: Select all
<SPELL_ABILITY tag="BITUMINOUS_BLAST_RULE_1" layer="7c" simple_filter="Target">
<TARGET_DETERMINATION>
return TargetCreatureBad()
</TARGET_DETERMINATION>
<PLAYTIME>
</PLAYTIME>
<EFFECT>
DealDamageToTarget(4)
</EFFECT>
</SPELL_ABILITY>
<TRIGGERED_ABILITY forced_skip="1" layer="0" zone="any">
<TRIGGER value="ZONECHANGE">
if( Object():GetErstwhileZone() == ZONE_STACK) then
return SelfTriggered()
else
return false
end
</TRIGGER>
<FILTER>
return (OwnedByYou() and InHand() and Subject():Register_Get(7) == 1)
</FILTER>
<EFFECT>
Subject():Register_Set(7,0)
Subject():PutInLibrary( -1 )
</EFFECT>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY layer="7c" zone="HAND" auto_skip="1" >
<TRIGGER value="SPELL_PLAYED">
return SelfTriggered()
</TRIGGER>
<PLAYTIME>
TargetCreatureBad()
ChooseTargetCreature()
</PLAYTIME>
<FILTER>
return TargetCard()
</FILTER>
<EFFECT>
</EFFECT>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY auto_skip="1" layer="0" zone="HAND">
<TRIGGER value="SPELL_PLAYED">
return SelfTriggered()
</TRIGGER>
<EFFECT>
Cascade(5)
</EFFECT>
</TRIGGERED_ABILITY>
- Code: Select all
<STATIC_ABILITY layer="8" zone="ANYWHERE" influencing_zone="HAND">
<FILTER>
return (InHand() and Subject():Register_Get(7) == 1)
</FILTER>
<EFFECT>
FreeCastingCost()
Flash()
</EFFECT>
</STATIC_ABILITY>
<TRIGGERED_ABILITY forced_skip="1" layer="0" zone="any">
<TRIGGER value="SPELL_PLAYED">
return (TriggerObject():Register_Get(7) ==1)
</TRIGGER>
<EFFECT>
TriggerObject():Register_Set(7,0)
</EFFECT>
</TRIGGERED_ABILITY>
Does anyone have any better ideas?
Last edited by Shatterhouse on 16 May 2011, 23:31, edited 2 times in total.
- Shatterhouse
- Posts: 72
- Joined: 20 Apr 2011, 00:07
- Has thanked: 0 time
- Been thanked: 2 times
-
Huggybaby - Administrator
- Posts: 3225
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 734 times
- Been thanked: 601 times
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests