Merge branch 'master' into 'master'

Attempting to fix the {C} payment while not breaking the "pay with any color" mechanic + Fix Vraska achievement.

Closes #1510 and #1518

See merge request core-developers/forge!3025
This commit is contained in:
Michael Kamensky
2020-07-22 11:01:33 +00:00
2 changed files with 8 additions and 1 deletions

View File

@@ -350,11 +350,15 @@ public class ManaPool extends ManaConversionMatrix implements Iterable<Mana> {
}
public boolean canPayForShardWithColor(ManaCostShard shard, byte color) {
if (shard.isOfKind(ManaAtom.COLORLESS) && color == ManaAtom.GENERIC) {
return false; // FIXME: testing Colorless against Generic is a recipe for disaster, but probably there should be a better fix.
}
// TODO Debug this for Paying Gonti,
byte line = getPossibleColorUses(color);
for(byte outColor : ManaAtom.MANATYPES) {
if ((line & outColor) != 0 && shard.canBePaidWithManaOfColor(color)) {
if ((line & outColor) != 0 && shard.canBePaidWithManaOfColor(outColor)) {
return true;
}
}

View File

@@ -42,6 +42,9 @@ public class AltWinAchievements extends AchievementCollection {
}
Achievement achievement = achievements.get(altWinCondition);
if (achievement == null) {
achievement = achievements.get("Emblem - " + altWinCondition); // indirectly winning through an emblem
}
if (achievement != null) {
achievement.update(player);
save();