mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Expanded UntapYType cost for Benthic Explorers
This commit is contained in:
@@ -4,7 +4,7 @@ Types:Creature Elemental
|
||||
Text:no text
|
||||
PT:2/2
|
||||
A:AB$ DealDamage | Cost$ UR UR T tapXType<2/Creature.Red/red creature> | Tgt$ TgtCP | NumDmg$ 3 | SpellDescription$ CARDNAME deals 3 damage to target creature or player.
|
||||
A:AB$ ChangeZone | Cost$ UR UR Q untapYType<2/Creature.Blue/blue creature> | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target creature to its owner's hand.
|
||||
A:AB$ ChangeZone | Cost$ UR UR Q untapYType<2/Creature.Blue+YouCtrl/blue creature> | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target creature to its owner's hand.
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/crackleburr.jpg
|
||||
SetInfo:EVE|Rare|http://magiccards.info/scans/en/eve/100.jpg
|
||||
|
||||
@@ -333,6 +333,7 @@ public class Cost {
|
||||
}
|
||||
|
||||
if (parse.contains("Q")) {
|
||||
this.untapCost = true;
|
||||
parse = parse.replace("Q", "").trim();
|
||||
this.costParts.add(0, new CostUntap());
|
||||
manaLocation++;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
package forge.card.cost;
|
||||
|
||||
import forge.AllZoneUtil;
|
||||
import forge.Card;
|
||||
import forge.CardList;
|
||||
import forge.CardListFilter;
|
||||
@@ -74,7 +75,11 @@ public class CostUntapType extends CostPartWithList {
|
||||
|
||||
sb.append(Cost.convertAmountTypeToWords(i, this.getAmount(), " tapped " + desc));
|
||||
|
||||
sb.append(" you control");
|
||||
if (this.getType().contains("YouDontCtrl")) {
|
||||
sb.append(" an opponent controls");
|
||||
} else if (this.getType().contains("YouCtrl")) {
|
||||
sb.append(" you control");
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -112,7 +117,7 @@ public class CostUntapType extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
public final boolean canPay(final SpellAbility ability, final Card source, final Player activator, final Cost cost) {
|
||||
CardList typeList = activator.getCardsIn(ZoneType.Battlefield);
|
||||
CardList typeList = AllZoneUtil.getCardsIn(ZoneType.Battlefield);
|
||||
|
||||
typeList = typeList.getValidCards(this.getType().split(";"), activator, source);
|
||||
|
||||
@@ -151,10 +156,14 @@ public class CostUntapType extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
public final boolean payHuman(final SpellAbility ability, final Card source, final CostPayment payment) {
|
||||
CardList typeList = ability.getActivatingPlayer().getCardsIn(ZoneType.Battlefield);
|
||||
final boolean untap = payment.getCost().getUntap();
|
||||
CardList typeList = AllZoneUtil.getCardsIn(ZoneType.Battlefield);
|
||||
typeList = typeList.getValidCards(this.getType().split(";"), ability.getActivatingPlayer(),
|
||||
ability.getSourceCard());
|
||||
typeList = typeList.filter(CardListFilter.TAPPED);
|
||||
if (untap) {
|
||||
typeList.remove(source);
|
||||
}
|
||||
final String amount = this.getAmount();
|
||||
Integer c = this.convertAmount();
|
||||
if (c == null) {
|
||||
@@ -167,7 +176,7 @@ public class CostUntapType extends CostPartWithList {
|
||||
}
|
||||
}
|
||||
|
||||
CostUtil.setInput(CostUntapType.inputUntapXCost(this, typeList, ability, payment, c));
|
||||
CostUtil.setInput(CostUntapType.inputUntapYCost(this, typeList, ability, payment, c));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -186,7 +195,7 @@ public class CostUntapType extends CostPartWithList {
|
||||
if (c == null) {
|
||||
final String sVar = ability.getSVar(amount);
|
||||
if (sVar.equals("XChoice")) {
|
||||
CardList typeList = ability.getActivatingPlayer().getCardsIn(ZoneType.Battlefield);
|
||||
CardList typeList = AllZoneUtil.getCardsIn(ZoneType.Battlefield);
|
||||
typeList = typeList.getValidCards(this.getType().split(";"), ability.getActivatingPlayer(),
|
||||
ability.getSourceCard());
|
||||
if (untap) {
|
||||
@@ -212,7 +221,7 @@ public class CostUntapType extends CostPartWithList {
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* input_untapXCost.
|
||||
* input_untapYCost.
|
||||
* </p>
|
||||
*
|
||||
* @param untapType
|
||||
@@ -227,7 +236,7 @@ public class CostUntapType extends CostPartWithList {
|
||||
* a int.
|
||||
* @return a {@link forge.control.input.Input} object.
|
||||
*/
|
||||
public static Input inputUntapXCost(final CostUntapType untapType, final CardList cardList, final SpellAbility sa,
|
||||
public static Input inputUntapYCost(final CostUntapType untapType, final CardList cardList, final SpellAbility sa,
|
||||
final CostPayment payment, final int nCards) {
|
||||
final Input target = new Input() {
|
||||
|
||||
@@ -288,5 +297,5 @@ public class CostUntapType extends CostPartWithList {
|
||||
};
|
||||
|
||||
return target;
|
||||
} // input_untapXCost()
|
||||
} // input_untapYCost()
|
||||
}
|
||||
|
||||
@@ -367,6 +367,8 @@ public class CostUtil {
|
||||
*
|
||||
* @param card
|
||||
* the card
|
||||
* @param sa
|
||||
* the SpellAbility
|
||||
* @param maxValue
|
||||
* the max value
|
||||
* @return the int
|
||||
@@ -394,6 +396,8 @@ public class CostUtil {
|
||||
*
|
||||
* @param card
|
||||
* the card
|
||||
* @param sa
|
||||
* the SpellAbility
|
||||
* @param maxValue
|
||||
* the max value
|
||||
* @return the int
|
||||
|
||||
Reference in New Issue
Block a user