NEO: initial support for "modified" property

This commit is contained in:
Tim Mocny
2022-01-26 16:47:28 +00:00
committed by Hans Mackowiak
parent 5e16d91e83
commit 06e95e0293
7 changed files with 46 additions and 1 deletions

View File

@@ -3474,6 +3474,13 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
runUnattachCommands();
}
public final boolean isModified() {
if (this.isEquipped() || this.hasCounters()) {
return true;
}
return Iterables.any(this.getEnchantedBy(), CardPredicates.isController(this.getController()));
}
public final void setType(final CardType type0) {
currentState.setType(type0);
}

View File

@@ -1328,6 +1328,10 @@ public class CardProperty {
if (card.isEquipping()) {
return false;
}
} else if (property.startsWith("modified")) {
if (!card.isModified()) {
return false;
}
} else if (property.startsWith("token")) {
if (!card.isToken() && !card.isTokenCard()) {
return false;

View File

@@ -0,0 +1,11 @@
Name:Chishiro, the Shattered Blade
ManaCost:2 R G
Types:Legendary Creature Snake Samurai
PT:4/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | TriggerZones$ Battlefield | ValidCard$ Aura.YouCtrl,Equipment.YouCtrl | Execute$ TrigToken | TriggerDescription$ Whenever an Aura or Equipment enters the battlefield under your control, create a 2/2 red Spirit creature token with menace.
SVar:TrigToken:DB$ Token | TokenScript$ r_2_2_spirit_menace
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigCounters | TriggerDescription$ At the beginning of your end step, put a +1/+1 counter on each modified creature you control. (Equipment, Auras you control, and counters are modifications.)
SVar:TrigCounters:DB$ PutCounterAll | ValidCards$ Creature.YouCtrl+modified | CounterType$ P1P1 | CounterNum$ 1
DeckHints:Type$Aura|Equipment & Ability$Counters
DeckHas:Ability$Token & Type$Spirit & Ability$Counters
Oracle:Whenever an Aura or Equipment enters the battlefield under your control, create a 2/2 red Spirit creature token with menace.\nAt the beginning of your end step, put a +1/+1 counter on each modified creature you control. (Equipment, Auras you control, and counters are modifications.)

View File

@@ -0,0 +1,9 @@
Name:Goro-Goro, Disciple of Ryusei
ManaCost:1 R
Types:Legendary Creature Samurai Goblin
PT:2/2
A:AB$ PumpAll | Cost$ R | ValidCards$ Creature.YouCtrl | KW$ Haste | SpellDescription$ Creatures you control gain haste until end of turn.
A:AB$ Token | Cost$ 3 R R | TokenScript$ r_5_5_dragon_spirit_flying | IsPresent$ Creature.YouCtrl+attacking+modified | StackDescription$ Create a 5/5 red Dragon Spirit creature token with flying. | SpellDescription$ Create a 5/5 red Dragon Spirit creature token with flying. Activate only if you control an attacking modified creature.
DeckHas:Ability$Token & Type$Dragon|Spirit
DeckHints:Type$Equipment|Aura & Ability$Counters
Oracle:{R}: Creatures you control gain haste until end of turn.\n{3}{R}{R}: Create a 5/5 red Dragon Spirit creature token with flying. Activate only if you control an attacking modified creature.

View File

@@ -0,0 +1,7 @@
Name:Spirit Token
ManaCost:no cost
Colors:red
Types:Creature Spirit
PT:2/2
K:Menace
Oracle:Menace

View File

@@ -0,0 +1,7 @@
Name:Dragon Spirit Token
ManaCost:no cost
Types:Creature Dragon Spirit
Colors:red
K:Flying
PT:5/5
Oracle:Flying

View File

@@ -429,7 +429,7 @@ public final class CardScriptParser {
"leastPower", "leastToughness", "greatestCMC",
"greatestRememberedCMC", "lowestRememberedCMC", "lowestCMC",
"enchanted", "unenchanted", "enchanting", "equipped", "unequipped",
"equipping", "token", "nonToken", "hasXCost", "suspended",
"equipping", "modified", "token", "nonToken", "hasXCost", "suspended",
"delved", "attacking", "attackingYou", "notattacking",
"attackedBySourceThisCombat", "blocking", "blockingSource",
"blockingCreatureYouCtrl", "blockingRemembered",