TR_m3_TT_FS_facestealer_2_sc
TR_Mainland.esm
Variables
13
Local Variables
doOnce
noidle
noattack
nohit
noflee
TR_abomination
powerReverse
T_Local_NPC
NoLore
T_Local_NoLore
TR_Map
pcCurrentHealth
pcPreviousHealth
Source
1Begin TR_m3_TT_FS_facestealer_2_sc
2
3short doOnce
4short noidle
5short noattack
6short nohit
7short noflee
8short TR_abomination
9short powerReverse
10float pcCurrentHealth
11float pcPreviousHealth
12short T_Local_NPC
13short NoLore
14short T_Local_NoLore
15short TR_Map
16
17if ( TR_Map != 3 )
18 set TR_Map to 3
19endif
20
21if ( MenuMode )
22 Return
23endif
24
25if ( GetDisabled )
26 setdelete 1
27 Return
28endif
29
30if ( TR_m3_TT_FS_helm_on == 0 )
31 if ( player->GetSpell T_De_Ab_FacelessHelm )
32 set TR_m3_TT_FS_helm_on to 1
33 endif
34elseif ( player->GetSpell T_De_Ab_FacelessHelm == 0 )
35 set TR_m3_TT_FS_helm_on to 0
36endif
37
38if ( GetJournalIndex TR_m3_TT_FaceStealer < 38 )
39 if ( GetSpellEffects "TR_m3_TT_FS_magic" )
40 if ( powerReverse == 0 )
41 set powerReverse to 1
42 SetMagicka 0
43 RemoveSpell "TR_m3_TT_FS_magic"
44 addspell TR_m3_TT_FS_nerf
45 player->addspell TR_m3_TT_FS_boon
46 StartScript TR_m3_TT_FS_failure
47 ForceGreeting
48 Return
49 endif
50 elseif ( TR_m3_TT_FS_helm_on == 1 )
51 if ( powerReverse == 0 )
52 set powerReverse to 1
53 SetMagicka 0
54 RemoveSpell "TR_m3_TT_FS_magic"
55 addspell TR_m3_TT_FS_nerf
56 player->addspell TR_m3_TT_FS_boon
57 StartScript TR_m3_TT_FS_failure
58 ForceGreeting
59 Return
60 endif
61 endif
62endif
63
64if ( doOnce == 1 )
65 if ( GetHealth < 500 )
66 set doOnce to 2
67 disable
68 PlaceAtMe, sprigganup, 1, 0, 0
69 if ( GetJournalIndex TR_m3_TT_FaceStealer >= 38 )
70 PlaceAtMe, TR_m3_TT_FS_facest_3b, 1, 0, 0
71 else
72 PlaceAtMe, TR_m3_TT_FS_facest_3, 1, 0, 0
73 endif
74 endif
75endif
76
77; record pc health
78if ( pcPreviousHealth < 0.1 )
79 set pcPreviousHealth to 1
80 ;MessageBox "Reset pcPreviousHealth" "ok"
81else
82 set pcPreviousHealth to pcCurrentHealth
83endif
84set pcCurrentHealth to ( player->GetHealth )
85
86; artificially make this guy's punches hit harder
87if ( player->GetFatigue < 0 )
88 ; if player is on the ground
89
90 ; if previoushealth is larger than current health
91 if ( ( pcCurrentHealth + 1 ) < ( pcPreviousHealth ) )
92 ; no repeats, just once
93 set pcPreviousHealth to 0
94
95 ; super punch!
96 ;MessageBox "super punch!" "ok"
97 player->ModCurrentHealth -15
98
99 endif
100
101endif
102
103
104if ( doOnce )
105 return
106endif
107
108if ( GetJournalIndex TR_m3_TT_FaceStealer >= 38 )
109 SetMagicka 0
110 addspell TR_m3_TT_FS_nerf
111 set powerReverse to 1
112endif
113
114StartCombat player
115set doOnce to 1
116set TR_abomination to 12
117ModCurrentHealth -100
118Say, "Vo\k\m\Atk_KM003.mp3", "We are too quick for you, brute."
119
120End