Eclipse-Phase-Unofficial / ep-character-creator

A web-based character creator application for the Eclipse Phase role-playing game.
Other
27 stars 18 forks source link

I think I have a fix for your problems. #68

Open ringringllingling opened 8 years ago

ringringllingling commented 8 years ago

Basically the issue is when bonuses get tallied to your skills. If you have an aptitude of 20 and spend 40 points, you have a base skill of 60. The question is, do morph and background bonuses to your aptitude and skill get applied BEFORE or AFTER you spend those 40 points, and do they count towards the skill cap of 80?

Say for example, my ego's reflex aptitude is 20, I have a morph bonus of +10 to my reflex, (with a cap of 30 on my aptitude) and I have an option that gives me +20 to any skill in my background. I put 40 points into fray and I choose fray as my background skill.

Do I then have a skill of 90, 85, 80, or 75? Do morph bonuses count after and background before I tally my base skill, background bonuses count before and morph bonuses after, or do both count after or do both count before? In any case, is there a hard limit of 80 on any skill that doesn't have the expert trait?

When you use the browser based character generator, that all depends on when you apply the bonus. If you spend your points first, then select your aptitude, morph or morph bonus, background or background bonus, the points are added after the fact. If you select any of those first, then assign the points second, they end up being applied retroactively.

Here is what the fix might look like in java:

public class TallyHo {

    // TODO code application logic here
    // a = ego aptitude
    // b = total number of character points spent
    // c = total number of character points spent over 60
    // y = expert trait true or false
    // x = base skill
    // z = final skill (prior to spending rez points)
    // r = bonus from morph
    // s = bonus from background

static int tally(int a, int b, int c, int r, int s, int x, int z, boolean y){c = (a+b)-60;
    c = (a+b)-60;
    x = (60 + c/2); //rounded down
    if(y == true){
        if(x+r+s>90){
            z=90;
        }
        else{
            z = x+r+s;
        }
    }
    else if(y==false){
        if(x+r+s>80){
            z=80;
        }
        else{
            z = x+r+s;
        }
    }
    return z;
}

}