mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Won't send to log empty entries
This commit is contained in:
@@ -23,6 +23,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import forge.Card;
|
||||
import forge.GameEventType;
|
||||
import forge.card.ability.AbilityFactory;
|
||||
@@ -149,8 +151,10 @@ public class ReplacementHandler {
|
||||
chosenRE.setHasRun(true);
|
||||
ReplacementResult res = this.executeReplacement(runParams, chosenRE, decider, game);
|
||||
if (res != ReplacementResult.NotReplaced) {
|
||||
chosenRE.setHasRun(false);
|
||||
game.getGameLog().add(GameEventType.EFFECT_REPLACED, chosenRE.toString());
|
||||
chosenRE.setHasRun(false);
|
||||
String message = chosenRE.toString();
|
||||
if ( !StringUtils.isEmpty(message))
|
||||
game.getGameLog().add(GameEventType.EFFECT_REPLACED, chosenRE.toString());
|
||||
return res;
|
||||
} else {
|
||||
if (possibleReplacers.size() == 0) {
|
||||
|
||||
Reference in New Issue
Block a user