mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
minor fixes
This commit is contained in:
parent
7df6bb8db6
commit
a06f27ec89
6 changed files with 11 additions and 6 deletions
|
@ -171,6 +171,8 @@ public abstract class ActivatedAbilityImpl<T extends ActivatedAbilityImpl<T>> ex
|
|||
|
||||
@Override
|
||||
public String getActivatedMessage(Game game) {
|
||||
if (game.isSimulation())
|
||||
return "";
|
||||
return " activates ability from " + getMessageText(game);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
package mage.abilities.costs.mana;
|
||||
|
||||
import mage.Constants.ColoredManaSymbol;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.game.Game;
|
||||
import mage.players.ManaPool;
|
||||
|
@ -43,6 +44,7 @@ public class PhyrexianManaCost extends ColoredManaCost {
|
|||
|
||||
public PhyrexianManaCost(ColoredManaSymbol mana) {
|
||||
super(mana);
|
||||
options.add(Mana.ColorlessMana(0));
|
||||
}
|
||||
|
||||
public PhyrexianManaCost(PhyrexianManaCost manaCost) {
|
||||
|
|
|
@ -71,7 +71,7 @@ public class PlaneswalkerRedirectionEffect extends RedirectionEffect<Planeswalke
|
|||
if (!damageEvent.isCombatDamage() && game.getOpponents(event.getTargetId()).contains(playerId)) {
|
||||
Player target = game.getPlayer(event.getTargetId());
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (target != null) {
|
||||
if (target != null && player != null) {
|
||||
int numPlaneswalkers = game.getBattlefield().countAll(filter, target.getId());
|
||||
if (numPlaneswalkers > 0 && player.chooseUse(outcome, "Redirect damage to planeswalker?", game)) {
|
||||
redirectTarget = new TargetPermanent(filter);
|
||||
|
@ -79,7 +79,7 @@ public class PlaneswalkerRedirectionEffect extends RedirectionEffect<Planeswalke
|
|||
redirectTarget.add(game.getBattlefield().getAllActivePermanents(filter, target.getId()).get(0).getId(), game);
|
||||
}
|
||||
else {
|
||||
player.choose(Outcome.Damage, redirectTarget, source.getSourceId(), game);
|
||||
player.choose(Outcome.Damage, redirectTarget, null, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -64,6 +64,6 @@ public class ExileSpellEffect extends PostResolveEffect<ExileSpellEffect> {
|
|||
|
||||
@Override
|
||||
public void postResolve(Card card, Ability source, UUID controllerId, Game game) {
|
||||
game.getExile().getPermanentExile().add(card);
|
||||
card.moveToExile(null, "", source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,7 +114,8 @@ class AnnihilatorEffect extends OneShotEffect<AnnihilatorEffect> {
|
|||
}
|
||||
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
Target target = new TargetControlledPermanent(1, count, filter, false);
|
||||
int amount = Math.min(count, game.getBattlefield().countAll(filter, player.getId()));
|
||||
Target target = new TargetControlledPermanent(amount, amount, filter, false);
|
||||
|
||||
//A spell or ability could have removed the only legal target this player
|
||||
//had, if thats the case this ability should fizzle.
|
||||
|
|
|
@ -28,12 +28,12 @@
|
|||
|
||||
package mage.game.stack;
|
||||
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Stack;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -46,7 +46,7 @@ import mage.players.Player;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class SpellStack extends Stack<StackObject> {
|
||||
public class SpellStack extends ArrayDeque<StackObject> {
|
||||
|
||||
public SpellStack () {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue