remove static ETBTapped code

This commit is contained in:
Northmoc
2020-11-15 15:27:00 -05:00
parent a4bd8c29c3
commit ae91e7e178
3 changed files with 0 additions and 94 deletions

View File

@@ -442,37 +442,6 @@ public class StaticAbility extends CardTraitBase implements IIdentifiable, Clone
return false;
}
/**
* Apply ability.
*
* @param mode
* the mode
* @param card
* the card
* @return true, if successful
*/
public final boolean applyAbility(final String mode, final Card card) {
// don't apply the ability if it hasn't got the right mode
if (!getParam("Mode").equals(mode)) {
return false;
}
if (this.isSuppressed() || !this.checkConditions()) {
return false;
}
if (mode.equals("ETBTapped")) {
return StaticAbilityETBTapped.applyETBTappedAbility(this, card);
}
if (mode.equals("GainAbilitiesOf")) {
}
return false;
}
public final boolean applyAbility(final String mode, final Card card, final boolean isCombat) {
// don't apply the ability if it hasn't got the right mode
if (!getParam("Mode").equals(mode)) {

View File

@@ -1,50 +0,0 @@
/*
* Forge: Play Magic: the Gathering.
* Copyright (C) 2011 Forge Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package forge.game.staticability;
import forge.game.CardTraitBase;
import forge.game.card.Card;
/**
* The Class StaticAbility_CantBeCast.
*/
public class StaticAbilityETBTapped {
/**
* TODO Write javadoc for this method.
*
* @param stAb
* a StaticAbility
* @param card
* the card
* @return true, if successful
*/
public static boolean applyETBTappedAbility(final StaticAbility stAb, final Card card) {
final Card hostCard = stAb.getHostCard();
if (stAb.hasParam("ValidCard")) {
if (!CardTraitBase.matchesValid(card, stAb.getParam("ValidCard").split(","), hostCard)) {
return false;
}
}
return true;
}
}

View File

@@ -63,19 +63,6 @@ public class PlayerZoneBattlefield extends PlayerZone {
super.add(c, position, latestState);
if (trigger) {
// ETBTapped static abilities
for (final Card ca : game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES)) {
for (final StaticAbility stAb : ca.getStaticAbilities()) {
if (stAb.applyAbility("ETBTapped", c)) {
// it enters the battlefield this way, and should
// not fire triggers
c.setTapped(true);
}
}
}
}
if (trigger) {
c.setSickness(true); // summoning sickness
c.runComesIntoPlayCommands();