mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
add Tangle Wire (from Nemesis) - should be the last large piece for the Tinker decks.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -4796,6 +4796,7 @@ res/cardsfolder/talruum_minotaur.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/tangle_asp.txt -text svneol=native#text/plain
|
res/cardsfolder/tangle_asp.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/tangle_golem.txt -text svneol=native#text/plain
|
res/cardsfolder/tangle_golem.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/tangle_spider.txt -text svneol=native#text/plain
|
res/cardsfolder/tangle_spider.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/tangle_wire.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/tanglebloom.txt -text svneol=native#text/plain
|
res/cardsfolder/tanglebloom.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/taoist_hermit.txt -text svneol=native#text/plain
|
res/cardsfolder/taoist_hermit.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/taoist_mystic.txt -text svneol=native#text/plain
|
res/cardsfolder/taoist_mystic.txt -text svneol=native#text/plain
|
||||||
|
|||||||
8
res/cardsfolder/tangle_wire.txt
Normal file
8
res/cardsfolder/tangle_wire.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Name:Tangle Wire
|
||||||
|
ManaCost:3
|
||||||
|
Types:Artifact
|
||||||
|
Text:At the beginning of each player's upkeep, that player taps an untapped artifact, creature, or land he or she controls for each fade counter on CARDNAME.
|
||||||
|
K:Fading:4
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/tangle_wire.jpg
|
||||||
|
End
|
||||||
@@ -590,7 +590,7 @@ public class CardFactoryUtil {
|
|||||||
return biggest;
|
return biggest;
|
||||||
}
|
}
|
||||||
|
|
||||||
//returns null if list.size() == 0
|
//returns null if list.size() == 0
|
||||||
public static Card AI_getWorstCreature(CardList list) {
|
public static Card AI_getWorstCreature(CardList list) {
|
||||||
CardList all = list;
|
CardList all = list;
|
||||||
all = all.getType("Creature");
|
all = all.getType("Creature");
|
||||||
@@ -606,6 +606,45 @@ public class CardFactoryUtil {
|
|||||||
return smallest;
|
return smallest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Card AI_getWorstPermanent(final CardList list, boolean biasEnch, boolean biasLand, boolean biasArt, boolean biasCreature) {
|
||||||
|
if(list.size() == 0) return null;
|
||||||
|
|
||||||
|
if(biasEnch && list.getType("Enchantment").size() > 0) {
|
||||||
|
return AI_getCheapestPermanent(list.getType("Enchantment"), null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(biasArt && list.getType("Artifact").size() > 0) {
|
||||||
|
return AI_getCheapestPermanent(list.getType("Artifact"), null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(biasLand && list.getType("Land").size() > 0) {
|
||||||
|
return getWorstLand(list.getType("Land"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(biasCreature && list.getType("Creature").size() > 0) {
|
||||||
|
return AI_getWorstCreature(list.getType("Creature"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(list.getType("Land").size() > 6) {
|
||||||
|
return getWorstLand(list.getType("Land"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(list.getType("Artifact").size() > 0 || list.getType("Enchantment").size() > 0) {
|
||||||
|
return AI_getCheapestPermanent(list.filter(new CardListFilter() {
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return c.isArtifact() || c.isEnchantment();
|
||||||
|
}
|
||||||
|
}), null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(list.getType("Creature").size() > 0) {
|
||||||
|
return AI_getWorstCreature(list.getType("Creature"));
|
||||||
|
}
|
||||||
|
|
||||||
|
//Planeswalkers fall through to here, lands will fall through if there aren't very many
|
||||||
|
return AI_getCheapestPermanent(list, null, false);
|
||||||
|
}
|
||||||
|
|
||||||
public static Input input_targetCreaturePlayer(final SpellAbility spell, boolean targeted, boolean free) {
|
public static Input input_targetCreaturePlayer(final SpellAbility spell, boolean targeted, boolean free) {
|
||||||
return input_targetCreaturePlayer(spell, Command.Blank, targeted, free);
|
return input_targetCreaturePlayer(spell, Command.Blank, targeted, free);
|
||||||
}
|
}
|
||||||
@@ -4464,8 +4503,12 @@ public class CardFactoryUtil {
|
|||||||
* @return the worst land found based on the description above
|
* @return the worst land found based on the description above
|
||||||
*/
|
*/
|
||||||
public static Card getWorstLand(Player player) {
|
public static Card getWorstLand(Player player) {
|
||||||
Card worstLand = null;
|
|
||||||
CardList lands = AllZoneUtil.getPlayerLandsInPlay(player);
|
CardList lands = AllZoneUtil.getPlayerLandsInPlay(player);
|
||||||
|
return getWorstLand(lands);
|
||||||
|
}//end getWorstLand
|
||||||
|
|
||||||
|
public static Card getWorstLand(CardList lands) {
|
||||||
|
Card worstLand = null;
|
||||||
//first, check for tapped, basic lands
|
//first, check for tapped, basic lands
|
||||||
for( int i = 0; i < lands.size(); i++ ) {
|
for( int i = 0; i < lands.size(); i++ ) {
|
||||||
Card tmp = lands.get(i);
|
Card tmp = lands.get(i);
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class GameActionUtil {
|
|||||||
upkeep_Honden_of_Infinite_Rage();
|
upkeep_Honden_of_Infinite_Rage();
|
||||||
upkeep_Vensers_Journal();
|
upkeep_Vensers_Journal();
|
||||||
upkeep_Land_Tax();
|
upkeep_Land_Tax();
|
||||||
|
upkeep_Tangle_Wire();
|
||||||
upkeep_Mana_Vault();
|
upkeep_Mana_Vault();
|
||||||
upkeep_Feedback();
|
upkeep_Feedback();
|
||||||
upkeep_Farmstead();
|
upkeep_Farmstead();
|
||||||
@@ -10115,6 +10116,53 @@ public class GameActionUtil {
|
|||||||
}//foreach(Card)
|
}//foreach(Card)
|
||||||
}//upkeep_Shapeshifter
|
}//upkeep_Shapeshifter
|
||||||
|
|
||||||
|
private static void upkeep_Tangle_Wire() {
|
||||||
|
final Player player = AllZone.Phase.getPlayerTurn();
|
||||||
|
CardList wires = AllZoneUtil.getCardsInPlay("Tangle Wire");
|
||||||
|
|
||||||
|
for(final Card source:wires) {
|
||||||
|
SpellAbility ability = new Ability(source, "0") {
|
||||||
|
@Override
|
||||||
|
public void resolve() {
|
||||||
|
final int num = source.getCounters(Counters.FADE);
|
||||||
|
final CardList list = AllZoneUtil.getPlayerCardsInPlay(player).filter(new CardListFilter() {
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return (c.isArtifact() || c.isLand() || c.isEnchantment()) && c.isUntapped();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
for(int i = 0; i < num; i++) {
|
||||||
|
if(player.isComputer()) {
|
||||||
|
Card toTap = CardFactoryUtil.AI_getWorstPermanent(list, false, false, false, false);
|
||||||
|
if(null != toTap) {
|
||||||
|
toTap.tap();
|
||||||
|
list.remove(toTap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
AllZone.InputControl.setInput(new Input() {
|
||||||
|
private static final long serialVersionUID = 5313424586016061612L;
|
||||||
|
public void showMessage() {
|
||||||
|
if(list.size() == 0) stop();
|
||||||
|
AllZone.Display.showMessage(source.getName()+" - Select "+num+" untapped artifact(s), creature(s), or land(s) you control");
|
||||||
|
ButtonUtil.disableAll();
|
||||||
|
}
|
||||||
|
public void selectCard(Card card, PlayerZone zone) {
|
||||||
|
if(zone.is(Constant.Zone.Battlefield, AllZone.HumanPlayer) && list.contains(card)) {
|
||||||
|
card.tap();
|
||||||
|
list.remove(card);
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
ability.setStackDescription(source.getName()+" - "+player+" taps X artifacts, creatures or lands he or she controls.");
|
||||||
|
AllZone.Stack.add(ability);
|
||||||
|
}//foreach(wire)
|
||||||
|
}//upkeep_Tangle_Wire()
|
||||||
|
|
||||||
private static void upkeep_Pillory_of_the_Sleepless() {
|
private static void upkeep_Pillory_of_the_Sleepless() {
|
||||||
final Player player = AllZone.Phase.getPlayerTurn();
|
final Player player = AllZone.Phase.getPlayerTurn();
|
||||||
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||||
|
|||||||
Reference in New Issue
Block a user