enderalse/source/scripts/fs_nqr05_bossfightabnormalitysc.psc

139 lines
2.8 KiB
Plaintext

Scriptname FS_NQR05_BossfightAbnormalitySC extends Actor
float Property invulnerabilityLength = 15 autoreadonly
int Property invulnerabilityWait = 50 autoreadonly
float Property attackDamageMultDuringInvulnerability = 3 autoreadonly
Spell Property _FS_NQR05_BossfightFireCloakSP Auto
ImageSpaceModifier Property MAGFireBoltEXCastImod Auto
Explosion Property _00E_FS_NQR05_PerversionExp Auto
Scene Property FS_NQR05_SC_Bossfight Auto
Topic Property FS_NQR05_Warnings_Invulnerability Auto
VisualEffect Property SoulTrapPVFX02 Auto
GlobalVariable Property FS_NQR05_AbnormalityDead Auto
GlobalVariable Property FS_NQR05_AbnormalityInitialized Auto
Actor Property FS_NQR05_TharaelREF Auto
Quest Property FS_NQR05 Auto
Sound Property MAGCloakOut Auto
Idle Property GiantKnownDown Auto
Actor playerREF
float oldAttackDmgMult
Event OnEnterBleedout()
Self.SetActorValue("healRate", 0.0)
Self.SetActorValue("healRatemult", 0.0)
FS_NQR05_AbnormalityDead.SetValueInt(1)
EndEvent
Event OnDeath(Actor killer)
FS_NQR05.setStage(255)
gotoState("Dead")
EndEvent
Event OnLoad()
if FS_NQR05.GetStage() >= 251 && FS_NQR05.GetStage() < 255
gotostate("CombatStart")
elseif FS_NQR05_AbnormalityInitialized.GetValueInt() == 0
self.playIdle(GiantKnownDown)
FS_NQR05_AbnormalityInitialized.SetValueInt(1)
registerforSingleUpdate(20)
endif
if !FS_NQR05_SC_Bossfight.IsPlaying()
self.SetAlpha(0.0)
endif
Endevent
Event OnUpdate()
Endevent
State CombatStart
Event OnBeginState()
playerREF = Game.getPlayer()
Self.RegisterForSingleUpdate(10)
EndEvent
Event OnUpdate()
if FS_NQR05.GetStage() >= 251 && FS_NQR05.GetStage() < 255
gotoState("Invulnerability")
endif
Endevent
Endstate
State Invulnerability
Event OnBeginState()
if FS_NQR05.GetStage() >= 251 && FS_NQR05.GetStage() < 255
MAGFireBoltEXCastImod.Apply()
;SoulTrapPVFX02.Play(self, -1, heart)
Utility.wait(1.0)
FS_NQR05_TharaelREF.Say(FS_NQR05_Warnings_Invulnerability)
oldAttackDmgMult = Self.getAV("attackdamagemult")
Utility.wait(3.0)
self.setghost(True)
Self.setAV("attackdamagemult", attackDamageMultDuringInvulnerability)
self.addspell(_FS_NQR05_BossfightFireCloakSP)
placeatme(_00E_FS_NQR05_PerversionExp)
Self.RegisterForSingleUpdate(invulnerabilityLength)
endif
EndEvent
Event OnEndState()
Endevent
Event OnUpdate()
MAGFireBoltEXCastImod.Apply()
self.setghost(False)
Self.setAV("attackdamagemult", oldAttackDmgMult)
self.removespell(_FS_NQR05_BossfightFireCloakSP)
MAGCloakOut.Play(Self)
SoulTrapPVFX02.stop(self)
gotoState("Combat")
Endevent
Endstate
State Combat
Event OnBeginState()
Self.RegisterForSingleUpdate(invulnerabilityWait)
Endevent
Event OnUpdate()
gotoState("Invulnerability")
Endevent
EndState
State Dead
EndState
Function RegisterCombatStart()
GoToState("CombatStart")
EndFunction