mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Added Pygmy Hippo
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -10463,6 +10463,7 @@ forge-gui/res/cardsfolder/p/putrid_leech.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/p/putrid_raptor.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/p/putrid_warrior.txt -text svneol=unset#text/plain
|
||||
forge-gui/res/cardsfolder/p/pygmy_allosaurus.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/p/pygmy_hippo.txt -text
|
||||
forge-gui/res/cardsfolder/p/pygmy_kavu.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/p/pygmy_pyrosaur.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/p/pygmy_razorback.txt svneol=native#text/plain
|
||||
|
||||
@@ -8,6 +8,7 @@ import forge.game.spellability.TargetRestrictions;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DrainManaEffect extends SpellAbilityEffect {
|
||||
@@ -26,16 +27,21 @@ public class DrainManaEffect extends SpellAbilityEffect {
|
||||
@Override
|
||||
public void resolve(SpellAbility sa) {
|
||||
final TargetRestrictions tgt = sa.getTargetRestrictions();
|
||||
List<Mana> drained = new ArrayList<Mana>();
|
||||
|
||||
for (final Player p : getTargetPlayers(sa)) {
|
||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||
List<Mana> drained = p.getManaPool().clearPool(false);
|
||||
drained.addAll(p.getManaPool().clearPool(false));
|
||||
}
|
||||
}
|
||||
|
||||
if (sa.hasParam("DrainMana")) {
|
||||
for (Mana mana : drained) {
|
||||
sa.getActivatingPlayer().getManaPool().addMana(mana);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sa.hasParam("RememberDrainedMana")) {
|
||||
sa.getHostCard().addRemembered((Integer) drained.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
15
forge-gui/res/cardsfolder/p/pygmy_hippo.txt
Normal file
15
forge-gui/res/cardsfolder/p/pygmy_hippo.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
Name:Pygmy Hippo
|
||||
ManaCost:G U
|
||||
Types:Creature Hippo
|
||||
PT:2/2
|
||||
T:Mode$ AttackerUnblocked | ValidCard$ Card.Self | Execute$ TrigActivateManaAbility | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME attacks and isn't blocked, you may have defending player activate a mana ability of each land he or she controls and empty his or her mana pool. If you do, CARDNAME assigns no combat damage this turn and at the beginning of your postcombat main phase, you add {X} to your mana pool, where X is the amount of mana emptied from defending player's mana pool this way.
|
||||
SVar:TrigActivateManaAbility:AB$ ActivateAbility | Cost$ 0 | Defined$ DefendingPlayer | Type$ Land | ManaAbility$ True | SubAbility$ DBEmptyPool
|
||||
SVar:DBEmptyPool:DB$ DrainMana | Defined$ DefendingPlayer | SubAbility$ DBPump | RememberDrainedMana$ True
|
||||
SVar:DBPump:DB$ Pump | Defined$ Self | KW$ HIDDEN CARDNAME assigns no combat damage | SubAbility$ DBDelTrig
|
||||
SVar:DBDelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Main2 | Execute$ TrigAddMana | TriggerDescription$ At the beginning of your postcombat main phase, you add {X} to your mana pool, where X is the amount of mana emptied from defending player's mana pool this way| SubAbility$ DBCleanup | RememberNumber$ True
|
||||
SVar:TrigAddMana:DB$ Mana | Produced$ 1 | Amount$ X | References$ X
|
||||
SVar:X:Count$TriggerRememberAmount
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/pygmy_hippo.jpg
|
||||
Oracle:Whenever Pygmy Hippo attacks and isn't blocked, you may have defending player activate a mana ability of each land he or she controls and empty his or her mana pool. If you do, Pygmy Hippo assigns no combat damage this turn and at the beginning of your postcombat main phase, you add {X} to your mana pool, where X is the amount of mana emptied from defending player's mana pool this way.
|
||||
Reference in New Issue
Block a user