* Fixed a bug with time stamp order and change of basic land type (e.g. Blood Moon and Spreading Seas).

This commit is contained in:
LevelX2 2016-02-25 17:08:17 +01:00
parent 140672b8b3
commit df98b4e0af
4 changed files with 106 additions and 25 deletions

View file

@ -98,19 +98,29 @@ public class BecomesBasicLandEnchantedEffect extends ContinuousEffectImpl {
for (String landType : landTypes) {
switch (landType) {
case "Swamp":
permanent.addAbility(new BlackManaAbility(), source.getSourceId(), game);
if (permanent.getSubtype().contains("Swamp")) { // type can be removed by other effect with newer timestamp, so no ability adding
permanent.addAbility(new BlackManaAbility(), source.getSourceId(), game);
}
break;
case "Mountain":
permanent.addAbility(new RedManaAbility(), source.getSourceId(), game);
if (permanent.getSubtype().contains("Mountain")) {
permanent.addAbility(new RedManaAbility(), source.getSourceId(), game);
}
break;
case "Forest":
permanent.addAbility(new GreenManaAbility(), source.getSourceId(), game);
if (permanent.getSubtype().contains("Forest")) {
permanent.addAbility(new GreenManaAbility(), source.getSourceId(), game);
}
break;
case "Island":
permanent.addAbility(new BlueManaAbility(), source.getSourceId(), game);
if (permanent.getSubtype().contains("Island")) {
permanent.addAbility(new BlueManaAbility(), source.getSourceId(), game);
}
break;
case "Plains":
permanent.addAbility(new WhiteManaAbility(), source.getSourceId(), game);
if (permanent.getSubtype().contains("Plains")) {
permanent.addAbility(new WhiteManaAbility(), source.getSourceId(), game);
}
break;
}
}

View file

@ -180,7 +180,7 @@ public class Library implements Serializable {
}
public List<UUID> getCardList() {
return new ArrayList(library);
return new ArrayList<>(library);
}
public List<Card> getCards(Game game) {