This commit is contained in:
jeffwadsworth 2021-07-10 20:29:51 -05:00
parent d06ab829ce
commit ca8fdde793

View file

@ -36,19 +36,36 @@ 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)) {
permanent.addSubType(
game,
SubType.PLAINS,
SubType.ISLAND,
SubType.SWAMP,
SubType.MOUNTAIN,
SubType.FOREST
);
permanent.addAbility(new WhiteManaAbility(), source.getSourceId(), game);
permanent.addAbility(new BlueManaAbility(), source.getSourceId(), game);
permanent.addAbility(new BlackManaAbility(), source.getSourceId(), game);
permanent.addAbility(new RedManaAbility(), source.getSourceId(), game);
permanent.addAbility(new GreenManaAbility(), source.getSourceId(), 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);
}
if (!permanent.getAbilities().containsRule(new WhiteManaAbility())) {
permanent.addAbility(new WhiteManaAbility(), source.getSourceId(), game);
}
if (!permanent.getAbilities().containsRule(new BlueManaAbility())) {
permanent.addAbility(new BlueManaAbility(), source.getSourceId(), game);
}
if (!permanent.getAbilities().containsRule(new BlackManaAbility())) {
permanent.addAbility(new BlackManaAbility(), source.getSourceId(), game);
}
if (!permanent.getAbilities().containsRule(new RedManaAbility())) {
permanent.addAbility(new RedManaAbility(), source.getSourceId(), game);
}
if (!permanent.getAbilities().containsRule(new GreenManaAbility())) {
permanent.addAbility(new GreenManaAbility(), source.getSourceId(), game);
}
}
return true;
}