mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
*Converted Planar deck and Scheme deck to zones.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -7669,6 +7669,7 @@ res/cardsfolder/o/orzhov_guildmage.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/o/orzhov_keyrune.txt -text
|
res/cardsfolder/o/orzhov_keyrune.txt -text
|
||||||
res/cardsfolder/o/orzhov_pontiff.txt -text
|
res/cardsfolder/o/orzhov_pontiff.txt -text
|
||||||
res/cardsfolder/o/orzhov_signet.txt svneol=native#text/plain
|
res/cardsfolder/o/orzhov_signet.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/o/orzhova.txt -text
|
||||||
res/cardsfolder/o/orzhova_the_church_of_deals.txt svneol=native#text/plain
|
res/cardsfolder/o/orzhova_the_church_of_deals.txt svneol=native#text/plain
|
||||||
res/cardsfolder/o/osai_vultures.txt -text svneol=unset#text/plain
|
res/cardsfolder/o/osai_vultures.txt -text svneol=unset#text/plain
|
||||||
res/cardsfolder/o/ostiary_thrull.txt svneol=native#text/plain
|
res/cardsfolder/o/ostiary_thrull.txt svneol=native#text/plain
|
||||||
|
|||||||
12
res/cardsfolder/o/orzhova.txt
Normal file
12
res/cardsfolder/o/orzhova.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Name:Orzhova
|
||||||
|
ManaCost:no cost
|
||||||
|
Types:Plane Ravnica
|
||||||
|
Text:no text
|
||||||
|
T:Mode$ PlaneswalkedFrom | ValidCard$ Plane.Self | Execute$ OrzhovaDeal | TriggerDescription$ When you planeswalk away from CARDNAME, each player returns all creature cards from his or her graveyard to the battlefield.
|
||||||
|
SVar:OrzhovaDeal:DB$ ChangeZoneAll | Origin$ Graveyard | Destination$ Battlefield | ChangeType$ Creature
|
||||||
|
T:Mode$ PlanarDice | Result$ Chaos | TriggerZones$ Command | Execute$ RolledChaos | TriggerDescription$ Whenever you roll Chaos, for each opponent, exile up to one target creature card from that player's graveyard.
|
||||||
|
SVar:RolledChaos:AB$ ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Exile | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature each opponent controls. | TargetMin$ 0 | TargetMax$ OneEach | References$ OneEach | TargetsWithDifferentControllers$ True
|
||||||
|
SVar:OneEach:PlayerCountOpponents$Amount
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/orzhova.jpg
|
||||||
|
SetInfo:PC2 Common
|
||||||
|
Oracle:When you planeswalk away from Orzhova, each player returns all creature cards from his or her graveyard to the battlefield.\nWhenever you roll {C}, for each opponent, exile up to one target creature card from that player's graveyard.
|
||||||
@@ -211,8 +211,12 @@ public class TriggerHandler {
|
|||||||
// This is done to allow the list of triggers to be modified while
|
// This is done to allow the list of triggers to be modified while
|
||||||
// triggers are running.
|
// triggers are running.
|
||||||
final ArrayList<Trigger> delayedTriggersWorkingCopy = new ArrayList<Trigger>(this.delayedTriggers);
|
final ArrayList<Trigger> delayedTriggersWorkingCopy = new ArrayList<Trigger>(this.delayedTriggers);
|
||||||
List<Card> allCards = game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES);
|
List<Card> allCards = new ArrayList<Card>();
|
||||||
allCards.addAll(game.getCardsIn(ZoneType.Stack));
|
for(Player p : game.getPlayers())
|
||||||
|
{
|
||||||
|
allCards.addAll(p.getAllCards());
|
||||||
|
}
|
||||||
|
//allCards.addAll(game.getCardsIn(ZoneType.Stack));
|
||||||
boolean checkStatics = false;
|
boolean checkStatics = false;
|
||||||
|
|
||||||
// Static triggers
|
// Static triggers
|
||||||
@@ -233,7 +237,7 @@ public class TriggerHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AP
|
// AP
|
||||||
allCards = playerAP.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES);
|
allCards = playerAP.getAllCards();
|
||||||
allCards.addAll(CardLists.filterControlledBy(game.getCardsIn(ZoneType.Stack), playerAP));
|
allCards.addAll(CardLists.filterControlledBy(game.getCardsIn(ZoneType.Stack), playerAP));
|
||||||
// add cards that move to hidden zones
|
// add cards that move to hidden zones
|
||||||
if (runParams.containsKey("Destination") && runParams.containsKey("Card")) {
|
if (runParams.containsKey("Destination") && runParams.containsKey("Card")) {
|
||||||
@@ -266,7 +270,7 @@ public class TriggerHandler {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
allCards = nap.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES);
|
allCards = nap.getAllCards();
|
||||||
allCards.addAll(CardLists.filterControlledBy(game.getCardsIn(ZoneType.Stack), nap));
|
allCards.addAll(CardLists.filterControlledBy(game.getCardsIn(ZoneType.Stack), nap));
|
||||||
// add cards that move to hidden zones
|
// add cards that move to hidden zones
|
||||||
if (runParams.containsKey("Destination") && runParams.containsKey("Card")) {
|
if (runParams.containsKey("Destination") && runParams.containsKey("Card")) {
|
||||||
|
|||||||
@@ -73,12 +73,24 @@ public class GameNew {
|
|||||||
// Schemes
|
// Schemes
|
||||||
List<Card> sd = new ArrayList<Card>();
|
List<Card> sd = new ArrayList<Card>();
|
||||||
for(IPaperCard cp : psc.getSchemes(player)) sd.add(cp.toForgeCard(player));
|
for(IPaperCard cp : psc.getSchemes(player)) sd.add(cp.toForgeCard(player));
|
||||||
if ( !sd.isEmpty()) player.setSchemeDeck(sd);
|
if ( !sd.isEmpty()) {
|
||||||
|
for(Card c : sd) {
|
||||||
|
player.getZone(ZoneType.SchemeDeck).add(c);
|
||||||
|
}
|
||||||
|
player.getZone(ZoneType.SchemeDeck).shuffle();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Planes
|
// Planes
|
||||||
List<Card> l = new ArrayList<Card>();
|
List<Card> l = new ArrayList<Card>();
|
||||||
for(IPaperCard cp : psc.getPlanes(player)) l.add(cp.toForgeCard(player));
|
for(IPaperCard cp : psc.getPlanes(player)) l.add(cp.toForgeCard(player));
|
||||||
if ( !l.isEmpty() ) player.setPlanarDeck(l);
|
if ( !l.isEmpty() ) {
|
||||||
|
for(Card c : l) {
|
||||||
|
player.getZone(ZoneType.PlanarDeck).add(c);
|
||||||
|
}
|
||||||
|
player.getZone(ZoneType.PlanarDeck).shuffle();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Set<CardPrinted> getRemovedAnteCards(Deck toUse) {
|
private static Set<CardPrinted> getRemovedAnteCards(Deck toUse) {
|
||||||
|
|||||||
@@ -571,47 +571,6 @@ public class GameState {
|
|||||||
public void setActivePlane(Card activePlane0) {
|
public void setActivePlane(Card activePlane0) {
|
||||||
this.activePlane = activePlane0;
|
this.activePlane = activePlane0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Currently unused. Base for the Single Planar deck option. (Rule 901.15)
|
|
||||||
*/
|
|
||||||
public void setCommunalPlaneDeck(List<Card> deck) {
|
|
||||||
communalPlanarDeck.clear();
|
|
||||||
communalPlanarDeck.addAll(deck);
|
|
||||||
CardLists.shuffle(communalPlanarDeck);
|
|
||||||
|
|
||||||
for(Player p : roIngamePlayers)
|
|
||||||
{
|
|
||||||
p.setPlanarDeck(communalPlanarDeck);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Currently unused. Base for the Single Planar deck option. (Rule 901.15)
|
|
||||||
*/
|
|
||||||
public void initCommunalPlane()
|
|
||||||
{
|
|
||||||
getTriggerHandler().suppressMode(TriggerType.PlaneswalkedTo);
|
|
||||||
Card firstPlane = null;
|
|
||||||
while(true)
|
|
||||||
{
|
|
||||||
firstPlane = communalPlanarDeck.get(0);
|
|
||||||
communalPlanarDeck.remove(0);
|
|
||||||
if(firstPlane.getType().contains("Phenomenon"))
|
|
||||||
{
|
|
||||||
communalPlanarDeck.add(firstPlane);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.getPhaseHandler().getPlayerTurn().getZone(ZoneType.Command).add(firstPlane);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getTriggerHandler().clearSuppression(TriggerType.PlaneswalkedTo);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void archenemy904_10() {
|
public void archenemy904_10() {
|
||||||
//904.10. If a non-ongoing scheme card is face up in the
|
//904.10. If a non-ongoing scheme card is face up in the
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
/** The Constant ALL_ZONES. */
|
/** The Constant ALL_ZONES. */
|
||||||
public static final List<ZoneType> ALL_ZONES = Collections.unmodifiableList(Arrays.asList(ZoneType.Battlefield,
|
public static final List<ZoneType> ALL_ZONES = Collections.unmodifiableList(Arrays.asList(ZoneType.Battlefield,
|
||||||
ZoneType.Library, ZoneType.Graveyard, ZoneType.Hand, ZoneType.Exile, ZoneType.Command, ZoneType.Ante,
|
ZoneType.Library, ZoneType.Graveyard, ZoneType.Hand, ZoneType.Exile, ZoneType.Command, ZoneType.Ante,
|
||||||
ZoneType.Sideboard));
|
ZoneType.Sideboard, ZoneType.PlanarDeck,ZoneType.SchemeDeck));
|
||||||
|
|
||||||
protected final GameState game;
|
protected final GameState game;
|
||||||
|
|
||||||
@@ -2968,9 +2968,9 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public void planeswalk()
|
public void planeswalk()
|
||||||
{
|
{
|
||||||
|
|
||||||
currentPlane = planarDeck.get(0);
|
currentPlane = getZone(ZoneType.PlanarDeck).get(0);
|
||||||
|
|
||||||
planarDeck.remove(0);
|
getZone(ZoneType.PlanarDeck).remove(currentPlane);
|
||||||
getZone(ZoneType.Command).add(currentPlane);
|
getZone(ZoneType.Command).add(currentPlane);
|
||||||
|
|
||||||
game.setActivePlane(currentPlane);
|
game.setActivePlane(currentPlane);
|
||||||
@@ -2996,17 +2996,11 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
Zone com = game.getZoneOf(currentPlane);
|
Zone com = game.getZoneOf(currentPlane);
|
||||||
com.remove(currentPlane);
|
com.remove(currentPlane);
|
||||||
currentPlane.clearControllers();
|
currentPlane.clearControllers();
|
||||||
planarDeck.add(currentPlane);
|
getZone(ZoneType.PlanarDeck).add(currentPlane);
|
||||||
currentPlane = null;
|
currentPlane = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPlanarDeck(List<Card> pd)
|
|
||||||
{
|
|
||||||
planarDeck = pd;
|
|
||||||
Collections.shuffle(planarDeck);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Sets up the first plane of a round.
|
* Sets up the first plane of a round.
|
||||||
@@ -3016,11 +3010,11 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
Card firstPlane = null;
|
Card firstPlane = null;
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
firstPlane = planarDeck.get(0);
|
firstPlane = getZone(ZoneType.PlanarDeck).get(0);
|
||||||
planarDeck.remove(0);
|
getZone(ZoneType.PlanarDeck).remove(firstPlane);
|
||||||
if(firstPlane.getType().contains("Phenomenon"))
|
if(firstPlane.getType().contains("Phenomenon"))
|
||||||
{
|
{
|
||||||
planarDeck.add(firstPlane);
|
getZone(ZoneType.PlanarDeck).add(firstPlane);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -372,4 +372,8 @@ public class Zone extends MyObservable implements IZone, Observer, java.io.Seria
|
|||||||
public void updateLabelObservers() {
|
public void updateLabelObservers() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void shuffle()
|
||||||
|
{
|
||||||
|
Collections.shuffle(cardList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ public enum ZoneType {
|
|||||||
Command(false),
|
Command(false),
|
||||||
Stack(false),
|
Stack(false),
|
||||||
Sideboard(true),
|
Sideboard(true),
|
||||||
Ante(false);
|
Ante(false),
|
||||||
|
SchemeDeck(true),
|
||||||
|
PlanarDeck(true);
|
||||||
|
|
||||||
public static final List<ZoneType> STATIC_ABILITIES_SOURCE_ZONES = Arrays.asList(new ZoneType[]{Battlefield, Graveyard, Exile, Command/*, Hand*/});
|
public static final List<ZoneType> STATIC_ABILITIES_SOURCE_ZONES = Arrays.asList(new ZoneType[]{Battlefield, Graveyard, Exile, Command/*, Hand*/});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user