qoala / InvisibleInc-CommunityBugFixes

1 stars 0 forks source link

Drilling an augment doubles modTrait values instead of reversing them. #39

Closed qoala closed 3 years ago

qoala commented 3 years ago

Some augments specify a modTrait table. Integer traits matching the contained keys are incremented by the specified value on the augmented agent.

When drilling out an augment, these and other changes are supposed to be undone (mostly strict reversal, though drilling a brain chip sets the associated stat to the minimum value). However inventory.trashItem incorrectly re-applies the values from the augment's modTrait.

Drilling out Titanium Rods sets the agent's meleeDamage to +2 for the rest of the mission. Drilling out Archive Pedler's prototype frame changes sprintBonus from -7 (sprinting is -4AP) to -14 (sprinting is -11AP).

In any case, the bug only affects the agent for the duration of the current mission.