It is currently 09 May 2025, 16:39
   
Text Size

Making Magic : Planeswalkers ( sort of working elspeth)

Moderator: CCGHQ Admins

Making Magic : Planeswalkers ( sort of working elspeth)

Postby kitsune223 » 11 Sep 2010, 01:51

I wanted to try and implement some planeswalkers into the game ( They do add a lot) but it seems like the "Planeswalker" card type is buggy ( they appear in the deck list but when you draw them you get an invisible card).

So I sort of bypassed it by making a legendary enchantment with charge counters instead of loyalty one.
The goal is to add some static abilities to allow the other player to redirect damage to the Planeswalker in form of losing counters :Every time the opponent attack he may choose the enchantment or the player which in turn will turn on {if the planeswalker was selected} an ability that cancels the damage but instead remove charge counters from the card ( it shouldn't be super hard).

The card itself should be indestructible or shroud( I know PW don't have indestructible but it's a better compromise then allowing them to be destroyed by enchantment killers, plus there aren't many permanent killers in this game) and use the same tool set in the example.

SO HERE IS THE PROGRESS :

Done:

Sample enchant-PW in the form of Elspeth ( bonus of working emblem :) )
Simple Check functions ( see if the PW can actually use the ability/ is it dead etc.)
Basic skeleton for damage dealing ( not posted as it's still an early work and will probably see revision tomorrow


To Do:
1)Damage redirection /Attacker redirection script ( the lion share of the work , and something that will probably take long to debug :( )

2)Add indestructible /shroud to Elspeth : Still need to figure which is better to put ( Actually that's an excuse I am just to tired to add it today ...)-Will take two minutes tomorrow

3)Make the .tdx file for Elspeth and the emblems ( Emblem just needs a pic but Elspeth need a frame as well)-IF SOMEONE CAN DO THIS IT WOULD BE A MAJOR HELP (hate dealing with it)

4) Write a function to add the initial charge counters : currently you can only add the INITIAL counters with AddChargeCounterToSelf() for some reason { I think it might have something to do with the layer it runs in , in other places the normal methods worked fine}

5) Build some more PW ( Elspeth was the hardest so this should be easier :)

Here's the code :

Elspeth Knight Errant

Code: Select all
<?xml version="1.0"?>
<MULTICARDS>
  <CARD>

<!--
///////////////////////////////////////////////////////////////////////////////////

 CARD INFORMATIONS

///////////////////////////////////////////////////////////////////////////////////
-->

    <FILENAME        text = "ELSPETH_KNIGHT_ERRANT" />
    <ARTID            Value = "88882200" />

    <TITLE            text =    "ELSPETH_KNIGHT_ERRANT_TITLE" />
    <TYPE            metaname = "Enchantment" />
    <SUPERTYPE    metaname = "Legendary" />
    <SUBTYPE    metaname = "ELSPETH" />

    <CASTING_COST    cost = "{2}{W}{W}" />
    <COLOR        value =    "W" />
    <FRAMECOLOUR           name = "W" />

    <EXPANSION    metaname = "8888" />
    <RARITY        metaname = "Mythic" />
    <COLLECTIONMAX            value = "0" />
    <COLLECTORNUMBER        value = "0" />
    <CARDNUMBER            value = "0" />
    <ARTIST                 name = "Volkan Baga" />

<!--
///////////////////////////////////////////////////////////////////////////////////

 START OF CARD ABILITIES

///////////////////////////////////////////////////////////////////////////////////
-->

    <TRIGGERED_ABILITY forced_skip="1" layer="0">

        <TRIGGER value="COMES_INTO_PLAY">
            return SelfTriggered()
        </TRIGGER>

              <EFFECT>
                AddChargeCounterToSelf()
            AddChargeCounterToSelf()
            AddChargeCounterToSelf()
            AddChargeCounterToSelf()
              </EFFECT>

       </TRIGGERED_ABILITY>

    <ACTIVATED_ABILITY tag="ELSPETH_KNIGHT_ERRANT_RULE_2" layer="1" forced_skip="0" sorcery_time="1">

        <COST type="TapSelf" />
        <COST type="COUNTERSSELF" name="CHARGE" number="+4" />

        <AVAILABILITY>
            return isPlayable(1)
        </AVAILABILITY>

        <EFFECT>
            PutTokensIntoPlay( "Soldier11_Token", 1)
        </EFFECT>

    </ACTIVATED_ABILITY>

    <ACTIVATED_ABILITY tag="ELSPETH_KNIGHT_ERRANT_RULE_3" layer="7c" forced_skip="0" sorcery_time="1">

        <COST type="TapSelf" />
        <COST type="COUNTERSSELF" name="CHARGE" number="+4" />

        <AVAILABILITY>
            return isPlayable(1)
        </AVAILABILITY>

             <TARGET_DETERMINATION>
                    return TargetCreatureGood()
              </TARGET_DETERMINATION>

        <PLAYTIME>
                ChooseTargetCreature()
        </PLAYTIME>

        <EFFECT>
            PlusThreePlusThreeToTargetCard()
            GiveFlying( Object():GetTargetCard() )   
        </EFFECT>
            <DURATION>
                    return UntilEndOfTurn()
             </DURATION>

    </ACTIVATED_ABILITY>

    <ACTIVATED_ABILITY tag="ELSPETH_KNIGHT_ERRANT_RULE_4" layer="1" forced_skip="0" sorcery_time="1">
        <COST type="TapSelf" />
        <COST type="COUNTERSSELF" name="CHARGE" number="-8" />
        <AVAILABILITY>
            return isPlayable(-8)
        </AVAILABILITY>
        <EFFECT>
            PutTokensIntoPlay("_INDESTRUCTABLE_EMB",1)
            if ( checkPWdeath() )
            then
                SacrificeThisCard()
            end
        </EFFECT>
    </ACTIVATED_ABILITY>

<!--
///////////////////////////////////////////////////////////////////////////////////

 END OF CARD ABILITIES

///////////////////////////////////////////////////////////////////////////////////
-->

    </CARD>
</MULTICARDS>
Emblem

Code: Select all
<?xml version="1.0"?>
<MULTICARDS>
  <CARD>

<!--
///////////////////////////////////////////////////////////////////////////////////

 CARD INFORMATIONS

///////////////////////////////////////////////////////////////////////////////////
-->

    <FILENAME         text = "_INDESTRUCTABLE_EMB" />
    <ARTID           value = "77771101" />

    <TITLE            text = "_INDESTRUCTABLE_EMB_TITLE" />
    <TYPE         metaname = "Land" />
    <SUB_TYPE     metaname = "Desert" />
    <COLOR           value = "C" />
    <FRAMECOLOUR      name = "W" />

    <EXPANSION    metaname = "8888" />
    <ARTIST           name = "" />

<!--
///////////////////////////////////////////////////////////////////////////////////

 START OF CARD ABILITIES

///////////////////////////////////////////////////////////////////////////////////
-->

    <STATIC_ABILITY layer="0" tag="_INDESTRUCTABLE_EMB_RULE_1">
      <FILTER>
        return (OwnedByYou() and InPlay())
      </FILTER>
      <EFFECT>
        Indestructible()
      </EFFECT>

    </STATIC_ABILITY>

    <STATIC_ABILITY layer="0">

      <EFFECT>
        Shroud()
      </EFFECT>

    </STATIC_ABILITY>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->



<!--
///////////////////////////////////////////////////////////////////////////////////

 END OF CARD ABILITIES

///////////////////////////////////////////////////////////////////////////////////
-->

  </CARD>
</MULTICARDS>
As said Functions will be posted later ( This girl is on her way to bed for a good night sleep :) )
kitsune223
 
Posts: 2
Joined: 11 Sep 2010, 01:17
Has thanked: 0 time
Been thanked: 0 time

Re: Making Magic : Planeswalkers ( sort of working elspeth)

Postby Clark » 12 Sep 2010, 13:13

Nice job!.

I tried to create PW like what you think, but stopped by the Q1.

The bottleneck is how to let player choose target to attack.

To the PW abilities, they could be implemented as level-up cards as what you exactly did.

To your Q2, i think PW'd better have both indestructible/shroud to prevent from deathtouch or 'destroy/excile/etc' sorcery.

Anyhow, hope your cards would be released soon :)
Clark
 
Posts: 64
Joined: 21 Aug 2010, 16:07
Has thanked: 0 time
Been thanked: 0 time

Re: Making Magic : Planeswalkers ( sort of working elspeth)

Postby kitsune223 » 13 Sep 2010, 13:33

Actually the damage part is quite easy. Once damage is assigned to the player you ask the person who played the damage ability if it wants to damage the PW or the player.

The problem is with the attack phase : I currently think the best solution is to ask the AT if he wants to attack the DF or the PW for every monster that attacked. If he choose to attack the PW we put a charge counter on it to indicate it attacks the PW.

SO HERE IS THE PROGRESS UPDATE:

Take damage redirection function added ( what this does is to ask the OP if he wants to assign the damage to the PW or the player)- Yet to be tested with AI .
Indestructible + shroud added .


PS.
If anyone knows the AI scripting methods ( make the AI select certain targets / play certain cards ) please PM me with the "how to", it would help a lot with the development
kitsune223
 
Posts: 2
Joined: 11 Sep 2010, 01:17
Has thanked: 0 time
Been thanked: 0 time

Re: Making Magic : Planeswalkers ( sort of working elspeth)

Postby digitalPanda » 16 Nov 2010, 16:57

Inside the CONSTANTS.LUA file Planeswalkers are considered a type of card:
Code: Select all
-- enum CardTypeEnum

CARD_TYPE_ARTIFACT
CARD_TYPE_CREATURE
CARD_TYPE_ENCHANTMENT
CARD_TYPE_INSTANT
CARD_TYPE_LAND
CARD_TYPE_PLANESWALKER
CARD_TYPE_SORCERY
CARD_TYPE_TRIBAL

you could switch

    <TYPE            metaname = "Enchantment" />
to
    <TYPE            metaname = "Planeswalker" />
also, there is no reference about
    <SUBTYPE         metaname = "ELSPETH" />
and this could not be good with Jace, Elspeth and Ajani.
In your case you should try to code the other Elspeth and test if, when you play this version both got destroyed properly.
Also you could use the same frame as Eldrazi spells to get a full frame for planeswalker since their card have a sort of see-trough in the lower part.
Code: Select all
    <FRAMECOLOUR        name = "C full" />
I hope this could be of any help, or maybe not but deserve a try :)
After I coded Kargan Dragonlord I was thinking the same about Planeswalkes, they works like a levelling creature...more or less. :P

If you still working on it, I could help you with the frame, just PM me, or reply.

Bye!
digitalPanda
 
Posts: 25
Joined: 29 Sep 2010, 22:24
Has thanked: 1 time
Been thanked: 0 time


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 16 guests

cron

Who is online

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

Login Form