mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Equip keyword can now take additional params such as AI preferred targets (see M13 rings for examples)
This commit is contained in:
@@ -3,7 +3,7 @@ ManaCost:2
|
||||
Types:Artifact Equipment
|
||||
Text:no text
|
||||
A:AB$ Pump | Cost$ 2 | Defined$ Equipped | KW$ Hexproof | SpellDescription$ Equipped creature gains hexproof until end of turn.
|
||||
K:Equip 1
|
||||
K:Equip 1 | AITgts$ Creature.Blue
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ EvosCounter | TriggerDescription$ At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's blue.
|
||||
SVar:EvosCounter:AB$PutCounter | Cost$ 0 | Defined$ Equipped | ConditionDefined$ Equipped | ConditionPresent$ Creature.Blue | ConditionCompare$ EQ1 | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:Rarity:Uncommon
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Ring of Kalonia
|
||||
ManaCost:2
|
||||
Types:Artifact Equipment
|
||||
Text:no text
|
||||
K:Equip 1
|
||||
K:Equip 1 | AITgts$ Creature.Green
|
||||
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddKeyword$ Trample | Description$ Equipped creature has trample.
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ KaloniaCounter | TriggerDescription$ At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's green.
|
||||
SVar:KaloniaCounter:AB$PutCounter | Cost$ 0 | Defined$ Equipped | ConditionDefined$ Equipped | ConditionPresent$ Creature.Green | ConditionCompare$ EQ1 | CounterType$ P1P1 | CounterNum$ 1
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Ring of Thune
|
||||
ManaCost:2
|
||||
Types:Artifact Equipment
|
||||
Text:no text
|
||||
K:Equip 1
|
||||
K:Equip 1 | AITgts$ Creature.White
|
||||
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddKeyword$ Vigilance | Description$ Equipped creature has vigilance.
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ ThuneCounter | TriggerDescription$ At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's white.
|
||||
SVar:ThuneCounter:AB$PutCounter | Cost$ 0 | Defined$ Equipped | ConditionDefined$ Equipped | ConditionPresent$ Creature.White | ConditionCompare$ EQ1 | CounterType$ P1P1 | CounterNum$ 1
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Ring of Valkas
|
||||
ManaCost:2
|
||||
Types:Artifact Equipment
|
||||
Text:no text
|
||||
K:Equip 1
|
||||
K:Equip 1 | AITgts$ Creature.Red
|
||||
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddKeyword$ Haste | Description$ Equipped creature has haste.
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ ValkasCounter | TriggerDescription$ At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's red.
|
||||
SVar:ValkasCounter:AB$PutCounter | Cost$ 0 | Defined$ Equipped | ConditionDefined$ Equipped | ConditionPresent$ Creature.Red | ConditionCompare$ EQ1 | CounterType$ P1P1 | CounterNum$ 1
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:2
|
||||
Types:Artifact Equipment
|
||||
Text:no text
|
||||
A:AB$ Regenerate | Cost$ 2 | Defined$ Equipped | SpellDescription$ Regenerate equipped creature.
|
||||
K:Equip 1
|
||||
K:Equip 1 | AITgts$ Creature.Black
|
||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ XathridCounter | TriggerDescription$ At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's black.
|
||||
SVar:XathridCounter:AB$PutCounter | Cost$ 0 | Defined$ Equipped | ConditionDefined$ Equipped | ConditionPresent$ Creature.Black | ConditionCompare$ EQ1 | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:Rarity:Uncommon
|
||||
|
||||
@@ -4652,14 +4652,25 @@ public class CardFactoryUtil {
|
||||
if (card.hasStartOfKeyword("Equip")) {
|
||||
// find position of Equip keyword
|
||||
final int equipPos = card.getKeywordPosition("Equip");
|
||||
// Check for additional params such as preferred AI targets
|
||||
final String equipString = card.getKeyword().get(equipPos).substring(5);
|
||||
final String[] equipExtras = equipString.contains("\\|") ? equipString.split("\\|", 2) : null;
|
||||
// Get cost string
|
||||
String equipCost = card.getKeyword().get(equipPos).substring(5).trim();
|
||||
// Creeate attach ability string
|
||||
String equipCost = "";
|
||||
if (equipExtras != null) {
|
||||
equipCost = equipExtras[0].trim();
|
||||
} else {
|
||||
equipCost = equipString.trim();
|
||||
}
|
||||
// Create attach ability string
|
||||
final StringBuilder abilityStr = new StringBuilder();
|
||||
abilityStr.append("AB$ Attach | Cost$ ");
|
||||
abilityStr.append(equipCost);
|
||||
abilityStr.append(" | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control ");
|
||||
abilityStr.append("| SorcerySpeed$ True | Equip$ True | AILogic$ Pump | IsPresent$ Card.Self+nonCreature ");
|
||||
if (equipExtras != null) {
|
||||
abilityStr.append("| ").append(equipExtras[1]).append(" ");
|
||||
}
|
||||
if (equipCost.matches(".+<.+>")) { //Something other than a mana cost
|
||||
abilityStr.append("| PrecostDesc$ Equip - | SpellDescription$ (Attach to target creature you control. Equip only as a sorcery.)");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user