mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Added Tariff
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -11634,6 +11634,7 @@ forge-gui/res/cardsfolder/t/tar_pit_warrior.txt svneol=native#text/plain
|
|||||||
forge-gui/res/cardsfolder/t/tar_pitcher.txt svneol=native#text/plain
|
forge-gui/res/cardsfolder/t/tar_pitcher.txt svneol=native#text/plain
|
||||||
forge-gui/res/cardsfolder/t/tarfire.txt svneol=native#text/plain
|
forge-gui/res/cardsfolder/t/tarfire.txt svneol=native#text/plain
|
||||||
forge-gui/res/cardsfolder/t/tariel_reckoner_of_souls.txt -text
|
forge-gui/res/cardsfolder/t/tariel_reckoner_of_souls.txt -text
|
||||||
|
forge-gui/res/cardsfolder/t/tariff.txt -text
|
||||||
forge-gui/res/cardsfolder/t/tarmogoyf.txt svneol=native#text/plain
|
forge-gui/res/cardsfolder/t/tarmogoyf.txt svneol=native#text/plain
|
||||||
forge-gui/res/cardsfolder/t/tarnished_citadel.txt svneol=native#text/plain
|
forge-gui/res/cardsfolder/t/tarnished_citadel.txt svneol=native#text/plain
|
||||||
forge-gui/res/cardsfolder/t/tarox_bladewing.txt svneol=native#text/plain
|
forge-gui/res/cardsfolder/t/tarox_bladewing.txt svneol=native#text/plain
|
||||||
|
|||||||
9
forge-gui/res/cardsfolder/t/tariff.txt
Normal file
9
forge-gui/res/cardsfolder/t/tariff.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Tariff
|
||||||
|
ManaCost:1 W
|
||||||
|
Types:Sorcery
|
||||||
|
A:SP$ RepeatEach | Cost$ 1 W | RepeatPlayers$ Player | RepeatSubAbility$ DBChooseCard | SpellDescription$ Each player sacrifices the creature he or she controls with the highest converted mana cost unless he or she pays that creature's mana cost. If two or more creatures a player controls are tied for highest cost, that player chooses one.
|
||||||
|
SVar:DBChooseCard:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Creature.greatestCMCControlledByRemembered | Mandatory$ True | SubAbility$ DBSac
|
||||||
|
SVar:DBSac:DB$ Sacrifice | Defined$ Player.IsRemembered | SacValid$ Card.ChosenCard | SacMessage$ the creature with the highest converted mana cost | UnlessCost$ ChosenManaCost | UnlessPayer$ Player.IsRemembered
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/tariff.jpg
|
||||||
|
SVar:RemAIDeck:True
|
||||||
|
Oracle:Each player sacrifices the creature he or she controls with the highest converted mana cost unless he or she pays that creature's mana cost. If two or more creatures a player controls are tied for highest cost, that player chooses one.
|
||||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import forge.card.MagicColor;
|
import forge.card.MagicColor;
|
||||||
|
import forge.card.mana.ManaCost;
|
||||||
import forge.card.mana.ManaCostShard;
|
import forge.card.mana.ManaCostShard;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -1205,6 +1206,13 @@ public class AbilityUtils {
|
|||||||
if (unlessCost.equals("CardManaCost")) {
|
if (unlessCost.equals("CardManaCost")) {
|
||||||
cost = new Cost(source.getManaCost(), true);
|
cost = new Cost(source.getManaCost(), true);
|
||||||
}
|
}
|
||||||
|
else if (unlessCost.equals("ChosenManaCost")) {
|
||||||
|
if (source.getChosenCard().isEmpty()) {
|
||||||
|
cost = new Cost(ManaCost.ZERO, true);
|
||||||
|
} else {
|
||||||
|
cost = new Cost(source.getChosenCard().get(0).getManaCost(), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (unlessCost.equals("RememberedCostMinus2")) {
|
else if (unlessCost.equals("RememberedCostMinus2")) {
|
||||||
if (source.getRemembered().isEmpty() || !(source.getRemembered().get(0) instanceof Card)) {
|
if (source.getRemembered().isEmpty() || !(source.getRemembered().get(0) instanceof Card)) {
|
||||||
sa.resolve();
|
sa.resolve();
|
||||||
|
|||||||
@@ -6268,7 +6268,14 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (property.startsWith("greatestCMC")) {
|
} else if (property.startsWith("greatestCMC")) {
|
||||||
final List<Card> list = CardLists.filter(game.getCardsIn(ZoneType.Battlefield), Presets.CREATURES);
|
List<Card> list = CardLists.filter(game.getCardsIn(ZoneType.Battlefield), Presets.CREATURES);
|
||||||
|
if (property.contains("ControlledBy")) {
|
||||||
|
List<Player> p = AbilityUtils.getDefinedPlayers(source, property.split("ControlledBy")[1], null);
|
||||||
|
list = CardLists.filterControlledBy(list, p);
|
||||||
|
if (!list.contains(this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
for (final Card crd : list) {
|
for (final Card crd : list) {
|
||||||
if (crd.isSplitCard()) {
|
if (crd.isSplitCard()) {
|
||||||
if (crd.getCMC(Card.SplitCMCMode.LeftSplitCMC) > this.getCMC() || crd.getCMC(Card.SplitCMCMode.RightSplitCMC) > this.getCMC()) {
|
if (crd.getCMC(Card.SplitCMCMode.LeftSplitCMC) > this.getCMC() || crd.getCMC(Card.SplitCMCMode.RightSplitCMC) > this.getCMC()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user