G420/enslaved standardize glyph level (#789)

* in enslaved reality, set all glyph levels to 5000

* make the 5000 be a floor, instead of a hard fix

So higher glyph levels are possible for enslaved, but not lower

* alter hint text in glyphs tab during enslaved

* update enslaved reality run box content, widen it
This commit is contained in:
garnet420 2019-08-25 21:40:36 -04:00 committed by GitHub
parent 5f4755ca5f
commit cc583ab471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 53 additions and 25 deletions

View File

@ -197,7 +197,8 @@ Vue.component("enslaved-tab", {
<div v-for="x in 25" class="o-enslaved-run-button__glitch"
:style="glitchStyle(x)"/>
</div>
<p>ID, TD, and 8th dimension purchases are limited to 1 each.</p>
<p>Glyph levels will be boosted to a minimum of 5000</p>
<p>Infinity, time, and 8th dimension purchases are limited to 1 each.</p>
<p>Normal dimension multipliers are always dilated (the glyph effect still only
applies in actual dilation)</p>
<p>Time study 192 is locked</p>
@ -206,7 +207,7 @@ Vue.component("enslaved-tab", {
<p>Time theorem generation from dilation glyphs is much slower</p>
<p>Certain challenge goals have been increased</p>
<p>Stored time is much less effective</p>
<b>Reward: ID purchase caps are increased by 1000 for every 1000 free tickspeed upgrades you get</b>
<b>Reward: ID purchase caps are increased by 1000 for every 1000 free tickspeed upgrades you have</b>
</div>
</div>
</div>`

View File

@ -52,17 +52,20 @@ const GlyphTooltipComponent = {
type: Number,
default: 0,
},
levelCap: {
levelOverride: {
type: Number,
default: Number.MAX_VALUE,
default: 0,
}
},
computed: {
onTouchDevice() {
return GameUI.touchDevice;
},
effectiveLevel() {
return this.levelOverride;
},
sortedEffects() {
return getGlyphEffectsFromBitmask(this.effects, Math.min(this.level, this.levelCap), this.strength);
return getGlyphEffectsFromBitmask(this.effects, this.effectiveLevel, this.strength);
},
rarityInfo() {
return getRarity(this.strength);
@ -82,15 +85,20 @@ const GlyphTooltipComponent = {
return `${this.rarityInfo.name} glyph of ${this.type} (${this.roundedRarity.toFixed(1)}%)`;
},
isLevelCapped() {
return this.levelCap < this.level;
return this.levelOverride < this.level;
},
isLevelBoosted() {
return this.levelOverride > this.level;
},
levelText() {
return this.isLevelCapped
? `Level: ▼${shortenSmallInteger(this.levelCap)}`
: `Level: ${shortenSmallInteger(this.level)}`;
// eslint-disable-next-line no-nested-ternary
const arrow = this.isLevelCapped ? "▼" : (this.isLevelBoosted ? "⯅" : "");
return `Level: ${arrow}${shortenSmallInteger(this.effectiveLevel)}${arrow}`;
},
levelStyle() {
return { color: this.isLevelCapped ? "#FF1111" : "#FFFFFF" };
// eslint-disable-next-line no-nested-ternary
const color = this.isLevelCapped ? "#FF1111" : (this.isLevelBoosted ? "#44FF44" : "");
return { color };
},
sacrificeText() {
if (AutoGlyphSacrifice.mode === AutoGlyphSacMode.ALCHEMY && this.type !== "reality") {
@ -209,7 +217,7 @@ Vue.component("glyph-component", {
suppressTooltip: false,
isTouched: false,
sacrificeReward: 0,
levelCap: Number.MAX_VALUE,
levelOverride: 0,
};
},
computed: {
@ -294,7 +302,8 @@ Vue.component("glyph-component", {
this.sacrificeReward = AutoGlyphSacrifice.mode === AutoGlyphSacMode.ALCHEMY
? glyphRefinementGain(this.glyph)
: glyphSacrificeGain(this.glyph);
this.levelCap = Effarig.isRunning ? Effarig.glyphLevelCap : Number.MAX_VALUE;
// eslint-disable-next-line no-nested-ternary
this.levelOverride = getAdjustedGlyphLevel(this.glyph.level);
},
moveTooltipTo(x, y) {
const tooltipEl = this.$refs.tooltip.$el;
@ -398,7 +407,7 @@ Vue.component("glyph-component", {
ref="tooltip"
v-bind="glyph"
:sacrificeReward="sacrificeReward"
:levelCap="levelCap"
:levelOverride="levelOverride"
:visible="isCurrentTooltip"/>
</div>
<div ref="over"

View File

@ -2,15 +2,28 @@
Vue.component("glyphs-tab", {
data: () => ({
showEnslavedHint: false,
enslavedHint: "",
}),
computed: {
showEnslavedHint() {
return this.enslavedHint !== "";
}
},
methods: {
update() {
if (!Enslaved.isRunning) {
this.showEnslavedHint = false;
return;
this.enslavedHint = "";
if (!Enslaved.isRunning) return;
const haveEffarig = Glyphs.activeList.find(e => e.type === "effarig") !== undefined;
const haveBoost = Glyphs.activeList.find(e => e.level < Enslaved.glyphLevelMin) !== undefined;
if (haveBoost) {
if (haveEffarig) {
this.enslavedHint = "done... what little... I can... but...<br>why did you bring... that thing... here...";
} else {
this.enslavedHint = "done... what little... I can...";
}
} else if (haveEffarig) {
this.enslavedHint = "Why did you bring... that thing... here...";
}
this.showEnslavedHint = Glyphs.activeList.find(e => e.type === "effarig") !== undefined;
}
},
template:
@ -28,9 +41,7 @@ Vue.component("glyphs-tab", {
<sacrificed-glyphs />
</div>
<div class="l-player-glyphs-column">
<div v-if="showEnslavedHint" class="o-teresa-quotes">
Why did you bring... that thing... here...
</div>
<div v-if="showEnslavedHint" class="o-teresa-quotes" v-html="enslavedHint" />
<div class="l-equipped-glyphs-wrapper">
<equipped-glyphs />
<current-glyph-effects />

View File

@ -94,7 +94,8 @@ function bigCrunchReset() {
if (Effarig.isRunning && !EffarigUnlock.infinity.isUnlocked) {
EffarigUnlock.infinity.unlock();
Modal.message.show(`Effarig Infinity reward: Glyph Level cap raised to ${Effarig.glyphLevelCap} and IP multipliers apply up to 1e50; infinitied count raises replicanti limit and gives you free RG.`);
Modal.message.show(`Effarig Infinity reward: Glyph Level cap raised to ${Effarig.glyphLevelCap} and IP` +
" multipliers apply up to 1e50; infinitied count raises replicanti limit and gives you free RG.");
}
EventHub.dispatch(GameEvent.BIG_CRUNCH_AFTER);

View File

@ -46,6 +46,7 @@ const Enslaved = {
isReleaseTick: false,
autoReleaseTick: 0,
autoReleaseSpeed: 0,
glyphLevelMin: 5000,
toggleStoreBlackHole() {
if (this.maxQuoteIdx === 6) player.celestials.enslaved.maxQuotes += 3;
player.celestials.enslaved.isStoring = !player.celestials.enslaved.isStoring;

View File

@ -564,6 +564,12 @@ function getGlyphEffectsFromBitmask(bitmask, level, strength) {
}));
}
function getAdjustedGlyphLevel(level) {
if (Enslaved.isRunning) return Math.max(level, Enslaved.glyphLevelMin);
if (Effarig.isRunning) return Math.min(level, Effarig.glyphLevelCap);
return level;
}
// Pulls out a single effect value from a glyph's bitmask, returning just the value (nothing for missing effects)
function getSingleGlyphEffectFromBitmask(effectName, glyph) {
const glyphEffect = GameDatabase.reality.glyphEffects[effectName];
@ -571,8 +577,7 @@ function getSingleGlyphEffectFromBitmask(effectName, glyph) {
if ((glyph.effects & (1 << glyphEffect.bitmaskIndex)) === 0) {
return undefined;
}
const level = Effarig.isRunning ? Math.min(glyph.level, Effarig.glyphLevelCap) : glyph.level;
return glyphEffect.effect(level, glyph.strength);
return glyphEffect.effect(getAdjustedGlyphLevel(glyph.level), glyph.strength);
}
function countEffectsFromBitmask(bitmask) {

View File

@ -5617,7 +5617,7 @@ kbd {
}
.o-enslaved-run-box {
width: 35rem;
width: 40rem;
padding: 2rem;
border-radius: .5rem;
border: 2px solid #cd945c;