fixes handle generation and adds regeneration after battles