Almost-working battle system

(But with errors)