Replace Overriden getTriggerPhrase() with setTriggerPhrase() usage (#9343)

This commit is contained in:
Alex Vasile 2022-08-08 23:28:46 -04:00 committed by GitHub
parent 188e6dd8c1
commit ebdb6b53a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
406 changed files with 918 additions and 2665 deletions

View file

@ -16,31 +16,29 @@ import mage.game.permanent.Permanent;
*/
public class ZoneChangeAllTriggeredAbility extends TriggeredAbilityImpl {
protected FilterPermanent filter;
protected Zone fromZone;
protected Zone toZone;
protected String rule;
protected final FilterPermanent filter;
protected final Zone fromZone;
protected final Zone toZone;
public ZoneChangeAllTriggeredAbility(Zone zone, Zone toZone, Effect effect, FilterPermanent filter, String rule, boolean optional) {
this(zone, null, toZone, effect, filter, rule, optional);
public ZoneChangeAllTriggeredAbility(Zone zone, Zone toZone, Effect effect, FilterPermanent filter, String triggerPhrase, boolean optional) {
this(zone, null, toZone, effect, filter, triggerPhrase, optional);
}
public ZoneChangeAllTriggeredAbility(Zone zone, Zone fromZone, Zone toZone, Effect effect, FilterPermanent filter, String rule, boolean optional) {
public ZoneChangeAllTriggeredAbility(Zone zone, Zone fromZone, Zone toZone, Effect effect, FilterPermanent filter, String triggerPhrase, boolean optional) {
super(zone, effect, optional);
if (fromZone == Zone.BATTLEFIELD) {
setLeavesTheBattlefieldTrigger(true);
}
this.fromZone = fromZone;
this.toZone = toZone;
this.rule = rule;
this.filter = filter;
setTriggerPhrase(triggerPhrase);
}
public ZoneChangeAllTriggeredAbility(final ZoneChangeAllTriggeredAbility ability) {
super(ability);
this.fromZone = ability.fromZone;
this.toZone = ability.toZone;
this.rule = ability.rule;
this.filter = ability.filter;
}
@ -67,11 +65,6 @@ public class ZoneChangeAllTriggeredAbility extends TriggeredAbilityImpl {
return false;
}
@Override
public String getTriggerPhrase() {
return rule ;
}
@Override
public ZoneChangeAllTriggeredAbility copy() {
return new ZoneChangeAllTriggeredAbility(this);