Giter Site home page Giter Site logo

Comments (6)

wang429 avatar wang429 commented on June 18, 2024

The class that handles this event is Nloth.class. In the constructor:

        ArrayList<AbstractRelic> relics = new ArrayList();
        relics.addAll(AbstractDungeon.player.relics);
        Collections.shuffle(relics, new Random(AbstractDungeon.miscRng.randomLong()));
        this.choice1 = (AbstractRelic)relics.get(0);
        this.choice2 = (AbstractRelic)relics.get(1);

from jorbs-spire-mod.

wang429 avatar wang429 commented on June 18, 2024

In the base game's EventHelper, EventHelper.getEvent() simply instantiates and returns a new instance of Nloth event class.

from jorbs-spire-mod.

dbjorge avatar dbjorge commented on June 18, 2024

This would be a good bug for someone looking to try out making a @SpirePatch; I think a reasonable way to implement this would be to use a SpireInsertPatch the looks for the Collections.shuffle call in the Nloth.class's <ctor>, and removes non-candidate relics from the relics local.

I think just hard-coding Fragile Mind would be acceptable for this bug fix, but even better would be to add some sort of Annotation or marker interface (maybe NonRemovableRelic) for Fragile Mind to use that the patch could look for.

from jorbs-spire-mod.

wang429 avatar wang429 commented on June 18, 2024

Gonna work on this, seems important enough to get out of the way.

from jorbs-spire-mod.

wang429 avatar wang429 commented on June 18, 2024

Need to also update AbstractDungeon::getShrine line 2239 to check the size not including Fragile Mind, otherwise, it's possible to crash with java.lang.IndexOutOfBoundsException when instantiating the event.

from jorbs-spire-mod.

dbjorge avatar dbjorge commented on June 18, 2024

Fixed by #206

from jorbs-spire-mod.

Related Issues (20)

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.