1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-12 01:01:04 -09:00

Minor formatting issues.

This commit is contained in:
LevelX2 2015-07-05 02:04:40 +02:00
parent ebd6e47848
commit 72b724e28a
5 changed files with 128 additions and 134 deletions
Mage.Sets/src/mage/sets
Mage/src/mage/game/stack
Utils

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.dragonsmaze;
import java.util.UUID;
@ -56,17 +55,14 @@ import mage.util.CardUtil;
*
* @author LevelX2
*/
public class CouncilOfTheAbsolute extends CardImpl {
public CouncilOfTheAbsolute (UUID ownerId) {
public CouncilOfTheAbsolute(UUID ownerId) {
super(ownerId, 62, "Council of the Absolute", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{W}{U}");
this.expansionSetCode = "DGM";
this.subtype.add("Human");
this.subtype.add("Advisor");
this.power = new MageInt(2);
this.toughness = new MageInt(4);
@ -79,7 +75,7 @@ public class CouncilOfTheAbsolute extends CardImpl {
}
public CouncilOfTheAbsolute (final CouncilOfTheAbsolute card) {
public CouncilOfTheAbsolute(final CouncilOfTheAbsolute card) {
super(card);
}

View file

@ -59,14 +59,14 @@ public class GoblinGloryChaser extends CardImpl {
// Renown 1
this.addAbility(new RenownAbility(1));
// As long as Goblin Glory Chaser is renowned, it has menace.
Effect effect = new ConditionalContinuousEffect(
new GainAbilitySourceEffect(MenaceAbility.getInstance(), Duration.WhileOnBattlefield),
new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield),
RenownCondition.getInstance(),
"As long as {this} is renowned, it has menace");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
this.addAbility(ability);
this.addAbility(ability);
}
public GoblinGloryChaser(final GoblinGloryChaser card) {

View file

@ -1,31 +1,30 @@
/*
* 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.
*/
* 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.game.stack;
import java.util.ArrayList;
@ -101,10 +100,10 @@ public class Spell extends StackObjImpl implements Card {
public Spell(final Spell spell) {
this.id = spell.id;
for (SpellAbility spellAbility: spell.spellAbilities) {
for (SpellAbility spellAbility : spell.spellAbilities) {
this.spellAbilities.add(spellAbility.copy());
}
for (Card spellCard: spell.spellCards) {
for (Card spellCard : spell.spellCards) {
this.spellCards.add(spellCard.copy());
}
if (spell.spellAbilities.get(0).equals(spell.ability)) {
@ -124,7 +123,6 @@ public class Spell extends StackObjImpl implements Card {
this.color = spell.color.copy();
}
public boolean activate(Game game, boolean noMana) {
if (!spellAbilities.get(0).activate(game, noMana)) {
return false;
@ -132,7 +130,7 @@ public class Spell extends StackObjImpl implements Card {
// if there are more abilities (fused split spell) or first ability added new abilities (splice), activate the additional abilities
boolean ignoreAbility = true;
boolean payNoMana = noMana;
for (SpellAbility spellAbility: spellAbilities) {
for (SpellAbility spellAbility : spellAbilities) {
// costs for spliced abilities were added to main spellAbility, so pay no mana for spliced abilities
payNoMana |= spellAbility.getSpellAbilityType().equals(SpellAbilityType.SPLICE);
if (ignoreAbility) {
@ -174,19 +172,19 @@ public class Spell extends StackObjImpl implements Card {
result = false;
boolean legalParts = false;
// check for legal parts
for(SpellAbility spellAbility: this.spellAbilities) {
// if muliple modes are selected, and there are modes with targets, then at least one mode has to have a legal target or
// When resolving a fused split spell with multiple targets, treat it as you would any spell with multiple targets.
// If all targets are illegal when the spell tries to resolve, the spell is countered and none of its effects happen.
for (SpellAbility spellAbility : this.spellAbilities) {
// if muliple modes are selected, and there are modes with targets, then at least one mode has to have a legal target or
// When resolving a fused split spell with multiple targets, treat it as you would any spell with multiple targets.
// If all targets are illegal when the spell tries to resolve, the spell is countered and none of its effects happen.
// If at least one target is still legal at that time, the spell resolves, but an illegal target can't perform any actions
// or have any actions performed on it.
// or have any actions performed on it.
legalParts |= spellAbilityHasLegalParts(spellAbility, game);
}
// resolve if legal parts
if (legalParts) {
for(SpellAbility spellAbility: this.spellAbilities) {
for (SpellAbility spellAbility : this.spellAbilities) {
if (spellAbilityHasLegalParts(spellAbility, game)) {
for (UUID modeId :spellAbility.getModes().getSelectedModes()) {
for (UUID modeId : spellAbility.getModes().getSelectedModes()) {
spellAbility.getModes().setActiveMode(modeId);
if (spellAbility.getTargets().stillLegal(spellAbility, game)) {
if (!spellAbility.getSpellAbilityType().equals(SpellAbilityType.SPLICE)) {
@ -216,14 +214,14 @@ public class Spell extends StackObjImpl implements Card {
if (ability.getTargets().stillLegal(ability, game)) {
updateOptionalCosts(0);
boolean bestow = this.getSpellAbility() instanceof BestowAbility;
if (bestow) {
if (bestow) {
// Must be removed first time, after that will be removed by continous effect
// Otherwise effects like evolve trigger from creature comes into play event
card.getCardType().remove(CardType.CREATURE);
card.getSubtype().add("Aura");
card.getSubtype().add("Aura");
}
if (card.putOntoBattlefield(game, fromZone, ability.getSourceId(), controllerId)) {
if (bestow) {
if (bestow) {
// card will be copied during putOntoBattlefield, so the card of CardPermanent has to be changed
// TODO: Find a better way to prevent bestow creatures from being effected by creature affecting abilities
Permanent permanent = game.getPermanent(card.getId());
@ -234,16 +232,16 @@ public class Spell extends StackObjImpl implements Card {
}
card.getCardType().add(CardType.CREATURE);
card.getSubtype().remove("Aura");
}
}
return ability.resolve(game);
}
if (bestow) {
if (bestow) {
card.getCardType().add(CardType.CREATURE);
}
}
return false;
}
// Aura has no legal target and its a bestow enchantment -> Add it to battlefield as creature
if (this.getSpellAbility() instanceof BestowAbility) {
if (this.getSpellAbility() instanceof BestowAbility) {
updateOptionalCosts(0);
result = card.putOntoBattlefield(game, fromZone, ability.getSourceId(), controllerId);
return result;
@ -263,17 +261,17 @@ public class Spell extends StackObjImpl implements Card {
}
private boolean spellAbilityHasLegalParts(SpellAbility spellAbility, Game game) {
if (spellAbility.getModes().getSelectedModes().size() > 1) {
if (spellAbility.getModes().getSelectedModes().size() > 1) {
boolean targetedMode = false;
boolean legalTargetedMode = false;
for (UUID modeId :spellAbility.getModes().getSelectedModes()) {
for (UUID modeId : spellAbility.getModes().getSelectedModes()) {
spellAbility.getModes().setActiveMode(modeId);
if (spellAbility.getTargets().size() > 0) {
targetedMode = true;
if (spellAbility.getTargets().stillLegal(spellAbility, game)) {
legalTargetedMode = true;
}
}
}
}
}
if (targetedMode) {
return legalTargetedMode;
@ -283,11 +281,11 @@ public class Spell extends StackObjImpl implements Card {
return spellAbility.getTargets().stillLegal(spellAbility, game);
}
}
/**
* As we have ability in the stack, we need to update optional costs in original card.
* This information will be used later by effects, e.g. to determine whether card was kicked or not.
* E.g. Desolation Angel
* As we have ability in the stack, we need to update optional costs in
* original card. This information will be used later by effects, e.g. to
* determine whether card was kicked or not. E.g. Desolation Angel
*/
private void updateOptionalCosts(int index) {
Ability abilityOrig = spellCards.get(index).getAbilities().get(spellAbilities.get(index).getId());
@ -307,9 +305,7 @@ public class Spell extends StackObjImpl implements Card {
}
}
}
@Override
public void counter(UUID sourceId, Game game) {
this.countered = true;
@ -319,10 +315,10 @@ public class Spell extends StackObjImpl implements Card {
Ability counteringAbility = null;
MageObject counteringObject = game.getObject(sourceId);
if (counteringObject instanceof StackObject) {
counteringAbility = ((StackObject)counteringObject).getStackAbility();
counteringAbility = ((StackObject) counteringObject).getStackAbility();
}
player.moveCards(card, Zone.STACK, Zone.GRAVEYARD, counteringAbility, game);
}
}
}
}
@ -340,18 +336,18 @@ public class Spell extends StackObjImpl implements Card {
public String getName() {
return card.getName();
}
@Override
public String getIdName() {
String idName;
if (card != null) {
idName = card.getId().toString().substring(0,3);
idName = card.getId().toString().substring(0, 3);
} else {
idName = getId().toString().substring(0,3);
idName = getId().toString().substring(0, 3);
}
return getName() + " ["+idName+"]";
return getName() + " [" + idName + "]";
}
@Override
public String getLogName() {
return GameLog.getColoredObjectIdName(card);
@ -363,7 +359,8 @@ public class Spell extends StackObjImpl implements Card {
}
@Override
public void setName(String name) {}
public void setName(String name) {
}
@Override
public Rarity getRarity() {
@ -415,7 +412,6 @@ public class Spell extends StackObjImpl implements Card {
return card.getSupertype();
}
public List<SpellAbility> getSpellAbilities() {
return spellAbilities;
}
@ -429,7 +425,7 @@ public class Spell extends StackObjImpl implements Card {
public Abilities<Ability> getAbilities(Game game) {
return card.getAbilities(game);
}
@Override
public boolean hasAbility(UUID abilityId, Game game) {
return card.hasAbility(abilityId, game);
@ -446,9 +442,11 @@ public class Spell extends StackObjImpl implements Card {
}
/**
* 202.3b When calculating the converted mana cost of an object with an {X} in its
* mana cost, X is treated as 0 while the object is not on the stack, and X is
* treated as the number chosen for it while the object is on the stack.
* 202.3b When calculating the converted mana cost of an object with an {X}
* in its mana cost, X is treated as 0 while the object is not on the stack,
* and X is treated as the number chosen for it while the object is on the
* stack.
*
* @return
*/
@Override
@ -457,9 +455,9 @@ public class Spell extends StackObjImpl implements Card {
if (faceDown) {
return 0;
}
for (Ability spellAbility: spellAbilities) {
for (Ability spellAbility : spellAbilities) {
int xMultiplier = 0;
for (String symbolString :spellAbility.getManaCosts().getSymbols()) {
for (String symbolString : spellAbility.getManaCosts().getSymbols()) {
int index = symbolString.indexOf("{X}");
while (index != -1) {
xMultiplier++;
@ -471,14 +469,14 @@ public class Spell extends StackObjImpl implements Card {
cmc += spellAbility.getManaCostsToPay().getX() * xMultiplier;
} else {
cmc += spellAbility.getManaCosts().convertedManaCost() + spellAbility.getManaCostsToPay().getX() * xMultiplier;
}
}
}
if (this.getSpellAbility().getSpellAbilityType().equals(SpellAbilityType.BASE_ALTERNATE)) {
cmc += getCard().getManaCost().convertedManaCost();
}
return cmc;
}
@Override
public MageInt getPower() {
return card.getPower();
@ -503,7 +501,8 @@ public class Spell extends StackObjImpl implements Card {
spellAbilities.add(spellAbility);
}
public void addAbility(Ability ability) {}
public void addAbility(Ability ability) {
}
@Override
public SpellAbility getSpellAbility() {
@ -512,14 +511,15 @@ public class Spell extends StackObjImpl implements Card {
public void setControllerId(UUID controllerId) {
this.ability.setControllerId(controllerId);
for (SpellAbility spellAbility: spellAbilities) {
for (SpellAbility spellAbility : spellAbilities) {
spellAbility.setControllerId(controllerId);
}
this.controllerId = controllerId;
}
@Override
public void setOwnerId(UUID controllerId) {}
public void setOwnerId(UUID controllerId) {
}
@Override
public List<String> getRules() {
@ -608,7 +608,7 @@ public class Spell extends StackObjImpl implements Card {
card.adjustChoices(ability, game);
}
}
@Override
public void adjustCosts(Ability ability, Game game) {
if (card != null) {
@ -623,7 +623,6 @@ public class Spell extends StackObjImpl implements Card {
}
}
@Override
public boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag) {
return moveToZone(zone, sourceId, game, flag, null);
@ -635,7 +634,7 @@ public class Spell extends StackObjImpl implements Card {
// If a copy of a card is in any zone other than the stack or the battlefield, it ceases to exist.
// These are state-based actions. See rule 704.
if (this.isCopiedSpell() && !zone.equals(Zone.STACK)) {
return true;
return true;
}
throw new UnsupportedOperationException("Unsupported operation");
}
@ -646,7 +645,7 @@ public class Spell extends StackObjImpl implements Card {
}
@Override
public boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game, ArrayList<UUID> appliedEffects) {
public boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game, ArrayList<UUID> appliedEffects) {
ZoneChangeEvent event = new ZoneChangeEvent(this.getId(), sourceId, this.getOwnerId(), Zone.STACK, Zone.EXILED, appliedEffects);
if (!game.replaceEvent(event)) {
game.getStack().remove(this);
@ -667,8 +666,6 @@ public class Spell extends StackObjImpl implements Card {
return false;
}
@Override
public boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId) {
throw new UnsupportedOperationException("Unsupported operation");
@ -711,7 +708,7 @@ public class Spell extends StackObjImpl implements Card {
@Override
public void updateZoneChangeCounter(Game game) {
throw new UnsupportedOperationException("Unsupported operation");
throw new UnsupportedOperationException("Unsupported operation");
}
@Override
@ -762,7 +759,8 @@ public class Spell extends StackObjImpl implements Card {
}
@Override
public void build() {}
public void build() {
}
@Override
public Counters getCounters(Game game) {
@ -815,7 +813,7 @@ public class Spell extends StackObjImpl implements Card {
@Override
public void setSpellAbility(SpellAbility ability) {
throw new UnsupportedOperationException("Not supported.");
throw new UnsupportedOperationException("Not supported.");
}
public boolean isCountered() {

View file

@ -1,31 +1,30 @@
/*
* 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.
*/
* 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.game.stack;
import java.util.ArrayDeque;
@ -44,11 +43,12 @@ public class SpellStack extends ArrayDeque<StackObject> {
protected Date dateLastAdded;
public SpellStack () {}
public SpellStack() {
}
public SpellStack(final SpellStack stack) {
for (StackObject spell: stack) {
for (StackObject spell : stack) {
this.addLast(spell.copy());
}
}
@ -67,7 +67,7 @@ public class SpellStack extends ArrayDeque<StackObject> {
}
public void remove(StackObject object) {
for (StackObject spell: this) {
for (StackObject spell : this) {
if (spell.getId().equals(object.getId())) {
super.remove(spell);
return;
@ -77,7 +77,7 @@ public class SpellStack extends ArrayDeque<StackObject> {
public boolean counter(UUID objectId, UUID sourceId, Game game) {
// the counter logic is copied by some spells to handle replacement effects of the countered spell
// so if logic is changed here check those spells for needed changes too
// so if logic is changed here check those spells for needed changes too
// Concerned cards to check: Hinder, Spell Crumple
StackObject stackObject = getStackObject(objectId);
MageObject sourceObject = game.getObject(sourceId);
@ -87,7 +87,7 @@ public class SpellStack extends ArrayDeque<StackObject> {
if (targetSourceObject == null) {
targetSourceName = "[Object not found]";
} else {
targetSourceName = game.getObject(stackObject.getSourceId()).getName();
targetSourceName = game.getObject(stackObject.getSourceId()).getLogName();
}
if (stackObject instanceof Spell) {
counteredObjectName = targetSourceName;
@ -95,12 +95,12 @@ public class SpellStack extends ArrayDeque<StackObject> {
counteredObjectName = "Ability (" + stackObject.getStackAbility().getRule(targetSourceName) + ") of " + targetSourceName;
}
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, objectId, sourceId, stackObject.getControllerId()))) {
if ( stackObject instanceof Spell ) {
game.rememberLKI(objectId, Zone.STACK, (Spell)stackObject);
if (stackObject instanceof Spell) {
game.rememberLKI(objectId, Zone.STACK, (Spell) stackObject);
} else {
this.remove(stackObject);
this.remove(stackObject);
}
stackObject.counter(sourceId, game);
stackObject.counter(sourceId, game);
if (!game.isSimulation()) {
game.informPlayers(counteredObjectName + " is countered by " + sourceObject.getLogName());
}
@ -114,7 +114,7 @@ public class SpellStack extends ArrayDeque<StackObject> {
}
public StackObject getStackObject(UUID id) {
for (StackObject stackObject: this) {
for (StackObject stackObject : this) {
UUID objectId = stackObject.getId();
if (objectId.equals(id)) {
return stackObject;
@ -128,10 +128,10 @@ public class SpellStack extends ArrayDeque<StackObject> {
}
public Spell getSpell(UUID id) {
for (StackObject stackObject: this) {
for (StackObject stackObject : this) {
if (stackObject instanceof Spell) {
if (stackObject.getId().equals(id) || stackObject.getSourceId().equals(id)) {
return (Spell)stackObject;
return (Spell) stackObject;
}
}
}

View file

@ -26130,7 +26130,7 @@ Valor in Akros|Magic Origins|39|U|{3}{W}|Enchantment|||Whenever a creature enter
Vryn Wingmare|Magic Origins|40|R|{2}{W}|Creature - Pegasus|2|1|Flying$Noncreature spells cost {1} more to cast.|
War Oracle|Magic Origins|41|U|{2}{W}{W}|Creature - Human Cleric|3|3|Lifelink$Renown 1 <i>(When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned)</i>|
Yoked Ox|Magic Origins|42|C|{W}|Creature - Ox|0|4||
Alhammarret, High Arbiter|Magic Origins|43|R|{5}{U}{U}|Legendary Creature - Sphinx|5|5|Flying$As Alhammarret, High Arbiter enters the battlefield, each opponent reveals his or her hand. You choose the name of a nonland card revealed this way.$Your opponent can't cast spells with the chosen name <i>(as long as this creature is on the battlefield)</i>.|
Alhammarret, High Arbiter|Magic Origins|43|R|{5}{U}{U}|Legendary Creature - Sphinx|5|5|Flying$As Alhammarret, High Arbiter enters the battlefield, each opponent reveals his or her hand. You choose the name of a nonland card revealed this way.$Your opponents can't cast spells with the chosen name <i>(as long as this creature is on the battlefield)</i>.|
Anchor to the AEther|Magic Origins|44|U|{2}{U}|Sorcery|||Put target creature on top of its owner's library. Scry 1.|
Artificer's Epiphany|Magic Origins|45|C|{2}{U}|Instant|||Draw two cards. If you control no artifacts, discard a card.|
Aspiring Aeronaut|Magic Origins|46|C|{3}{U}|Creature - Human Artificer|1|2|Flying$When Aspiring Aeronaut enters the battlefield, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield.|