enderalse/source/scripts/_00e_phasmalist_controlsummon.psc

33 lines
1.5 KiB
Plaintext
Raw Normal View History

Scriptname _00E_Phasmalist_ControlSummon extends activemagiceffect
2021-10-05 22:59:59 +00:00
; script that is attached to the magic effect that summons the apparition. Since it should be an aimed spell, this effect just checks wether the summon is legal and
; eventually casts a spell whose explosion places a marker that really summons the apparition (_00E_Phasmalist_SummonApparitionSC)
Actor Property PlayerREF auto
2021-10-05 22:59:59 +00:00
_FS_Phasmalist_ControlQuest Property ControlQuest auto
Message Property _00E_Phasmalist_NoPhasmalistTrinket auto
{Message objects whose title is the message that is displayed when the player tries to summon an apparition but wears no phasmalist trinket object}
Message Property _00E_Phasmalist_CannotSummon auto
GlobalVariable Property _00E_Phasmalist_TankMode auto
Shout Property _00E_Phasmalist_A1_SummonApparationShout Auto
2021-10-05 22:59:59 +00:00
Spell Property spellToCastOnSuccess Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
2021-10-05 22:59:59 +00:00
If ControlQuest.IsApparitionChangingSummonStatus()
; Do nothing
ElseIf ControlQuest.IsApparitionSpawned()
ControlQuest.UnsummonApparition()
(PlayerREF as _00E_Game_TalentControlSC).SetTalentRecoveryTime(_00E_Phasmalist_A1_SummonApparationShout, 0)
Else
If ControlQuest.IsTrinketEquipped()
If ControlQuest.IsBadApparitionLocation(PlayerREF.GetCurrentLocation()) || _00E_Phasmalist_TankMode.GetValue() != 0
_00E_Phasmalist_CannotSummon.Show()
Else
spellToCastOnSuccess.Cast(PlayerREF)
EndIf
Else
2021-10-05 22:59:59 +00:00
Debug.Notification(_00E_Phasmalist_NoPhasmalistTrinket.getName())
EndIf
2021-10-05 22:59:59 +00:00
EndIf
EndEvent