- Added Koskun Falls

This commit is contained in:
swordshine
2013-03-30 12:37:09 +00:00
parent ba5c9fbc84
commit c238925c22
3 changed files with 38 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -5779,6 +5779,7 @@ res/cardsfolder/k/korlash_heir_to_blackblade.txt svneol=native#text/plain
res/cardsfolder/k/kormus_bell.txt svneol=native#text/plain res/cardsfolder/k/kormus_bell.txt svneol=native#text/plain
res/cardsfolder/k/korozda_guildmage.txt -text res/cardsfolder/k/korozda_guildmage.txt -text
res/cardsfolder/k/korozda_monitor.txt -text res/cardsfolder/k/korozda_monitor.txt -text
res/cardsfolder/k/koskun_falls.txt -text
res/cardsfolder/k/koskun_keep.txt svneol=native#text/plain res/cardsfolder/k/koskun_keep.txt svneol=native#text/plain
res/cardsfolder/k/koth_of_the_hammer.txt svneol=native#text/plain res/cardsfolder/k/koth_of_the_hammer.txt svneol=native#text/plain
res/cardsfolder/k/koths_courier.txt svneol=native#text/plain res/cardsfolder/k/koths_courier.txt svneol=native#text/plain

View File

@@ -0,0 +1,11 @@
Name:Koskun Falls
ManaCost:2 B B
Types:World Enchantment
S:Mode$ CantAttackUnless | ValidCard$ Creature | Target$ You | Cost$ 2 | Description$ Creatures can't attack you unless their controller pays 2 for each creature he or she controls that's attacking you.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ At the beginning of your upkeep, sacrifice CARDNAME unless you tap an untapped creature you control.
SVar:TrigSac:AB$ Sacrifice | Cost$ 0 | Defined$ Self | UnlessCost$ tapXType<1/Creature> | UnlessPayer$ You
SVar:NeedsToPlayVar:Y GE1
SVar:Y:Count$Valid Creature.YouCtrl
SVar:Picture:http://www.wizards.com/global/images/magic/general/koskun_fallss.jpg
Oracle:At the beginning of your upkeep, sacrifice Koskun Falls unless you tap an untapped creature you control.\nCreatures can't attack you unless their controller pays {2} for each creature he or she controls that's attacking you.
SetInfo:HML Rare

View File

@@ -51,6 +51,7 @@ import forge.card.cost.CostPutCounter;
import forge.card.cost.CostRemoveCounter; import forge.card.cost.CostRemoveCounter;
import forge.card.cost.CostReturn; import forge.card.cost.CostReturn;
import forge.card.cost.CostSacrifice; import forge.card.cost.CostSacrifice;
import forge.card.cost.CostTapType;
import forge.card.cost.CostUtil; import forge.card.cost.CostUtil;
import forge.card.mana.ManaCost; import forge.card.mana.ManaCost;
import forge.card.spellability.Ability; import forge.card.spellability.Ability;
@@ -563,6 +564,31 @@ public final class GameActionUtil {
cpl.reportPaidCardsTo(sourceAbility); cpl.reportPaidCardsTo(sourceAbility);
} }
else if (part instanceof CostTapType) {
List<Card> choiceList = CardLists.getValidCards(p.getCardsIn(ZoneType.Battlefield), part.getType().split(";"), p, source);
choiceList = CardLists.filter(choiceList, Presets.UNTAPPED);
int amount = getAmountFromPartX(part, source, sourceAbility);
if (choiceList.size() < amount) {
// unable to pay (not enough cards)
return false;
}
InputSelectCards inp = new InputSelectCardsFromList(amount, amount, choiceList);
inp.setMessage("Select %d card(s) to tap");
inp.setCancelAllowed(true);
FThreads.setInputAndWait(inp);
if (inp.hasCancelled() || inp.getSelected().size() != amount)
return false;
CostPartWithList cpl = (CostPartWithList)part;
for (Card c : inp.getSelected()) {
cpl.executePayment(sourceAbility, c);
}
cpl.reportPaidCardsTo(sourceAbility);
}
else if (part instanceof CostPartMana ) { else if (part instanceof CostPartMana ) {
if (!((CostPartMana) part).getManaToPay().equals("0")) // non-zero costs require input if (!((CostPartMana) part).getManaToPay().equals("0")) // non-zero costs require input
mayRemovePart = false; mayRemovePart = false;