Rename : typo in static method

This commit is contained in:
Ingmar Goudt 2018-09-29 13:35:48 +02:00
parent ef092b20e0
commit 809e75af75
25 changed files with 25 additions and 27 deletions

View file

@ -62,7 +62,7 @@ class AnZerrinRuinsDontUntapEffect extends DontUntapInControllersUntapStepAllEff
if (super.applies(event, source, game)) {
Permanent permanent = game.getPermanent(event.getTargetId());
if (permanent != null) {
if (permanent.hasSubtype(ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game), game)) {
if (permanent.hasSubtype(ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game), game)) {
return true;
}
}

View file

@ -64,7 +64,7 @@ class ConspyEffect extends ContinuousEffectImpl {
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (controller != null && subType != null) {
// Creature cards you own that aren't on the battlefield
// in graveyard

View file

@ -57,7 +57,7 @@ class AshesOfTheFallenEffect extends ContinuousEffectImpl {
Player controller = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(source.getSourceId());
if (controller != null && permanent != null) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(permanent.getId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(permanent.getId(), game);
if (subType != null) {
for (UUID cardId : controller.getGraveyard()) {
Card card = game.getCard(cardId);

View file

@ -64,7 +64,7 @@ class CavernOfSoulsManaBuilder extends ConditionalManaBuilder {
@Override
public ConditionalManaBuilder setMana(Mana mana, Ability source, Game game) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (subType != null) {
creatureType = subType;
}

View file

@ -66,7 +66,7 @@ class ConspiracyEffect extends ContinuousEffectImpl {
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (controller != null && subType != null) {
// Creature cards you own that aren't on the battlefield
// in graveyard

View file

@ -61,7 +61,7 @@ class FilterCoverOfDarkness extends FilterCreaturePermanent {
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
if (super.match(permanent, sourceId, playerId, game)) {
if (subType == null) {
subType = ChooseCreatureTypeEffect.getChoosenCreatureType(sourceId, game);
subType = ChooseCreatureTypeEffect.getChosenCreatureType(sourceId, game);
if (subType == null) {
return false;
}

View file

@ -70,7 +70,7 @@ class DoomCannonFilter extends FilterControlledCreaturePermanent {
@Override
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
if (super.match(permanent, sourceId, playerId, game)) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(sourceId, game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(sourceId, game);
if (subType != null && permanent.hasSubtype(subType, game)) {
return true;
}

View file

@ -71,7 +71,7 @@ class AddCounterAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(getSourceId(), game);
if (subType != null) {
Spell spell = game.getStack().getSpell(event.getTargetId());
if (spell != null

View file

@ -69,7 +69,7 @@ class KindredChargeEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (controller != null && sourceObject != null) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (subType != null) {
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control of the chosen type");
filter.add(new SubtypePredicate(subType));

View file

@ -70,7 +70,7 @@ class KindredSummonsEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (subType == null) {
return false;
}

View file

@ -80,7 +80,7 @@ class MetallicMimicReplacementEffect extends ReplacementEffectImpl {
&& enteringCreature.isControlledBy(source.getControllerId())
&& enteringCreature.isCreature()
&& !event.getTargetId().equals(source.getSourceId())) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
return subType != null && enteringCreature.hasSubtype(subType, game);
}
return false;

View file

@ -66,7 +66,7 @@ class ObeliskOfUrdBoostEffect extends ContinuousEffectImpl {
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (subType != null) {
for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
if (perm.hasSubtype(subType, game)) {

View file

@ -53,7 +53,7 @@ class PillarOfOriginsManaBuilder extends ConditionalManaBuilder {
@Override
public ConditionalManaBuilder setMana(Mana mana, Ability source, Game game) {
creatureType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
creatureType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (controller != null && sourceObject != null) {

View file

@ -81,7 +81,7 @@ class RidersOfGavonyGainAbilityControlledEffect extends ContinuousEffectImpl {
if (protectionFilter == null) {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(permanent.getId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(permanent.getId(), game);
if (subType != null) {
protectionFilter = new FilterPermanent(subType.getDescription() + 's');
protectionFilter.add(new SubtypePredicate(subType));

View file

@ -23,7 +23,6 @@ import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.token.RiptideReplicatorToken;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.Token;
/**
@ -80,7 +79,7 @@ class RiptideReplicatorEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color");
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (subType == null) {
return false;
}

View file

@ -57,7 +57,7 @@ class FilterSteelyResolve extends FilterCreaturePermanent {
@Override
public boolean match(Permanent permanent, UUID sourceId, UUID playerId, Game game) {
if (super.match(permanent, sourceId, playerId, game)) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(sourceId, game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(sourceId, game);
if (subType != null && permanent.hasSubtype(subType, game)) {
return true;
}

View file

@ -57,7 +57,7 @@ class UnclaimedTerritoryManaBuilder extends ConditionalManaBuilder {
@Override
public ConditionalManaBuilder setMana(Mana mana, Ability source, Game game) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (subType != null) {
creatureType = subType;
}

View file

@ -81,7 +81,7 @@ class DrawCardIfCreatureTypeAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(getSourceId(), game);
if (subType != null) {
Spell spell = game.getStack().getSpell(event.getTargetId());
if (spell != null

View file

@ -19,7 +19,6 @@ import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.VolrathsLaboratoryToken;
@ -74,7 +73,7 @@ class VolrathsLaboratoryEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color");
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
Token token = new VolrathsLaboratoryToken(color, subType);
return token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
}

View file

@ -53,7 +53,7 @@ class XenograftAddSubtypeEffect extends ContinuousEffectImpl {
@Override
public boolean apply(Game game, Ability source) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (subType != null) {
List<Permanent> permanents = game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game);
for (Permanent permanent : permanents) {

View file

@ -62,7 +62,7 @@ public class ChooseCreatureTypeEffect extends OneShotEffect {
* @param game
* @return
*/
public static SubType getChoosenCreatureType(UUID objectId, Game game) {
public static SubType getChosenCreatureType(UUID objectId, Game game) {
SubType creatureType = null;
Object savedCreatureType = game.getState().getValue(objectId + "_type");
if (savedCreatureType != null) {

View file

@ -22,7 +22,7 @@ public class AddChosenSubtypeEffect extends ContinuousEffectImpl {
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(permanent.getId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(permanent.getId(), game);
if (subType != null && !permanent.hasSubtype(subType, game)) {
permanent.getSubtype(game).add(subType);
}

View file

@ -49,7 +49,7 @@ public class BoostAllOfChosenSubtypeEffect extends BoostAllEffect {
@Override
protected void setRuntimeData(Ability source, Game game) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (subType != null) {
subtype = subType;
} else {

View file

@ -37,7 +37,7 @@ public class SpellsCostReductionAllOfChosenSubtypeEffect extends SpellsCostReduc
@Override
protected boolean selectedByRuntimeData(Card card, Ability source, Game game) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (subType != null) {
return card.hasSubtype(subType, game);
}

View file

@ -19,7 +19,7 @@ public class ChosenSubtypePredicate implements ObjectPlayerPredicate<ObjectSourc
@Override
public boolean apply(ObjectSourcePlayer<MageObject> input, Game game) {
SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(input.getSourceId(), game);
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(input.getSourceId(), game);
return input.getObject().hasSubtype(subType, game);
}