mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user