mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed .hasType implementation.
This commit is contained in:
parent
f488b0268a
commit
291c67ec7d
1 changed files with 6 additions and 6 deletions
|
@ -152,19 +152,19 @@ public abstract class MageObjectImpl<T extends MageObjectImpl<T>> implements Mag
|
||||||
public void adjustCosts(Ability ability, Game game) {}
|
public void adjustCosts(Ability ability, Game game) {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasSubtype(String subtype) {
|
public boolean hasSubtype(String value) {
|
||||||
if (subtype == null) {
|
if (value == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (subtype.contains(subtype)) {
|
if (this.subtype.contains(value)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else { // checking for Changeling
|
else { // checking for Changeling
|
||||||
// first make sure input parameter is not creature type
|
// first make sure input parameter is not creature type
|
||||||
// if so, then ChangelingAbility doesn't matter
|
// if so, then ChangelingAbility doesn't matter
|
||||||
if (subtype.equals("Mountain") || subtype.equals("Island") || subtype.equals("Plains")
|
if (value.equals("Mountain") || value.equals("Island") || value.equals("Plains")
|
||||||
|| subtype.equals("Forest") || subtype.equals("Swamp") || subtype.equals("Aura")
|
|| value.equals("Forest") || value.equals("Swamp") || value.equals("Aura")
|
||||||
|| subtype.equals("Equipment") || subtype.equals("Fortification")) {
|
|| value.equals("Equipment") || value.equals("Fortification")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// as it is creature subtype, then check the existence of Changeling
|
// as it is creature subtype, then check the existence of Changeling
|
||||||
|
|
Loading…
Reference in a new issue