mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Made DistributedAsYouChoose available in PutCounter
- Converted Blessings of Nature to DistributeAsYouChoose
This commit is contained in:
@@ -3,10 +3,7 @@ ManaCost:4 G
|
||||
Types:Sorcery
|
||||
Text:no text
|
||||
K:Miracle:G
|
||||
A:SP$PutCounter | Cost$ 4 G | ValidTgts$ Creature | TgtPrompt$ Select target creature (1) | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ PutCounter2 | SpellDescription$ Distribute four +1+1 counters among any number of target creatures.
|
||||
SVar:PutCounter2:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (2) | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ PutCounter3
|
||||
SVar:PutCounter3:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (3) | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ PutCounter4
|
||||
SVar:PutCounter4:DB$PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature (4) | CounterType$ P1P1 | CounterNum$ 1
|
||||
A:SP$ PutCounter | Cost$ 4 G | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute counters to | CounterType$ P1P1 | CounterNum$ 4 | TargetMin$ 1 | TargetMax$ 4 | DividedAsYouChoose$ 4 | SpellDescription$ Distribute four +1+1 counters among any number of target creatures.
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/blessings_of_nature.jpg
|
||||
SetInfo:AVR|Uncommon|http://magiccards.info/scans/en/avr/168.jpg
|
||||
|
||||
@@ -4,4 +4,7 @@ Types:Instant
|
||||
Text:no text
|
||||
A:SP$ PreventDamage | Cost$ 1 W | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player to prevent damage to | Amount$ 5 | TargetMin$ 1 | TargetMax$ 5 | DividedAsYouChoose$ 5 | SpellDescription$ Prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/remedy.jpg
|
||||
SetInfo:VIS|Common|http://magiccards.info/scans/en/vi/117.jpg
|
||||
SetInfo:6ED|Common|http://magiccards.info/scans/en/6e/36.jpg
|
||||
Oracle:Prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.
|
||||
End
|
||||
@@ -19,10 +19,15 @@ public class CountersPutEffect extends SpellEffect {
|
||||
protected String getStackDescription(SpellAbility sa) {
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final Card card = sa.getSourceCard();
|
||||
final boolean dividedAsYouChoose = sa.hasParam("DividedAsYouChoose");
|
||||
|
||||
final CounterType cType = CounterType.valueOf(sa.getParam("CounterType"));
|
||||
final int amount = AbilityUtils.calculateAmount(card, sa.getParam("CounterNum"), sa);
|
||||
sb.append("Put ");
|
||||
if (dividedAsYouChoose) {
|
||||
sb.append("Distribute ");
|
||||
} else {
|
||||
sb.append("Put ");
|
||||
}
|
||||
if (sa.hasParam("UpTo")) {
|
||||
sb.append("up to ");
|
||||
}
|
||||
@@ -30,7 +35,11 @@ public class CountersPutEffect extends SpellEffect {
|
||||
if (amount != 1) {
|
||||
sb.append("s");
|
||||
}
|
||||
sb.append(" on ");
|
||||
if (dividedAsYouChoose) {
|
||||
sb.append(" among ");
|
||||
} else {
|
||||
sb.append(" on ");
|
||||
}
|
||||
final Target tgt = sa.getTarget();
|
||||
final List<Card> tgtCards = tgt != null ? tgt.getTargetCards() : AbilityUtils.getDefinedCards(sa.getSourceCard(), sa.getParam("Defined"), sa);
|
||||
|
||||
@@ -91,6 +100,7 @@ public class CountersPutEffect extends SpellEffect {
|
||||
}
|
||||
|
||||
for (final Card tgtCard : tgtCards) {
|
||||
counterAmount = (sa.getTarget() != null && sa.hasParam("DividedAsYouChoose")) ? sa.getTarget().getDividedValue(tgtCard) : counterAmount;
|
||||
if ((tgt == null) || tgtCard.canBeTargetedBy(sa)) {
|
||||
if (max != -1) {
|
||||
counterAmount = max - tgtCard.getCounters(counterType);
|
||||
|
||||
@@ -437,6 +437,8 @@ public class TargetSelection {
|
||||
apiBasedMessage = "Select how much damage to deal to ";
|
||||
} else if (sa.getApi().toString().equals("PreventDamage")) {
|
||||
apiBasedMessage = "Select how much damage to prevent to ";
|
||||
} else if (sa.getApi().toString().equals("PutCounter")) {
|
||||
apiBasedMessage = "Select how many counters to distribute to ";
|
||||
}
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append(apiBasedMessage);
|
||||
|
||||
Reference in New Issue
Block a user