This commit is contained in:
Lymia Aluysia 2016-09-28 09:27:06 -05:00
commit e57da7598e
No known key found for this signature in database
GPG key ID: DB2E204C989251F7
162 changed files with 575 additions and 249 deletions

View file

@ -82,7 +82,7 @@ public class PlayAreaPanel extends javax.swing.JPanel {
private JCheckBoxMenuItem holdPriorityMenuItem;
public static final int PANEL_HEIGHT = 263;
public static final int PANEL_HEIGHT_SMALL = 190;
public static final int PANEL_HEIGHT_SMALL = 210;
/**
* Creates new form PlayAreaPanel

View file

@ -107,7 +107,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
private static final int PANEL_WIDTH = 94;
private static final int PANEL_HEIGHT = 262;
private static final int PANEL_HEIGHT_SMALL = 232;
private static final int PANEL_HEIGHT_SMALL = 242;
private static final int MANA_LABEL_SIZE_HORIZONTAL = 20;
private static final Border GREEN_BORDER = new LineBorder(Color.green, 3);
@ -176,6 +176,15 @@ public class PlayerPanelExt extends javax.swing.JPanel {
}
private void setTextForLabel (JLabel label, int amount, boolean alwaysBlack) {
label.setText(Integer.toString(amount));
if (amount != 0 || alwaysBlack) {
label.setForeground(Color.BLACK);
} else {
label.setForeground(new Color(100, 100, 100));
}
}
public void update(PlayerView player) {
this.player = player;
updateAvatar();
@ -191,11 +200,11 @@ public class PlayerPanelExt extends javax.swing.JPanel {
lifeLabel.setFont(font);
changedFontLife = false;
}
lifeLabel.setText(Integer.toString(playerLife));
poisonLabel.setText(Integer.toString(player.getCounters().getCount(CounterType.POISON)));
energyLabel.setText(Integer.toString(player.getCounters().getCount(CounterType.ENERGY)));
experienceLabel.setText(Integer.toString(player.getCounters().getCount(CounterType.EXPERIENCE)));
handLabel.setText(Integer.toString(player.getHandCount()));
setTextForLabel(lifeLabel, playerLife, true);
setTextForLabel(poisonLabel, player.getCounters().getCount(CounterType.POISON), false);
setTextForLabel(energyLabel, player.getCounters().getCount(CounterType.ENERGY), false);
setTextForLabel(experienceLabel, player.getCounters().getCount(CounterType.EXPERIENCE), false);
setTextForLabel(handLabel, player.getHandCount(), true);
int libraryCards = player.getLibraryCount();
if (libraryCards > 99) {
Font font = libraryLabel.getFont();
@ -208,7 +217,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
libraryLabel.setFont(font);
changedFontLibrary = false;
}
libraryLabel.setText(Integer.toString(libraryCards));
setTextForLabel(libraryLabel, libraryCards, true);
int graveCards = player.getGraveyard().size();
if (graveCards > 99) {
@ -224,7 +233,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
graveLabel.setFont(font);
changedFontGrave = false;
}
graveLabel.setText(Integer.toString(graveCards));
setTextForLabel(graveLabel, graveCards, false);
graveLabel.setToolTipText("Card Types: " + qtyCardTypes(player.getGraveyard()));
int exileCards = player.getExile().size();
@ -241,7 +250,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
exileLabel.setFont(font);
changedFontExile = false;
}
exileLabel.setText(Integer.toString(exileCards));
setTextForLabel(exileLabel, exileCards, false);
if (!MageFrame.isLite()) {
int id = player.getUserData().getAvatarId();
@ -358,12 +367,12 @@ public class PlayerPanelExt extends javax.swing.JPanel {
}
protected void update(ManaPoolView pool) {
manaLabels.get("B").setText(Integer.toString(pool.getBlack()));
manaLabels.get("R").setText(Integer.toString(pool.getRed()));
manaLabels.get("W").setText(Integer.toString(pool.getWhite()));
manaLabels.get("G").setText(Integer.toString(pool.getGreen()));
manaLabels.get("U").setText(Integer.toString(pool.getBlue()));
manaLabels.get("X").setText(Integer.toString(pool.getColorless()));
setTextForLabel(manaLabels.get("B"), pool.getBlack(), false);
setTextForLabel(manaLabels.get("R"), pool.getRed(), false);
setTextForLabel(manaLabels.get("W"), pool.getWhite(), false);
setTextForLabel(manaLabels.get("G"), pool.getGreen(), false);
setTextForLabel(manaLabels.get("U"), pool.getBlue(), false);
setTextForLabel(manaLabels.get("X"), pool.getColorless(), false);
}
/**
@ -433,7 +442,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
hand.setOpaque(false);
// Poison count
poisonLabel.setText("0");
setTextForLabel(poisonLabel, 0, false);
r = new Rectangle(18, 18);
poisonLabel.setToolTipText("Poison");
Image imagePoison = ImageHelper.getImageFromResources("/info/poison.png");
@ -535,7 +544,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
energyExperiencePanel.setOpaque(false);
// Energy count
energyLabel.setText("0");
setTextForLabel(energyLabel, 0, false);
r = new Rectangle(18, 18);
energyLabel.setToolTipText("Energy");
Image imageEnergy = ImageHelper.getImageFromResources("/info/energy.png");
@ -545,7 +554,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
energy.setOpaque(false);
// Experience count
experienceLabel.setText("0");
setTextForLabel(experienceLabel, 0, false);
r = new Rectangle(18, 18);
experienceLabel.setToolTipText("Experience");
Image imageExperience = ImageHelper.getImageFromResources("/info/experience.png");
@ -568,7 +577,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
// Add mana symbols
JLabel manaCountLabelW = new JLabel();
manaCountLabelW.setToolTipText("White mana");
manaCountLabelW.setText("0");
setTextForLabel(manaCountLabelW, 0, false);
manaLabels.put("W", manaCountLabelW);
r = new Rectangle(12, 12);
BufferedImage imageManaW = ManaSymbols.getSizedManaSymbol("W");
@ -584,7 +593,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
JLabel manaCountLabelU = new JLabel();
manaCountLabelU.setToolTipText("Blue mana");
manaCountLabelU.setText("0");
setTextForLabel(manaCountLabelU, 0, false);
manaLabels.put("U", manaCountLabelU);
r = new Rectangle(12, 12);
BufferedImage imageManaU = ManaSymbols.getSizedManaSymbol("U");
@ -600,7 +609,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
JLabel manaCountLabelB = new JLabel();
manaCountLabelB.setToolTipText("Black mana");
manaCountLabelB.setText("0");
setTextForLabel(manaCountLabelB, 0, false);
manaLabels.put("B", manaCountLabelB);
r = new Rectangle(12, 12);
BufferedImage imageManaB = ManaSymbols.getSizedManaSymbol("B");
@ -616,7 +625,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
JLabel manaCountLabelR = new JLabel();
manaCountLabelR.setToolTipText("Red mana");
manaCountLabelR.setText("0");
setTextForLabel(manaCountLabelR, 0, false);
manaLabels.put("R", manaCountLabelR);
r = new Rectangle(12, 12);
BufferedImage imageManaR = ManaSymbols.getSizedManaSymbol("R");
@ -632,7 +641,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
JLabel manaCountLabelG = new JLabel();
manaCountLabelG.setToolTipText("Green mana");
manaCountLabelG.setText("0");
setTextForLabel(manaCountLabelG, 0, false);
manaLabels.put("G", manaCountLabelG);
r = new Rectangle(12, 12);
BufferedImage imageManaG = ManaSymbols.getSizedManaSymbol("G");
@ -648,7 +657,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
JLabel manaCountLabelX = new JLabel();
manaCountLabelX.setToolTipText("Colorless mana");
manaCountLabelX.setText("0");
setTextForLabel(manaCountLabelX, 0, false);
manaLabels.put("X", manaCountLabelX);
r = new Rectangle(12, 12);
BufferedImage imageManaX = ManaSymbols.getSizedManaSymbol("C");
@ -858,7 +867,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
)
)
.addPreferredGap(ComponentPlacement.RELATED)
.addGap(2)
.addComponent(zonesPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
)
);

View file

@ -99,7 +99,7 @@ class SingeMindOgreEffect extends OneShotEffect {
Card card = targetPlayer.getHand().getRandom(game);
revealed.add(card);
targetPlayer.revealCards("Singe-Mind Ogre", revealed, game);
targetPlayer.loseLife(card.getConvertedManaCost(), game);
targetPlayer.loseLife(card.getConvertedManaCost(), game, false);
return true;
}
return false;

View file

@ -116,7 +116,7 @@ class DeathEffect extends OneShotEffect {
if (game.getState().getZone(creatureCard.getId()).equals(Zone.GRAVEYARD)) {
controller.moveCards(creatureCard, Zone.BATTLEFIELD, source, game);
}
controller.loseLife(creatureCard.getConvertedManaCost(), game);
controller.loseLife(creatureCard.getConvertedManaCost(), game, false);
return true;
}
return false;

View file

@ -98,7 +98,7 @@ class EssenceHarvestEffect extends OneShotEffect {
}
if (amount > 0) {
targetPlayer.loseLife(amount, game);
targetPlayer.loseLife(amount, game, false);
player.gainLife(amount, game);
}
return true;

View file

@ -122,7 +122,7 @@ class KillingWaveEffect extends OneShotEffect {
if (lifePaid > 0) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.loseLife(lifePaid, game);
player.loseLife(lifePaid, game, false);
}
}
}

View file

@ -91,7 +91,7 @@ class ScourgeOfNumaiEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
if (game.getBattlefield().countAll(new FilterCreaturePermanent("Ogre", "Ogre"), source.getControllerId(), game) < 1) {
controller.loseLife(2, game);
controller.loseLife(2, game, false);
}
return true;
}

View file

@ -91,7 +91,7 @@ class TakenumaBleederEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
if (game.getBattlefield().countAll(new FilterCreaturePermanent("Demon", "Demon"), source.getControllerId(), game) < 1) {
controller.loseLife(1, game);
controller.loseLife(1, game, false);
}
return true;
}

View file

@ -103,7 +103,7 @@ class PainSeerEffect extends OneShotEffect {
if (card != null &&
card.moveToZone(Zone.HAND, source.getSourceId(), game, false)) {
player.loseLife(card.getConvertedManaCost(), game);
player.loseLife(card.getConvertedManaCost(), game, false);
return true;
}
}

View file

@ -88,7 +88,7 @@ class ServantOfTymaretEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
int lostAmount = 0;
for (UUID opponentId: game.getOpponents(source.getControllerId())) {
lostAmount += game.getPlayer(opponentId).loseLife(1, game);
lostAmount += game.getPlayer(opponentId).loseLife(1, game, false);
}
game.getPlayer(source.getControllerId()).gainLife(lostAmount, game);
return true;

View file

@ -108,7 +108,7 @@ class DevouringGreedEffect extends OneShotEffect {
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
Player sourcePlayer = game.getPlayer(source.getControllerId());
if (targetPlayer != null && sourcePlayer != null) {
targetPlayer.loseLife(amount, game);
targetPlayer.loseLife(amount, game, false);
sourcePlayer.gainLife(amount, game);
return true;
}

View file

@ -84,7 +84,7 @@ class KokushoTheEveningStarEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
int loseLife = 0;
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
loseLife += game.getPlayer(opponentId).loseLife(5, game);
loseLife += game.getPlayer(opponentId).loseLife(5, game, false);
}
if (loseLife > 0)
game.getPlayer(source.getControllerId()).gainLife(loseLife, game);

View file

@ -128,7 +128,7 @@ class StabwhiskerLoseLifeEffect extends OneShotEffect {
if (opponent != null) {
int lifeLose = 3 - opponent.getHand().size();
if (lifeLose > 0 ) {
opponent.loseLife(lifeLose, game);
opponent.loseLife(lifeLose, game, false);
}
return true;
}

View file

@ -106,7 +106,7 @@ class LimDulsVaultEffect extends OneShotEffect {
player.lookAtCards("Lim-Dul's Vault", cards, game);
doAgain = player.chooseUse(outcome, "Pay 1 life and look at the next 5 cards?", source, game);
if (doAgain) {
player.loseLife(1, game);
player.loseLife(1, game, false);
} else {
player.shuffleLibrary(source, game);
}

View file

@ -112,7 +112,7 @@ class ObNixilisOfTheBlackOathEffect1 extends OneShotEffect {
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(opponentId);
if (opponent != null) {
loseLife += opponent.loseLife(1, game);
loseLife += opponent.loseLife(1, game, false);
}
}
controller.gainLife(loseLife, game);

View file

@ -139,7 +139,7 @@ class RavingDeadDamageEffect extends OneShotEffect {
if (player != null) {
Integer amount = (int) Math.ceil(player.getLife() / 2f);
if (amount > 0) {
player.loseLife(amount, game);
player.loseLife(amount, game, false);
}
return true;
}

View file

@ -96,7 +96,7 @@ class DeadlyTempestEffect extends OneShotEffect {
if (count > 0) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.loseLife(count, game);
player.loseLife(count, game, false);
}
}
}

View file

@ -145,7 +145,7 @@ class ScytheclawEffect extends OneShotEffect {
if (player != null) {
Integer amount = (int) Math.ceil(player.getLife() / 2f);
if (amount > 0) {
player.loseLife(amount, game);
player.loseLife(amount, game, false);
}
return true;
}

View file

@ -142,7 +142,7 @@ class BloodTyrantEffect extends OneShotEffect {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
if (player.loseLife(1, game) > 0) {
if (player.loseLife(1, game, false) > 0) {
counters++;
}
}

View file

@ -84,7 +84,7 @@ class InfectiousHorrorEffect extends OneShotEffect {
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(opponentId);
if (opponent != null) {
opponent.loseLife(2, game);
opponent.loseLife(2, game, false);
}
}
return true;

View file

@ -155,7 +155,7 @@ class SludgeStriderEffect extends OneShotEffect {
Player targetPlayer = game.getPlayer(source.getFirstTarget());
Player you = game.getPlayer(source.getControllerId());
if (targetPlayer != null) {
targetPlayer.loseLife(1, game);
targetPlayer.loseLife(1, game, false);
}
if (you != null) {
you.gainLife(1, game);

View file

@ -87,7 +87,7 @@ class StrongholdDisciplineEffect extends OneShotEffect {
if (count > 0) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.loseLife(count, game);
player.loseLife(count, game, false);
}
}
}

View file

@ -122,7 +122,7 @@ class TyrantsChoiceLoseLifeEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
game.getPlayer(opponentId).loseLife(4, game);
game.getPlayer(opponentId).loseLife(4, game, false);
}
return true;
}

View file

@ -142,7 +142,7 @@ class KayaGhostAssassinEffect extends OneShotEffect {
game.addDelayedTriggeredAbility(delayedAbility, source);
}
}
controller.loseLife(2, game);
controller.loseLife(2, game, false);
return true;
}
return false;

View file

@ -89,7 +89,7 @@ class RainOfGoreEffect extends ReplacementEffectImpl {
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(event.getPlayerId());
if (player != null) {
player.loseLife(event.getAmount(), game);
player.loseLife(event.getAmount(), game, false);
}
return true;
}

View file

@ -102,7 +102,7 @@ class BloodScrivenerReplacementEffect extends ReplacementEffectImpl {
Player player = game.getPlayer(event.getPlayerId());
if (player != null) {
player.drawCards(2, game, event.getAppliedEffects());
player.loseLife(1, game);
player.loseLife(1, game, false);
}
return true;
}

View file

@ -80,7 +80,7 @@ class DamnablePactEffect extends OneShotEffect {
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
if (targetPlayer != null) {
targetPlayer.drawCards(source.getManaCostsToPay().getX(), game);
targetPlayer.loseLife(source.getManaCostsToPay().getX(), game);
targetPlayer.loseLife(source.getManaCostsToPay().getX(), game, false);
return true;
}
return false;

View file

@ -96,7 +96,7 @@ class FoulTongueShriekEffect extends OneShotEffect {
if (controller != null && targetOpponent != null) {
int amount = new AttackingFilterCreatureCount(filter).calculate(game, source, this);
if (amount > 0) {
targetOpponent.loseLife(amount, game);
targetOpponent.loseLife(amount, game, false);
controller.gainLife(amount, game);
}
return true;

View file

@ -107,7 +107,7 @@ class SelfInflictedWoundEffect extends OneShotEffect {
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null) {
if (permanent.sacrifice(source.getSourceId(), game)) {
targetOpponent.loseLife(2, game);
targetOpponent.loseLife(2, game, false);
}
}

View file

@ -106,7 +106,7 @@ class MurderousBetrayalCost extends CostImpl {
if (lifeToPay < 0) {
this.paid = true;
} else {
this.paid = (controller.loseLife(lifeToPay, game) == lifeToPay);
this.paid = (controller.loseLife(lifeToPay, game, false) == lifeToPay);
}
return this.paid;
}

View file

@ -88,7 +88,7 @@ class CertainDeathEffect extends OneShotEffect {
permanent.destroy(source.getSourceId(), game, false);
Player permController = game.getPlayer(permanent.getControllerId());
if (permController != null) {
permController.loseLife(2, game);
permController.loseLife(2, game, false);
you.gainLife(2, game);
return true;
}

View file

@ -102,7 +102,7 @@ class BatwingBrumeEffect extends OneShotEffect {
if (amount > 0) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.loseLife(amount, game);
player.loseLife(amount, game, false);
}
}
}

View file

@ -107,7 +107,7 @@ class SaplingOfColfenorEffect extends OneShotEffect {
controller.revealCards(sourceObject.getIdName(), cards, game);
if (card.getCardType().contains(CardType.CREATURE)) {
controller.gainLife(card.getToughness().getValue(), game);
controller.loseLife(card.getPower().getValue(), game);
controller.loseLife(card.getPower().getValue(), game, false);
return controller.moveCards(cards.getCards(game), Zone.HAND, source, game);
}
}

View file

@ -103,7 +103,7 @@ class SootImpEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player caster = game.getPlayer(targetPointer.getFirst(game, source));
if (caster != null) {
caster.loseLife(1, game);
caster.loseLife(1, game, false);
return true;
}
return false;

View file

@ -168,7 +168,7 @@ class SoulReapEffect extends OneShotEffect {
if (creature != null) {
Player controller = game.getPlayer(creature.getControllerId());
if (controller != null) {
controller.loseLife(3, game);
controller.loseLife(3, game, false);
return true;
}
}

View file

@ -90,7 +90,7 @@ class DevourInShadowEffect extends OneShotEffect {
Player player = game.getPlayer(source.getControllerId());
Permanent target = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source));
if (player != null && target != null) {
player.loseLife(target.getToughness().getValue(), game);
player.loseLife(target.getToughness().getValue(), game, false);
return true;
}
return false;

View file

@ -93,7 +93,7 @@ class PoxEffect extends OneShotEffect {
Player player = game.getPlayer(playerId);
if (player != null) {
int lifeToLose = (int) Math.ceil(player.getLife() / 3.0);
player.loseLife(lifeToLose, game);
player.loseLife(lifeToLose, game, false);
}
}
// then discards a third of the cards in his or her hand,

View file

@ -126,7 +126,7 @@ class SylvanLibraryEffect extends OneShotEffect {
if (controller.canPayLifeCost()
&& controller.getLife() >= 4
&& controller.chooseUse(outcome, "Pay 4 life for " + card.getLogName() + "? (Otherwise it's put on top of your library)", source, game)) {
controller.loseLife(4, game);
controller.loseLife(4, game, false);
game.informPlayers(controller.getLogName() + " pays 4 life to keep a card on hand");
} else {
cardsPutBack.add(card);

View file

@ -0,0 +1,54 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.fridaynightmagic;
import java.util.UUID;
import mage.constants.Rarity;
/**
*
* @author fireshoes
*/
public class FieryTemper extends mage.sets.timeshifted.FieryTemper {
public FieryTemper(UUID ownerId) {
super(ownerId);
this.cardNumber = "198";
this.expansionSetCode = "FNMP";
this.rarity = Rarity.UNCOMMON;
}
public FieryTemper(final FieryTemper card) {
super(card);
}
@Override
public FieryTemper copy() {
return new FieryTemper(this);
}
}

View file

@ -83,7 +83,7 @@ public class MinionsMurmurs extends CardImpl {
if (controller != null) {
int creaturesControlled = game.getBattlefield().countAll(new FilterCreaturePermanent(), controller.getId(), game);
controller.drawCards(creaturesControlled, game);
controller.loseLife(creaturesControlled, game);
controller.loseLife(creaturesControlled, game, false);
return true;
}
return false;

View file

@ -0,0 +1,52 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.gameday;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class CultivatorOfBlades extends mage.sets.kaladesh.CultivatorOfBlades {
public CultivatorOfBlades(UUID ownerId) {
super(ownerId);
this.cardNumber = "56";
this.expansionSetCode = "MGDC";
}
public CultivatorOfBlades(final CultivatorOfBlades card) {
super(card);
}
@Override
public CultivatorOfBlades copy() {
return new CultivatorOfBlades(this);
}
}

View file

@ -0,0 +1,52 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.gameday;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class EssenceExtraction extends mage.sets.kaladesh.EssenceExtraction {
public EssenceExtraction(UUID ownerId) {
super(ownerId);
this.cardNumber = "55";
this.expansionSetCode = "MGDC";
}
public EssenceExtraction(final EssenceExtraction card) {
super(card);
}
@Override
public EssenceExtraction copy() {
return new EssenceExtraction(this);
}
}

View file

@ -107,7 +107,7 @@ class DuskmantleSeerEffect extends OneShotEffect {
Cards cards = new CardsImpl();
cards.add(card);
player.revealCards(sourceCard.getName() + ": Revealed by " + player.getName(), cards, game);
player.loseLife(card.getConvertedManaCost(), game);
player.loseLife(card.getConvertedManaCost(), game, false);
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
}
}

View file

@ -156,7 +156,7 @@ class OrzhovCharmDestroyAndLoseLifeEffect extends OneShotEffect {
int toughness = target.getToughness().getValue();
target.destroy(source.getSourceId(), game, false);
if (toughness > 0) {
controller.loseLife(toughness, game);
controller.loseLife(toughness, game, false);
}
return true;
}

View file

@ -107,7 +107,7 @@ class VizkopaConfessorEffect extends OneShotEffect {
if (controller != null && targetPlayer != null && sourceCard != null) {
int payLife = controller.getAmount(0, controller.getLife(),"Pay how many life?", game);
if (payLife > 0) {
controller.loseLife(payLife, game);
controller.loseLife(payLife, game, false);
game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getLogName()).append(" pays ").append(payLife).append(" life").toString());
Cards cardsInHand = new CardsImpl();

View file

@ -154,7 +154,7 @@ class OpponentsLoseLifeEffect extends OneShotEffect {
for (UUID opponentId: game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(opponentId);
if (opponent != null) {
opponent.loseLife(amountLifeGained, game);
opponent.loseLife(amountLifeGained, game, false);
}
}
}

View file

@ -82,7 +82,7 @@ class AgentOfMasksEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
int loseLife = 0;
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
loseLife += game.getPlayer(opponentId).loseLife(1, game);
loseLife += game.getPlayer(opponentId).loseLife(1, game, false);
}
if (loseLife > 0)
game.getPlayer(source.getControllerId()).gainLife(loseLife, game);

View file

@ -99,7 +99,7 @@ class GhostCouncilOfOrzhovaEffect extends OneShotEffect {
Player targetPlayer = game.getPlayer(source.getFirstTarget());
Player controllerPlayer = game.getPlayer(source.getControllerId());
if (targetPlayer != null && controllerPlayer != null) {
targetPlayer.loseLife(1, game);
targetPlayer.loseLife(1, game, false);
controllerPlayer.gainLife(1, game);
}
return false;

View file

@ -148,7 +148,7 @@ class SoulsOfTheFaultlessEffect extends OneShotEffect {
UUID attackerId = (UUID) this.getValue("attackerId");
Player attacker = game.getPlayer(attackerId);
if (attacker != null) {
attacker.loseLife(amount, game);
attacker.loseLife(amount, game, false);
}
return true;
}

View file

@ -97,13 +97,13 @@ class GameOfChaosEffect extends OneShotEffect {
if (youWinFlip) { // flipper of coin wins, flipper gain 1 and non-flipper loses 1
you.gainLife(lifeAmount, game);
targetOpponent.loseLife(lifeAmount, game);
targetOpponent.loseLife(lifeAmount, game, false);
if (targetOpponent.canRespond() && you.canRespond()) {
continueFlipping = you.chooseUse(outcome, "Flip again?", source, game);
controllerWonLast = true;
}
} else { // non-flipper wins, flipper lose 1 and non-flipper gains 1
you.loseLife(lifeAmount, game);
you.loseLife(lifeAmount, game, false);
targetOpponent.gainLife(lifeAmount, game);
if (targetOpponent.canRespond() && you.canRespond()) {
continueFlipping = targetOpponent.chooseUse(outcome, "Flip again?", source, game);

View file

@ -114,7 +114,7 @@ class ZursWeirdingReplacementEffect extends ReplacementEffectImpl {
if (otherPlayer.canPayLifeCost()
&& otherPlayer.getLife() >= 2
&& otherPlayer.chooseUse(Outcome.Benefit, message, source, game)) {
otherPlayer.loseLife(2, game);
otherPlayer.loseLife(2, game, false);
player.moveCards(card, Zone.GRAVEYARD, source, game);
break;
}

View file

@ -100,7 +100,7 @@ class PhyrexianDelverEffect extends OneShotEffect {
if (game.getState().getZone(creatureCard.getId()).equals(Zone.GRAVEYARD)) {
result = controller.moveCards(creatureCard, Zone.BATTLEFIELD, source, game);;
}
controller.loseLife(creatureCard.getConvertedManaCost(), game);
controller.loseLife(creatureCard.getConvertedManaCost(), game, false);
return result;
}
return false;

View file

@ -0,0 +1,52 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.judgepromo;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class ZurTheEnchanter extends mage.sets.coldsnap.ZurTheEnchanter {
public ZurTheEnchanter(UUID ownerId) {
super(ownerId);
this.cardNumber = "107";
this.expansionSetCode = "JR";
}
public ZurTheEnchanter(final ZurTheEnchanter card) {
super(card);
}
@Override
public ZurTheEnchanter copy() {
return new ZurTheEnchanter(this);
}
}

View file

@ -107,7 +107,7 @@ class DeathWishEffect extends OneShotEffect {
int amount = (controller.getLife() + 1) / 2;
if (amount > 0) {
controller.loseLife(amount, game);
controller.loseLife(amount, game, false);
}
return true;
}

View file

@ -119,10 +119,17 @@ class ChandraTorchOfDefianceEffect extends OneShotEffect {
Library library = controller.getLibrary();
Card card = library.removeFromTop(game);
if (card != null) {
boolean exiledCardWasCast = false;
controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true);
if (controller.chooseUse(Outcome.Benefit, "Cast the card? (You still pay the costs)", source, game) && !card.getCardType().contains(CardType.LAND)) {
controller.cast(card.getSpellAbility(), game, false);
} else {
// LinkedHashMap<UUID, ActivatedAbility> useableAbilities = controller.getUseableActivatedAbilities(card, Zone.EXILED, game);
// for (ActivatedAbility ability : useableAbilities.values()) {
//
// }
// controller.activateAbility(useableAbilities, game);
exiledCardWasCast = controller.cast(card.getSpellAbility(), game, false);
}
if (!exiledCardWasCast) {
new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT).apply(game, source);
}
}

View file

@ -63,7 +63,7 @@ public class FairgroundsTrumpeter extends CardImpl {
// At the beginning of each end step, if a +1/+1 counter was placed on a permanent under your control this turn, put a +1/+1 counter on Fairgrounds Trumpeter.
this.addAbility(new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
TargetController.YOU, false), FairgroundsTrumpeterCondition.getInstance(),
TargetController.ANY, false), FairgroundsTrumpeterCondition.getInstance(),
"At the beginning of each end step, if a +1/+1 counter was placed on a permanent under your control this turn, put a +1/+1 counter on Fairgrounds Trumpeter."),
new FairgroundsTrumpeterWatcher());
}

View file

@ -0,0 +1,52 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.launchparty;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class SaheelisArtistry extends mage.sets.kaladesh.SaheelisArtistry {
public SaheelisArtistry(UUID ownerId) {
super(ownerId);
this.cardNumber = "37";
this.expansionSetCode = "MLP";
}
public SaheelisArtistry(final SaheelisArtistry card) {
super(card);
}
@Override
public SaheelisArtistry copy() {
return new SaheelisArtistry(this);
}
}

View file

@ -84,7 +84,7 @@ class HoardersGreedEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
do {
controller.loseLife(2, game);
controller.loseLife(2, game, false);
controller.drawCards(2, game);
} while (controller.canRespond() && ClashEffect.getInstance().apply(game, source));
return true;

View file

@ -122,7 +122,7 @@ class XathridDemonEffect extends OneShotEffect {
for (UUID opponentId : opponents) {
Player opponent = game.getPlayer(opponentId);
if (opponent != null) {
opponent.loseLife(amount, game);
opponent.loseLife(amount, game, false);
}
}
}
@ -130,7 +130,7 @@ class XathridDemonEffect extends OneShotEffect {
}
} else {
sourcePermanent.tap(game);
controller.loseLife(7, game);
controller.loseLife(7, game, false);
return true;
}
return false;

View file

@ -85,7 +85,7 @@ class DarkTutelageEffect extends OneShotEffect {
Card card = player.getLibrary().removeFromTop(game);
if (card != null) {
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
player.loseLife(card.getConvertedManaCost(), game);
player.loseLife(card.getConvertedManaCost(), game, false);
Cards cards = new CardsImpl();
cards.add(card);
player.revealCards("Dark Tutelage", cards, game);

View file

@ -98,7 +98,7 @@ class BubblingCauldronEffect extends OneShotEffect {
int damage = 0;
for (UUID opponentId: game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(opponentId);
damage += opponent.loseLife(4, game);
damage += opponent.loseLife(4, game, false);
}
game.getPlayer(source.getControllerId()).gainLife(damage, game);
return true;

View file

@ -146,7 +146,7 @@ class ObNixilisUnshackledEffect extends SacrificeEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));
if (player != null) {
player.loseLife(10, game);
player.loseLife(10, game, false);
}
return super.apply(game, source);
}

View file

@ -93,7 +93,7 @@ class GravebladeMarauderEffect extends OneShotEffect {
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
Player controller = game.getPlayer(source.getControllerId());
if (targetPlayer != null && controller != null) {
targetPlayer.loseLife(controller.getGraveyard().count(new FilterCreatureCard(), game), game);
targetPlayer.loseLife(controller.getGraveyard().count(new FilterCreatureCard(), game), game, false);
return true;
}
return false;

View file

@ -100,7 +100,7 @@ class TaintedRemedyReplacementEffect extends ReplacementEffectImpl {
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player opponent = game.getPlayer(event.getPlayerId());
if (opponent != null) {
opponent.loseLife(event.getAmount(), game);
opponent.loseLife(event.getAmount(), game, false);
}
return true;
}

View file

@ -99,7 +99,7 @@ class ThornbowArcherEffect extends OneShotEffect {
Player opponent = game.getPlayer(opponentId);
if (opponent != null) {
if (game.getBattlefield().countAll(filter, opponentId, game) == 0) {
opponent.loseLife(1, game);
opponent.loseLife(1, game, false);
}
}
}

View file

@ -0,0 +1,52 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.mediainserts;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class SkyshipStalker extends mage.sets.kaladesh.SkyshipStalker {
public SkyshipStalker(UUID ownerId) {
super(ownerId);
this.cardNumber = "162";
this.expansionSetCode = "MBP";
}
public SkyshipStalker(final SkyshipStalker card) {
super(card);
}
@Override
public SkyshipStalker copy() {
return new SkyshipStalker(this);
}
}

View file

@ -110,7 +110,7 @@ class IllicitAuctionEffect extends GainControlTargetEffect {
}
game.informPlayers(winner.getLogName() + " won the auction with a bid of " + highBid + " life" + (highBid > 1 ? "s" : ""));
winner.loseLife(highBid, game);
winner.loseLife(highBid, game, false);
super.controllingPlayerId = winner.getId();
}
super.init(source, game);

View file

@ -109,7 +109,7 @@ class SpoilsOfTheVaultEffect extends OneShotEffect {
}
controller.revealCards(sourceObject.getIdName(), cardsToReveal, game);
controller.moveCards(cardsToExile, Zone.EXILED, source, game);
controller.loseLife(cardsToExile.size(), game);
controller.loseLife(cardsToExile.size(), game, false);
return true;
}

View file

@ -97,7 +97,7 @@ class LoseLifeOpponentsEffect extends OneShotEffect {
for (UUID opponentUUID : opponents) {
Player player = game.getPlayer(opponentUUID);
if (player != null) {
player.loseLife(1, game);
player.loseLife(1, game, false);
applied = true;
}
}

View file

@ -130,7 +130,7 @@ class TezzeretAgentOfBolasEffect2 extends OneShotEffect {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
player.loseLife(count, game);
player.loseLife(count, game, false);
}
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {

View file

@ -129,7 +129,7 @@ class MaralenOfTheMornsongEffect2 extends OneShotEffect {
UUID activePlayerId = game.getActivePlayerId();
Player player = game.getPlayer(activePlayerId);
if (player != null) {
player.loseLife(3, game);
player.loseLife(3, game, false);
TargetCardInLibrary target = new TargetCardInLibrary();
if (player.searchLibrary(target, game)) {
for (UUID cardId : target.getTargets()) {

View file

@ -116,7 +116,7 @@ class ChancellorOfTheDrossEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
int loseLife = 0;
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
loseLife += game.getPlayer(opponentId).loseLife(3, game);
loseLife += game.getPlayer(opponentId).loseLife(3, game, false);
}
if (loseLife > 0) {
game.getPlayer(source.getControllerId()).gainLife(loseLife, game);

View file

@ -112,7 +112,7 @@ class DreadDefilerEffect extends OneShotEffect {
if (amount > 0) {
Player targetOpponent = game.getPlayer(source.getFirstTarget());
if (targetOpponent != null) {
targetOpponent.loseLife(amount, game);
targetOpponent.loseLife(amount, game, false);
return true;
}
}

View file

@ -123,6 +123,6 @@ class RemorselessPunishmentEffect extends OneShotEffect {
}
}
opponent.loseLife(5, game);
opponent.loseLife(5, game, false);
}
}

View file

@ -113,7 +113,7 @@ class VisionsOfBrutalityEffect extends OneShotEffect {
if (controllerEnchanted != null) {
int damage = (Integer) getValue("damage");
if (damage > 0) {
controllerEnchanted.loseLife(damage, game);
controllerEnchanted.loseLife(damage, game, false);
}
}
}

View file

@ -133,7 +133,7 @@ class SkeletalScryingEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if ( controller != null ) {
controller.drawCards(amount.calculate(game, source, this), game);
controller.loseLife(amount.calculate(game, source, this), game);
controller.loseLife(amount.calculate(game, source, this), game, false);
return true;
}
return false;

View file

@ -87,7 +87,7 @@ class BiorhythmEffect extends OneShotEffect {
if(player != null) {
int diff = player.getLife() - game.getBattlefield().countAll(filter, playerId, game);
if(diff > 0) {
player.loseLife(diff, game);
player.loseLife(diff, game, false);
}
if(diff < 0) {
player.gainLife(-diff, game);

View file

@ -102,7 +102,7 @@ class EbonbladeReaperEffect extends OneShotEffect {
if (player != null) {
Integer amount = (int) Math.ceil(player.getLife() / 2f);
if (amount > 0) {
player.loseLife(amount, game);
player.loseLife(amount, game, false);
}
return true;
}

View file

@ -141,7 +141,7 @@ class StarlitSanctumBlackEffect extends OneShotEffect {
if (amount > 0) {
Player player = game.getPlayer(source.getFirstTarget());
if (player != null) {
player.loseLife(amount, game);
player.loseLife(amount, game, false);
return true;
}
}

View file

@ -99,7 +99,7 @@ class ImpsMischiefLoseLifeEffect extends OneShotEffect {
if (spell != null) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
player.loseLife(spell.getConvertedManaCost(), game);
player.loseLife(spell.getConvertedManaCost(), game, false);
return true;
}
}

View file

@ -92,7 +92,7 @@ class TemporalExtortionCounterSourceEffect extends OneShotEffect {
Player player = game.getPlayer(playerId);
if (player.chooseUse(outcome, "Pay half your life, rounded up to counter " + sourceObject.getIdName() + "?", source, game)) {
Integer amount = (int) Math.ceil(player.getLife() / 2f);
player.loseLife(amount, game);
player.loseLife(amount, game, false);
game.informPlayers(player.getLogName() + " pays half his or her life, rounded up to counter " + sourceObject.getIdName() + ".");
Spell spell = game.getStack().getSpell(source.getSourceId());
if (spell != null) {

View file

@ -107,7 +107,7 @@ class LastStandEffect extends OneShotEffect {
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
if (opponent != null) {
int swamps = game.getBattlefield().count(filterSwamp, source.getSourceId(), source.getControllerId(), game);
opponent.loseLife(swamps * 2, game);
opponent.loseLife(swamps * 2, game, false);
}
// Last Stand deals damage equal to the number of Mountains you control to target creature.
Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());

View file

@ -96,7 +96,7 @@ class DarkConfidantEffect extends OneShotEffect {
Cards cards = new CardsImpl(card);
controller.revealCards(sourcePermanent.getIdName(), cards, game);
controller.moveCards(card, Zone.HAND, source, game);
controller.loseLife(card.getConvertedManaCost(), game);
controller.loseLife(card.getConvertedManaCost(), game, false);
}
return true;

View file

@ -97,7 +97,7 @@ class NetherbornPhalanxEffect extends OneShotEffect {
if (count > 0) {
Player opponent = game.getPlayer(playerId);
if (opponent != null) {
opponent.loseLife(count, game);
opponent.loseLife(count, game, false);
return true;
}
}

View file

@ -98,7 +98,7 @@ class HavocFestivalLoseLifeEffect extends OneShotEffect {
if (player != null) {
Integer amount = (int) Math.ceil(player.getLife() / 2f);
if (amount > 0) {
player.loseLife(amount, game);
player.loseLife(amount, game, false);
return true;
}
}

View file

@ -142,7 +142,7 @@ class ShriekingAfflictionTargetEffect extends OneShotEffect {
if (sourcePermanent != null) {
game.informPlayers(sourcePermanent.getName() + ": " + player.getLogName() + " loses 3 life");
}
player.loseLife(3, game);
player.loseLife(3, game, false);
return true;
}
return false;

View file

@ -128,7 +128,7 @@ public class BanefulOmen extends CardImpl {
for (UUID opponentUuid : opponents) {
Player opponent = game.getPlayer(opponentUuid);
if (opponent != null) {
opponent.loseLife(loseLife, game);
opponent.loseLife(loseLife, game, false);
}
}
}

View file

@ -106,7 +106,7 @@ class SufferThePastEffect extends OneShotEffect {
}
}
you.gainLife(numberExiled, game);
targetPlayer.loseLife(numberExiled, game);
targetPlayer.loseLife(numberExiled, game, false);
}
}
return true;

View file

@ -99,7 +99,7 @@ class VendettaEffect extends OneShotEffect {
Player player = game.getPlayer(source.getControllerId());
Permanent target = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source));
if (player != null && target != null) {
player.loseLife(target.getToughness().getValue(), game);
player.loseLife(target.getToughness().getValue(), game, false);
return true;
}
return false;

View file

@ -91,7 +91,7 @@ class BloodClockEffect extends OneShotEffect {
return false;
}
if (player.getLife() > 2 && player.chooseUse(Outcome.Neutral, "Pay 2 life? If you don't, return a permanent you control to its owner's hand.", source, game)) {
player.loseLife(2, game);
player.loseLife(2, game, false);
game.informPlayers(player.getLogName() + " pays 2 life. He will not return a permanent he or she controls.");
return true;
} else {

View file

@ -93,7 +93,7 @@ class ChoiceOfDamnationsEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
if (controller.chooseUse(outcome, "Shall " + targetPlayer.getLogName() + " lose " + amount + " life?", source, game)) {
targetPlayer.loseLife(amount, game);
targetPlayer.loseLife(amount, game, false);
} else {
int numberPermanents = game.getState().getBattlefield().countAll(new FilterPermanent(), targetPlayer.getId(), game);
if (numberPermanents > amount) {

View file

@ -106,7 +106,7 @@ class PainsRewardEffect extends OneShotEffect {
}
game.informPlayers(winner.getLogName() + " won the auction with a bid of " + highBid + " life" + (highBid > 1 ? "s" : ""));
winner.loseLife(highBid, game);
winner.loseLife(highBid, game, false);
winner.drawCards(4, game);
return true;
}

View file

@ -90,7 +90,7 @@ class RavingOniSlaveEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
if (game.getBattlefield().count(new FilterCreaturePermanent("Demon", "Demon"), source.getSourceId(), source.getControllerId(), game) < 1) {
controller.loseLife(3, game);
controller.loseLife(3, game, false);
}
return true;
}

View file

@ -77,7 +77,7 @@ class ExsanguinateEffect extends OneShotEffect {
int loseLife = 0;
int damage = source.getManaCostsToPay().getX();
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
loseLife += game.getPlayer(opponentId).loseLife(damage, game);
loseLife += game.getPlayer(opponentId).loseLife(damage, game, false);
}
if (loseLife > 0)
game.getPlayer(source.getControllerId()).gainLife(loseLife, game);

View file

@ -138,7 +138,7 @@ class FleshAllergyEffect extends OneShotEffect {
if (player != null) {
int amount = watcher.creaturesDiedThisTurn;
if (amount > 0) {
player.loseLife(amount, game);
player.loseLife(amount, game, false);
return true;
}
}

View file

@ -96,7 +96,7 @@ class PainfulQuandryEffect extends OneShotEffect {
paid = cost.pay(source, game, source.getSourceId(), player.getId(), false, null);
}
if (!paid) {
player.loseLife(5, game);
player.loseLife(5, game, false);
}
return true;
}

View file

@ -98,7 +98,7 @@ class HollowbornBarghestEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
game.getPlayer(opponentId).loseLife(2, game);
game.getPlayer(opponentId).loseLife(2, game, false);
}
return true;
}
@ -135,7 +135,7 @@ class HollowbornBarghestTriggeredAbility extends TriggeredAbilityImpl {
if (game.getOpponents(controllerId).contains(event.getPlayerId())) {
Player opponent = game.getPlayer(event.getPlayerId());
if (opponent != null && opponent.getHand().isEmpty()) {
opponent.loseLife(2, game);
opponent.loseLife(2, game, false);
return true;
}
}

View file

@ -110,7 +110,7 @@ class LeechriddenSwampLoseLifeEffect extends OneShotEffect {
Players players = game.getPlayers();
for ( Player player : players.values() ) {
if ( !player.getId().equals(source.getControllerId()) ) {
player.loseLife(1, game);
player.loseLife(1, game, false);
}
}
return true;

View file

@ -109,7 +109,7 @@ class PlagueOfVerminEffect extends OneShotEffect {
if (currentPlayer.chooseUse(Outcome.AIDontUseIt, "Pay life?", source, game)) {
totalPaidLife = currentPlayer.getAmount(0, controller.getLife(), "Pay how many life?", game);
if (totalPaidLife > 0) {
currentPlayer.loseLife(totalPaidLife, game);
currentPlayer.loseLife(totalPaidLife, game, false);
if (payLife.get(currentPlayer.getId()) == null) {
payLife.put(currentPlayer.getId(), totalPaidLife);
} else {

View file

@ -99,7 +99,7 @@ class PollutedBondsEffect extends OneShotEffect {
if (controller != null) {
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
if (opponent != null) {
opponent.loseLife(2, game);
opponent.loseLife(2, game, false);
}
controller.gainLife(2, game);
return true;

Some files were not shown because too many files have changed in this diff Show more