# Rare Heal Station — only the OnButtonPressed handler changes. # All using{} imports and the class header stay the same as above. OnButtonPressed(Agent : agent) : void = # Roll a 4-sided die. GetRandomInt is from /Verse.org/Random. Roll := GetRandomInt(1, 4) # Only grant the item on a roll of 1 (25% chance). if (Roll = 1): if (Player := player[Agent]): granter_device.GrantItem(Player) # Rolls of 2, 3, or 4 fall through here and do nothing.