mirror of
https://github.com/correl/mage.git
synced 2024-11-25 11:09:53 +00:00
Merge origin/master
This commit is contained in:
commit
4cf957a4a9
2 changed files with 4 additions and 4 deletions
|
@ -103,10 +103,7 @@ class TargetStackObjectTargetingControlledPermanent extends TargetObject {
|
||||||
@Override
|
@Override
|
||||||
public boolean canTarget(UUID id, Ability source, Game game) {
|
public boolean canTarget(UUID id, Ability source, Game game) {
|
||||||
StackObject stackObject = game.getStack().getStackObject(id);
|
StackObject stackObject = game.getStack().getStackObject(id);
|
||||||
if ((stackObject instanceof Spell) || (stackObject instanceof StackAbility)) {
|
return (stackObject instanceof Spell) || (stackObject instanceof StackAbility);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -105,6 +105,9 @@ public class SpellStack extends ArrayDeque<StackObject> {
|
||||||
counteredObjectName = "Ability (" + stackObject.getStackAbility().getRule(targetSourceName) + ") of " + targetSourceName;
|
counteredObjectName = "Ability (" + stackObject.getStackAbility().getRule(targetSourceName) + ") of " + targetSourceName;
|
||||||
}
|
}
|
||||||
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, objectId, sourceId, stackObject.getControllerId()))) {
|
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER, objectId, sourceId, stackObject.getControllerId()))) {
|
||||||
|
if (!(stackObject instanceof Spell)) { // spells are removed from stack by the card movement
|
||||||
|
this.remove(stackObject);
|
||||||
|
}
|
||||||
stackObject.counter(sourceId, game, zone, owner, onTop);
|
stackObject.counter(sourceId, game, zone, owner, onTop);
|
||||||
if (!game.isSimulation()) {
|
if (!game.isSimulation()) {
|
||||||
game.informPlayers(counteredObjectName + " is countered by " + sourceObject.getLogName());
|
game.informPlayers(counteredObjectName + " is countered by " + sourceObject.getLogName());
|
||||||
|
|
Loading…
Reference in a new issue