Fixed Cavern of Souls and similar cards spamming the game logs (bug #7079) (#7148)

This commit is contained in:
Daniel Bomar 2021-01-01 10:04:24 -06:00 committed by GitHub
parent adbeb5a328
commit 98235ba57f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -68,7 +68,7 @@ class CavernOfSoulsManaBuilder extends ConditionalManaBuilder {
} }
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId()); MageObject sourceObject = game.getObject(source.getSourceId());
if (game.inCheckPlayableState() && controller != null && sourceObject != null) { if (controller != null && sourceObject != null && mana.getAny() == 0) {
game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName()
+ " (can only be spend to cast for creatures of type " + creatureType + " and that spell can't be countered)"); + " (can only be spend to cast for creatures of type " + creatureType + " and that spell can't be countered)");
} }

View file

@ -56,7 +56,7 @@ class PillarOfOriginsManaBuilder extends ConditionalManaBuilder {
creatureType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game); creatureType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId()); MageObject sourceObject = game.getObject(source.getSourceId());
if (controller != null && sourceObject != null) { if (controller != null && sourceObject != null && mana.getAny() == 0) {
game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName()
+ " (can only be spent to cast creatures of type " + creatureType + ")"); + " (can only be spent to cast creatures of type " + creatureType + ")");
} }

View file

@ -63,7 +63,7 @@ class UnclaimedTerritoryManaBuilder extends ConditionalManaBuilder {
} }
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId()); MageObject sourceObject = game.getObject(source.getSourceId());
if (controller != null && sourceObject != null) { if (controller != null && sourceObject != null && mana.getAny() == 0) {
game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName() game.informPlayers(controller.getLogName() + " produces " + mana.toString() + " with " + sourceObject.getLogName()
+ " (can only be spent to cast creatures of type " + creatureType + ")"); + " (can only be spent to cast creatures of type " + creatureType + ")");
} }