- Added Bounty of the Hunt and Shambling Swarm

This commit is contained in:
moomarc
2013-02-15 08:22:55 +00:00
parent 180f8fbc64
commit fada7d7cb3
7 changed files with 91 additions and 10 deletions

2
.gitattributes vendored
View File

@@ -1210,6 +1210,7 @@ res/cardsfolder/b/boundless_realms.txt -text
res/cardsfolder/b/bounteous_kirin.txt svneol=native#text/plain res/cardsfolder/b/bounteous_kirin.txt svneol=native#text/plain
res/cardsfolder/b/bountiful_harvest.txt svneol=native#text/plain res/cardsfolder/b/bountiful_harvest.txt svneol=native#text/plain
res/cardsfolder/b/bounty_hunter.txt svneol=native#text/plain res/cardsfolder/b/bounty_hunter.txt svneol=native#text/plain
res/cardsfolder/b/bounty_of_the_hunt.txt -text
res/cardsfolder/b/bower_passage.txt -text res/cardsfolder/b/bower_passage.txt -text
res/cardsfolder/b/brace_for_impact.txt -text res/cardsfolder/b/brace_for_impact.txt -text
res/cardsfolder/b/brackwater_elemental.txt svneol=native#text/plain res/cardsfolder/b/brackwater_elemental.txt svneol=native#text/plain
@@ -9210,6 +9211,7 @@ res/cardsfolder/s/shambleshark.txt -text
res/cardsfolder/s/shambling_remains.txt svneol=native#text/plain res/cardsfolder/s/shambling_remains.txt svneol=native#text/plain
res/cardsfolder/s/shambling_shell.txt svneol=native#text/plain res/cardsfolder/s/shambling_shell.txt svneol=native#text/plain
res/cardsfolder/s/shambling_strider.txt svneol=native#text/plain res/cardsfolder/s/shambling_strider.txt svneol=native#text/plain
res/cardsfolder/s/shambling_swarm.txt -text
res/cardsfolder/s/shanodin_dryads.txt svneol=native#text/plain res/cardsfolder/s/shanodin_dryads.txt svneol=native#text/plain
res/cardsfolder/s/shape_anew.txt -text res/cardsfolder/s/shape_anew.txt -text
res/cardsfolder/s/shape_stealer.txt -text svneol=unset#text/plain res/cardsfolder/s/shape_stealer.txt -text svneol=unset#text/plain

View File

@@ -4,6 +4,7 @@ Types:Sorcery
Text:no text Text:no text
K:Miracle:G K:Miracle:G
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. 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:RemAIDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/blessings_of_nature.jpg 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 SetInfo:AVR|Uncommon|http://magiccards.info/scans/en/avr/168.jpg

View File

@@ -0,0 +1,14 @@
Name:Bounty of the Hunt
ManaCost:3 G G
Types:Instant
Text:no text
A:SP$ PutCounter | Cost$ 3 G G | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute counters to | CounterType$ P1P1 | CounterNum$ 3 | TargetMin$ 1 | TargetMax$ 3 | DividedAsYouChoose$ 3 | RememberCounters$ True | SubAbility$ DelayedRemoveCounters | RememberTargets$ True | SpellDescription$ Distribute three +1/+1 counters among one, two, or three target creatures. For each +1/+1 counter you put on a creature this way, remove a +1/+1 counter from that creature at the beginning of the next cleanup step.
A:SP$ PutCounter | Cost$ ExileFromHand<1/Card.Green> | CostDesc$ You may exile a green card from your hand | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute counters to | CounterType$ P1P1 | CounterNum$ 3 | TargetMin$ 1 | TargetMax$ 3 | DividedAsYouChoose$ 3 | RememberCounters$ True | SubAbility$ DelayedRemoveCounters | RememberTargets$ True | SpellDescription$ rather than pay CARDNAME's mana cost.
SVar:DelayedRemoveCounters:DB$ DelayedTrigger | Mode$ Phase | Phase$ Cleanup | Execute$ TrigRemoveCounter | Secondary$ True | TriggerDescription$ For each +1/+1 counter you put on a creature this way, remove a +1/+1 counter from that creature at the beginning of the next cleanup step.
SVar:TrigRemoveCounter:AB$ RemoveCounter | Cost$ 0 | Defined$ Remembered | CounterType$ P1P1 | CounterNum$ Remembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/bounty_of_the_hunt.jpg
SetInfo:ALL|Uncommon|http://magiccards.info/scans/en/ai/63.jpg
Oracle:You may exile a green card from your hand rather than pay Bounty of the Hunt's mana cost.\nDistribute three +1/+1 counters among one, two, or three target creatures. For each +1/+1 counter you put on a creature this way, remove a +1/+1 counter from that creature at the beginning of the next cleanup step.
End

View File

@@ -0,0 +1,15 @@
Name:Shambling Swarm
ManaCost:1 B B B
Types:Creature Horror
Text:no text
PT:3/3
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ SwarmSpread | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, distribute three -1/-1 counters among one, two, or three target creatures. For each -1/-1 counter you put on a creature this way, remove a -1/-1 counter from that creature at the beginning of the next end step.
SVar:SwarmSpread:AB$ PutCounter | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute counters to | IsCurse$ True | CounterType$ M1M1 | CounterNum$ 3 | TargetMin$ 1 | TargetMax$ 3 | DividedAsYouChoose$ 3 | RememberCounters$ True | SubAbility$ DelayedRemoveCounters | RememberTargets$ True
SVar:DelayedRemoveCounters:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigRemoveCounter | Secondary$ True | TriggerDescription$ For each -1/-1 counter you put on a creature this way, remove a -1/-1 counter from that creature at the beginning of the next end step.
SVar:TrigRemoveCounter:AB$ RemoveCounter | Cost$ 0 | Defined$ Remembered | CounterType$ M1M1 | CounterNum$ Remembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/shambling_swarm.jpg
SetInfo:TOR|Rare|http://magiccards.info/scans/en/tr/82.jpg
Oracle:When Shambling Swarm dies, distribute three -1/-1 counters among one, two, or three target creatures. For each -1/-1 counter you put on a creature this way, remove a -1/-1 counter from that creature at the beginning of the next end step.
End

View File

@@ -98,6 +98,7 @@ public class Card extends GameEntity implements Comparable<Card> {
private final CardDamageHistory damageHistory = new CardDamageHistory(); private final CardDamageHistory damageHistory = new CardDamageHistory();
private Map<CounterType, Integer> counters = new TreeMap<CounterType, Integer>(); private Map<CounterType, Integer> counters = new TreeMap<CounterType, Integer>();
private Map<Card, Map<CounterType, Integer>> countersAddedBy = new TreeMap<Card, Map<CounterType, Integer>>();
private final Map<String, Object> triggeringObjects = new TreeMap<String, Object>(); private final Map<String, Object> triggeringObjects = new TreeMap<String, Object>();
private ArrayList<String> extrinsicKeyword = new ArrayList<String>(); private ArrayList<String> extrinsicKeyword = new ArrayList<String>();
// Hidden keywords won't be displayed on the card // Hidden keywords won't be displayed on the card
@@ -347,7 +348,7 @@ public class Card extends GameEntity implements Comparable<Card> {
public void setPreFaceDownCharacteristic(CardCharacteristicName preCharacteristic) { public void setPreFaceDownCharacteristic(CardCharacteristicName preCharacteristic) {
this.preTFDCharacteristic = preCharacteristic; this.preTFDCharacteristic = preCharacteristic;
} }
/** /**
* Turn face down. * Turn face down.
* *
@@ -700,7 +701,7 @@ public class Card extends GameEntity implements Comparable<Card> {
public final void clearImprinted() { public final void clearImprinted() {
this.imprintedCards.clear(); this.imprintedCards.clear();
} }
/** /**
* <p> * <p>
* addEncoded. * addEncoded.
@@ -750,7 +751,7 @@ public class Card extends GameEntity implements Comparable<Card> {
*/ */
public final void clearEncoded() { public final void clearEncoded() {
this.encodedCards.clear(); this.encodedCards.clear();
} }
/** /**
* <p> * <p>
@@ -1260,6 +1261,15 @@ public class Card extends GameEntity implements Comparable<Card> {
return true; return true;
} }
public final int getTotalCountersToAdd(final CounterType counterType, final int baseAmount, final boolean applyMultiplier) {
if (!this.canHaveCountersPlacedOnIt(counterType)) {
return 0;
}
final int multiplier = applyMultiplier ? this.getController().getCounterDoublersMagnitude(counterType) : 1;
return multiplier * baseAmount;
}
public final void addCounter(final CounterType counterType, final int n, final boolean applyMultiplier) { public final void addCounter(final CounterType counterType, final int n, final boolean applyMultiplier) {
if (!this.canHaveCountersPlacedOnIt(counterType)) { if (!this.canHaveCountersPlacedOnIt(counterType)) {
return; return;
@@ -1285,6 +1295,38 @@ public class Card extends GameEntity implements Comparable<Card> {
this.updateObservers(); this.updateObservers();
} }
/**
* <p>
* addCountersAddedBy.
* </p>
* @param source the card adding the counters to this card
* @param counterType the counter type added
* @param counterAmount the amount of counters added
*/
public final void addCountersAddedBy(final Card source, final CounterType counterType, final int counterAmount) {
final Map<CounterType, Integer> counterMap = new TreeMap<CounterType, Integer>();
counterMap.put(counterType, counterAmount);
this.countersAddedBy.put(source, counterMap);
}
/**
* <p>
* getCountersAddedBy.
* </p>
* @param source the card the counters were added by
* @param counterType the counter type added
* @return the amount of counters added.
*/
public final int getCountersAddedBy(final Card source, final CounterType counterType) {
int counterAmount = 0;
if (this.countersAddedBy.containsKey(source)) {
final Map<CounterType, Integer> counterMap = this.countersAddedBy.get(source);
counterAmount = counterMap.containsKey(counterType) ? counterMap.get(counterType) : 0;
this.countersAddedBy.remove(source);
}
return counterAmount;
}
/** /**
* <p> * <p>
* subtractCounter. * subtractCounter.
@@ -9076,11 +9118,11 @@ public class Card extends GameEntity implements Comparable<Card> {
if (tr.getMode() != TriggerType.ChangesZone) { if (tr.getMode() != TriggerType.ChangesZone) {
continue; continue;
} }
if (!params.get("Destination").equals(ZoneType.Battlefield.toString())) { if (!params.get("Destination").equals(ZoneType.Battlefield.toString())) {
continue; continue;
} }
if (params.containsKey("ValidCard") && !params.get("ValidCard").contains("Self")) { if (params.containsKey("ValidCard") && !params.get("ValidCard").contains("Self")) {
continue; continue;
} }
@@ -9102,11 +9144,11 @@ public class Card extends GameEntity implements Comparable<Card> {
if (!(re instanceof ReplaceMoved)) { if (!(re instanceof ReplaceMoved)) {
continue; continue;
} }
if (!params.get("Destination").equals(ZoneType.Battlefield.toString())) { if (!params.get("Destination").equals(ZoneType.Battlefield.toString())) {
continue; continue;
} }
if (params.containsKey("ValidCard") && !params.get("ValidCard").contains("Self")) { if (params.containsKey("ValidCard") && !params.get("ValidCard").contains("Self")) {
continue; continue;
} }
@@ -9130,9 +9172,9 @@ public class Card extends GameEntity implements Comparable<Card> {
if (isToken() && !isCopiedToken()) { if (isToken() && !isCopiedToken()) {
return 0; return 0;
} }
int xPaid = 0; int xPaid = 0;
// 2012-07-22 - If a card is on the stack, count the xManaCost in with it's CMC // 2012-07-22 - If a card is on the stack, count the xManaCost in with it's CMC
if (Singletons.getModel().getGame().getCardsIn(ZoneType.Stack).contains(this) && getManaCost() != null) { if (Singletons.getModel().getGame().getCardsIn(ZoneType.Stack).contains(this) && getManaCost() != null) {
xPaid = getXManaCostPaid() * getManaCost().countX(); xPaid = getXManaCostPaid() * getManaCost().countX();

View File

@@ -74,6 +74,7 @@ public class CountersPutEffect extends SpellEffect {
return; return;
} }
final boolean remember = sa.hasParam("RememberCounters");
int counterAmount = AbilityUtils.calculateAmount(sa.getSourceCard(), sa.getParam("CounterNum"), sa); int counterAmount = AbilityUtils.calculateAmount(sa.getSourceCard(), sa.getParam("CounterNum"), sa);
final int max = sa.hasParam("MaxFromEffect") ? Integer.parseInt(sa.getParam("MaxFromEffect")) : -1; final int max = sa.hasParam("MaxFromEffect") ? Integer.parseInt(sa.getParam("MaxFromEffect")) : -1;
@@ -109,6 +110,10 @@ public class CountersPutEffect extends SpellEffect {
if (zone == null) { if (zone == null) {
// Do nothing, token disappeared // Do nothing, token disappeared
} else if (zone.is(ZoneType.Battlefield) || zone.is(ZoneType.Stack)) { } else if (zone.is(ZoneType.Battlefield) || zone.is(ZoneType.Stack)) {
if (remember) {
final int value = tgtCard.getTotalCountersToAdd(counterType, counterAmount, true);
tgtCard.addCountersAddedBy(card, counterType, value);
}
tgtCard.addCounter(counterType, counterAmount, true); tgtCard.addCounter(counterType, counterAmount, true);
} else { } else {
// adding counters to something like re-suspend cards // adding counters to something like re-suspend cards

View File

@@ -57,7 +57,7 @@ public class CountersRemoveEffect extends SpellEffect {
final Card card = sa.getSourceCard(); final Card card = sa.getSourceCard();
final String type = sa.getParam("CounterType"); final String type = sa.getParam("CounterType");
int counterAmount = 0; int counterAmount = 0;
if (!sa.getParam("CounterNum").equals("All")) { if (!sa.getParam("CounterNum").equals("All") && !sa.getParam("CounterNum").equals("Remembered")) {
counterAmount = AbilityUtils.calculateAmount(sa.getSourceCard(), sa.getParam("CounterNum"), sa); counterAmount = AbilityUtils.calculateAmount(sa.getSourceCard(), sa.getParam("CounterNum"), sa);
} }
@@ -83,6 +83,8 @@ public class CountersRemoveEffect extends SpellEffect {
final Zone zone = Singletons.getModel().getGame().getZoneOf(tgtCard); final Zone zone = Singletons.getModel().getGame().getZoneOf(tgtCard);
if (sa.getParam("CounterNum").equals("All")) { if (sa.getParam("CounterNum").equals("All")) {
counterAmount = tgtCard.getCounters(counterType); counterAmount = tgtCard.getCounters(counterType);
} else if (sa.getParam("CounterNum").equals("Remembered")) {
counterAmount = tgtCard.getCountersAddedBy(card, counterType);
} }
if (type.matches("Any")) { if (type.matches("Any")) {