added onattack(cid, target)