Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes for skills and attributes #1526
Contains a commit from #1394. Also Sormat battle commit 3.16, which somehow got lost in the rebasing.
Sormat's observation that items that trigger skills always set the source battler as the highest level member of the party. If there are multiple members of the party with the highest level, the first is selected. From testing I found his observations to be correct, with the additional caveat that the source also has to be able to act (not dead or has a nomove state).
I opted to break compatibility for self skills here. Instead I let you use them on anyone, with the source being that same actor instead of the highest level member.
I tested all of this by changing the levels of party members and hacking their SPI stats really high or low to determine which character was being used as the source.
The idea behind the highest level actor logic makes sense but its not very good. For example, if your highest level actor is a fighter type with low SPI and then you use an item which cases a healing spell that has SPI effect, it'll be wasted as your high level fighter's SPI gets used.
2 times, most recently
Dec 5, 2018
referenced this pull request
Dec 6, 2018
Turns out item usability plays into item skills.
If the highest level actor can't use the item, then the next highest level actor is chosen as the "source".
I've moved the clamping damage values commit to #1452
This is ready now. I don't have anything more to add.
At least for "One Ally" and "Whole Party" it doesn't seem to be "Highest Leveled Actor".
When the Skill is of Magical Element and you set it to E (0%) for 3 of the 4 party members then only the one member who doesn't have E will be healt by the item.
Because that one member isn't the highest leveled actor the caster must be the actor himself.
But that's because elements are based on the target, not the caster. Try it with magical influence and super high/low SPI stats. That's how I tested it and it really is highest level actor.
Also we have this 50% thing in our healing skill effect logic. Maybe its wrong?
Ghabry left a comment
Will accept this when the obvious wrong 50% conditions are removed.
Removed the the 50% thing.
I wouldn't worry too much about perfect accuracy at this stage. We have still more battle PRs which adjust the skill effect logic. After all are in I'd like to test for accuracy and merge the skill effect logic from battle and menu to one place.