That could be fixed simply by having the game check the unmodified value of the attribute instead of the modified one. If your Dx really is 30, but have a -20 modifier, checking the stat when raising it should return Dx:30 instead of Dx:10.
You hit Andor Drakon, the ElDeR cHaOs GoD, and severely wound him.
The greater balor summons some help!
The ratling duelist disarms you. You drop your blessed Trident of the Red Rooster (+36, 6d12+18) [+12, +12]. It flies to the west.
Andor Drakon, the ElDeR cHaOs GoD, picks up the blessed Trident of the Red Rooster (+36, 6d12+18) [+12, +12].
Andor Drakon, the ElDeR cHaOs GoD, wields the blessed Trident of the Red Rooster (+36, 6d12+18) [+12, +12].