mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Equipment that becomes a creature will now fall off of what it is equipping as a state-based effect.
This commit is contained in:
@@ -564,15 +564,20 @@ public class GameAction {
|
|||||||
|
|
||||||
//Make sure all equipment stops equipping previously equipped creatures that have left play.
|
//Make sure all equipment stops equipping previously equipped creatures that have left play.
|
||||||
CardList equip = AllZoneUtil.getCardsInPlay();
|
CardList equip = AllZoneUtil.getCardsInPlay();
|
||||||
equip = equip.filter(AllZoneUtil.equipment);
|
|
||||||
|
//don't filter, so we catch cases where a card loses the subtype "Equipment"
|
||||||
|
//equip = equip.filter(AllZoneUtil.equipment);
|
||||||
|
|
||||||
Iterator<Card> iter = equip.iterator();
|
Iterator<Card> iter = equip.iterator();
|
||||||
while(iter.hasNext()) {
|
while(iter.hasNext()) {
|
||||||
c = iter.next();
|
c = iter.next();
|
||||||
if(c.isEquipping()) {
|
if(c.isEquipping()) {
|
||||||
Card equippedCreature = c.getEquipping().get(0);
|
Card equippedCreature = c.getEquipping().get(0);
|
||||||
if(!AllZoneUtil.isCardInPlay(equippedCreature)) c.unEquipCard(equippedCreature);
|
if(!AllZoneUtil.isCardInPlay(equippedCreature)) c.unEquipCard(equippedCreature);
|
||||||
}
|
|
||||||
|
//make sure any equipment that has become a creature stops equipping
|
||||||
|
if(c.isCreature()) c.unEquipCard(equippedCreature);
|
||||||
|
}
|
||||||
}//while iter.hasNext()
|
}//while iter.hasNext()
|
||||||
}//for q=0;q<2
|
}//for q=0;q<2
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user