mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
- addSubType() already checks for duplicates
This commit is contained in:
parent
d8c537800b
commit
9300d07160
1 changed files with 6 additions and 15 deletions
|
@ -36,21 +36,12 @@ public class BecomesAllBasicsControlledEffect extends ContinuousEffectImpl {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND, source.getControllerId(), game)) {
|
||||
if (!permanent.getSubtype(game).contains(SubType.PLAINS)) {
|
||||
permanent.addSubType(SubType.PLAINS);
|
||||
}
|
||||
if (!permanent.getSubtype(game).contains(SubType.ISLAND)) {
|
||||
permanent.addSubType(SubType.ISLAND);
|
||||
}
|
||||
if (!permanent.getSubtype(game).contains(SubType.SWAMP)) {
|
||||
permanent.addSubType(SubType.SWAMP);
|
||||
}
|
||||
if (!permanent.getSubtype(game).contains(SubType.MOUNTAIN)) {
|
||||
permanent.addSubType(SubType.MOUNTAIN);
|
||||
}
|
||||
if (!permanent.getSubtype(game).contains(SubType.FOREST)) {
|
||||
permanent.addSubType(SubType.FOREST);
|
||||
}
|
||||
permanent.addSubType(SubType.PLAINS);
|
||||
permanent.addSubType(SubType.ISLAND);
|
||||
permanent.addSubType(SubType.SWAMP);
|
||||
permanent.addSubType(SubType.MOUNTAIN);
|
||||
permanent.addSubType(SubType.FOREST);
|
||||
|
||||
if (!permanent.getAbilities().containsRule(new WhiteManaAbility())) {
|
||||
permanent.addAbility(new WhiteManaAbility(), source.getSourceId(), game);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue