OK, got it. I was thinking you'd also had this script modified to work on out-of-battle commands, but apparently not. Some other unrelated script must be calling on_turn_end when walking around between battles, which triggers this error.
All we really need to do to fix this is make sure the current_decays variable is initialized when loading a new map.
This code should hopefully fix it, stick it either on its own page or at the end of one of the other scripts:
class Scene_Map < Scene_Base
alias scene_map_start_ftb_bugfix start
def start
$game_temp.current_decays = {}
for i in 0..999
$game_temp.current_decays[i] = {}
end
scene_map_start_ftb_bugfix
end
end
If that doesn't work, something else is going on in addition to this problem.