mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Replaced the Magnet lists for auras and equipments with checks for the SVars EnchantMe and EquipMe.
This commit is contained in:
@@ -4,6 +4,7 @@ Types:Creature Human Soldier
|
||||
Text:no text
|
||||
PT:1/1
|
||||
K:stPumpSelf:Permanent.equipped:1/1/First Strike:No Condition:As long as Auriok Glaivemaster is equipped, it gets +1/+1 and has first strike.
|
||||
SVar:EquipMe:Once
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/auriok_glaivemaster.jpg
|
||||
End
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Creature Hound
|
||||
Text:no text
|
||||
PT:1/1
|
||||
K:stPumpAll:Creature.YouCtrl:0/0/Vigilance:isEnchanted:Creatures you control have vigilance as long as Gate Hound is enchanted.
|
||||
SVar:EnchantMe:Once
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/gate_hound.jpg
|
||||
End
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Creature Goblin Warrior
|
||||
Text:Goblin Gaveleer gets +2/+0 for each Equipment attached to it.
|
||||
PT:1/1
|
||||
K:Trample
|
||||
SVar:EquipMe:Multiple
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_gaveleer.jpg
|
||||
End
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Creature Kor Soldier
|
||||
Text:no text
|
||||
PT:1/1
|
||||
K:stPumpSelf:Permanent.equipped:1/1/Flying:No Condition:As long as Kitesail Apprentice is equipped, it gets +1/+1 and has flying.
|
||||
SVar:EquipMe:Once
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/kitesail_apprentice.jpg
|
||||
End
|
||||
|
||||
@@ -3,6 +3,7 @@ ManaCost:W
|
||||
Types:Creature Kor Soldier
|
||||
Text:As long as Kor Duelist is equipped, it has double strike.
|
||||
PT:1/1
|
||||
SVar:EquipMe:Once
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/kor_duelist.jpg
|
||||
End
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Creature Cat Soldier
|
||||
Text:no text
|
||||
PT:1/3
|
||||
K:stPumpSelf:Permanent.equipped:1/1/Vigilance:No Condition:As long as Leonin Den-Guard is equipped, it gets +1/+1 and has vigilance.
|
||||
SVar:EquipMe:Once
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/leonin_den_guard.jpg
|
||||
End
|
||||
|
||||
@@ -3,6 +3,7 @@ ManaCost:3 W
|
||||
Types:Creature Elephant Soldier
|
||||
Text:Loxodon Punisher gets +2/+2 for each Equipment attached to it.
|
||||
PT:2/2
|
||||
SVar:EquipMe:Multiple
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/loxodon_punisher.jpg
|
||||
End
|
||||
|
||||
@@ -3,7 +3,8 @@ ManaCost:1 U U
|
||||
Types:Creature Metathran Soldier
|
||||
Text:no text
|
||||
PT:2/3
|
||||
K:StaticEffect:Play:Self:Keyword/Unblockable:enchanted:Metathran Elite is unblockable as long as it's enchanted.
|
||||
K:stPumpSelf:Creature:0/0/Unblockable:isEnchanted:Metathran Elite is unblockable as long as it's enchanted.
|
||||
SVar:EnchantMe:Once
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/metathran_elite.jpg
|
||||
End
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Creature Wombat
|
||||
Text:Rabid Wombat gets +2/+2 for each Aura attached to it.
|
||||
PT:0/1
|
||||
K:Vigilance
|
||||
SVar:EnchantMe:Multiple
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/rabid_wombat.jpg
|
||||
End
|
||||
|
||||
@@ -5,6 +5,7 @@ Text:no text
|
||||
PT:3/4
|
||||
K:Vigilance
|
||||
K:stPumpAll:Creature.Cat+YouCtrl:2/2/Double Strike:isEquipped:As long as Raksha Golden Cub is equipped, Cat creatures you control get +2/+2 and have double strike.
|
||||
SVar:EquipMe:Once
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/raksha_golden_cub.jpg
|
||||
End
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Creature Cat Knight
|
||||
Text:no text
|
||||
PT:2/2
|
||||
K:stPumpSelf:Permanent.equipped:1/1/Flying:No Condition:As long as Skyhunter Cub is equipped, it gets +1/+1 and has flying.
|
||||
SVar:EquipMe:Once
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/skyhunter_cub.jpg
|
||||
End
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Creature Cat Soldier
|
||||
Text:no text
|
||||
PT:2/2
|
||||
K:stPumpSelf:Permanent.equipped:0/0/First Strike & Lifelink:No Condition:As long as Sunspear Shikari is equipped, it has first strike and lifelink.
|
||||
SVar:EquipMe:Once
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sunspear_shikari.jpg
|
||||
End
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Artifact Creature Golem
|
||||
Text:no text
|
||||
PT:3/3
|
||||
K:stPumpSelf:Creature:2/2/Flying & First Strike & Trample:isEnchanted:As long as Thran Golem is enchanted, it gets +2/+2 and has flying, first strike, and trample.
|
||||
SVar:EnchantMe:Once
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/thran_golem.jpg
|
||||
End
|
||||
|
||||
@@ -4,6 +4,7 @@ Types:Legendary Creature Beast
|
||||
Text:Uril gets +2/+2 for each Aura attached to it.
|
||||
PT:5/5
|
||||
K:CARDNAME can't be the target of spells or abilities your opponents control.
|
||||
SVar:EnchantMe:Multiple
|
||||
SVar:Rarity:Mythic
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/uril_the_miststalker.jpg
|
||||
End
|
||||
|
||||
@@ -1791,12 +1791,7 @@ public class CardFactoryUtil {
|
||||
|
||||
// Is there at least 1 Loxodon Punisher and/or Goblin Gaveleer to target
|
||||
CardList equipMagnetList = list;
|
||||
equipMagnetList = equipMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getName().equals("Loxodon Punisher")
|
||||
|| c.getName().equals("Goblin Gaveleer");
|
||||
}
|
||||
});
|
||||
equipMagnetList = equipMagnetList.getEquipMagnets();
|
||||
|
||||
if (!equipMagnetList.isEmpty() && Tough >= 0) {
|
||||
return equipMagnetList;
|
||||
@@ -1926,11 +1921,8 @@ public class CardFactoryUtil {
|
||||
|
||||
if (Tough >= -1) { // we want Rabid Wombat or a Uril, the Miststalker to gain at least +1 toughness
|
||||
CardList auraMagnetList = new CardList(AllZone.Computer_Play.getCards());
|
||||
auraMagnetList = auraMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature() && (c.getName().equals("Rabid Wombat") || c.getName().equals("Uril, the Miststalker"));
|
||||
}
|
||||
});
|
||||
auraMagnetList = auraMagnetList.getEnchantMagnets();
|
||||
|
||||
if (! auraMagnetList.isEmpty()) { // AI has a special target creature(s) to enchant
|
||||
auraMagnetList.shuffle();
|
||||
for (int i = 0; i < auraMagnetList.size(); i++) {
|
||||
|
||||
@@ -1264,11 +1264,8 @@ class CardFactory_Auras {
|
||||
//else (is there a Rabid Wombat or a Uril, the Miststalker to target?)
|
||||
|
||||
CardList auraMagnetList = new CardList(AllZone.Computer_Play.getCards());
|
||||
auraMagnetList = auraMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature() && (c.getName().equals("Rabid Wombat") || c.getName().equals("Uril, the Miststalker"));
|
||||
}
|
||||
});
|
||||
auraMagnetList = auraMagnetList.getEnchantMagnets();
|
||||
|
||||
if (! auraMagnetList.isEmpty()) { // AI has a special target creature(s) to enchant
|
||||
auraMagnetList.shuffle();
|
||||
for (int i = 0; i < auraMagnetList.size(); i++) {
|
||||
@@ -1374,11 +1371,8 @@ class CardFactory_Auras {
|
||||
//else (is there a Rabid Wombat or a Uril, the Miststalker to target?)
|
||||
|
||||
CardList auraMagnetList = new CardList(AllZone.Computer_Play.getCards());
|
||||
auraMagnetList = auraMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature() && (c.getName().equals("Rabid Wombat") || c.getName().equals("Uril, the Miststalker"));
|
||||
}
|
||||
});
|
||||
auraMagnetList = auraMagnetList.getEnchantMagnets();
|
||||
|
||||
if (! auraMagnetList.isEmpty()) { // AI has a special target creature(s) to enchant
|
||||
auraMagnetList.shuffle();
|
||||
for (int i = 0; i < auraMagnetList.size(); i++) {
|
||||
@@ -1483,11 +1477,8 @@ class CardFactory_Auras {
|
||||
//else (is there a Rabid Wombat or a Uril, the Miststalker to target?)
|
||||
|
||||
CardList auraMagnetList = new CardList(AllZone.Computer_Play.getCards());
|
||||
auraMagnetList = auraMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature() && (c.getName().equals("Rabid Wombat") || c.getName().equals("Uril, the Miststalker"));
|
||||
}
|
||||
});
|
||||
auraMagnetList = auraMagnetList.getEnchantMagnets();
|
||||
|
||||
if (! auraMagnetList.isEmpty()) { // AI has a special target creature(s) to enchant
|
||||
auraMagnetList.shuffle();
|
||||
for (int i = 0; i < auraMagnetList.size(); i++) {
|
||||
@@ -1746,11 +1737,8 @@ class CardFactory_Auras {
|
||||
//else (is there a Rabid Wombat or a Uril, the Miststalker to target?)
|
||||
|
||||
CardList auraMagnetList = new CardList(AllZone.Computer_Play.getCards());
|
||||
auraMagnetList = auraMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature() && (c.getName().equals("Rabid Wombat") || c.getName().equals("Uril, the Miststalker"));
|
||||
}
|
||||
});
|
||||
auraMagnetList = auraMagnetList.getEnchantMagnets();
|
||||
|
||||
if (! auraMagnetList.isEmpty()) { // AI has a special target creature(s) to enchant
|
||||
auraMagnetList.shuffle();
|
||||
for (int i = 0; i < auraMagnetList.size(); i++) {
|
||||
|
||||
@@ -17,6 +17,7 @@ class CardFactory_Equipment {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
public static Card getCard(final Card card, String cardName, String owner) {
|
||||
|
||||
//*************** START *********** START **************************
|
||||
@@ -71,12 +72,7 @@ class CardFactory_Equipment {
|
||||
|
||||
// Is there at least 1 Loxodon Punisher and/or Goblin Gaveleer to target
|
||||
CardList equipMagnetList = list;
|
||||
equipMagnetList = equipMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getName().equals("Loxodon Punisher")
|
||||
|| c.getName().equals("Goblin Gaveleer");
|
||||
}
|
||||
});
|
||||
equipMagnetList = equipMagnetList.getEquipMagnets();
|
||||
|
||||
if (equipMagnetList.size() != 0) {
|
||||
return equipMagnetList;
|
||||
@@ -277,12 +273,7 @@ class CardFactory_Equipment {
|
||||
|
||||
// Is there at least 1 Loxodon Punisher and/or Goblin Gaveleer to target
|
||||
CardList equipMagnetList = list;
|
||||
equipMagnetList = equipMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getName().equals("Loxodon Punisher")
|
||||
|| c.getName().equals("Goblin Gaveleer");
|
||||
}
|
||||
});
|
||||
equipMagnetList = equipMagnetList.getEquipMagnets();
|
||||
|
||||
if (equipMagnetList.size() != 0) {
|
||||
return equipMagnetList;
|
||||
@@ -358,12 +349,7 @@ class CardFactory_Equipment {
|
||||
|
||||
// Is there at least 1 Loxodon Punisher and/or Goblin Gaveleer to target
|
||||
CardList equipMagnetList = list;
|
||||
equipMagnetList = equipMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getName().equals("Loxodon Punisher")
|
||||
|| c.getName().equals("Goblin Gaveleer");
|
||||
}
|
||||
});
|
||||
equipMagnetList = equipMagnetList.getEquipMagnets();
|
||||
|
||||
if (equipMagnetList.size() != 0) {
|
||||
return equipMagnetList;
|
||||
@@ -552,12 +538,7 @@ class CardFactory_Equipment {
|
||||
|
||||
// Is there at least 1 Loxodon Punisher and/or Goblin Gaveleer to target
|
||||
CardList equipMagnetList = list;
|
||||
equipMagnetList = equipMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getName().equals("Loxodon Punisher")
|
||||
|| c.getName().equals("Goblin Gaveleer");
|
||||
}
|
||||
});
|
||||
equipMagnetList = equipMagnetList.getEquipMagnets();
|
||||
|
||||
if (equipMagnetList.size() != 0) {
|
||||
return equipMagnetList;
|
||||
@@ -659,12 +640,7 @@ class CardFactory_Equipment {
|
||||
|
||||
// Is there at least 1 Loxodon Punisher and/or Goblin Gaveleer to target
|
||||
CardList equipMagnetList = list;
|
||||
equipMagnetList = equipMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getName().equals("Loxodon Punisher")
|
||||
|| c.getName().equals("Goblin Gaveleer");
|
||||
}
|
||||
});
|
||||
equipMagnetList = equipMagnetList.getEquipMagnets();
|
||||
|
||||
if (equipMagnetList.size() != 0) {
|
||||
return equipMagnetList;
|
||||
@@ -766,12 +742,7 @@ class CardFactory_Equipment {
|
||||
|
||||
// Is there at least 1 Loxodon Punisher and/or Goblin Gaveleer to target
|
||||
CardList equipMagnetList = list;
|
||||
equipMagnetList = equipMagnetList.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getName().equals("Loxodon Punisher")
|
||||
|| c.getName().equals("Goblin Gaveleer");
|
||||
}
|
||||
});
|
||||
equipMagnetList = equipMagnetList.getEquipMagnets();
|
||||
|
||||
if (equipMagnetList.size() != 0) {
|
||||
return equipMagnetList;
|
||||
|
||||
@@ -383,4 +383,22 @@ public class CardList implements Iterable<Card> {
|
||||
return retList;
|
||||
}//getValidCards
|
||||
*/
|
||||
|
||||
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())));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user