T_ScCrea_WormmouthDisease
Tamriel_Data.esm
Variables
2
Local Variables
dead
ran
Source
1Begin T_ScCrea_WormmouthDisease
2
3DontSaveObject
4short dead
5short ran
6
7if ( dead == 1 )
8 return
9endif
10
11If ( GetHealth <= 0 )
12 set dead to 1 ;now remove the disease, as the player only gets diseased from attacks
13
14 if (getSpell, "witbane" == 1)
15 removeSpell "witbane"
16 elseif (getSpell, "serpiginous dementia" == 1)
17 removeSpell "serpiginous dementia"
18 elseif (getSpell, "Wither" == 1)
19 removeSpell "Wither"
20 elseif (getSpell, "Rotbone" == 1)
21 removeSpell "Rotbone"
22 elseif (getSpell, "Ataxia" == 1)
23 removeSpell "Ataxia"
24 endif
25
26 return
27Endif
28
29if ( GetCommonDisease == 0 )
30 set ran to random 5; choose the random disease for this wormmouth
31
32 if (ran == 0)
33 addSpell "witbane"
34 elseif (ran == 1)
35 addSpell "serpiginous dementia"
36 elseif (ran == 2)
37 addSpell "Wither"
38 elseif (ran == 3)
39 addSpell "Rotbone"
40 else
41 addSpell "Ataxia"
42 endif
43endif
44
45End T_ScCrea_WormmouthDisease