another batch of text cleanup (#11694)

* minor refactor EntersBattlefieldEffect

* more minor refactoring

* text fix

* fix more text

* more text adjustments

* more text discrepancy fixes

* continue the text fixes

* followup fixes and more fixes
This commit is contained in:
xenohedron 2024-01-20 23:13:03 -05:00 committed by GitHub
parent 7008f0a7f0
commit 4959ef4d49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
84 changed files with 192 additions and 212 deletions

View file

@ -1,4 +1,3 @@
package mage.abilities.effects;
import mage.MageObject;
@ -20,11 +19,11 @@ import mage.players.Player;
*/
public class EntersBattlefieldEffect extends ReplacementEffectImpl {
protected Effects baseEffects = new Effects();
protected String text;
protected Condition condition;
protected boolean optional;
protected EnterEventType enterEventType;
private final Effects baseEffects;
private final String text;
private final Condition condition;
private final boolean optional;
private final EnterEventType enterEventType;
public static final String SOURCE_CAST_SPELL_ABILITY = "sourceCastSpellAbility";
@ -46,6 +45,7 @@ public class EntersBattlefieldEffect extends ReplacementEffectImpl {
public EntersBattlefieldEffect(Effect baseEffect, Condition condition, String text, boolean selfScope, boolean optional, EnterEventType enterEventType) {
super(Duration.WhileOnBattlefield, baseEffect.getOutcome(), selfScope);
this.baseEffects = new Effects();
this.baseEffects.add(baseEffect);
this.enterEventType = enterEventType;
this.text = text;
@ -83,12 +83,8 @@ public class EntersBattlefieldEffect extends ReplacementEffectImpl {
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getTargetId().equals(source.getSourceId())) {
if (condition == null || condition.apply(game, source)) {
return true;
}
}
return false;
return event.getTargetId().equals(source.getSourceId())
&& (condition == null || condition.apply(game, source));
}
@Override