Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
(Tejahn) Is remove from the game possible?
Moderator: CCGHQ Admins
(Tejahn) Is remove from the game possible?
by Tejahn » 19 Jul 2015, 17:18
I've been thinking about how tokens are removed from the game and I now wonder if it's possible to remove non-tokens from the game the same way.
(1). The approach I'm hoping for is a way to remove a card, regardless of its type, from the game in the same way tokens are removed. That is, they aren't retrievable again in the same way that destroyed or exiled tokens can't be brought back.
(2). The cards become tokens with a trigger protecting them from be affected while they become such and are removed from the game that way because the are tokens.
If possible, can someone code the following:
For each player, you choose from among the permanents that player controls an artifact, a creature, an enchantment, and a land. Then each player removes all other nonland permanents he or she controls from the game.
It's similar to Cataclysm and Tragic Arrogance.
(1). The approach I'm hoping for is a way to remove a card, regardless of its type, from the game in the same way tokens are removed. That is, they aren't retrievable again in the same way that destroyed or exiled tokens can't be brought back.
(2). The cards become tokens with a trigger protecting them from be affected while they become such and are removed from the game that way because the are tokens.
If possible, can someone code the following:
For each player, you choose from among the permanents that player controls an artifact, a creature, an enchantment, and a land. Then each player removes all other nonland permanents he or she controls from the game.
It's similar to Cataclysm and Tragic Arrogance.
Re: (Tejahn) Is remove from the game possible?
by Xander9009 » 19 Jul 2015, 17:42
Probably not possible. How would you make it a token? The only I know of to even make the token badge appear is to copy other cards with it, but that immediately ends (and can't really be prevented from ending as far as I know) as soon as it leaves the battlefield.
As the kind of question I hate getting when asking questions like this: why not just exile them? They are, generally speaking, not retrievable from exile unless the card that exiled them brings them back. The only exception to this that is currently coded is the one I made (I can't remember the name), but it would be relatively simple to make the manager for that card ignore all cards being exiled for a single resolution. Once done, the manager goes back to working like it was, but without pointers to those cards, and thus ignores their existence.
As the kind of question I hate getting when asking questions like this: why not just exile them? They are, generally speaking, not retrievable from exile unless the card that exiled them brings them back. The only exception to this that is currently coded is the one I made (I can't remember the name), but it would be relatively simple to make the manager for that card ignore all cards being exiled for a single resolution. Once done, the manager goes back to working like it was, but without pointers to those cards, and thus ignores their existence.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: (Tejahn) Is remove from the game possible?
by Tejahn » 19 Jul 2015, 18:14
Great explanation. And I was just curios. Cards like Final Judgment were updated to reflect that 'Remove all creatures from the game' mean 'Exile all creatures'. Thanks for helping me understand the limitations of the engine.
Re: (Tejahn) Is remove from the game possible?
by RiiakShiNal » 20 Jul 2015, 00:32
You can't remove non-token cards from the game like tokens (the engine won't allow it). The closest you will be able to get is moving them to the ZONE_CEASED_TO_EXIST (using QueueZoneChange), though they will technically still be in that zone whereas tokens actually get deleted when they leave play.
Though it should be noted that the older "remove from game" text on cards was errata'd to mean exile in later versions of MtG. So there should be no problem with just exiling the cards.
Though it should be noted that the older "remove from game" text on cards was errata'd to mean exile in later versions of MtG. So there should be no problem with just exiling the cards.
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: (Tejahn) Is remove from the game possible?
by Tejahn » 20 Jul 2015, 17:20
Understood. But out of curiosity and because I want to test ZONE_CEASED_TO_EXIST, can you provide a working code?
Re: (Tejahn) Is remove from the game possible?
by Xander9009 » 20 Jul 2015, 17:23
Neo's phasing cards use it.Tejahn wrote:Understood. But out of curiosity and because I want to test ZONE_CEASED_TO_EXIST, can you provide a working code?
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: (Tejahn) Is remove from the game possible?
by Tejahn » 20 Jul 2015, 23:02
Thanks! I'll get a look.
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 33 guests