From 291c67ec7de42117c92c2c1a32b51e99a14bad1d Mon Sep 17 00:00:00 2001 From: magenoxx Date: Mon, 15 Aug 2011 19:26:28 +0400 Subject: [PATCH] Fixed .hasType implementation. --- Mage/src/mage/MageObjectImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Mage/src/mage/MageObjectImpl.java b/Mage/src/mage/MageObjectImpl.java index 2440c148de..2a4d61fab8 100644 --- a/Mage/src/mage/MageObjectImpl.java +++ b/Mage/src/mage/MageObjectImpl.java @@ -152,19 +152,19 @@ public abstract class MageObjectImpl> implements Mag public void adjustCosts(Ability ability, Game game) {} @Override - public boolean hasSubtype(String subtype) { - if (subtype == null) { + public boolean hasSubtype(String value) { + if (value == null) { return false; } - if (subtype.contains(subtype)) { + if (this.subtype.contains(value)) { return true; } else { // checking for Changeling // first make sure input parameter is not creature type // if so, then ChangelingAbility doesn't matter - if (subtype.equals("Mountain") || subtype.equals("Island") || subtype.equals("Plains") - || subtype.equals("Forest") || subtype.equals("Swamp") || subtype.equals("Aura") - || subtype.equals("Equipment") || subtype.equals("Fortification")) { + if (value.equals("Mountain") || value.equals("Island") || value.equals("Plains") + || value.equals("Forest") || value.equals("Swamp") || value.equals("Aura") + || value.equals("Equipment") || value.equals("Fortification")) { return false; } // as it is creature subtype, then check the existence of Changeling