state(); if data.hp.val <= 0 { c_deleteunit(pos.x, pos.y, id); }