+ 2
As soon as this statement is read: setInterval(checkturn, 1000);
it starts working so checkturn tries to getElementById("turned") since turni equals 2, but that #turned element still not part of the DOM, hasn't been created yet, that's why it throws error null every second.
+ 1
After your first attack, turni is decremented from 2 to 1.
now that turni=1, every if (turni == 1) return; will exit the corresponding function either attack() or heal().
var turni stays the same 1.