send energy when dying, calculate energy