Some minor fixes.

This commit is contained in:
LevelX2 2015-04-21 00:09:29 +02:00
parent c2fb2de67a
commit a47c0adfda
2 changed files with 4 additions and 3 deletions

View file

@ -96,7 +96,7 @@ public class GameView implements Serializable {
for (StackObject stackObject: state.getStack()) {
if (stackObject instanceof StackAbility) {
// Stack Ability
MageObject object = ((StackAbility)stackObject).getSourceObject(game);
MageObject object = game.getObject(stackObject.getSourceId());
Card card = game.getCard(stackObject.getSourceId());
if (card != null) {
if (object != null) {

View file

@ -112,11 +112,11 @@ class WaveOfVitriolEffect extends OneShotEffect {
if (player != null) {
int count = 0;
for(Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, playerId, game)) {
if (permanent.getCardType().contains(CardType.LAND)) {
if (permanent.sacrifice(source.getSourceId(), game) && permanent.getCardType().contains(CardType.LAND)) {
count++;
}
permanent.sacrifice(source.getSourceId(), game);
}
game.getState().handleSimultaneousEvent(game);
if (count > 0 && player.chooseUse(Outcome.PutLandInPlay, "Search your library for up to " + count + " basic lands?", game)) {
Target target = new TargetCardInLibrary(0,count, new FilterBasicLandCard());
player.chooseTarget(outcome, target, source, game);
@ -127,6 +127,7 @@ class WaveOfVitriolEffect extends OneShotEffect {
}
}
player.shuffleLibrary(game);
game.getState().handleSimultaneousEvent(game);
}
}
}