mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Minor card fixes
This commit is contained in:
@@ -1819,7 +1819,7 @@ public class AiController {
|
|||||||
// AI would play everything. But limits to one copy of (Leyline of Singularity) and (Gemstone Caverns)
|
// AI would play everything. But limits to one copy of (Leyline of Singularity) and (Gemstone Caverns)
|
||||||
|
|
||||||
List<SpellAbility> result = Lists.newArrayList();
|
List<SpellAbility> result = Lists.newArrayList();
|
||||||
for(SpellAbility sa : usableFromOpeningHand) {
|
for (SpellAbility sa : usableFromOpeningHand) {
|
||||||
// Is there a better way for the AI to decide this?
|
// Is there a better way for the AI to decide this?
|
||||||
if (doTrigger(sa, false)) {
|
if (doTrigger(sa, false)) {
|
||||||
result.add(sa);
|
result.add(sa);
|
||||||
@@ -1830,7 +1830,7 @@ public class AiController {
|
|||||||
SpellAbility saGemstones = null;
|
SpellAbility saGemstones = null;
|
||||||
|
|
||||||
List<SpellAbility> toRemove = Lists.newArrayList();
|
List<SpellAbility> toRemove = Lists.newArrayList();
|
||||||
for(SpellAbility sa : result) {
|
for (SpellAbility sa : result) {
|
||||||
String srcName = sa.getHostCard().getName();
|
String srcName = sa.getHostCard().getName();
|
||||||
if ("Gemstone Caverns".equals(srcName)) {
|
if ("Gemstone Caverns".equals(srcName)) {
|
||||||
if (saGemstones == null)
|
if (saGemstones == null)
|
||||||
|
|||||||
@@ -788,7 +788,6 @@ public class ComputerUtilMana {
|
|||||||
String manaProduced = ignoreColor || ignoreType ? MagicColor.toShortString(toPay.getColorMask())
|
String manaProduced = ignoreColor || ignoreType ? MagicColor.toShortString(toPay.getColorMask())
|
||||||
: predictManafromSpellAbility(saPayment, ai, toPay);
|
: predictManafromSpellAbility(saPayment, ai, toPay);
|
||||||
|
|
||||||
// System.out.println(manaProduced);
|
|
||||||
payMultipleMana(cost, manaProduced, ai);
|
payMultipleMana(cost, manaProduced, ai);
|
||||||
|
|
||||||
// remove from available lists
|
// remove from available lists
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ public class CountersRemoveAi extends SpellAbilityAi {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected boolean checkApiLogic(Player ai, SpellAbility sa) {
|
protected boolean checkApiLogic(Player ai, SpellAbility sa) {
|
||||||
|
|
||||||
final String type = sa.getParam("CounterType");
|
final String type = sa.getParam("CounterType");
|
||||||
|
|
||||||
if (sa.usesTargeting()) {
|
if (sa.usesTargeting()) {
|
||||||
|
|||||||
@@ -67,8 +67,7 @@ public class FightAi extends SpellAbilityAi {
|
|||||||
for (Card humanCreature : humCreatures) {
|
for (Card humanCreature : humCreatures) {
|
||||||
if (ComputerUtilCombat.getDamageToKill(humanCreature) <= fighter1.getNetPower()
|
if (ComputerUtilCombat.getDamageToKill(humanCreature) <= fighter1.getNetPower()
|
||||||
&& humanCreature.getNetPower() < ComputerUtilCombat.getDamageToKill(fighter1)) {
|
&& humanCreature.getNetPower() < ComputerUtilCombat.getDamageToKill(fighter1)) {
|
||||||
// todo: check min/max targets; see if we picked the best
|
// todo: check min/max targets; see if we picked the best matchup
|
||||||
// matchup
|
|
||||||
sa.getTargets().add(humanCreature);
|
sa.getTargets().add(humanCreature);
|
||||||
return true;
|
return true;
|
||||||
} else if (humanCreature.getSVar("Targeting").equals("Dies")) {
|
} else if (humanCreature.getSVar("Targeting").equals("Dies")) {
|
||||||
@@ -85,8 +84,7 @@ public class FightAi extends SpellAbilityAi {
|
|||||||
for (Card aiCreature : aiCreatures) {
|
for (Card aiCreature : aiCreatures) {
|
||||||
if (ComputerUtilCombat.getDamageToKill(humanCreature) <= aiCreature.getNetPower()
|
if (ComputerUtilCombat.getDamageToKill(humanCreature) <= aiCreature.getNetPower()
|
||||||
&& humanCreature.getNetPower() < ComputerUtilCombat.getDamageToKill(aiCreature)) {
|
&& humanCreature.getNetPower() < ComputerUtilCombat.getDamageToKill(aiCreature)) {
|
||||||
// todo: check min/max targets; see if we picked the
|
// todo: check min/max targets; see if we picked the best matchup
|
||||||
// best matchup
|
|
||||||
sa.getTargets().add(humanCreature);
|
sa.getTargets().add(humanCreature);
|
||||||
sa.getTargets().add(aiCreature);
|
sa.getTargets().add(aiCreature);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ public class Match {
|
|||||||
|
|
||||||
if (!lostOwnership.isEmpty()) {
|
if (!lostOwnership.isEmpty()) {
|
||||||
List<PaperCard> lostPaperOwnership = new ArrayList<>();
|
List<PaperCard> lostPaperOwnership = new ArrayList<>();
|
||||||
for(Card c : lostOwnership) {
|
for (Card c : lostOwnership) {
|
||||||
lostPaperOwnership.add((PaperCard)c.getPaperCard());
|
lostPaperOwnership.add((PaperCard)c.getPaperCard());
|
||||||
}
|
}
|
||||||
outcome.addAnteLost(registered, lostPaperOwnership);
|
outcome.addAnteLost(registered, lostPaperOwnership);
|
||||||
@@ -357,7 +357,7 @@ public class Match {
|
|||||||
|
|
||||||
if (!gainedOwnership.isEmpty()) {
|
if (!gainedOwnership.isEmpty()) {
|
||||||
List<PaperCard> gainedPaperOwnership = new ArrayList<>();
|
List<PaperCard> gainedPaperOwnership = new ArrayList<>();
|
||||||
for(Card c : gainedOwnership) {
|
for (Card c : gainedOwnership) {
|
||||||
gainedPaperOwnership.add((PaperCard)c.getPaperCard());
|
gainedPaperOwnership.add((PaperCard)c.getPaperCard());
|
||||||
}
|
}
|
||||||
outcome.addAnteWon(registered, gainedPaperOwnership);
|
outcome.addAnteWon(registered, gainedPaperOwnership);
|
||||||
|
|||||||
@@ -73,10 +73,8 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
|
|||||||
controllers = AbilityUtils.getDefinedPlayers(card, sa.getParam("Controller"), sa);
|
controllers = AbilityUtils.getDefinedPlayers(card, sa.getParam("Controller"), sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
final List<SpellAbility> tgtSpells = getTargetSpells(sa);
|
final List<SpellAbility> tgtSpells = getTargetSpells(sa);
|
||||||
|
|
||||||
|
|
||||||
if (tgtSpells.size() == 0 || amount == 0) {
|
if (tgtSpells.size() == 0 || amount == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ public class PhaseHandler implements java.io.Serializable {
|
|||||||
eventEndCombat = new GameEventCombatEnded(attackers, blockers);
|
eventEndCombat = new GameEventCombatEnded(attackers, blockers);
|
||||||
}
|
}
|
||||||
endCombat();
|
endCombat();
|
||||||
for(Player player : game.getPlayers()) {
|
for (Player player : game.getPlayers()) {
|
||||||
player.resetCombatantsThisCombat();
|
player.resetCombatantsThisCombat();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -430,7 +430,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public boolean isOpponentOf(Player other) {
|
public boolean isOpponentOf(Player other) {
|
||||||
return other != this && other != null && (other.teamNumber < 0 || other.teamNumber != teamNumber);
|
return other != this && other != null && (other.teamNumber < 0 || other.teamNumber != teamNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOpponentOf(String other) {
|
public boolean isOpponentOf(String other) {
|
||||||
Player otherPlayer = null;
|
Player otherPlayer = null;
|
||||||
for (Player p : game.getPlayers()) {
|
for (Player p : game.getPlayers()) {
|
||||||
@@ -474,9 +473,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public final boolean gainLife(int lifeGain, final Card source) {
|
public final boolean gainLife(int lifeGain, final Card source) {
|
||||||
return gainLife(lifeGain, source, null);
|
return gainLife(lifeGain, source, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean gainLife(int lifeGain, final Card source, final SpellAbility sa) {
|
public final boolean gainLife(int lifeGain, final Card source, final SpellAbility sa) {
|
||||||
|
|
||||||
// Run any applicable replacement effects.
|
// Run any applicable replacement effects.
|
||||||
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(this);
|
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(this);
|
||||||
repParams.put(AbilityKey.LifeGained, lifeGain);
|
repParams.put(AbilityKey.LifeGained, lifeGain);
|
||||||
@@ -544,7 +541,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public final int loseLife(final int toLose) {
|
public final int loseLife(final int toLose) {
|
||||||
return loseLife(toLose, false);
|
return loseLife(toLose, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int loseLife(final int toLose, final boolean manaBurn) {
|
public final int loseLife(final int toLose, final boolean manaBurn) {
|
||||||
int lifeLost = 0;
|
int lifeLost = 0;
|
||||||
if (!canLoseLife()) {
|
if (!canLoseLife()) {
|
||||||
@@ -870,7 +866,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public final int addCounter(final CounterType counterType, final int n, final Player source, final SpellAbility cause, final boolean applyMultiplier, GameEntityCounterTable table) {
|
public final int addCounter(final CounterType counterType, final int n, final Player source, final SpellAbility cause, final boolean applyMultiplier, GameEntityCounterTable table) {
|
||||||
return addCounter(counterType, n, source, cause, applyMultiplier, true, table);
|
return addCounter(counterType, n, source, cause, applyMultiplier, true, table);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int addCounter(CounterType counterType, int n, final Player source, final SpellAbility cause, boolean applyMultiplier, boolean fireEvents, GameEntityCounterTable table) {
|
public int addCounter(CounterType counterType, int n, final Player source, final SpellAbility cause, boolean applyMultiplier, boolean fireEvents, GameEntityCounterTable table) {
|
||||||
int addAmount = n;
|
int addAmount = n;
|
||||||
@@ -1000,7 +995,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public final void addChangedKeywords(final String[] addKeywords, final String[] removeKeywords, final Long timestamp) {
|
public final void addChangedKeywords(final String[] addKeywords, final String[] removeKeywords, final Long timestamp) {
|
||||||
addChangedKeywords(ImmutableList.copyOf(addKeywords), ImmutableList.copyOf(removeKeywords), timestamp);
|
addChangedKeywords(ImmutableList.copyOf(addKeywords), ImmutableList.copyOf(removeKeywords), timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void addChangedKeywords(final List<String> addKeywords, final List<String> removeKeywords, final Long timestamp) {
|
public final void addChangedKeywords(final List<String> addKeywords, final List<String> removeKeywords, final Long timestamp) {
|
||||||
// if the key already exists - merge entries
|
// if the key already exists - merge entries
|
||||||
KeywordsChange cks = null;
|
KeywordsChange cks = null;
|
||||||
@@ -1050,8 +1044,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public final void removeKeyword(final String keyword) {
|
public final void removeKeyword(final String keyword) {
|
||||||
removeKeyword(keyword, true);
|
removeKeyword(keyword, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public final void removeKeyword(final String keyword, final boolean allInstances) {
|
public final void removeKeyword(final String keyword, final boolean allInstances) {
|
||||||
boolean keywordRemoved = false;
|
boolean keywordRemoved = false;
|
||||||
|
|
||||||
@@ -1082,7 +1074,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public final boolean hasKeyword(final String keyword) {
|
public final boolean hasKeyword(final String keyword) {
|
||||||
return keywords.contains(keyword);
|
return keywords.contains(keyword);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean hasKeyword(final Keyword keyword) {
|
public final boolean hasKeyword(final Keyword keyword) {
|
||||||
return keywords.contains(keyword);
|
return keywords.contains(keyword);
|
||||||
@@ -1172,7 +1163,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public boolean hasProtectionFrom(final Card source, final boolean checkSBA) {
|
public boolean hasProtectionFrom(final Card source, final boolean checkSBA) {
|
||||||
return hasProtectionFrom(source, checkSBA, false);
|
return hasProtectionFrom(source, checkSBA, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasProtectionFrom(final Card source, final boolean checkSBA, final boolean damageSource) {
|
public boolean hasProtectionFrom(final Card source, final boolean checkSBA, final boolean damageSource) {
|
||||||
final boolean colorlessDamage = damageSource && source.hasKeyword("Colorless Damage Source");
|
final boolean colorlessDamage = damageSource && source.hasKeyword("Colorless Damage Source");
|
||||||
for (KeywordInterface ki : keywords) {
|
for (KeywordInterface ki : keywords) {
|
||||||
@@ -1638,6 +1628,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public final int getNumDiscardedThisTurn() {
|
public final int getNumDiscardedThisTurn() {
|
||||||
return numDiscardedThisTurn;
|
return numDiscardedThisTurn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void resetNumDiscardedThisTurn() {
|
public final void resetNumDiscardedThisTurn() {
|
||||||
numDiscardedThisTurn = 0;
|
numDiscardedThisTurn = 0;
|
||||||
}
|
}
|
||||||
@@ -1925,7 +1916,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public boolean hasTappedLandForManaThisTurn() {
|
public boolean hasTappedLandForManaThisTurn() {
|
||||||
return tappedLandForManaThisTurn;
|
return tappedLandForManaThisTurn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTappedLandForManaThisTurn(boolean tappedLandForManaThisTurn) {
|
public void setTappedLandForManaThisTurn(boolean tappedLandForManaThisTurn) {
|
||||||
this.tappedLandForManaThisTurn = tappedLandForManaThisTurn;
|
this.tappedLandForManaThisTurn = tappedLandForManaThisTurn;
|
||||||
}
|
}
|
||||||
@@ -2004,7 +1994,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
boolean isAnyOppLoseProof = false;
|
boolean isAnyOppLoseProof = false;
|
||||||
for (Player p : game.getPlayers()) {
|
for (Player p : game.getPlayers()) {
|
||||||
if (p == this || p.getOutcome() != null) {
|
if (p == this || p.getOutcome() != null) {
|
||||||
|
|
||||||
continue; // except self and already dead
|
continue; // except self and already dead
|
||||||
}
|
}
|
||||||
isAnyOppLoseProof |= p.hasKeyword("You can't lose the game.");
|
isAnyOppLoseProof |= p.hasKeyword("You can't lose the game.");
|
||||||
@@ -2083,7 +2072,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public final boolean hasRevolt() {
|
public final boolean hasRevolt() {
|
||||||
return revolt;
|
return revolt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setRevolt(final boolean val) {
|
public final void setRevolt(final boolean val) {
|
||||||
revolt = val;
|
revolt = val;
|
||||||
}
|
}
|
||||||
@@ -2143,7 +2131,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public final void setLibrarySearched(final int l) {
|
public final void setLibrarySearched(final int l) {
|
||||||
numLibrarySearchedOwn = l;
|
numLibrarySearchedOwn = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getLibrarySearched() {
|
public final int getLibrarySearched() {
|
||||||
return numLibrarySearchedOwn;
|
return numLibrarySearchedOwn;
|
||||||
}
|
}
|
||||||
@@ -2167,7 +2154,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean isValid(final String restriction, final Player sourceController, final Card source, CardTraitBase spellAbility) {
|
public final boolean isValid(final String restriction, final Player sourceController, final Card source, CardTraitBase spellAbility) {
|
||||||
|
|
||||||
final String[] incR = restriction.split("\\.", 2);
|
final String[] incR = restriction.split("\\.", 2);
|
||||||
|
|
||||||
if (incR[0].equals("Opponent")) {
|
if (incR[0].equals("Opponent")) {
|
||||||
@@ -2320,6 +2306,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public final void resetSpellCastThisGame() {
|
public final void resetSpellCastThisGame() {
|
||||||
spellsCastThisGame = 0;
|
spellsCastThisGame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getLifeGainedByTeamThisTurn() {
|
public final int getLifeGainedByTeamThisTurn() {
|
||||||
return lifeGainedByTeamThisTurn;
|
return lifeGainedByTeamThisTurn;
|
||||||
}
|
}
|
||||||
@@ -2647,7 +2634,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public int getStartingHandSize() {
|
public int getStartingHandSize() {
|
||||||
return startingHandSize;
|
return startingHandSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStartingHandSize(int shs) {
|
public void setStartingHandSize(int shs) {
|
||||||
startingHandSize = shs;
|
startingHandSize = shs;
|
||||||
}
|
}
|
||||||
@@ -2687,7 +2673,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
* Puts my currently active planes, if any, at the bottom of my planar deck.
|
* Puts my currently active planes, if any, at the bottom of my planar deck.
|
||||||
*/
|
*/
|
||||||
public void leaveCurrentPlane() {
|
public void leaveCurrentPlane() {
|
||||||
|
|
||||||
final Map<AbilityKey, Object> runParams = AbilityKey.newMap();
|
final Map<AbilityKey, Object> runParams = AbilityKey.newMap();
|
||||||
runParams.put(AbilityKey.Cards, new CardCollection(currentPlanes));
|
runParams.put(AbilityKey.Cards, new CardCollection(currentPlanes));
|
||||||
game.getTriggerHandler().runTrigger(TriggerType.PlaneswalkedFrom, runParams, false);
|
game.getTriggerHandler().runTrigger(TriggerType.PlaneswalkedFrom, runParams, false);
|
||||||
@@ -2746,11 +2731,9 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public CardCollectionView getInboundTokens() {
|
public CardCollectionView getInboundTokens() {
|
||||||
return inboundTokens;
|
return inboundTokens;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addInboundToken(Card c) {
|
public void addInboundToken(Card c) {
|
||||||
inboundTokens.add(c);
|
inboundTokens.add(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeInboundToken(Card c) {
|
public void removeInboundToken(Card c) {
|
||||||
inboundTokens.remove(c);
|
inboundTokens.remove(c);
|
||||||
}
|
}
|
||||||
@@ -2791,7 +2774,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
ColorSet identity = ColorSet.fromMask(ci);
|
ColorSet identity = ColorSet.fromMask(ci);
|
||||||
return identity;
|
return identity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ColorSet getNotCommanderColorID() {
|
public ColorSet getNotCommanderColorID() {
|
||||||
if (commanders.isEmpty()) {
|
if (commanders.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
@@ -2804,7 +2786,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
Integer cast = commanderCast.get(commander);
|
Integer cast = commanderCast.get(commander);
|
||||||
return cast == null ? 0 : cast.intValue();
|
return cast == null ? 0 : cast.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void incCommanderCast(Card commander) {
|
public void incCommanderCast(Card commander) {
|
||||||
commanderCast.put(commander, getCommanderCast(commander) + 1);
|
commanderCast.put(commander, getCommanderCast(commander) + 1);
|
||||||
getView().updateCommanderCast(this, commander);
|
getView().updateCommanderCast(this, commander);
|
||||||
@@ -2842,9 +2823,11 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public void setExtraTurnCount(final int val) {
|
public void setExtraTurnCount(final int val) {
|
||||||
view.setExtraTurnCount(val);
|
view.setExtraTurnCount(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHasPriority(final boolean val) {
|
public void setHasPriority(final boolean val) {
|
||||||
view.setHasPriority(val);
|
view.setHasPriority(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAI() {
|
public boolean isAI() {
|
||||||
return view.isAI();
|
return view.isAI();
|
||||||
}
|
}
|
||||||
@@ -3137,7 +3120,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public CardCollectionView getLostOwnership() {
|
public CardCollectionView getLostOwnership() {
|
||||||
return lostOwnership;
|
return lostOwnership;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CardCollectionView getGainedOwnership() {
|
public CardCollectionView getGainedOwnership() {
|
||||||
return gainedOwnership;
|
return gainedOwnership;
|
||||||
}
|
}
|
||||||
@@ -3209,6 +3191,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
this.updateZoneForView(com);
|
this.updateZoneForView(com);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateKeywordCardAbilityText() {
|
public void updateKeywordCardAbilityText() {
|
||||||
if(getKeywordCard() == null)
|
if(getKeywordCard() == null)
|
||||||
return;
|
return;
|
||||||
@@ -3252,10 +3235,10 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
keywordEffect = null;
|
keywordEffect = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasBlessing() {
|
public boolean hasBlessing() {
|
||||||
return blessingEffect != null;
|
return blessingEffect != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBlessing(boolean bless) {
|
public void setBlessing(boolean bless) {
|
||||||
// no need to to change
|
// no need to to change
|
||||||
if ((blessingEffect != null) == bless) {
|
if ((blessingEffect != null) == bless) {
|
||||||
@@ -3357,7 +3340,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
getView().updateAdditionalVote(this);
|
getView().updateAdditionalVote(this);
|
||||||
getGame().fireEvent(new GameEventPlayerStatsChanged(this, false));
|
getGame().fireEvent(new GameEventPlayerStatsChanged(this, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeAdditionalVote(long timestamp) {
|
public void removeAdditionalVote(long timestamp) {
|
||||||
if (additionalVotes.remove(timestamp) != null) {
|
if (additionalVotes.remove(timestamp) != null) {
|
||||||
getView().updateAdditionalVote(this);
|
getView().updateAdditionalVote(this);
|
||||||
@@ -3420,7 +3402,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public Set<Long> getControlVote() {
|
public Set<Long> getControlVote() {
|
||||||
return controlVotes;
|
return controlVotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setControlVote(Set<Long> value) {
|
public void setControlVote(Set<Long> value) {
|
||||||
controlVotes.clear();
|
controlVotes.clear();
|
||||||
controlVotes.addAll(value);
|
controlVotes.addAll(value);
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ ManaCost:4 U
|
|||||||
Types:Enchantment Aura Curse
|
Types:Enchantment Aura Curse
|
||||||
K:Enchant player
|
K:Enchant player
|
||||||
A:SP$ Attach | Cost$ 4 U | ValidTgts$ Player | AILogic$ Curse
|
A:SP$ Attach | Cost$ 4 U | ValidTgts$ Player | AILogic$ Curse
|
||||||
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ Player.EnchantedBy | Execute$ TrigCopy | TriggerZones$ Battlefield | OptionalDecider$ TriggeredCardOpponent | TriggerDescription$ Whenever enchanted player casts an instant or sorcery spell, each other player may copy that spell and may choose new targets for the copy they control.
|
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ Player.EnchantedBy | Execute$ TrigCopy | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player casts an instant or sorcery spell, each other player may copy that spell and may choose new targets for the copy they control.
|
||||||
# TODO each player should copy it for multiplayer
|
SVar:TrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | Controller$ TriggeredCardOpponent | Optional$ True | MayChooseTarget$ True
|
||||||
SVar:TrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | Controller$ TriggeredCardOpponent | MayChooseTarget$ True
|
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
SVar:RemMultiplayer:True
|
SVar:RemMultiplayer:True
|
||||||
Oracle:Enchant player\nWhenever enchanted player casts an instant or sorcery spell, each other player may copy that spell and may choose new targets for the copy they control.
|
Oracle:Enchant player\nWhenever enchanted player casts an instant or sorcery spell, each other player may copy that spell and may choose new targets for the copy they control.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:2 G G
|
|||||||
Types:Creature Spirit
|
Types:Creature Spirit
|
||||||
PT:3/4
|
PT:3/4
|
||||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ RepeatPayment | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, each player may pay any amount of mana. Then each player creates a number of 1/1 green Squirrel creature tokens equal to the amount of mana they paid this way.
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ RepeatPayment | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, each player may pay any amount of mana. Then each player creates a number of 1/1 green Squirrel creature tokens equal to the amount of mana they paid this way.
|
||||||
SVar:RepeatPayment:DB$ RepeatEach | RepeatPlayers$ Player | StartingWithActivator$ True | RepeatSubAbility$ DBPay | StackDescription$ When CARDNAME dies, each player may pay any amount of mana. Then each player creates a number of 1/1 green Squirrel creature tokens equal to the amount of mana they paid this way.
|
SVar:RepeatPayment:DB$ RepeatEach | RepeatPlayers$ Player | StartingWithActivator$ True | ChangeZoneTable$ True | RepeatSubAbility$ DBPay | StackDescription$ When CARDNAME dies, each player may pay any amount of mana. Then each player creates a number of 1/1 green Squirrel creature tokens equal to the amount of mana they paid this way.
|
||||||
SVar:DBPay:DB$ ChooseNumber | Defined$ Player.IsRemembered | ChooseAnyNumber$ True | ListTitle$ Pay Any Mana | AILogic$ MaxForAnyController | SubAbility$ DBToken
|
SVar:DBPay:DB$ ChooseNumber | Defined$ Player.IsRemembered | ChooseAnyNumber$ True | ListTitle$ Pay Any Mana | AILogic$ MaxForAnyController | SubAbility$ DBToken
|
||||||
# TODO: ideally the tokens should be created simultaneously after all the players have finished paying mana, but that's difficult to implement.
|
# TODO: ideally the tokens should be created simultaneously after all the players have finished paying mana, but that's difficult to implement.
|
||||||
SVar:DBToken:DB$ Token | TokenAmount$ X | TokenScript$ g_1_1_squirrel | TokenOwner$ Player.IsRemembered | LegacyImage$ g 1 1 squirrel wth | UnlessCost$ X | UnlessPayer$ Player.IsRemembered | UnlessSwitched$ True
|
SVar:DBToken:DB$ Token | TokenAmount$ X | TokenScript$ g_1_1_squirrel | TokenOwner$ Player.IsRemembered | LegacyImage$ g 1 1 squirrel wth | UnlessCost$ X | UnlessPayer$ Player.IsRemembered | UnlessSwitched$ True
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ Name:Mutiny
|
|||||||
ManaCost:R
|
ManaCost:R
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ Pump | Cost$ R | ValidTgts$ Creature.OppCtrl | AILogic$ PowerDmg | TgtPrompt$ Select target creature an opponent controls | SubAbility$ MutinyDamage | StackDescription$ None | SpellDescription$ Target creature an opponent controls deals damage equal to its power to another target creature that player controls.
|
A:SP$ Pump | Cost$ R | ValidTgts$ Creature.OppCtrl | AILogic$ PowerDmg | TgtPrompt$ Select target creature an opponent controls | SubAbility$ MutinyDamage | StackDescription$ None | SpellDescription$ Target creature an opponent controls deals damage equal to its power to another target creature that player controls.
|
||||||
SVar:MutinyDamage:DB$ DealDamage | ValidTgts$ Creature.OppCtrl | TargetUnique$ True | AILogic$ PowerDmg | NumDmg$ X | DamageSource$ ParentTarget
|
SVar:MutinyDamage:DB$ DealDamage | ValidTgts$ Creature.OppCtrl | TargetUnique$ True | TargetsWithSameController$ True | AILogic$ PowerDmg | NumDmg$ X | DamageSource$ ParentTarget
|
||||||
SVar:X:ParentTargeted$CardPower
|
SVar:X:ParentTargeted$CardPower
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mutiny.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/mutiny.jpg
|
||||||
//TODO Not perfect yet, there seems to be no check whether the creature's controller is the same?
|
|
||||||
Oracle:Target creature an opponent controls deals damage equal to its power to another target creature that player controls.
|
Oracle:Target creature an opponent controls deals damage equal to its power to another target creature that player controls.
|
||||||
@@ -4,7 +4,7 @@ Types:Legendary Creature Elf Warrior
|
|||||||
PT:2/2
|
PT:2/2
|
||||||
T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | Execute$ TrigPayCost | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of combat on your turn, you may pay {X}{X}. When you do, distribute X +1/+1 counters among any number of target Elves.
|
T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | Execute$ TrigPayCost | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of combat on your turn, you may pay {X}{X}. When you do, distribute X +1/+1 counters among any number of target Elves.
|
||||||
SVar:TrigPayCost:AB$ ImmediateTrigger | Cost$ X X | Execute$ TrigPutCounters | TriggerDescription$ When you pay {X}{X}, distribute X +1/+1 counters among any number of target Elf creatures you control.
|
SVar:TrigPayCost:AB$ ImmediateTrigger | Cost$ X X | Execute$ TrigPutCounters | TriggerDescription$ When you pay {X}{X}, distribute X +1/+1 counters among any number of target Elf creatures you control.
|
||||||
SVar:TrigPutCounters:DB$ PutCounter | ValidTgts$ Creature.Elf+YouCtrl | TgtPrompt$ Select any number of target Elf creatures you control to distribute counters to | CounterType$ P1P1 | CounterNum$ Y | TargetMin$ 1 | TargetMax$ X | DividedAsYouChoose$ X
|
SVar:TrigPutCounters:DB$ PutCounter | ValidTgts$ Creature.Elf+YouCtrl | TgtPrompt$ Select any number of target Elf creatures you control to distribute counters to | CounterType$ P1P1 | CounterNum$ X | TargetMin$ 1 | TargetMax$ X | DividedAsYouChoose$ X
|
||||||
SVar:X:Count$xPaid
|
SVar:X:Count$xPaid
|
||||||
K:Partner
|
K:Partner
|
||||||
DeckHas:Ability$Counters
|
DeckHas:Ability$Counters
|
||||||
|
|||||||
Reference in New Issue
Block a user