tag:blogger.com,1999:blog-889604442512373664.post7045652657654570058..comments2023-10-31T08:28:52.391-07:00Comments on Computer Programming and Magic: The Gathering: Card Uniqueness - A Thorny ProblemForgehttp://www.blogger.com/profile/15838286606081721333noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-889604442512373664.post-18585996292016601462011-10-06T11:17:47.444-07:002011-10-06T11:17:47.444-07:00I completely agree with the post.I completely agree with the post.tablet pc windowshttp://www.tabletpc-shop.infonoreply@blogger.comtag:blogger.com,1999:blog-889604442512373664.post-19539998995971430592011-08-19T10:19:41.457-07:002011-08-19T10:19:41.457-07:00I did understand the comprehensive rules but somet...I did understand the comprehensive rules but sometimes it is hard to do decide how to specifically implement them. Errors will abound but hopefully that are fixable.Forgehttps://www.blogger.com/profile/15838286606081721333noreply@blogger.comtag:blogger.com,1999:blog-889604442512373664.post-91504032111869505342011-08-18T22:28:25.516-07:002011-08-18T22:28:25.516-07:00As Zethfox said we create a new object at each zon...As Zethfox said we create a new object at each zone change in Wagic. I felt nostalgic and looked at the revision where we changed that: Febryary 16, 2009, more than 2 years ago :)<br /><br />http://code.google.com/p/wagic/source/detail?spec=svn199&r=199wololohttp://wololo.net/wagicnoreply@blogger.comtag:blogger.com,1999:blog-889604442512373664.post-23213592196628988282011-08-17T03:43:40.450-07:002011-08-17T03:43:40.450-07:00it is actually part of the comprehensive rules too...it is actually part of the comprehensive rules too btw. so if you decide to go that route, it would bring you more inline with mtg rules as a handy side effect :)<br /><br /><br />403.4. Whenever a permanent enters the battlefield, it becomes a new object and has no relationship to <br />any previous permanent represented by the same card, except for the cases listed in rule 400.7. (This <br />is also true for any objects entering any zone)zethfoxhttps://www.blogger.com/profile/03031120170207030056noreply@blogger.comtag:blogger.com,1999:blog-889604442512373664.post-82634159397175753892011-08-17T03:28:12.095-07:002011-08-17T03:28:12.095-07:00in wagic, we handle this issue by making a new cop...in wagic, we handle this issue by making a new copy of the object everytime it enters a different zone, in some cases we tell the engine to skip a zone, in the case of lands, they enter an engine zone called temp, and resolve from there, on copy we tell it to copy the value of the zone it had before temp.<br /><br />this way we can check validness of the target effect ( shock damage ) on resolve. if the target is not valid anymore then we fizzle the effect.<br /><br />I can imagine without such a system you must run into a a lot of "edge cases" where effects don't quite resolve as they should.zethfoxhttps://www.blogger.com/profile/03031120170207030056noreply@blogger.comtag:blogger.com,1999:blog-889604442512373664.post-86299034949282262422011-08-16T09:43:32.438-07:002011-08-16T09:43:32.438-07:00DuelSage - "Real world magic handles this by ...DuelSage - "Real world magic handles this by essentially having 2 ID's."<br /><br />You are right, just one ID doesn't work correctly.Forgehttps://www.blogger.com/profile/15838286606081721333noreply@blogger.comtag:blogger.com,1999:blog-889604442512373664.post-88532544726611332102011-08-15T18:45:51.258-07:002011-08-15T18:45:51.258-07:00umm, I'm pretty new at java, but from my knowl...umm, I'm pretty new at java, but from my knowledge of game rules, Real world magic handles this by essentially having 2 ID's. The first is the physical card ie what seems to be currently implemented in forge, and the second is a board ID. Essentially on casting a card (put onto the stack not at resolution), it generates a new temporary ID for the card and when that card returns to hand, is exiled, is sent to deck, or is sent to graveyard, it's considered a new object and the temp id is changed. Effects then specify a combination of the temp id's.<br /><br />so for the blink example it would be :<br />momentary blink(card 25): exile temp ID 94, note that card ID is 24<br />Elvish piper(card 24): exiled-> temp ID 94 becomes 101<br />momentary blink part 2: get noted card id's (24) new temp id (101), move temp id 101 to battlefield<br />shock(card 12): deal 2 damage to 94 (can't find 94 so counters itself);<br /><br />this also solves the rare occasions where an effect moves a card from zone 1 to zone 2 for a period but a second effect moves that from zone 2 to zone 3 then back. The first effect should then no longer be able to move it from zone 2 back to 1 since by moving from zone 3 to 2, it's a new object. An issue you'd get if you only kept 1 card ID per card in a container object and checked if it was in a legal container at resolution.<br /><br />sorry had to repost, misread blink thought it was like venser, no edit buttonDualSagehttps://www.blogger.com/profile/17158627586917873937noreply@blogger.comtag:blogger.com,1999:blog-889604442512373664.post-28655286870864286762011-08-15T12:39:22.526-07:002011-08-15T12:39:22.526-07:00"it is possible to think over solving the fiz..."it is possible to think over solving the fizzling rule from another point of view - e.g. by reimplementing Target objects."<br /><br />Yes but using a stupid int for the unique card ID has worked so far and Forge is up to 8,000+ cards. I'm not saying that it is the only option but it is very simple.Forgehttps://www.blogger.com/profile/15838286606081721333noreply@blogger.comtag:blogger.com,1999:blog-889604442512373664.post-34388395642686455472011-08-15T02:49:01.859-07:002011-08-15T02:49:01.859-07:00yep, it is well known issue. and you know there is...yep, it is well known issue. and you know there is always at least another option to solve (almost) any issue.<br />having the same id over the game brings other advantages, so it is possible to think over solving the fizzling rule from another point of view - e.g. by reimplementing Target objects. So shock will have Target that may 'target' only players or creature permanents. So before resolving it, the legality will be checked and as it is not valid anymore - Elvish Piper in Exile zone since Momentary Blink resolution - Shock will be countered.nantuko84https://www.blogger.com/profile/15891352523600843744noreply@blogger.com