pub(crate) fn spend_all_secondary_resource( state: &mut CombatState, buf: &mut DenseBuffer, cost: f64, ) -> f64