mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Changed the syntax of YouCtrl in isValidCard.
This commit is contained in:
@@ -3,8 +3,8 @@ ManaCost:3 UR UR UR
|
||||
Types:Creature Horror
|
||||
Text:UR UR UR UR: You may put a blue or red creature card from your hand onto the battlefield.
|
||||
PT:4/4
|
||||
K:stPumpOther:YouCtrl Creature.Blue:1/1:No Condition:Other blue creatures you control get +1/+1.
|
||||
K:stPumpOther:YouCtrl Creature.Red:1/1:No Condition:Other red creatures you control get +1/+1.
|
||||
K:stPumpOther:Creature.Blue+:1/1:No Condition:Other blue creatures you control get +1/+1.
|
||||
K:stPumpOther:Creature.Red+:1/1:No Condition:Other red creatures you control get +1/+1.
|
||||
SVar:PlayMain1:TRUE
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mindwrack_liege.jpg
|
||||
|
||||
@@ -2034,16 +2034,24 @@ public class Card extends MyObservable {
|
||||
}
|
||||
|
||||
public boolean isValidCard(String Restrictions[], String Controller) {
|
||||
String Restriction[] = Restrictions;
|
||||
if (Restrictions[0].startsWith("YouCtrl")) {
|
||||
if (!controller.equals(Controller)) return false;
|
||||
Restriction[0] = Restriction[0].replaceFirst("YouCtrl ", "");
|
||||
}
|
||||
if (Restrictions[0].startsWith("YouDontCtrl")) {
|
||||
if (controller.equals(Controller)) return false;
|
||||
Restriction[0] = Restriction[0].replaceFirst("YouDontCtrl ", "");
|
||||
}
|
||||
return isValidCard(Restriction);
|
||||
for (int i=0; i<Restrictions.length; i++)
|
||||
{
|
||||
if (Restrictions[i].contains("YouCtrl"))
|
||||
{
|
||||
if (!getController().equals(Controller))
|
||||
return false;
|
||||
Restrictions[i].replaceAll(".YouCtrl", "");
|
||||
Restrictions[i].replaceAll("YouCtrl", "");
|
||||
}
|
||||
else if (Restrictions[i].contains("YouDontCtrl"))
|
||||
{
|
||||
if (getController().equals(Controller))
|
||||
return false;
|
||||
Restrictions[i].replaceAll(".YouDontCtrl", "");
|
||||
Restrictions[i].replaceAll("YouDontCtrl", "");
|
||||
}
|
||||
}
|
||||
return isValidCard(Restrictions);
|
||||
}
|
||||
|
||||
public boolean isValidCard(String Restrictions[]) {
|
||||
|
||||
Reference in New Issue
Block a user