Merge pull request #4049 from theelk801/master

small things
This commit is contained in:
theelk801 2017-09-23 18:08:17 -04:00 committed by GitHub
commit a3ce9e4d98
3 changed files with 3 additions and 2 deletions

View file

@ -40,7 +40,7 @@ public class DefendingPlayerControlsPredicate implements ObjectSourcePlayerPredi
@Override
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
return input.getObject().getControllerId().equals(game.getCombat().getDefenderId(input.getSourceId()));
return input.getObject().getControllerId().equals(game.getCombat().getDefendingPlayerId(input.getSourceId()));
}
@Override

View file

@ -40,7 +40,7 @@ public class DefendingPlayerOwnsCardPredicate implements ObjectSourcePlayerPredi
@Override
public boolean apply(ObjectSourcePlayer<Card> input, Game game) {
return input.getObject().getOwnerId().equals(game.getCombat().getDefenderId(input.getSourceId()));
return input.getObject().getOwnerId().equals(game.getCombat().getDefendingPlayerId(input.getSourceId()));
}
@Override

View file

@ -1108,6 +1108,7 @@ public abstract class PlayerImpl implements Player, Serializable {
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.ACTIVATE_ABILITY, ability.getId(), ability.getSourceId(), playerId))) {
int bookmark = game.bookmarkState();
ability.newId();
ability.setControllerId(playerId);
game.getStack().push(new StackAbility(ability, playerId));
if (ability.activate(game, false)) {
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ACTIVATED_ABILITY, ability.getId(), ability.getSourceId(), playerId));