mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Added Time and Tide, Amulet of Quoz
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -264,6 +264,7 @@ res/cardsfolder/a/amrou_scout.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/amrou_seekers.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/amugaba.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/amulet_of_kroog.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/amulet_of_quoz.txt -text
|
||||
res/cardsfolder/a/amulet_of_unmaking.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/amulet_of_vigor.txt svneol=native#text/plain
|
||||
res/cardsfolder/a/an_havva_constable.txt svneol=native#text/plain
|
||||
@@ -11348,6 +11349,7 @@ res/cardsfolder/t/timbermare.txt svneol=native#text/plain
|
||||
res/cardsfolder/t/timbermaw_larva.txt svneol=native#text/plain
|
||||
res/cardsfolder/t/timberpack_wolf.txt -text
|
||||
res/cardsfolder/t/timberwatch_elf.txt svneol=native#text/plain
|
||||
res/cardsfolder/t/time_and_tide.txt -text
|
||||
res/cardsfolder/t/time_bomb.txt svneol=native#text/plain
|
||||
res/cardsfolder/t/time_ebb.txt svneol=native#text/plain
|
||||
res/cardsfolder/t/time_elemental.txt svneol=native#text/plain
|
||||
|
||||
13
res/cardsfolder/a/amulet_of_quoz.txt
Normal file
13
res/cardsfolder/a/amulet_of_quoz.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
Name:Amulet of Quoz
|
||||
ManaCost:6
|
||||
Types:Artifact
|
||||
K:Remove CARDNAME from your deck before playing if you're not playing for ante.
|
||||
A:AB$ Mill | Cost$ T Sac<1/CARDNAME> | ValidTgts$ Opponent | Destination$ Ante | NumCards$ 1 | RememberMilled$ True | Optional$ True | SubAbility$ DBFlip | PlayerTurn$ True | ActivationPhases$ Upkeep | SpellDescription$ Target opponent may add the top card of his or her library to the ante. If he or she doesn't, you flip a coin. If you win the flip, that player loses the game. If you lose the flip, you lose the game. Activate this ability only during your upkeep.
|
||||
SVar:DBFlip:DB$ FlipACoin | Caller$ You | WinSubAbility$ OppLoseGame | LoseSubAbility$ YouLoseGame | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 | SubAbility$ DBCleanup
|
||||
SVar:OppLoseGame:DB$ LosesGame | Defined$ Targeted
|
||||
SVar:YouLoseGame:DB$ LosesGame | Defined$ You
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:RemAIDeck:True
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/amulet_of_quoz.jpg
|
||||
Oracle:Remove Amulet of Quoz from your deck before playing if you're not playing for ante.\n{T}, Sacrifice Amulet of Quoz: Target opponent may add the top card of his or her library to the ante. If he or she doesn't, you flip a coin. If you win the flip, that player loses the game. If you lose the flip, you lose the game. Activate this ability only during your upkeep.
|
||||
6
res/cardsfolder/t/time_and_tide.txt
Normal file
6
res/cardsfolder/t/time_and_tide.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Name:Time and Tide
|
||||
ManaCost:U U
|
||||
Types:Instant
|
||||
A:SP$ Phases | Cost$ U U | AllValid$ Creature | PhaseInOrOutAll$ True | SpellDescription$ Simultaneously, all phased-out creatures phase in and all creatures with phasing phase out.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/time_and_tide.jpg
|
||||
Oracle:Simultaneously, all phased-out creatures phase in and all creatures with phasing phase out.
|
||||
@@ -14,6 +14,7 @@ import forge.game.ai.ComputerUtilCost;
|
||||
import forge.game.ai.ComputerUtilMana;
|
||||
import forge.game.phase.PhaseType;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.player.PlayerActionConfirmMode;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.util.MyRandom;
|
||||
|
||||
@@ -155,4 +156,11 @@ public class MillAi extends SpellAbilityAi {
|
||||
|
||||
return true;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see forge.card.ability.SpellAbilityAi#confirmAction(forge.game.player.Player, forge.card.spellability.SpellAbility, forge.game.player.PlayerActionConfirmMode, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean confirmAction(Player player, SpellAbility sa, PlayerActionConfirmMode mode, String message) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,12 @@ public class MillEffect extends SpellAbilityEffect {
|
||||
|
||||
for (final Player p : getTargetPlayers(sa)) {
|
||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||
if (sa.hasParam("Optional")) {
|
||||
final String prompt = String.format("Do you want to put card(s) from library to %s?", destination);
|
||||
if (!p.getController().confirmAction(sa, null, prompt)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
final List<Card> milled = p.mill(numCards, destination, bottom);
|
||||
if (destination.equals(ZoneType.Exile) && sa.hasParam("ExileFaceDown")) {
|
||||
for (final Card c : milled) {
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
package forge.card.ability.effects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import forge.Card;
|
||||
import forge.card.ability.AbilityUtils;
|
||||
import forge.card.ability.SpellAbilityEffect;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.game.Game;
|
||||
import forge.game.zone.ZoneType;
|
||||
|
||||
public class PhasesEffect extends SpellAbilityEffect {
|
||||
|
||||
@@ -35,13 +39,31 @@ public class PhasesEffect extends SpellAbilityEffect {
|
||||
* </p>
|
||||
* @param sa
|
||||
* a {@link forge.card.spellability.SpellAbility} object.
|
||||
* @param af
|
||||
* a {@link forge.card.ability.AbilityFactory} object.
|
||||
*/
|
||||
@Override
|
||||
public void resolve(SpellAbility sa) {
|
||||
final List<Card> tgtCards = getTargetCards(sa);
|
||||
List<Card> tgtCards = new ArrayList<Card>();
|
||||
final Game game = sa.getActivatingPlayer().getGame();
|
||||
final Card source = sa.getSourceCard();
|
||||
final boolean phaseInOrOut = sa.hasParam("PhaseInOrOutAll");
|
||||
|
||||
if (sa.hasParam("AllValid")) {
|
||||
if (phaseInOrOut) {
|
||||
tgtCards = game.getCardsIncludePhasingIn(ZoneType.Battlefield);
|
||||
} else {
|
||||
tgtCards = game.getCardsIn(ZoneType.Battlefield);
|
||||
}
|
||||
tgtCards = AbilityUtils.filterListByType(tgtCards, sa.getParam("AllValid"), sa);
|
||||
} else if (sa.hasParam("Defined")) {
|
||||
tgtCards = AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa);
|
||||
} else {
|
||||
tgtCards = getTargetCards(sa);
|
||||
}
|
||||
if (phaseInOrOut) { // Time and Tide
|
||||
for (final Card tgtC : tgtCards) {
|
||||
tgtC.phase();
|
||||
}
|
||||
} else { // just phase out
|
||||
for (final Card tgtC : tgtCards) {
|
||||
if (!tgtC.isPhasedOut()) {
|
||||
tgtC.phase();
|
||||
@@ -49,3 +71,4 @@ public class PhasesEffect extends SpellAbilityEffect {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,6 +361,18 @@ public class Game {
|
||||
}
|
||||
}
|
||||
|
||||
public List<Card> getCardsIncludePhasingIn(final ZoneType zone) {
|
||||
if (zone == ZoneType.Stack) {
|
||||
return getStackZone().getCards();
|
||||
} else {
|
||||
List<Card> cards = new ArrayList<Card>();
|
||||
for (final Player p : getPlayers()) {
|
||||
cards.addAll(p.getCardsIncludePhasingIn(zone));
|
||||
}
|
||||
return cards;
|
||||
}
|
||||
}
|
||||
|
||||
public List<Card> getCardsIn(final Iterable<ZoneType> zones) {
|
||||
final List<Card> cards = new ArrayList<Card>();
|
||||
for (final ZoneType z : zones) {
|
||||
|
||||
Reference in New Issue
Block a user