mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
update AF$PutCounter to accept Defined$
This commit is contained in:
@@ -91,6 +91,7 @@ public class AbilityFactory_Counters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String putStackDescription(AbilityFactory af, SpellAbility sa){
|
public static String putStackDescription(AbilityFactory af, SpellAbility sa){
|
||||||
|
HashMap<String,String> params = af.getMapParams();
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
if (!(sa instanceof Ability_Sub))
|
if (!(sa instanceof Ability_Sub))
|
||||||
@@ -99,7 +100,7 @@ public class AbilityFactory_Counters {
|
|||||||
sb.append(" ");
|
sb.append(" ");
|
||||||
|
|
||||||
Counters cType = Counters.valueOf(af.getMapParams().get("CounterType"));
|
Counters cType = Counters.valueOf(af.getMapParams().get("CounterType"));
|
||||||
String name = af.getHostCard().getName();
|
Card card = af.getHostCard();
|
||||||
int amount = AbilityFactory.calculateAmount(af.getHostCard(), af.getMapParams().get("CounterNum"), sa);
|
int amount = AbilityFactory.calculateAmount(af.getHostCard(), af.getMapParams().get("CounterNum"), sa);
|
||||||
|
|
||||||
sb.append("Put ").append(amount).append(" ").append(cType.getName())
|
sb.append("Put ").append(amount).append(" ").append(cType.getName())
|
||||||
@@ -107,13 +108,10 @@ public class AbilityFactory_Counters {
|
|||||||
if(amount != 1) sb.append("s");
|
if(amount != 1) sb.append("s");
|
||||||
sb.append(" on");
|
sb.append(" on");
|
||||||
|
|
||||||
if (af.getAbTgt() == null)
|
ArrayList<Card> tgts = AbilityFactory.getDefinedCards(card, params.get("Defined"), sa);
|
||||||
sb.append(" ").append(name);
|
|
||||||
else {
|
for (Card c : tgts)
|
||||||
ArrayList<Card> tgts = af.getAbTgt().getTargetCards();
|
sb.append(" ").append(c.getName());
|
||||||
for (Card c : tgts)
|
|
||||||
sb.append(" ").append(c.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
sb.append(".");
|
sb.append(".");
|
||||||
|
|
||||||
@@ -368,8 +366,7 @@ public class AbilityFactory_Counters {
|
|||||||
if (tgt != null)
|
if (tgt != null)
|
||||||
tgtCards = tgt.getTargetCards();
|
tgtCards = tgt.getTargetCards();
|
||||||
else{
|
else{
|
||||||
tgtCards = new ArrayList<Card>();
|
tgtCards = AbilityFactory.getDefinedCards(card, params.get("Defined"), sa);
|
||||||
tgtCards.add(card);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Card tgtCard : tgtCards)
|
for(Card tgtCard : tgtCards)
|
||||||
|
|||||||
Reference in New Issue
Block a user