mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Converting MinTarget and MaxTarget to strings so they can be variable amounts.
- Merged Footbottom Feast to AB_Retrieve
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
Name:Footbottom Feast
|
Name:Footbottom Feast
|
||||||
ManaCost:2 B
|
ManaCost:2 B
|
||||||
Types:Instant
|
Types:Instant
|
||||||
Text:Put any number of target creature cards from your graveyard on top of your library.
|
Text:no text
|
||||||
K:spReturnTgt:AnyNumber:Creature:TopofLibrary
|
A:SP$Retrieve | Cost$ 2 B | Destination$ Library | TargetMin$ 0 | TargetMax$ X | TgtPrompt$ Put any number of target creature cards from your graveyard on top of your library.
|
||||||
K:Draw a card.
|
K:Draw a card.
|
||||||
|
SVar:X:Count$TypeInYourYard.Creature
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/footbottom_feast.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/footbottom_feast.jpg
|
||||||
End
|
End
|
||||||
@@ -151,8 +151,8 @@ public class AbilityFactory {
|
|||||||
|
|
||||||
if (isTargeted)
|
if (isTargeted)
|
||||||
{
|
{
|
||||||
int min = mapParams.containsKey("TargetMin") ? Integer.parseInt(mapParams.get("TargetMin")) : 1;
|
String min = mapParams.containsKey("TargetMin") ? mapParams.get("TargetMin") : "1";
|
||||||
int max = mapParams.containsKey("TargetMax") ? Integer.parseInt(mapParams.get("TargetMax")) : 1;
|
String max = mapParams.containsKey("TargetMax") ? mapParams.get("TargetMax") : "1";
|
||||||
|
|
||||||
if (hasValid){
|
if (hasValid){
|
||||||
// TgtPrompt now optional
|
// TgtPrompt now optional
|
||||||
|
|||||||
@@ -173,9 +173,9 @@ public class AbilityFactory_Bounce {
|
|||||||
if (abTgt != null){
|
if (abTgt != null){
|
||||||
abTgt.resetTargets();
|
abTgt.resetTargets();
|
||||||
// target loop
|
// target loop
|
||||||
while(abTgt.getNumTargeted() < abTgt.getMaxTargets()){
|
while(abTgt.getNumTargeted() < abTgt.getMaxTargets(sa.getSourceCard(), sa)){
|
||||||
if (list.size() == 0){
|
if (list.size() == 0){
|
||||||
if (abTgt.getNumTargeted() < abTgt.getMinTargets() || abTgt.getNumTargeted() == 0){
|
if (abTgt.getNumTargeted() < abTgt.getMinTargets(sa.getSourceCard(), sa) || abTgt.getNumTargeted() == 0){
|
||||||
abTgt.resetTargets();
|
abTgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -194,7 +194,7 @@ public class AbilityFactory_Bounce {
|
|||||||
choice = CardFactoryUtil.AI_getMostExpensivePermanent(list, af.getHostCard(), true);
|
choice = CardFactoryUtil.AI_getMostExpensivePermanent(list, af.getHostCard(), true);
|
||||||
|
|
||||||
if (choice == null){ // can't find anything left
|
if (choice == null){ // can't find anything left
|
||||||
if (abTgt.getNumTargeted() < abTgt.getMinTargets() || abTgt.getNumTargeted() == 0){
|
if (abTgt.getNumTargeted() < abTgt.getMinTargets(sa.getSourceCard(), sa) || abTgt.getNumTargeted() == 0){
|
||||||
abTgt.resetTargets();
|
abTgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,9 +251,9 @@ public class AbilityFactory_Counters {
|
|||||||
if (abTgt != null){
|
if (abTgt != null){
|
||||||
abTgt.resetTargets();
|
abTgt.resetTargets();
|
||||||
// target loop
|
// target loop
|
||||||
while(abTgt.getNumTargeted() < abTgt.getMaxTargets()){
|
while(abTgt.getNumTargeted() < abTgt.getMaxTargets(sa.getSourceCard(), sa)){
|
||||||
if (list.size() == 0){
|
if (list.size() == 0){
|
||||||
if (abTgt.getNumTargeted() < abTgt.getMinTargets() || abTgt.getNumTargeted() == 0){
|
if (abTgt.getNumTargeted() < abTgt.getMinTargets(sa.getSourceCard(), sa) || abTgt.getNumTargeted() == 0){
|
||||||
abTgt.resetTargets();
|
abTgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -295,7 +295,7 @@ public class AbilityFactory_Counters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (choice == null){ // can't find anything left
|
if (choice == null){ // can't find anything left
|
||||||
if (abTgt.getNumTargeted() < abTgt.getMinTargets() || abTgt.getNumTargeted() == 0){
|
if (abTgt.getNumTargeted() < abTgt.getMinTargets(sa.getSourceCard(), sa) || abTgt.getNumTargeted() == 0){
|
||||||
abTgt.resetTargets();
|
abTgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ import java.util.Random;
|
|||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
|
|
||||||
// target loop
|
// target loop
|
||||||
while (tgt.getNumTargeted() < tgt.getMaxTargets()) {
|
while (tgt.getNumTargeted() < tgt.getMaxTargets(saMe.getSourceCard(), saMe)) {
|
||||||
// TODO: Consider targeting the planeswalker
|
// TODO: Consider targeting the planeswalker
|
||||||
if (tgt.canTgtCreatureAndPlayer()) {
|
if (tgt.canTgtCreatureAndPlayer()) {
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ import java.util.Random;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// fell through all the choices, no targets left?
|
// fell through all the choices, no targets left?
|
||||||
if (tgt.getNumTargeted() < tgt.getMinTargets()
|
if (tgt.getNumTargeted() < tgt.getMinTargets(saMe.getSourceCard(), saMe)
|
||||||
|| tgt.getNumTargeted() == 0) {
|
|| tgt.getNumTargeted() == 0) {
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -191,9 +191,9 @@ public class AbilityFactory_Destroy {
|
|||||||
if (abTgt != null){
|
if (abTgt != null){
|
||||||
abTgt.resetTargets();
|
abTgt.resetTargets();
|
||||||
// target loop
|
// target loop
|
||||||
while(abTgt.getNumTargeted() < abTgt.getMaxTargets()){
|
while(abTgt.getNumTargeted() < abTgt.getMaxTargets(sa.getSourceCard(), sa)){
|
||||||
if (list.size() == 0){
|
if (list.size() == 0){
|
||||||
if (abTgt.getNumTargeted() < abTgt.getMinTargets() || abTgt.getNumTargeted() == 0){
|
if (abTgt.getNumTargeted() < abTgt.getMinTargets(sa.getSourceCard(), sa) || abTgt.getNumTargeted() == 0){
|
||||||
abTgt.resetTargets();
|
abTgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -210,7 +210,7 @@ public class AbilityFactory_Destroy {
|
|||||||
choice = CardFactoryUtil.AI_getMostExpensivePermanent(list, af.getHostCard(), true);
|
choice = CardFactoryUtil.AI_getMostExpensivePermanent(list, af.getHostCard(), true);
|
||||||
|
|
||||||
if (choice == null){ // can't find anything left
|
if (choice == null){ // can't find anything left
|
||||||
if (abTgt.getNumTargeted() < abTgt.getMinTargets() || abTgt.getNumTargeted() == 0){
|
if (abTgt.getNumTargeted() < abTgt.getMinTargets(sa.getSourceCard(), sa) || abTgt.getNumTargeted() == 0){
|
||||||
abTgt.resetTargets();
|
abTgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -512,12 +512,12 @@ public class AbilityFactory_Fetch {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
while(tgt.getNumTargeted() < tgt.getMaxTargets()){
|
while(tgt.getNumTargeted() < tgt.getMaxTargets(sa.getSourceCard(), sa)){
|
||||||
// AI Targeting
|
// AI Targeting
|
||||||
Card choice;
|
Card choice;
|
||||||
|
|
||||||
if (list.size() == 0){
|
if (list.size() == 0){
|
||||||
if (tgt.getNumTargeted() < tgt.getMinTargets() || tgt.getNumTargeted() == 0){
|
if (tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa) || tgt.getNumTargeted() == 0){
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -537,7 +537,7 @@ public class AbilityFactory_Fetch {
|
|||||||
choice = list.get(0);
|
choice = list.get(0);
|
||||||
}
|
}
|
||||||
if (choice == null){ // can't find anything left
|
if (choice == null){ // can't find anything left
|
||||||
if (tgt.getNumTargeted() < tgt.getMinTargets() || tgt.getNumTargeted() == 0){
|
if (tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa) || tgt.getNumTargeted() == 0){
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,11 +135,11 @@ public class AbilityFactory_GainControl {
|
|||||||
if (list.isEmpty())
|
if (list.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
while(tgt.getNumTargeted() < tgt.getMaxTargets()){
|
while(tgt.getNumTargeted() < tgt.getMaxTargets(sa.getSourceCard(), sa)){
|
||||||
Card t = null;
|
Card t = null;
|
||||||
|
|
||||||
if (list.isEmpty()){
|
if (list.isEmpty()){
|
||||||
if (tgt.getNumTargeted() < tgt.getMinTargets() || tgt.getNumTargeted() == 0){
|
if (tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa) || tgt.getNumTargeted() == 0){
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,11 +95,11 @@ public class AbilityFactory_PermanentState {
|
|||||||
if (untapList.size() == 0)
|
if (untapList.size() == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
while(tgt.getNumTargeted() < tgt.getMaxTargets()){
|
while(tgt.getNumTargeted() < tgt.getMaxTargets(sa.getSourceCard(), sa)){
|
||||||
Card choice = null;
|
Card choice = null;
|
||||||
|
|
||||||
if (untapList.size() == 0){
|
if (untapList.size() == 0){
|
||||||
if (tgt.getNumTargeted() < tgt.getMinTargets() || tgt.getNumTargeted() == 0){
|
if (tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa) || tgt.getNumTargeted() == 0){
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ public class AbilityFactory_PermanentState {
|
|||||||
choice = CardFactoryUtil.AI_getMostExpensivePermanent(untapList, af.getHostCard(), false);
|
choice = CardFactoryUtil.AI_getMostExpensivePermanent(untapList, af.getHostCard(), false);
|
||||||
|
|
||||||
if (choice == null){ // can't find anything left
|
if (choice == null){ // can't find anything left
|
||||||
if (tgt.getNumTargeted() < tgt.getMinTargets() || tgt.getNumTargeted() == 0){
|
if (tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa) || tgt.getNumTargeted() == 0){
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ public class AbilityFactory_PermanentState {
|
|||||||
tgtCards = tgt.getTargetCards();
|
tgtCards = tgt.getTargetCards();
|
||||||
else{
|
else{
|
||||||
tgtCards = new ArrayList<Card>();
|
tgtCards = new ArrayList<Card>();
|
||||||
tgtCards.add(card);
|
tgtCards.add(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Card tgtC : tgtCards){
|
for(Card tgtC : tgtCards){
|
||||||
@@ -152,10 +152,10 @@ public class AbilityFactory_PermanentState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Card c = tgtCards.get(0);
|
Card c = tgtCards.get(0);
|
||||||
|
|
||||||
String DrawBack = params.get("SubAbility");
|
String DrawBack = params.get("SubAbility");
|
||||||
if (af.hasSubAbility())
|
if (af.hasSubAbility())
|
||||||
CardFactoryUtil.doDrawBack(DrawBack, 0, card.getController(), card.getController().getOpponent(), card.getController(), card, c, sa);
|
CardFactoryUtil.doDrawBack(DrawBack, 0, card.getController(), card.getController().getOpponent(), card.getController(), card, c, sa);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,11 +251,11 @@ public class AbilityFactory_PermanentState {
|
|||||||
if (tapList.size() == 0)
|
if (tapList.size() == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
while(tgt.getNumTargeted() < tgt.getMaxTargets()){
|
while(tgt.getNumTargeted() < tgt.getMaxTargets(sa.getSourceCard(), sa)){
|
||||||
Card choice = null;
|
Card choice = null;
|
||||||
|
|
||||||
if (tapList.size() == 0){
|
if (tapList.size() == 0){
|
||||||
if (tgt.getNumTargeted() < tgt.getMinTargets() || tgt.getNumTargeted() == 0){
|
if (tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa) || tgt.getNumTargeted() == 0){
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -271,7 +271,7 @@ public class AbilityFactory_PermanentState {
|
|||||||
choice = CardFactoryUtil.AI_getMostExpensivePermanent(tapList, af.getHostCard(), false);
|
choice = CardFactoryUtil.AI_getMostExpensivePermanent(tapList, af.getHostCard(), false);
|
||||||
|
|
||||||
if (choice == null){ // can't find anything left
|
if (choice == null){ // can't find anything left
|
||||||
if (tgt.getNumTargeted() < tgt.getMinTargets() || tgt.getNumTargeted() == 0){
|
if (tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa) || tgt.getNumTargeted() == 0){
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -296,12 +296,12 @@ public class AbilityFactory_Pump {
|
|||||||
if (list.isEmpty())
|
if (list.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
while(tgt.getNumTargeted() < tgt.getMaxTargets()){
|
while(tgt.getNumTargeted() < tgt.getMaxTargets(sa.getSourceCard(), sa)){
|
||||||
Card t = null;
|
Card t = null;
|
||||||
boolean goodt = false;
|
boolean goodt = false;
|
||||||
|
|
||||||
if (list.isEmpty()){
|
if (list.isEmpty()){
|
||||||
if (tgt.getNumTargeted() < tgt.getMinTargets() || tgt.getNumTargeted() == 0){
|
if (tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa) || tgt.getNumTargeted() == 0){
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -329,7 +329,7 @@ public class AbilityFactory_Pump {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (list.isEmpty()){
|
if (list.isEmpty()){
|
||||||
if (tgt.getNumTargeted() < tgt.getMinTargets() || tgt.getNumTargeted() == 0){
|
if (tgt.getNumTargeted() < tgt.getMinTargets(sa.getSourceCard(), sa) || tgt.getNumTargeted() == 0){
|
||||||
tgt.resetTargets();
|
tgt.resetTargets();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11146,7 +11146,7 @@ public class CardFactory implements NewConstants {
|
|||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Barl's Cage")) {
|
else if(cardName.equals("Barl's Cage")) {
|
||||||
final String Tgts[] = {"Creature"};
|
final String Tgts[] = {"Creature"};
|
||||||
Target target= new Target("Select target creature.", Tgts, 1, 1);
|
Target target= new Target("Select target creature.", Tgts, "1", "1");
|
||||||
|
|
||||||
final Ability_Cost cost = new Ability_Cost("3", card.getName(), true);
|
final Ability_Cost cost = new Ability_Cost("3", card.getName(), true);
|
||||||
|
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ public class Target {
|
|||||||
public String[] getValidTgts() { return ValidTgts; }
|
public String[] getValidTgts() { return ValidTgts; }
|
||||||
public String getVTSelection() { return vtSelection; }
|
public String getVTSelection() { return vtSelection; }
|
||||||
|
|
||||||
private int minTargets = 1;
|
private String minTargets;
|
||||||
public int getMinTargets() { return minTargets; }
|
private String maxTargets;
|
||||||
private int maxTargets = 1;
|
public int getMinTargets(Card c, SpellAbility sa) { return AbilityFactory.calculateAmount(c, minTargets, sa); }
|
||||||
public int getMaxTargets() { return maxTargets; }
|
public int getMaxTargets(Card c, SpellAbility sa) { return AbilityFactory.calculateAmount(c, maxTargets, sa); }
|
||||||
|
|
||||||
public boolean isMaxTargetsChosen() { return maxTargets == numTargeted; }
|
public boolean isMaxTargetsChosen(Card c, SpellAbility sa) { return getMaxTargets(c, sa) == numTargeted; }
|
||||||
public boolean isMinTargetsChosen() { return minTargets <= numTargeted; }
|
public boolean isMinTargetsChosen(Card c, SpellAbility sa) { return getMinTargets(c, sa) <= numTargeted; }
|
||||||
|
|
||||||
private String tgtZone = Constant.Zone.Play;
|
private String tgtZone = Constant.Zone.Play;
|
||||||
public void setZone(String tZone) { tgtZone = tZone; }
|
public void setZone(String tZone) { tgtZone = tZone; }
|
||||||
@@ -84,10 +84,10 @@ public class Target {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Target(String parse){
|
public Target(String parse){
|
||||||
this(parse, 1, 1);
|
this(parse, "1", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Target(String parse, int min, int max){
|
public Target(String parse, String min, String max){
|
||||||
// parse=Tgt{C}{P} - Primarily used for Pump or Damage
|
// parse=Tgt{C}{P} - Primarily used for Pump or Damage
|
||||||
// C = Creature P=Player/Planeswalker
|
// C = Creature P=Player/Planeswalker
|
||||||
// CP = All three
|
// CP = All three
|
||||||
@@ -126,10 +126,10 @@ public class Target {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Target(String select, String[] valid){
|
public Target(String select, String[] valid){
|
||||||
this(select, valid, 1, 1);
|
this(select, valid, "1", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Target(String select, String[] valid, int min, int max){
|
public Target(String select, String[] valid, String min, String max){
|
||||||
tgtValid = true;
|
tgtValid = true;
|
||||||
vtSelection = select;
|
vtSelection = select;
|
||||||
ValidTgts = valid;
|
ValidTgts = valid;
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ public class Target_Selection {
|
|||||||
|
|
||||||
public boolean chooseTargets(){
|
public boolean chooseTargets(){
|
||||||
// if not enough targets chosen, reset and cancel Ability
|
// if not enough targets chosen, reset and cancel Ability
|
||||||
if (bCancel || (bDoneTarget && !target.isMinTargetsChosen())){
|
if (bCancel || (bDoneTarget && !target.isMinTargetsChosen(card, ability))){
|
||||||
bCancel = true;
|
bCancel = true;
|
||||||
req.finishedTargeting();
|
req.finishedTargeting();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!doesTarget() || bDoneTarget && target.isMinTargetsChosen() || target.isMaxTargetsChosen()){
|
else if (!doesTarget() || bDoneTarget && target.isMinTargetsChosen(card, ability) || target.isMaxTargetsChosen(card, ability)){
|
||||||
Ability_Sub abSub = ability.getSubAbility();
|
Ability_Sub abSub = ability.getSubAbility();
|
||||||
|
|
||||||
if (abSub == null){
|
if (abSub == null){
|
||||||
@@ -109,7 +109,7 @@ public class Target_Selection {
|
|||||||
}//input_targetValid
|
}//input_targetValid
|
||||||
|
|
||||||
//CardList choices are the only cards the user can successful select
|
//CardList choices are the only cards the user can successful select
|
||||||
public static Input input_targetSpecific(final SpellAbility spell, final CardList choices, final String message,
|
public static Input input_targetSpecific(final SpellAbility sa, final CardList choices, final String message,
|
||||||
final boolean targeted, final boolean bTgtPlayer, final Target_Selection select, final SpellAbility_Requirements req) {
|
final boolean targeted, final boolean bTgtPlayer, final Target_Selection select, final SpellAbility_Requirements req) {
|
||||||
Input target = new Input() {
|
Input target = new Input() {
|
||||||
private static final long serialVersionUID = -1091595663541356356L;
|
private static final long serialVersionUID = -1091595663541356356L;
|
||||||
@@ -128,7 +128,7 @@ public class Target_Selection {
|
|||||||
|
|
||||||
Target t = select.getTgt();
|
Target t = select.getTgt();
|
||||||
// If reached Minimum targets, enable OK button
|
// If reached Minimum targets, enable OK button
|
||||||
if (t.getMinTargets() > t.getNumTargeted())
|
if (t.getMinTargets(sa.getSourceCard(), sa) > t.getNumTargeted())
|
||||||
ButtonUtil.enableOnlyCancel();
|
ButtonUtil.enableOnlyCancel();
|
||||||
else
|
else
|
||||||
ButtonUtil.enableAll();
|
ButtonUtil.enableAll();
|
||||||
@@ -149,7 +149,7 @@ public class Target_Selection {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void selectCard(Card card, PlayerZone zone) {
|
public void selectCard(Card card, PlayerZone zone) {
|
||||||
if(targeted && !CardFactoryUtil.canTarget(spell, card)) {
|
if(targeted && !CardFactoryUtil.canTarget(sa, card)) {
|
||||||
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection? Restrictions?).");
|
AllZone.Display.showMessage("Cannot target this card (Shroud? Protection? Restrictions?).");
|
||||||
}
|
}
|
||||||
else if(choices.contains(card)) {
|
else if(choices.contains(card)) {
|
||||||
@@ -160,7 +160,7 @@ public class Target_Selection {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void selectPlayer(Player player) {
|
public void selectPlayer(Player player) {
|
||||||
if (bTgtPlayer && player.canTarget(spell.getSourceCard())){
|
if (bTgtPlayer && player.canTarget(sa.getSourceCard())){
|
||||||
select.getTgt().addTarget(player);
|
select.getTgt().addTarget(player);
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@ public class Target_Selection {
|
|||||||
}//input_targetSpecific()
|
}//input_targetSpecific()
|
||||||
|
|
||||||
|
|
||||||
public static Input input_cardFromList(final SpellAbility spell, final CardList choices, final String message,
|
public static Input input_cardFromList(final SpellAbility sa, final CardList choices, final String message,
|
||||||
final boolean targeted, final Target_Selection select, final SpellAbility_Requirements req){
|
final boolean targeted, final Target_Selection select, final SpellAbility_Requirements req){
|
||||||
// Send in a list of valid cards, and popup a choice box to target
|
// Send in a list of valid cards, and popup a choice box to target
|
||||||
Input target = new Input() {
|
Input target = new Input() {
|
||||||
|
|||||||
Reference in New Issue
Block a user