function c_resetbattlevar(target=id) { with target { attacks = 0; attacked = 0; } }