It is currently 07 May 2024, 22:21
   
Text Size

removing a card from the game

Moderator: CCGHQ Admins

removing a card from the game

Postby logoliv » 12 Apr 2015, 11:32

I'm trying to code a card that removes all other instances of itself (all cards with the same name) from the game when entering the battlefield. The problem is that i don't want to exile them but remove them completely from the game, is it possible in Magic 2014 ?

In the first DotP i coded a card that did the job, but i suppose it won't work with the 2014 version :
Code: Select all
<TRIGGERED_ABILITY layer="0" zone="Any">
         
   <TRIGGER value="COMES_INTO_PLAY">
   return SelfTriggered()
   </TRIGGER>
         
   <FILTER>
   return SubjectType() == SUBJECT_OBJECT
     and Object():GetRef() == Subject():GetRef()
     and Object():GetPlayer() == Subject():GetPlayer()
     and ( Subject():GetZone() == ZONE_GRAVEYARD or
       Subject():GetZone() == ZONE_HAND or
       Subject():GetZone() == ZONE_LIBRARY )
   </FILTER>
         
   <EFFECT>
   Subject():RemoveFromGame()
   </EFFECT>
         
</TRIGGERED_ABILITY>
Any help would be welcome :)
User avatar
logoliv
 
Posts: 130
Joined: 26 Jul 2010, 11:15
Has thanked: 4 times
Been thanked: 1 time

Re: removing a card from the game

Postby RiiakShiNal » 13 Apr 2015, 10:51

In DotP 2010 RemoveFromGame() is the exact same thing as exiling. It was renamed in later iterations of the DotP engine. So your card that "did the job" simply exiled the other copies of itself and did not actually remove them.

There is no way to completely remove a non-token card from the game. Tokens are deleted (completely removed) when they leave play, but there is no way to delete a non-token card.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: removing a card from the game

Postby logoliv » 13 Apr 2015, 12:39

thanks :) if i remember correctly, we could not see the exile zone in DotP right ? that's why i thought they were completely removed from game.
User avatar
logoliv
 
Posts: 130
Joined: 26 Jul 2010, 11:15
Has thanked: 4 times
Been thanked: 1 time

Re: removing a card from the game

Postby RiiakShiNal » 14 Apr 2015, 10:46

logoliv wrote:thanks :) if i remember correctly, we could not see the exile zone in DotP right ? that's why i thought they were completely removed from game.
That's correct, in DotP 2010 we could not see the exile zone. The closest we can get now is with ZONE_CEASED_TO_EXIST, but it may not work as expected and there is no easy function to send a card to that zone. If I remember correctly one of the modders on the forum was experimenting with this and said that using QueueZoneChange() they were able to send cards to that zone.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: removing a card from the game

Postby sweetLu » 14 Apr 2015, 12:41

I think neo used it for phasing when he was trying to make that. I'd suggest checking there if you want to look into it.
sweetLu
 
Posts: 181
Joined: 16 Jul 2014, 01:24
Has thanked: 21 times
Been thanked: 22 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 8 guests


Who is online

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

Login Form