mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
remove all contains(cardtype.XX) references, instead use the default interface method
This commit is contained in:
parent
733de2d27f
commit
b5e8c88153
466 changed files with 581 additions and 570 deletions
|
|
@ -163,12 +163,12 @@ public abstract class MageObjectImpl implements MageObject {
|
|||
public MageInt getToughness() {
|
||||
return toughness;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getStartingLoyalty() {
|
||||
for (Ability ab: getAbilities()) {
|
||||
for (Ability ab : getAbilities()) {
|
||||
if (ab instanceof PlanswalkerEntersWithLoyalityCountersAbility) {
|
||||
return ((PlanswalkerEntersWithLoyalityCountersAbility)ab).getStartingLoyalty();
|
||||
return ((PlanswalkerEntersWithLoyalityCountersAbility) ab).getStartingLoyalty();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -178,19 +178,19 @@ public abstract class MageObjectImpl implements MageObject {
|
|||
public ObjectColor getColor(Game game) {
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ObjectColor getFrameColor(Game game) {
|
||||
// For lands, add any colors of mana the land can produce to
|
||||
// its frame colors.
|
||||
if (this.isLand()) {
|
||||
ObjectColor cl = frameColor.copy();
|
||||
for (Ability ab: getAbilities()) {
|
||||
for (Ability ab : getAbilities()) {
|
||||
if (ab instanceof ActivatedManaAbilityImpl) {
|
||||
ActivatedManaAbilityImpl mana = (ActivatedManaAbilityImpl)ab;
|
||||
ActivatedManaAbilityImpl mana = (ActivatedManaAbilityImpl) ab;
|
||||
try {
|
||||
List<Mana> manaAdded = mana.getNetMana(game);
|
||||
for (Mana m: manaAdded) {
|
||||
for (Mana m : manaAdded) {
|
||||
if (m.getAny() > 0) {
|
||||
return new ObjectColor("WUBRG");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue