mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-22 04:05:42 +00:00
Improve ACHNR behavior
This commit is contained in:
parent
a75b1526a6
commit
fe698ccfb9
@ -48,6 +48,12 @@ class PerkState extends SetPurchasableMechanicState {
|
||||
onPurchased() {
|
||||
if (this.config.bumpCurrency !== undefined) this.config.bumpCurrency();
|
||||
if (this.label === "EU1" && Currency.eternities.gt(0)) applyEU1();
|
||||
if (this.label === "ACHNR") {
|
||||
if (Achievements.preReality.some(a => !a.isUnlocked)) player.reality.gainedAutoAchievements = true;
|
||||
for (const achievement of Achievements.preReality) {
|
||||
achievement.unlock(true);
|
||||
}
|
||||
}
|
||||
GameCache.achievementPeriod.invalidate();
|
||||
GameCache.buyablePerks.invalidate();
|
||||
EventHub.dispatch(GAME_EVENT.PERK_BOUGHT);
|
||||
|
@ -482,7 +482,10 @@ GameDatabase.reality.perks = {
|
||||
id: 205,
|
||||
label: "ACHNR",
|
||||
family: PERK_FAMILY.ACHIEVEMENT,
|
||||
description: "Reality no longer resets your Achievements.",
|
||||
get description() {
|
||||
return `Immediately unlock the first ${formatInt(13)} rows of Achievements
|
||||
and Reality no longer resets them.`;
|
||||
},
|
||||
automatorPoints: 10,
|
||||
shortDescription: () => "Keep Achievements on Reality",
|
||||
defaultPosition: new Vector(-195, -630)
|
||||
|
@ -77,7 +77,7 @@ export default {
|
||||
this.totalCountdown = ((Achievements.preReality.countWhere(a => !a.isUnlocked) - 1) * Achievements.period +
|
||||
Achievements.timeToNextAutoAchieve) / gameSpeedupFactor;
|
||||
this.missingAchievements = Achievements.preReality.countWhere(a => !a.isUnlocked);
|
||||
this.showAutoAchieve = PlayerProgress.realityUnlocked();
|
||||
this.showAutoAchieve = PlayerProgress.realityUnlocked() && !Perk.achievementGroup5.isBought;
|
||||
this.isAutoAchieveActive = player.reality.autoAchieve;
|
||||
this.hideCompletedRows = player.options.hideCompletedAchievementRows;
|
||||
this.achMultBreak = BreakInfinityUpgrade.achievementMult.canBeApplied;
|
||||
|
Loading…
Reference in New Issue
Block a user