mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2025-02-16 23:50:17 +00:00
Make more small changes
Cap d12 at e70, add nicenice reward, add additional effarig 25 reward
This commit is contained in:
parent
e935fce782
commit
c273ec7608
@ -40,11 +40,17 @@ Vue.component("effect-display", {
|
||||
this.updateFn = isNumber
|
||||
? () => this.effectValue = effect()
|
||||
: () => this.effectValue.copyFrom(effect());
|
||||
const cap = config.cap;
|
||||
// If the config has a reachedCapFn, we assume its effect value calculation
|
||||
// takes account of the cap itself, so we don't have to.
|
||||
const cap = config.reachedCapFn === undefined ? config.cap : () => this.effectValue;
|
||||
if (cap === undefined) return;
|
||||
if (config.reachedCapFn) {
|
||||
this.reachedCapFn = config.reachedCapFn;
|
||||
} else {
|
||||
this.reachedCapFn = isNumber
|
||||
? () => this.effectValue >= this.cap
|
||||
: () => this.effectValue.gte(this.cap);
|
||||
}
|
||||
if (typeof cap !== "function") {
|
||||
this.hasCap = true;
|
||||
this.cap = isNumber ? cap : Decimal.fromDecimal(cap);
|
||||
|
@ -11,6 +11,7 @@ Vue.component("dilation-upgrade", {
|
||||
data() {
|
||||
return {
|
||||
isBought: false,
|
||||
isCapped: false,
|
||||
isAffordable: false,
|
||||
isAutoUnlocked: false,
|
||||
isAutobuyerOn: false,
|
||||
@ -26,9 +27,10 @@ Vue.component("dilation-upgrade", {
|
||||
return {
|
||||
"o-dilation-upgrade": true,
|
||||
"o-dilation-upgrade--rebuyable": this.isRebuyable,
|
||||
"o-dilation-upgrade--available": !this.isBought && !this.isCapped && this.isAffordable,
|
||||
"o-dilation-upgrade--unavailable": !this.isBought && !this.isCapped && !this.isAffordable,
|
||||
"o-dilation-upgrade--bought": this.isBought,
|
||||
"o-dilation-upgrade--available": !this.isBought && this.isAffordable,
|
||||
"o-dilation-upgrade--unavailable": !this.isBought && !this.isAffordable
|
||||
"o-dilation-upgrade--capped": this.isCapped,
|
||||
};
|
||||
}
|
||||
},
|
||||
@ -36,6 +38,7 @@ Vue.component("dilation-upgrade", {
|
||||
update() {
|
||||
if (this.isRebuyable) {
|
||||
this.isAffordable = this.upgrade.isAffordable;
|
||||
this.isCapped = this.upgrade.isCapped;
|
||||
} else {
|
||||
this.isBought = this.upgrade.isBought;
|
||||
if (!this.isBought) {
|
||||
@ -56,7 +59,7 @@ Vue.component("dilation-upgrade", {
|
||||
/>
|
||||
<effect-display br :config="upgrade.config" />
|
||||
<cost-display br
|
||||
v-if="!isBought"
|
||||
v-if="!isBought && !isCapped"
|
||||
:config="upgrade.config"
|
||||
singular="Dilated Time"
|
||||
plural="Dilated Time"
|
||||
|
@ -450,10 +450,11 @@ const RA_UNLOCKS = {
|
||||
level: 15,
|
||||
displayIcon: `<span class="fas fa-fire"></span>`
|
||||
},
|
||||
MAX_RARITY: {
|
||||
MAX_RARITY_AND_SHARD_SACRIFICE_BOOST: {
|
||||
id: 13,
|
||||
description: "Get Effarig to level 25",
|
||||
reward: () => `Glyphs are always generated with ${formatPercents(1)} rarity`,
|
||||
reward: () => `Glyphs are always generated with ${formatPercents(1)} rarity and ` +
|
||||
`glyph sacrifice gain is raised to a power based on relic shards`,
|
||||
pet: Ra.pets.effarig,
|
||||
level: 25,
|
||||
displayIcon: `<i class="fas fa-ankh"></i>`
|
||||
|
@ -25,7 +25,7 @@ function startDilatedEternity(auto) {
|
||||
// id 1-3 are rebuyables
|
||||
// id 2 resets your dilated time and free galaxies
|
||||
|
||||
const DIL_UPG_COSTS = [null, [1e5, 10], [1e6, 100], [1e7, 20],
|
||||
const DIL_UPG_COSTS = [null, [1e5, 10, Number.MAX_VALUE], [1e6, 100, 33], [1e7, 20, Number.MAX_VALUE],
|
||||
5e6, 1e9, 5e7,
|
||||
2e12, 1e10, 1e11,
|
||||
1e15];
|
||||
@ -43,11 +43,12 @@ function buyDilationUpgrade(id, bulk, extraFactor) {
|
||||
} else {
|
||||
const upgAmount = player.dilation.rebuyables[id];
|
||||
const realCost = new Decimal(DIL_UPG_COSTS[id][0]).times(Decimal.pow(DIL_UPG_COSTS[id][1], (upgAmount)));
|
||||
if (player.dilation.dilatedTime.lt(realCost)) return false;
|
||||
if (player.dilation.dilatedTime.lt(realCost) || upgAmount >= DIL_UPG_COSTS[id][2]) return false;
|
||||
|
||||
let buying = Decimal.affordGeometricSeries(player.dilation.dilatedTime,
|
||||
DIL_UPG_COSTS[id][0], DIL_UPG_COSTS[id][1], upgAmount).toNumber();
|
||||
buying = Math.clampMax(buying, Effects.max(1, PerkShopUpgrade.bulkDilation) * extraFactor);
|
||||
buying = Math.clampMax(buying, DIL_UPG_COSTS[id][2] - upgAmount);
|
||||
if (!bulk) {
|
||||
buying = Math.clampMax(buying, 1);
|
||||
}
|
||||
@ -195,6 +196,10 @@ class RebuyableDilationUpgradeState extends RebuyableMechanicState {
|
||||
set isAutobuyerOn(value) {
|
||||
player.dilation.auto[this.autobuyerId] = value;
|
||||
}
|
||||
|
||||
get isCapped() {
|
||||
return this.config.reachedCapFn();
|
||||
}
|
||||
|
||||
purchase(bulk, extraFactor = 1) {
|
||||
buyDilationUpgrade(this.config.id, bulk, extraFactor);
|
||||
|
@ -305,7 +305,7 @@ const GlyphGenerator = {
|
||||
},
|
||||
|
||||
randomStrength(rng) {
|
||||
if (Ra.has(RA_UNLOCKS.MAX_RARITY)) return rarityToStrength(100);
|
||||
if (Ra.has(RA_UNLOCKS.MAX_RARITY_AND_SHARD_SACRIFICE_BOOST)) return rarityToStrength(100);
|
||||
let result;
|
||||
// Divide the extra minimum rarity (also from Reality Upgrade 16) by the strength multiplier
|
||||
// since we'll multiply by the strength multiplier later.
|
||||
@ -1063,8 +1063,9 @@ const GlyphSacrificeHandler = {
|
||||
if (glyph.type === "reality") return 0.01 * glyph.level * Achievement(171).effectOrDefault(1);
|
||||
const pre10kFactor = Math.pow(Math.clampMax(glyph.level, 10000) + 10, 2.5);
|
||||
const post10kFactor = 1 + Math.clampMin(glyph.level - 10000, 0) / 100;
|
||||
return pre10kFactor * post10kFactor * glyph.strength *
|
||||
Teresa.runRewardMultiplier * Achievement(171).effectOrDefault(1);
|
||||
const power = Ra.has(RA_UNLOCKS.MAX_RARITY_AND_SHARD_SACRIFICE_BOOST) ? 1 + Effarig.maxRarityBoost / 100 : 1;
|
||||
return Math.pow(pre10kFactor * post10kFactor * glyph.strength *
|
||||
Teresa.runRewardMultiplier * Achievement(171).effectOrDefault(1), power);
|
||||
},
|
||||
sacrificeGlyph(glyph, force = false) {
|
||||
if (glyph.type === "cursed") {
|
||||
@ -1234,7 +1235,7 @@ function getGlyphLevelInputs() {
|
||||
.concat(Array.range(1, 4).map(x => Array.range(1, 5).every(y => RealityUpgrade(5 * x + y).isBought)))
|
||||
.filter(x => x)
|
||||
.length;
|
||||
const achievementFactor = Achievement(148).effectOrDefault(0);
|
||||
const achievementFactor = Effects.sum(Achievement(148), Achievement(166));
|
||||
baseLevel += rowFactor + achievementFactor;
|
||||
scaledLevel += rowFactor + achievementFactor;
|
||||
// Temporary runaway prevention (?)
|
||||
|
@ -1095,7 +1095,9 @@ GameDatabase.achievements.normal = [
|
||||
name: "Nicenice.",
|
||||
tooltip: () => `Get a glyph with level exactly ${formatInt(6969)}.`,
|
||||
checkRequirement: () => gainedGlyphLevel().actualLevel === 6969,
|
||||
checkEvent: GAME_EVENT.REALITY_RESET_BEFORE
|
||||
checkEvent: GAME_EVENT.REALITY_RESET_BEFORE,
|
||||
reward: () => `+${formatInt(69)} to glyph level.`,
|
||||
effect: 69
|
||||
},
|
||||
{
|
||||
id: 167,
|
||||
|
@ -12,6 +12,7 @@ GameDatabase.eternity.dilation = (function() {
|
||||
effect: () => config.effect(player.dilation.rebuyables[config.id]),
|
||||
formatEffect: config.formatEffect,
|
||||
formatCost: config.formatCost,
|
||||
reachedCapFn: () => player.dilation.rebuyables[config.id] >= config.purchaseCap,
|
||||
rebuyable: true
|
||||
};
|
||||
}
|
||||
@ -26,7 +27,8 @@ GameDatabase.eternity.dilation = (function() {
|
||||
return Decimal.pow(base, bought);
|
||||
},
|
||||
formatEffect: value => formatX(value, 2, 0),
|
||||
formatCost: value => format(value, 2, 0)
|
||||
formatCost: value => format(value, 2, 0),
|
||||
purchaseCap: Number.MAX_VALUE
|
||||
}),
|
||||
galaxyThreshold: rebuyable({
|
||||
id: 2,
|
||||
@ -36,9 +38,11 @@ GameDatabase.eternity.dilation = (function() {
|
||||
(Perk.bypassDGReset.isBought
|
||||
? "Reset Dilated Galaxies, but lower their threshold"
|
||||
: "Reset Dilated Time and Dilated Galaxies, but lower their threshold"),
|
||||
effect: bought => Math.pow(0.8, bought),
|
||||
// The 33rd purchase is at 1e7, and is the last purchase.
|
||||
effect: bought => (bought < 33 ? Math.pow(0.8, bought) : 0),
|
||||
formatEffect: () => format(getFreeGalaxyMult(), 3, 3),
|
||||
formatCost: value => format(value, 2, 0)
|
||||
formatCost: value => format(value, 2, 0),
|
||||
purchaseCap: 33
|
||||
}),
|
||||
tachyonGain: rebuyable({
|
||||
id: 3,
|
||||
@ -49,7 +53,8 @@ GameDatabase.eternity.dilation = (function() {
|
||||
: "Triple the amount of Tachyon Particles gained."),
|
||||
effect: bought => Decimal.pow(3, bought),
|
||||
formatEffect: value => formatX(value, 2, 0),
|
||||
formatCost: value => format(value, 2, 0)
|
||||
formatCost: value => format(value, 2, 0),
|
||||
purchaseCap: Number.MAX_VALUE
|
||||
}),
|
||||
doubleGalaxies: {
|
||||
id: 4,
|
||||
|
@ -4456,7 +4456,7 @@ screen and (max-width: 480px) {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.o-dilation-upgrade--bought {
|
||||
.o-dilation-upgrade--bought, .o-dilation-upgrade--capped {
|
||||
color: black;
|
||||
background-color: #64dd17;
|
||||
border-color: black;
|
||||
@ -4525,7 +4525,7 @@ screen and (max-width: 480px) {
|
||||
color: #64ddad;
|
||||
}
|
||||
|
||||
.t-dark .o-dilation-upgrade--bought {
|
||||
.t-dark .o-dilation-upgrade--bought, .t-dark .o-dilation-upgrade--capped {
|
||||
background-color: #64dd17;
|
||||
}
|
||||
|
||||
@ -4549,7 +4549,7 @@ screen and (max-width: 480px) {
|
||||
animation: a-dilation-btn-glow--cancer 10s infinite;
|
||||
}
|
||||
|
||||
.t-s6 .o-dilation-upgrade--bought {
|
||||
.t-s6 .o-dilation-upgrade--bought, .t-s6 .o-dilation-upgrade--capped {
|
||||
background: #64dd17;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user