- Added the variable "EnchantedController" to isValid in the player class.

- Added Brand of Ill Omen by Jeff.
This commit is contained in:
Sloth
2011-12-08 20:52:38 +00:00
parent 55c8e51836
commit 62965ae940
3 changed files with 36 additions and 4 deletions

1
.gitattributes vendored
View File

@@ -1004,6 +1004,7 @@ res/cardsfolder/b/bramblesnap.txt svneol=native#text/plain
res/cardsfolder/b/bramblewood_paragon.txt svneol=native#text/plain
res/cardsfolder/b/branching_bolt.txt svneol=native#text/plain
res/cardsfolder/b/branchsnap_lorian.txt svneol=native#text/plain
res/cardsfolder/b/brand_of_ill_omen.txt -text
res/cardsfolder/b/branded_brawlers.txt svneol=native#text/plain
res/cardsfolder/b/brass_gnat.txt svneol=native#text/plain
res/cardsfolder/b/brass_herald.txt svneol=native#text/plain

View File

@@ -0,0 +1,13 @@
Name:Brand of Ill Omen
ManaCost:3 R
Types:Enchantment Aura
Text:no text
K:Cumulative upkeep:R
A:SP$ Attach | Cost$ 3 R | ValidTgts$ Creature | AILogic$ Curse
S:Mode$ CantBeCast | ValidCard$ Creature | Caster$ EnchantedController | Description$ Enchanted creature's controller can't cast creature spells.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/brand_of_ill_omen.jpg
SetInfo:ICE|Rare|http://magiccards.info/scans/en/ia/177.jpg
Oracle:Enchant creature\nCumulative upkeep {R} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.)\nEnchanted creature's controller can't cast creature spells.
End

View File

@@ -2220,9 +2220,27 @@ public abstract class Player extends GameEntity {
final String[] incR = restriction.split("\\.");
if (!incR[0].equals("Player") && !(incR[0].equals("Opponent") && !this.equals(sourceController))
&& !(incR[0].equals("You") && this.equals(sourceController))) {
return false;
if (incR[0].equals("Opponent")) {
if (this.equals(sourceController)) {
return false;
}
} else if (incR[0].equals("You")) {
if (!this.equals(sourceController)) {
return false;
}
} else if (incR[0].equals("EnchantedController")) {
GameEntity enchanted = source.getEnchanting();
if (enchanted == null || !(enchanted instanceof Card)) {
return false;
}
Card enchantedCard = (Card) enchanted;
if (!this.equals(enchantedCard.getController())) {
return false;
}
} else {
if (!incR[0].equals("Player")) {
return false;
}
}
if (incR.length > 1) {