mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
add Power Sink (from original base Alpha)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -3811,6 +3811,7 @@ res/cardsfolder/pouncing_jaguar.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/power_armor.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/power_artifact.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/power_matrix.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/power_sink.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/power_surge.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/pradesh_gypsies.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/predator_dragon.txt -text svneol=native#text/plain
|
||||
|
||||
10
res/cardsfolder/power_sink.txt
Normal file
10
res/cardsfolder/power_sink.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Name:Power Sink
|
||||
ManaCost:X U
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$Counter | Cost$ X U | Type$ Spell | UnlessCost$ X |PowerSink$True| SpellDescription$ Counter target spell unless its controller pays X. If he or she doesn't, that player taps all lands with mana abilities he or she controls and empties his or her mana pool.
|
||||
SVar:X:Count$xPaid
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/power_sink.jpg
|
||||
End
|
||||
@@ -143,6 +143,7 @@ public class AbilityFactory_CounterMagic {
|
||||
|
||||
public void execute() {
|
||||
removeFromStack(tgtSA,sa);
|
||||
if(params.containsKey("PowerSink")) doPowerSink(AllZone.HumanPlayer);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -153,6 +154,7 @@ public class AbilityFactory_CounterMagic {
|
||||
if(ComputerUtil.canPayCost(ability)) ComputerUtil.playNoStack(ability);
|
||||
else {
|
||||
removeFromStack(tgtSA,sa);
|
||||
if(params.containsKey("PowerSink")) doPowerSink(AllZone.ComputerPlayer);
|
||||
}
|
||||
}
|
||||
doExtraActions(tgtSA,sa);
|
||||
@@ -181,6 +183,21 @@ public class AbilityFactory_CounterMagic {
|
||||
tgt[0] = null;
|
||||
|
||||
}
|
||||
|
||||
private void doPowerSink(Player p) {
|
||||
//get all lands with mana abilities
|
||||
CardList lands = AllZoneUtil.getPlayerLandsInPlay(p);
|
||||
lands = lands.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.getManaAbility().size() > 0;
|
||||
}
|
||||
});
|
||||
//tap them
|
||||
for(Card c:lands) c.tap();
|
||||
|
||||
//empty mana pool
|
||||
if(p.isHuman()) AllZone.ManaPool.clearPool();
|
||||
}
|
||||
|
||||
private String counterStackDescription(AbilityFactory af, SpellAbility sa){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user