It is currently 29 Apr 2024, 10:23
   
Text Size

Leyline of Vitality

Moderator: CCGHQ Admins

Leyline of Vitality

Postby zanemerrick » 17 Apr 2011, 20:53

Hi all. This forum seems to be a little dead lately and I was hoping for some help from more experienced coders than myself. If you're still here, please help [-o<

OK, so I've been working on Leyline of Vitality for a little while now and after some trial and error, I seem to have come to a dead end #-o Everything works perfectly as listed below, except part of the first ability: "If Leyline of Vitality is in your opening hand, you may begin with it on the battlefield."

I can get the game to ask if I want to start with it on the battlefield (it all works great), but the problem comes when I draw it later in the game, say 3rd or 4th turn in. It still asks if you want to start the game with it in play (therefore getting a free Leyline no matter at which point in the game you're in. Here's what I have:

Code: Select all
<TRIGGERED_ABILITY layer="0" tag="LEYLINE_OF_VITALITY_RULE_1" zone="hand" forced_skip="1">
 <TRIGGER value="BEGINNING_OF_STEP"> if (MTG():GetStep() == STEP_MAIN_1 and Object():Register_Get( 1 ) < 1 and Player() == Object():GetPlayer()) then return true else return false end </TRIGGER>
 <PLAYTIME> Object():Register_Set( 1, 1 ) Object():GetFilter():Clear() Object():GetFilter():SetPlayer( Object():GetPlayer() ) Object():GetPlayer():BeginNewMultipleChoice( true ) Object():GetPlayer():AddMultipleChoiceAnswer( "YES" ) Object():GetPlayer():AddMultipleChoiceAnswer( "NO" ) Object():GetPlayer():AskMultipleChoiceQuestion( "LEYLINE_OF_VITALITY_Q" ) </PLAYTIME>
 <EFFECT> Object():Register_Set( 1, 1 ) if Object():GetMultipleChoiceResult() == 0 then Object():PutIntoPlay( Object():GetPlayer() ) end </EFFECT>
 </TRIGGERED_ABILITY>
I followed the coding of Leyline of the Void for the above. Is there a way to make the game determine if it's the very first turn or not? Much appreciation on any help with this.
zanemerrick
 
Posts: 6
Joined: 12 Apr 2011, 08:10
Has thanked: 0 time
Been thanked: 0 time

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 26 guests


Who is online

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

Login Form