ScriptName FrostmourneFragments
short RandomChance
short Fragments
float LuckMod
begin ScriptEffectStart
set Str to player.getAV Strength
set RandomChance to getRandomPercent
set LuckMod to player.getAV Luck
set LuckMod to LuckMod * 0.2
if LuckMod < 1
set LuckMod to 1
endif
if LuckMod > 10
set LuckMod to 10
endif
if RandomChance <= LuckMod
set Fragments to Fragments + 1
Message "Frostmourne has clained % Fragments",Fragments,1
endif
if Fragments == 1
player.setAV Strength 30
endif
if Fragments == 2
player.setAV Strength 60
endif
if Fragments == 3
player.setAV Strength 90
endif
if Fragments == 4
player.setAV Strength 120
endif
if Fragments == 5
player.setAV Strength 150
endif
if Fragments == 6
player.setAV Strength 180
endif
if Fragments == 7
player.setAV Strength 210
endif
if Fragments == 8
player.setAV Strength 240
endif
if Fragments == 9
player.setAV Strength 270
endif
if Fragments == 10
cast SoulFragments
set Fragments to 0
endif
end