Page 1 of 1

equipMagnetList?

PostPosted: 08 Oct 2010, 14:23
by Rob Cashwalker
I was browsing through the recent changes, and I came across this from Chris:
- Minor edit to CardFactoryUtil.eqPump_Equip. The equipMagnetList will now add Goblin Gaveleer and Loxodon Punisher to this list
What about Auriok Steelshaper?

Shouldn't this be handled via an SVar? Kinda like the AI hints for "buffed by"?

Re: equipMagnetList?

PostPosted: 08 Oct 2010, 15:51
by Sloth
Rob Cashwalker wrote:Shouldn't this be handled via an SVar? Kinda like the AI hints for "buffed by"?
I was thinking the same thing. There should be SVars like EnchantMe and EquipMe. At the moment the magnet lists have to be maintained in two places of the code.

Maybe we can even differentiate between creatures that benefit from one Aura/Equipment (like Thran Golem) and creatures that benefit from greater numbers (like Rabid Wombat).

Re: equipMagnetList?

PostPosted: 08 Oct 2010, 21:39
by Sloth
I've replaced the old lists with these checks for SVars:

Code: Select all
    public CardList getEquipMagnets() {
       return this.filter(new CardListFilter() {
            public boolean addCard(Card c) {
               return (c.isCreature() && (c.getSVar("EquipMe").equals("Multiple")
                     || (c.getSVar("EquipMe").equals("Once") && !c.isEnchanted())));
            }
        });
    }
   
    public CardList getEnchantMagnets() {
       return this.filter(new CardListFilter() {
            public boolean addCard(Card c) {
               return (c.isCreature() && (c.getSVar("EnchantMe").equals("Multiple")
                     || (c.getSVar("EnchantMe").equals("Once") && !c.isEnchanted())));
            }
        });
    }