Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
removing a card from the game
Moderator: CCGHQ Admins
removing a card from the game
by 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 :
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>
Re: removing a card from the game
by 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.
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.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- 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
by 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.
Re: removing a card from the game
by RiiakShiNal » 14 Apr 2015, 10:46
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.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.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- 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
by 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.
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests