SCTX |
scn MehrunesRazorSCRIPT
short RandomChance ; Prep our Dice roll
float LuckMod ; High-Luck PC's do better
begin ScriptEffectStart
if isEssential == 0 ;Don't waste time on essential characters or the PC
if GetInFaction OblivionCreatures == 0 ; protects Mehrunes Dagon and other such enemies
set RandomChance to getRandomPercent
set LuckMod to player.getAV Luck ; Luck Chance
set LuckMod to LuckMod * 0.05
if LuckMod < 1 ; In case the PC is really un-lucky
set LuckMod to 1
endif
if LuckMod > 10
set LuckMod to 10 ; Never greater than 10% chance allowed
endif
; DEBUG MESSAGES
;Message "Rolled %.0f against %.0f percent Chance",RandomChance,LuckMod,1
if RandomChance <= LuckMod ; Check against dice roll
kill player ; Make 'em deader
set DL9MehrunesQuest.DL9SoulTotal to DL9MehrunesQuest.DL9SoulTotal + 1 ; Kills ++
if DL9MehrunesQuest.DL9SoulTotal <= 1
Message "Through the Razor, Mehrunes Dagon claims this soul!" ; Unique Message for Kill #1
else
message "Dagon claims this soul! %.0f souls claimed.",DL9MehrunesQuest.DL9SoulTotal,1 ; Ominous Text of doom
endif
endif
endif
endif ; Commented w/Daily Check lines
endif
end
|