Code Monkey home page Code Monkey logo

prestige-tree's Introduction

prestige-tree's People

Contributors

aarextiaokhiao avatar dystopia-user181 avatar iamyhvr avatar jacorb90 avatar wellingtonwritescode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prestige-tree's Issues

Exponent not in scientific notation for exponents less than -1,000,000,000

When you run the "Anti-Enhancers" hinderance for long enough, something like the following can occur, where the exponent (itself a very large negative number) is not correctly formatted in scientific notation, it stays in comma-separated notation even as it passes -1,000,000,000 and beyond. It's only when the exponent reaches -9,000,000,000,000,000 that it changes the notation to double-logarithmic. Note that the precision is still respected, as it still is only showing up to 4 significant figures (3 decimal places in scientific notation).
image

Multiple instances of NaNs from (negative number)^(non-integer)

A bugfix in break_eternity.js (Patashu/break_eternity.js@8b6efe7) for Patashu/break_eternity.js#43 is causing a few instances of NaNs in my post-game save when cherry-picked into Prestige Tree Rewritten:

  • ba12 softcap:

    Prestige-Tree/js/sc.js

    Lines 273 to 280 in cec9198

    ba12: {
    title: "Top-Right Balance Upgrade (Positive Ion)",
    type: "log",
    start: new Decimal(0.75),
    exp: new Decimal(0.25),
    display() { return hasUpgrade("ba", 12) && upgradeEffect("ba", 12).gte(this.start) },
    info() { return "Starts at "+format(this.start.times(100))+"%, logarithmic and brought to the "+format(this.exp.pow(-1))+"th root" },
    },

    is causing errors here:

    Prestige-Tree/js/sc.js

    Lines 386 to 387 in cec9198

    let exp = getSoftcapData(name, "exp");
    return val.log10().pow(exp).times(start.div(start.log10().pow(exp)));

    specifically this portion:

    start.log10().pow(exp)

    start.log10() is -0.12493873660829993, so this calculates (-0.12493873660829993 ^ 0.25), causing a NaN. This has no real roots.

  • nextMinibot:

    Prestige-Tree/js/layers.js

    Lines 8271 to 8274 in cec9198

    nextMinibot() {
    if (player.r.allotted.breeders.lt(1)||tmp.r.totalMinibots.gte(tmp.r.minibotCap.plus(player.r.spentMinibots))) return new Decimal(1/0);
    else return Decimal.pow(10, tmp.r.totalMinibots.sub(player.r.grownMinibots.times(tmp.r.reduceMinibotReqMult)).plus(1).pow(1.5)).times(1e5).div(player.r.allotted.breeders.max(1).pow(tmp.r.breederExp));
    },

    specifically, this portion:

    tmp.r.totalMinibots.sub(player.r.grownMinibots.times(tmp.r.reduceMinibotReqMult)).plus(1).pow(1.5)

    At one point in time:

    • tmp.r.totalMinibots = 1
    • player.r.grownMinibots = 627
    • tmp.r.reduceMinibotReqMult = 1

    so this calculates (-625 ^ 1.5), causing a NaN. This has no real roots.

  • The Brain "next":

    next() { return Decimal.pow(10, Decimal.pow(10, new Decimal((player.ne.activeChallenge==11||hasAchievement("a", 151))?tmp.ne.challenges[11].amt:0).plus(1).div(tmp.ne.challenges[11].gainMult).root(tmp.ne.buyables[11].effect).log10().root(3).times(11)).sub(1)).sub(1) },

    That's a lot of code. Formatted using prettier, it looks like:

      Decimal.pow(
      10,
      Decimal.pow(
        10,
        new Decimal(
          player.ne.activeChallenge == 11 || hasAchievement("a", 151)
            ? tmp.ne.challenges[11].amt
            : 0
        )
          .plus(1)
          .div(tmp.ne.challenges[11].gainMult)
          .root(tmp.ne.buyables[11].effect)
          .log10()
          .root(3)
          .times(11)
      ).sub(1)
    ).sub(1);

    and the problem is in the .root(3) after the .log10, which ends up calculating (-2.6340821214933543 ^ (1/3)). This technically does have a real root of -1.3810511702377193, as (-x)^(1/3) = -(x^(1/3)).

  • Wraith buyMax (spotted while going into The Brain in an end-game save):

    Prestige-Tree/js/layers.js

    Lines 5003 to 5006 in cec9198

    buyMax() {
    let target = player.ps.points.sub(1).div(2).min(player.ps.souls.sub(200).div(174).root(4).sub(1)).times(tmp.ps.buyables[this.id].scaleSlow).plus(1).floor().max(0)
    player[this.layer].buyables[this.id] = player[this.layer].buyables[this.id].max(target)
    },

    specifically this portion:

    player.ps.souls.sub(200).div(174).root(4).sub(1)

    player.ps.souls is zero, so this calculates (-1.1494252873563218 ^ (1/4)). This has no real roots.

There might be more instances that surface if you're not at end-game.

The easiest way of resolving this problem is to call .abs() before calling .root or .pow, as that should keep the behaviour identical to the currently used version of break_eternity.js if break_eternity.js is updated (and is a no-op if break_eternity.js isn't updated). However, in some cases a .max call might be more appropriate.

H10 seemingly impossible when playing on Firefox.

After over a hundred attempts the best result I got was e326k points. At first I thought I was just underpowered for it and had to wait for 69 space, but then I got the idea to play on Chrome. First try, e476k points.

Shell Expansion eating all machine parts

In v1.2 Patch 1 there is a bug that if you buy Shell Expansion and you have twice it's cost of machine parts, then it will still buy only x1 Shell Expansion, but reduce your remaining machine parts to 0.

Very very very tiny amounts of enhance points in H8?

Hello! I'm not actually sure if this is a bug, but I certainly can't figure out why it would happen mechanically, and I have no idea how else to progress if it's NOT a bug, so I'm filing this issue. :)

Basically, whenever I start H8, by the time the timer stops, I have either 3e-10 or 6e-20 enhance points. I have no idea how to get a fraction of an enhance point, but the challenge seems basically impossible and really random. If I start the challenge and do nothing, it dies at about ~e4100 points. If I start the challenge and IMMEDIATELY hit E, it instead dies at about e13.5-e14k points, which doesn't really seem intended at all, considering that everything on layer 3 is auto and "no reset" by this point.

I've also noticed that this challenge seems to stop ticking up at around two seconds rather than the ten the description claims.

Am I just missing something extremely obvious? I'm at 33/36 Space and 11/12 Boosters and this seems like what the game wants me to do to push myself over the wall.

Here's a pastebin of my savefile, if that helps: https://pastebin.com/8G1htVMq

Thanks for the game, it's a neat idea!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.