mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Added Panglacial Wurm
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -9802,6 +9802,7 @@ forge-gui/res/cardsfolder/p/pallimud.txt svneol=native#text/plain
|
|||||||
forge-gui/res/cardsfolder/p/panacea.txt -text
|
forge-gui/res/cardsfolder/p/panacea.txt -text
|
||||||
forge-gui/res/cardsfolder/p/pandemonium.txt -text
|
forge-gui/res/cardsfolder/p/pandemonium.txt -text
|
||||||
forge-gui/res/cardsfolder/p/pang_tong_young_phoenix.txt svneol=native#text/plain
|
forge-gui/res/cardsfolder/p/pang_tong_young_phoenix.txt svneol=native#text/plain
|
||||||
|
forge-gui/res/cardsfolder/p/panglacial_wurm.txt -text
|
||||||
forge-gui/res/cardsfolder/p/pangosaur.txt svneol=native#text/plain
|
forge-gui/res/cardsfolder/p/pangosaur.txt svneol=native#text/plain
|
||||||
forge-gui/res/cardsfolder/p/panic.txt svneol=native#text/plain
|
forge-gui/res/cardsfolder/p/panic.txt svneol=native#text/plain
|
||||||
forge-gui/res/cardsfolder/p/panic_attack.txt svneol=native#text/plain
|
forge-gui/res/cardsfolder/p/panic_attack.txt svneol=native#text/plain
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ import forge.game.cost.Cost;
|
|||||||
import forge.game.mana.ManaCostBeingPaid;
|
import forge.game.mana.ManaCostBeingPaid;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.spellability.AbilitySub;
|
import forge.game.spellability.AbilitySub;
|
||||||
|
import forge.game.spellability.Spell;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
|
import forge.game.spellability.SpellAbilityRestriction;
|
||||||
import forge.game.spellability.SpellAbilityStackInstance;
|
import forge.game.spellability.SpellAbilityStackInstance;
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
import forge.util.Expressions;
|
import forge.util.Expressions;
|
||||||
@@ -1484,4 +1486,24 @@ public class AbilityUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final List<SpellAbility> getBasicSpellsFromPlayEffect(final Card tgtCard, final Player controller) {
|
||||||
|
List<SpellAbility> sas = new ArrayList<SpellAbility>();
|
||||||
|
for (SpellAbility s : tgtCard.getBasicSpells()) {
|
||||||
|
final Spell newSA = (Spell) s.copy();
|
||||||
|
newSA.setActivatingPlayer(controller);
|
||||||
|
SpellAbilityRestriction res = new SpellAbilityRestriction();
|
||||||
|
// timing restrictions still apply
|
||||||
|
res.setPlayerTurn(s.getRestrictions().getPlayerTurn());
|
||||||
|
res.setOpponentTurn(s.getRestrictions().getOpponentTurn());
|
||||||
|
res.setPhases(s.getRestrictions().getPhases());
|
||||||
|
res.setZone(null);
|
||||||
|
newSA.setRestrictions(res);
|
||||||
|
// timing restrictions still apply
|
||||||
|
if (res.checkTimingRestrictions(tgtCard, newSA) && newSA.checkOtherRestrictions()) {
|
||||||
|
sas.add(newSA);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sas;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -678,22 +678,8 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined && changeType != null)
|
|
||||||
fetchList = AbilityUtils.filterListByType(fetchList, sa.getParam("ChangeType"), sa);
|
|
||||||
|
|
||||||
if (searchedLibrary) {
|
|
||||||
if (decider.equals(player)) {
|
|
||||||
// should only count the number of searching player's own library
|
|
||||||
decider.incLibrarySearched();
|
|
||||||
}
|
|
||||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
|
||||||
runParams.put("Player", decider);
|
|
||||||
runParams.put("Target", Lists.newArrayList(player));
|
|
||||||
decider.getGame().getTriggerHandler().runTrigger(TriggerType.SearchedLibrary, runParams, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!defined) {
|
if (!defined) {
|
||||||
if (origin.contains(ZoneType.Library) && !defined && !sa.hasParam("NoLooking") && !decider.hasKeyword("CantSearchLibrary")) {
|
if (origin.contains(ZoneType.Library) && searchedLibrary) {
|
||||||
final int fetchNum = Math.min(player.getCardsIn(ZoneType.Library).size(), 4);
|
final int fetchNum = Math.min(player.getCardsIn(ZoneType.Library).size(), 4);
|
||||||
List<Card> shown = !decider.hasKeyword("LimitSearchLibrary") ? player.getCardsIn(ZoneType.Library) : player.getCardsIn(ZoneType.Library, fetchNum);
|
List<Card> shown = !decider.hasKeyword("LimitSearchLibrary") ? player.getCardsIn(ZoneType.Library) : player.getCardsIn(ZoneType.Library, fetchNum);
|
||||||
// Look at whole library before moving onto choosing a card
|
// Look at whole library before moving onto choosing a card
|
||||||
@@ -707,6 +693,37 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (searchedLibrary) {
|
||||||
|
if (decider.equals(player)) {
|
||||||
|
// should only count the number of searching player's own library
|
||||||
|
decider.incLibrarySearched();
|
||||||
|
// Panglacial Wurm
|
||||||
|
List<Card> canCastWhileSearching = CardLists.getKeyword(fetchList,
|
||||||
|
"While you're searching your library, you may cast CARDNAME from your library.");
|
||||||
|
for (final Card tgtCard : canCastWhileSearching) {
|
||||||
|
List<SpellAbility> sas = AbilityUtils.getBasicSpellsFromPlayEffect(tgtCard, decider);
|
||||||
|
if (sas.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SpellAbility tgtSA = decider.getController().getAbilityToPlay(sas);
|
||||||
|
if (!decider.getController().confirmAction(tgtSA, null, "Do you want to play " + tgtCard + "?")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// if played, that card cannot be found
|
||||||
|
if (decider.getController().playSaFromPlayEffect(tgtSA)) {
|
||||||
|
fetchList.remove(tgtCard);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||||
|
runParams.put("Player", decider);
|
||||||
|
runParams.put("Target", Lists.newArrayList(player));
|
||||||
|
decider.getGame().getTriggerHandler().runTrigger(TriggerType.SearchedLibrary, runParams, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!defined && changeType != null)
|
||||||
|
fetchList = AbilityUtils.filterListByType(fetchList, sa.getParam("ChangeType"), sa);
|
||||||
|
|
||||||
if (sa.hasParam("NoShuffle")) {
|
if (sa.hasParam("NoShuffle")) {
|
||||||
shuffleMandatory = false;
|
shuffleMandatory = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ import forge.game.ability.SpellAbilityEffect;
|
|||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
import forge.game.cost.Cost;
|
import forge.game.cost.Cost;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.spellability.Spell;
|
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
import forge.game.spellability.SpellAbilityRestriction;
|
|
||||||
import forge.game.zone.Zone;
|
import forge.game.zone.Zone;
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
import forge.item.PaperCard;
|
import forge.item.PaperCard;
|
||||||
@@ -179,22 +177,7 @@ public class PlayEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get basic spells (no flashback, etc.)
|
// get basic spells (no flashback, etc.)
|
||||||
ArrayList<SpellAbility> sas = new ArrayList<SpellAbility>();
|
List<SpellAbility> sas = AbilityUtils.getBasicSpellsFromPlayEffect(tgtCard, controller);
|
||||||
for (SpellAbility s : tgtCard.getBasicSpells()) {
|
|
||||||
final Spell newSA = (Spell) s.copy();
|
|
||||||
newSA.setActivatingPlayer(controller);
|
|
||||||
SpellAbilityRestriction res = new SpellAbilityRestriction();
|
|
||||||
// timing restrictions still apply
|
|
||||||
res.setPlayerTurn(s.getRestrictions().getPlayerTurn());
|
|
||||||
res.setOpponentTurn(s.getRestrictions().getOpponentTurn());
|
|
||||||
res.setPhases(s.getRestrictions().getPhases());
|
|
||||||
res.setZone(null);
|
|
||||||
newSA.setRestrictions(res);
|
|
||||||
// timing restrictions still apply
|
|
||||||
if (res.checkTimingRestrictions(tgtCard, newSA) && newSA.checkOtherRestrictions()) {
|
|
||||||
sas.add(newSA);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (sas.isEmpty()) {
|
if (sas.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
8
forge-gui/res/cardsfolder/p/panglacial_wurm.txt
Normal file
8
forge-gui/res/cardsfolder/p/panglacial_wurm.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Name:Panglacial Wurm
|
||||||
|
ManaCost:5 G G
|
||||||
|
Types:Creature Wurm
|
||||||
|
PT:9/5
|
||||||
|
K:Trample
|
||||||
|
K:While you're searching your library, you may cast CARDNAME from your library.
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/panglacial_wurm.jpg
|
||||||
|
Oracle:Trample\nWhile you're searching your library, you may cast Panglacial Wurm from your library.
|
||||||
Reference in New Issue
Block a user