Giter Site home page Giter Site logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Proposed solution:
Strip out ghetto Essence Hole code (You're supposed to add an item that has the 
same Essence value
Add new value, Essence_Max. When removing gear, Essence is restored to 
pre-implantation value, while Essence_Max remains at the same value, and is 
used for Resonance/Magic-based requirements. (Does Essence hole affect Social 
Limit?)
New value, Essence_Hole = Essence - Essence_Max
When installing an augmentation: 
if (Essence Cost <= Essence Hole) 
{Essence = Essence - Essence Cost} 
else 
{Essence_Max = Essence_Max + (Essence Hole - Essence Cost) //Should yield a 
negative number
Essence = Essence - Essence Cost}

There's probably going to be a reason this won't work, but napkin-code suggests 
it should be fine.

Original comment by [email protected] on 26 Feb 2015 at 11:05

  • Changed state: Started

from chummer5a.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
This way is probably a little easier and saves an entire variable!

//Declare essence hole
decimal Essence_Hole = 0;


//When removing cyberware
Essence_Hole += Cyberware_Essence;

//when adding cyberware
Essence_Hole -= Essence_Cost;
If (Essence_Hole < 0)
{
    Essence += Essence_Hole; //Essence_Hole is negative, so this will subtract
    Essence_Hole = 0;
}

Original comment by [email protected] on 27 Feb 2015 at 12:28

from chummer5a.

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.