MTGForge 05/03 (unofficial BETA) version
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: MTGForge 05/03 (unofficial BETA) version
by Rob Cashwalker » 07 May 2009, 16:59
Bah.. I guess you're right, I wasn't thinking about it enough.
Maybe instead of using getType().contains(Type), make a new method, (Boolean) isType(Type) that does both? And then modify the CardList filtering method to return cards with isType(Type) = true.
Maybe instead of using getType().contains(Type), make a new method, (Boolean) isType(Type) that does both? And then modify the CardList filtering method to return cards with isType(Type) = true.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Changeling
by mtgrares » 07 May 2009, 17:08
Changeling was a great addition, it has greatly improved my quest deck. I have Avian Changeling and several creatures that fetch other Mercenaries, so they can also get Avian Changeling (which is great since it has flying.)
Anyways, this isn't a big problem but when I use the card Kodama's Reach the list of lands also includes Avian Changeling. I know that implementing changeling is hard because MTG Forge doesn't differiantiate between type (Land, Instant, Sorcery, Creature, Planeswalker), subtype (anything to the right of the dash, Mounain, Goblin, Elf) and supertype (Artifact, Legendary, Tribal, Basic).
Anyways, this isn't a big problem but when I use the card Kodama's Reach the list of lands also includes Avian Changeling. I know that implementing changeling is hard because MTG Forge doesn't differiantiate between type (Land, Instant, Sorcery, Creature, Planeswalker), subtype (anything to the right of the dash, Mounain, Goblin, Elf) and supertype (Artifact, Legendary, Tribal, Basic).
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: MTGForge 05/03 (unofficial BETA) version
by Rob Cashwalker » 07 May 2009, 17:16
That does complicate things a bit doesn't it? There are going to be a number of cases where searching for a specific type of card is going to get confused with Changelings - it;s not just kodama's reach.
The rest of MTGForge might not differentiate, but if using my suggestion of isType(), then the logic could deal with it. If the type you're looking for is a supertype, then ignore the Changeling keyword. If the type is anything else (elf, rebel, etc) then go ahead and include changelings.
The rest of MTGForge might not differentiate, but if using my suggestion of isType(), then the logic could deal with it. If the type you're looking for is a supertype, then ignore the Changeling keyword. If the type is anything else (elf, rebel, etc) then go ahead and include changelings.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: MTGForge 05/03 (unofficial BETA) version
by mtgrares » 07 May 2009, 17:28
I haven't gotten very far in version 2, but I divided up getType() into getSuperType(), getSubtype(), and getType(). I also still like searching the whole type line because it is easier so I also have getTypeLine() : String and isTypeLine(String a), does the type line contain String a, which is what the current isType() method does. Obviously dividing up the type methods makes implementing Changling much easier.
My only real suggestion is to change isType(String) to check to see if the String you are checking is "special" like creature or instant. The complete list of Strings to check would be something like: Basic, Artifact, Enchantment, Instant, Sorcery, Land, Creature. If isType() is given one of these "special" things, the changling code isn't executed. (I hope that makes sense. I'm not sure it would really work. It is just my 2 cents )
My only real suggestion is to change isType(String) to check to see if the String you are checking is "special" like creature or instant. The complete list of Strings to check would be something like: Basic, Artifact, Enchantment, Instant, Sorcery, Land, Creature. If isType() is given one of these "special" things, the changling code isn't executed. (I hope that makes sense. I'm not sure it would really work. It is just my 2 cents )
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: MTGForge 05/03 (unofficial BETA) version
by DennisBergkamp » 07 May 2009, 18:37
Ahh, didn't know about this. I see what's going on though, Kodama's Reach does "land = land.getType("Basic");", which will include all Changelings. In this case it's easy to fix, let me see if there are more cards this happens with.Anyways, this isn't a big problem but when I use the card Kodama's Reach the list of lands also includes Avian Changeling. I know that implementing changeling is hard because MTG Forge doesn't differiantiate between type (Land, Instant, Sorcery, Creature, Planeswalker), subtype (anything to the right of the dash, Mounain, Goblin, Elf) and supertype (Artifact, Legendary, Tribal, Basic).
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: MTGForge 05/03 (unofficial BETA) version
by mtgrares » 07 May 2009, 19:09
Avian Changeling probably can be played like an instant but I haven't tested it.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: MTGForge 05/03 (unofficial BETA) version
by DennisBergkamp » 07 May 2009, 19:18
I've fixed this (doesn't look very pretty, but it does the job ). Obviously dividing types into super and sub type would be ideal (like you did in V2), but it would require a lot of work...
I think this might be my next big project in Forge, and come to think of it, this would be very big since I would have to go through all cards again
Hmm, maybe in the original 5/3 version Avian Changeling can be played as an instant, but after I applied my fixes just now I'm not able to cast it during my opponent's turn, so that's a good sign.
I think this might be my next big project in Forge, and come to think of it, this would be very big since I would have to go through all cards again
Hmm, maybe in the original 5/3 version Avian Changeling can be played as an instant, but after I applied my fixes just now I'm not able to cast it during my opponent's turn, so that's a good sign.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: MTGForge 05/03 (unofficial BETA) version
by mtgrares » 07 May 2009, 19:58
Sounds good, MTG Forge (by its very nature) is prone to errors. "If it an't broken yet, keep fiddling with it until it is."
I still like Changleing though because it works with others cards because it is so flexible.
I still like Changleing though because it works with others cards because it is so flexible.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
23 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 67 guests