You'll have to use a case branch.
when /TROLL ITEM/i
outcomes = [1, 2, 3, 4]
# these are now just placeholders.
# you could also use strings if you like ("hpgen", "death", etc.)
case outcomes.sample
when 1
target.hp += (target.mhp / 2).to_i
# this would recover 50% HP. the "to_i" forces it...