mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Add achievements for winning with Phage and Door to Nothingness
This commit is contained in:
@@ -30,6 +30,7 @@ public class AltWinAchievements extends AchievementCollection {
|
|||||||
add("Chance Encounter", "The Accident", "This victory was brought to you by a series of fortunate events.");
|
add("Chance Encounter", "The Accident", "This victory was brought to you by a series of fortunate events.");
|
||||||
add("Coalition Victory", "The Teamwork", "Let's all be friends!");
|
add("Coalition Victory", "The Teamwork", "Let's all be friends!");
|
||||||
add("Darksteel Reactor", "The Machine", "What are you going to do with all this power? Whatever you want!");
|
add("Darksteel Reactor", "The Machine", "What are you going to do with all this power? Whatever you want!");
|
||||||
|
add("Door to Nothingness", "The Door", "And behind door #2 is...");
|
||||||
add("Epic Struggle", "The Army", "Let's just trample them into the ground already!");
|
add("Epic Struggle", "The Army", "Let's just trample them into the ground already!");
|
||||||
add("Felidar Sovereign", "The Cat's Life", "Just wait for his other eight lives!");
|
add("Felidar Sovereign", "The Cat's Life", "Just wait for his other eight lives!");
|
||||||
add("Helix Pinnacle", "The Tower", "The view from the top is great!");
|
add("Helix Pinnacle", "The Tower", "The view from the top is great!");
|
||||||
@@ -39,6 +40,7 @@ public class AltWinAchievements extends AchievementCollection {
|
|||||||
add("Maze's End", "The Labyrinth", "What? No bossfight?");
|
add("Maze's End", "The Labyrinth", "What? No bossfight?");
|
||||||
add("Mortal Combat", "The Boneyard", "So peaceful...");
|
add("Mortal Combat", "The Boneyard", "So peaceful...");
|
||||||
add("Near-Death Experience", "The Edge", "Phew... I thought I was going to die!");
|
add("Near-Death Experience", "The Edge", "Phew... I thought I was going to die!");
|
||||||
|
add("Phage the Untouchable", "The Untouchable", "None are immune to her deadly touch!");
|
||||||
add("Test of Endurance", "The Test", "So... did I pass?");
|
add("Test of Endurance", "The Test", "So... did I pass?");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +53,16 @@ public class AltWinAchievements extends AchievementCollection {
|
|||||||
//only call update achievement for alternate win condition (if any)
|
//only call update achievement for alternate win condition (if any)
|
||||||
if (player.getOutcome().hasWon()) {
|
if (player.getOutcome().hasWon()) {
|
||||||
String altWinCondition = player.getOutcome().altWinSourceName;
|
String altWinCondition = player.getOutcome().altWinSourceName;
|
||||||
if (!StringUtils.isEmpty(altWinCondition)) {
|
if (StringUtils.isEmpty(altWinCondition)) {
|
||||||
|
Player opponent = player.getSingleOpponent();
|
||||||
|
if (opponent == null) { return; }
|
||||||
|
|
||||||
|
altWinCondition = opponent.getOutcome().loseConditionSpell;
|
||||||
|
if (StringUtils.isEmpty(altWinCondition)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Achievement achievement = achievements.get(altWinCondition);
|
Achievement achievement = achievements.get(altWinCondition);
|
||||||
if (achievement != null) {
|
if (achievement != null) {
|
||||||
achievement.update(gui, player);
|
achievement.update(gui, player);
|
||||||
@@ -59,7 +70,6 @@ public class AltWinAchievements extends AchievementCollection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private class AltWinAchievement extends Achievement {
|
private class AltWinAchievement extends Achievement {
|
||||||
private AltWinAchievement(String cardName0, String displayName0, String flavorText0) {
|
private AltWinAchievement(String cardName0, String displayName0, String flavorText0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user