The Destroyed/IsDead check is redundant here (see above), but you could use `xp.Level == 0` ? 0 : xp.Level - 1` to avoid the level < 1 check below.