Function open_pet_case_with_pity

Source
pub fn open_pet_case_with_pity(
    character_state: &mut CharacterState,
    config: &GameConfig,
    rng: &mut StdRng,
    wishlist: &[PetId],
) -> Result<PetId>
Expand description

One roll with the BAL-032 first-copy pity applied, advancing the counter.

The pity is a safety net over the ordinary weights, not a replacement for them: the rarity roll and the wishlist ×2 multiplier are untouched. Only when first_copy_pity_pulls consecutive rolls have produced no NEW template does the next roll get forced onto one the player does not own.

The counter resets on ANY first copy — including one that arrived by luck rather than by pity — so a lucky streak legitimately postpones the guarantee instead of banking toward a double reward.