Merge pull request #1014 from kevlahnota/master

handle 301.5c
This commit is contained in:
Anthony Calosa
2022-06-30 15:41:45 +08:00
committed by GitHub

View File

@@ -2794,7 +2794,18 @@ public class CardFactoryUtil {
abilityStr.append(equipCost);
abilityStr.append("| ValidTgts$ ").append(valid);
abilityStr.append(" | TgtPrompt$ Select target ").append(vstr).append(" you control ");
abilityStr.append("| SorcerySpeed$ True | Equip$ True | AILogic$ Pump | IsPresent$ Equipment.Self+nonCreature ");
if (card.hasKeyword(Keyword.RECONFIGURE)) {
/*
* 301.5c An Equipment thats also a creature cant equip a creature unless that Equipment has reconfigure (see rule 702.151, “Reconfigure”).
* An Equipment that loses the subtype “Equipment” cant equip a creature. An Equipment cant equip itself. An Equipment that equips an illegal
* or nonexistent permanent becomes unattached from that permanent but remains on the battlefield. (This is a state-based action. See rule 704.)
* An Equipment cant equip more than one creature. If a spell or ability would cause an Equipment to equip more than one creature,
* the Equipments controller chooses which creature it equips.
*/
abilityStr.append("| SorcerySpeed$ True | Equip$ True | AILogic$ Pump | IsPresent$ Equipment.Self ");
} else {
abilityStr.append("| SorcerySpeed$ True | Equip$ True | AILogic$ Pump | IsPresent$ Equipment.Self+nonCreature ");
}
// add AttachAi for some special cards
if (card.hasSVar("AttachAi")) {
abilityStr.append("| ").append(card.getSVar("AttachAi"));