From 3c91b8d15fbffebeedf9abba6016d2767faf9cde Mon Sep 17 00:00:00 2001 From: Mark Langen Date: Sun, 16 Apr 2017 23:18:35 -0600 Subject: [PATCH] Start to add builder pattern to some card definition classes --- Mage/src/main/java/mage/abilities/effects/Effect.java | 2 +- Mage/src/main/java/mage/abilities/effects/EffectImpl.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/Effect.java b/Mage/src/main/java/mage/abilities/effects/Effect.java index e4fe554493..17234c7f9d 100644 --- a/Mage/src/main/java/mage/abilities/effects/Effect.java +++ b/Mage/src/main/java/mage/abilities/effects/Effect.java @@ -46,7 +46,7 @@ public interface Effect extends Serializable { UUID getId(); void newId(); String getText(Mode mode); - void setText(String staticText); + Effect setText(String staticText); boolean apply(Game game, Ability source); Outcome getOutcome(); void setOutcome(Outcome outcome); diff --git a/Mage/src/main/java/mage/abilities/effects/EffectImpl.java b/Mage/src/main/java/mage/abilities/effects/EffectImpl.java index c0117cff6b..91f82ddaa9 100644 --- a/Mage/src/main/java/mage/abilities/effects/EffectImpl.java +++ b/Mage/src/main/java/mage/abilities/effects/EffectImpl.java @@ -85,8 +85,9 @@ public abstract class EffectImpl implements Effect { } @Override - public void setText(String staticText) { + public Effect setText(String staticText) { this.staticText = staticText; + return this; } @Override