Skip to content

Commit

Permalink
Merge pull request toilet45#94 from glitchyfishys/master
Browse files Browse the repository at this point in the history
small changes
  • Loading branch information
toilet45 authored Jun 21, 2024
2 parents 897b1d3 + d9388f2 commit 28f02b7
Showing 1 changed file with 5 additions and 25 deletions.
30 changes: 5 additions & 25 deletions src/core/glyphs/glyph-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,8 @@ export const Glyphs = {
factorsOpen: false,
bestUndoGlyphCount: 0,
get maxSlots() {
if (Pelle.isDoomed){
let p = PelleRifts.vacuum.milestones[0].canBeApplied ? 1 : 0;
if(CorruptionUpgrade(6).isBought) p+=1;
return p;
}
else{
let i = 3;
if (RealityUpgrade(9).isBought){
i++
}
if (RealityUpgrade(24).isBought){
i++
}
if (MendingMilestone.five.isReached){
i += 3;
}
return i
}
//return MendingMilestone.five.isReached ? 8 : 5
return this.activeSlotCount;
// can't you just do this?
}, //will be a function later for further upgrades
get inventoryList() {
return player.reality.glyphs.inventory;
Expand Down Expand Up @@ -109,6 +92,7 @@ export const Glyphs = {
if(CorruptionUpgrade(6).isBought) p+=1;
return p;
}
// it would be funny to have 12 glyphs for a challenge
return MendingMilestone.five.isReached ? 6 + Effects.sum(RealityUpgrade(9), RealityUpgrade(24)) : 3 + Effects.sum(RealityUpgrade(9), RealityUpgrade(24))
},
get protectedSlots() {
Expand Down Expand Up @@ -370,11 +354,6 @@ export const Glyphs = {
*/
//Hexa saved me from a ton of spagetti code, so thanks to him
if (!Pelle.isDoomed) {
if (player.mending.corruptionChallenge.corruptedMend && ["cursed"].includes(this.active[targetSlot].type) && this.active[targetSlot].id>=3 && this.active[targetSlot].id<=2+corruptionPenalties.compGlyphs.hiddenFour[player.mending.corruption[4]]) { //1.already force cursed number? 2.target is cursed? 3.the swapper is NOT cursed?
Modal.message.show(`The forced Cursed Glyphs cannot be touched!`,
{ closeEvent: GAME_EVENT.GLYPHS_CHANGED });
return;
}//here for swap I think--sxy
if (!canEquipSpecial && ["effarig", "reality"].includes(glyph.type)) { // Can we not equip a Special and is the glyph we are trying to equip a special?
if (!(this.active[targetSlot].type == glyph.type)) { // Is the glyph we are trying to equip not replacing its own type?
Modal.message.show(`You have the max amount of ${glyph.type.capitalize()} Glyphs equipped!`,
Expand Down Expand Up @@ -437,7 +416,8 @@ export const Glyphs = {
for(let i=0;i<cga;i++) {
Glyphs.equip(Glyphs.inventory.filter(x => x == null ? false : (x.type == "cursed"))[0],i);
};
// this should work -glitch
this.clearUndo();
// this should work -glitch

}
this.updateRealityGlyphEffects();
Expand Down

0 comments on commit 28f02b7

Please sign in to comment.