mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
*Added Archive Trap
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -441,6 +441,7 @@ res/cardsfolder/a/archangels_light.txt -text
|
||||
res/cardsfolder/a/archdemon_of_unx.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/archery_training.txt -text
|
||||
res/cardsfolder/a/architects_of_will.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/archive_trap.txt -text
|
||||
res/cardsfolder/a/archivist.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/archmage_ascension.txt -text
|
||||
res/cardsfolder/a/archon_of_justice.txt svneol=native#text/plain
|
||||
|
||||
9
res/cardsfolder/a/archive_trap.txt
Normal file
9
res/cardsfolder/a/archive_trap.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Archive Trap
|
||||
ManaCost:3 U U
|
||||
Types:Instant Trap
|
||||
A:SP$ Mill | Cost$ 3 U U | NumCards$ 13 | ValidTgts$ Opponent | TgtPrompt$ Choose an opponent | SpellDescription$ Target opponent puts the top three cards of his or her library into his or her graveyard.
|
||||
A:SP$ Mill | Cost$ 0 | CheckSVar$ TrapTrigger | NumCards$ 13 | ValidTgts$ Opponent | TgtPrompt$ Choose an opponent | CostDesc$ If an opponent searched his or her library this turn, you may pay 0 rather than pay CARDNAME's mana cost. | SpellDescription$
|
||||
SVar:TrapTrigger:Count$SearchedLibrary.Opponent
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/archive_trap.jpg
|
||||
Oracle:If an opponent searched his or her library this turn, you may pay {0} rather than pay Archive Trap's mana cost.\nTarget opponent puts the top thirteen cards of his or her library into his or her graveyard.
|
||||
SetInfo:ZEN Rare
|
||||
@@ -1199,6 +1199,17 @@ public class AbilityUtils {
|
||||
return CardFactoryUtil.doXMath(Integer.parseInt(sq[2]), expr, c); // not Kicked
|
||||
}
|
||||
}
|
||||
|
||||
//Count$SearchedLibrary.<DefinedPlayer>
|
||||
if(sq[0].contains("SearchedLibrary")) {
|
||||
int sum = 0;
|
||||
for(Player p : AbilityUtils.getDefinedPlayers(c, sq[1], sa))
|
||||
{
|
||||
sum += p.getLibrarySearched();
|
||||
}
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
// Count$Compare <int comparator value>.<True>.<False>
|
||||
if (sq[0].startsWith("Compare")) {
|
||||
|
||||
@@ -1089,6 +1089,10 @@ public class ChangeZoneAi extends SpellAbilityAi {
|
||||
if (sa.hasParam("Origin")) {
|
||||
origin = ZoneType.listValueOf(sa.getParam("Origin"));
|
||||
}
|
||||
|
||||
if(origin.contains(ZoneType.Library)) {
|
||||
sa.getActivatingPlayer().incLibrarySearched();
|
||||
}
|
||||
|
||||
String type = sa.getParam("ChangeType");
|
||||
if (type == null) {
|
||||
|
||||
@@ -40,6 +40,10 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect {
|
||||
public void resolve(SpellAbility sa) {
|
||||
final ZoneType destination = ZoneType.smartValueOf(sa.getParam("Destination"));
|
||||
final List<ZoneType> origin = ZoneType.listValueOf(sa.getParam("Origin"));
|
||||
|
||||
if(origin.contains(ZoneType.Library)) {
|
||||
sa.getActivatingPlayer().incLibrarySearched();
|
||||
}
|
||||
|
||||
List<Card> cards = new ArrayList<Card>();
|
||||
|
||||
|
||||
@@ -634,6 +634,11 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
||||
if (sa.hasParam("Origin")) {
|
||||
origin = ZoneType.listValueOf(sa.getParam("Origin"));
|
||||
}
|
||||
|
||||
if(origin.contains(ZoneType.Library)) {
|
||||
sa.getActivatingPlayer().incLibrarySearched();
|
||||
}
|
||||
|
||||
ZoneType destination = ZoneType.smartValueOf(sa.getParam("Destination"));
|
||||
// this needs to be zero indexed. Top = 0, Third = 2
|
||||
int libraryPos = sa.hasParam("LibraryPosition") ? Integer.parseInt(sa.getParam("LibraryPosition")) : 0;
|
||||
|
||||
@@ -1373,6 +1373,8 @@ public class CardFactoryUtil {
|
||||
if (sq[0].contains("LowestLibrary")) {
|
||||
return Aggregates.min(cc.getGame().getPlayers(), Player.Accessors.countCardsInZone(ZoneType.Library));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Count$Chroma.<mana letter>
|
||||
if (sq[0].contains("Chroma")) {
|
||||
|
||||
@@ -633,6 +633,7 @@ public class PhaseHandler implements java.io.Serializable {
|
||||
p.resetProwl();
|
||||
p.setLifeLostThisTurn(0);
|
||||
p.setLifeGainedThisTurn(0);
|
||||
p.setLibrarySearched(0);
|
||||
|
||||
p.removeKeyword("At the beginning of this turn's end step, you lose the game.");
|
||||
p.removeKeyword("Skip the untap step of this turn.");
|
||||
|
||||
@@ -106,6 +106,9 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
|
||||
/** The num power surge lands. */
|
||||
private int numPowerSurgeLands;
|
||||
|
||||
/** The number of times this player has searched his library. */
|
||||
private int numLibrarySearched = 0;
|
||||
|
||||
/** The prowl. */
|
||||
private ArrayList<String> prowl = new ArrayList<String>();
|
||||
@@ -2262,6 +2265,17 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
public final void resetProwl() {
|
||||
this.prowl = new ArrayList<String>();
|
||||
}
|
||||
|
||||
public final void setLibrarySearched(final int l) {
|
||||
this.numLibrarySearched = l;
|
||||
}
|
||||
|
||||
public final int getLibrarySearched() {
|
||||
return this.numLibrarySearched;
|
||||
}
|
||||
public final void incLibrarySearched() {
|
||||
this.numLibrarySearched++;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
Reference in New Issue
Block a user