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