It is currently 04 Sep 2025, 19:49
   
Text Size

Generic Manlands

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Generic Manlands

Postby friarsol » 24 Jun 2010, 20:22

Hey guys,
So I found a bug when Manlands stopped being creatures, equipment didn't fall off them. (it would stay attached, but be invisible while not a creature)

Then when I went to see why that was. I was bothered by the fact that all of the manlands follow the exact same structure (I'm sure if I looked around enough that would be the case with lots of things) so I decided to pull the code out and generalize it. So I put the generalized code in CardFactoryUtil and added Dread Statuary. The only manland not implemented is Nantuko Monastery now.

And while the two functions were written for manlands they also are generic enough to work for things like Chimeric Idol.

I can submit this in, but I think I need to have permission to checkin. Lemme know what you think.

Code: Select all
public static void revertManland(Card c, String[] removeTypes, String[] removeKeywords)
public static void activateManland(Card c, int attack, int defense, String[] addTypes, String[] addKeywords, String cost)
Oh I also discovered a bug in unEquipAllCards where it will only unequip half of the equipped cards so I have a fix for that too.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Generic Manlands

Postby DennisBergkamp » 24 Jun 2010, 20:29

Sure sounds good! PM me your email address (has to be associated with a google account), and I'll give you permission to commit stuff.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 26 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 26 users online :: 0 registered, 0 hidden and 26 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 26 guests

Login Form