God sweet jesus mercy please no

first off you ARE DOING TYPECHECKS WRONG THIS IS NOT HOW YOU DO TYPECHECKS

second, all 
if(shit.damage > 0) shit.take_damage(num, 0)
can be written once
just make type affect the temp var that is used to do damage, and do whatever  1-2 lines of code that differe between those cpoypasta mountinas