- UID
- 49149
- 帖子
- 4
- 主題
- 0
- 精華
- 0
- 積分
- 40
- 楓幣
- 5
- 威望
- 2
- 存款
- 0
- 贊助金額
- 150
- 推廣
- 0
- GP
- 0
- 閱讀權限
- 30
- 性別
- 保密
- 在線時間
- 4 小時
- 註冊時間
- 2014-3-2
- 最後登入
- 2021-4-4
|
Public Sub ApplyEffectToPlayer(ByVal magnitude As Single, ByVal Optional forceHeal As Boolean = False)
If (PlayerData.mCurrentHP > 0!) Then
Dim flag As Boolean = True
SkillInstance.AlterPlayerHPEvent(magnitude, forceHeal)
If (magnitude >= 0!) Then
If (magnitude < RestoreGameplay.minRecoverHP) Then
RestoreGameplay.minRecoverHP = magnitude
End If
If (magnitude > RestoreGameplay.maxRecoverHP) Then
RestoreGameplay.maxRecoverHP = magnitude
End If
RestoreGameplay.totalRecoverHP = (RestoreGameplay.totalRecoverHP + magnitude)
If ((PlayerData.mCurrentHP < PlayerData.mMaxHP) AndAlso (magnitude > 0!)) Then
Me.recoverDisplayTime += 1
Me.HpERcoverEffectPlay
AudioController.sfx.Play(Sound1.instance.hpRecover)
End If
ElseIf (magnitude < 0!) Then
If (((Labyrinth.protectedData.currentBattleZoneIndex = Labyrinth.protectedData.totalBattleZone) AndAlso (PlayerData.mCurrentHP > (PlayerData.mMaxHP * 0.5!))) AndAlso ((PlayerData.mCurrentHP + magnitude) < (PlayerData.mMaxHP * 0.1!))) Then
LabyrinthCamera.parent.animation.Play
End If
Dim num As Integer = CInt(-magnitude)
RestoreGameplay.totalDamageTaken = (RestoreGameplay.totalDamageTaken + num)
If (num > RestoreGameplay.maxDamageTaken) Then
RestoreGameplay.maxDamageTaken = num
End If
If (num < RestoreGameplay.minDamageTaken) Then
RestoreGameplay.minDamageTaken = num
End If
If (num > RestoreGameplay.maxDamageTakenPerWave(RestoreGameplay.protectedData.currentWaveIndex1)) Then
RestoreGameplay.maxDamageTakenPerWave(RestoreGameplay.protectedData.currentWaveIndex1) = num
End If
AudioController.sfx.Play(Sound1.instance.skill_retribute)
End If
PlayerData.mCurrentHP = (PlayerData.mCurrentHP + magnitude)
If (PlayerData.mCurrentHP > PlayerData.mMaxHP) Then
PlayerData.mCurrentHP = PlayerData.mMaxHP
End If
If (PlayerData.mCurrentHP <= 0!) Then
If flag Then
PlayerData.mCurrentHP = 1!
Else
PlayerData.mCurrentHP = 0!
CoroutineControl.instance.StartCoroutine(Me.GameOver)
MyBase.enabled = False
End If
ElseIf (PlayerData.mCurrentHP <= 1!) Then
PlayerData.mCurrentHP = 1!
End If
If (PlayerData.mCurrentHP < RestoreGameplay.minHP) Then
RestoreGameplay.minHP = PlayerData.mCurrentHP
End If
If (PlayerData.mCurrentHP < RestoreGameplay.minPlayerHPPerWave(RestoreGameplay.protectedData.currentWaveIndex1)) Then
RestoreGameplay.minPlayerHPPerWave(RestoreGameplay.protectedData.currentWaveIndex1) = PlayerData.mCurrentHP
End If
If (PlayerData.mCurrentHP > 0!) Then
Labyrinth.newHPBar.ChangeTo(If(((PlayerData.mCurrentHP / PlayerData.mMaxHP) >= 0.01!), (PlayerData.mCurrentHP / PlayerData.mMaxHP), 0.01!), 0.4!)
Else
Labyrinth.newHPBar.ChangeTo(0!, 0.4!)
End If
If (Not Labyrinth.playerHP_JText Is Nothing) Then
Labyrinth.playerHP_JText.text = (CInt(PlayerData.mCurrentHP) & "/" & CInt(PlayerData.mMaxHP))
End If
If (PlayerData.mCurrentHP > (PlayerData.mMaxHP * 0.2!)) Then
Labyrinth.playerHP_JText_Ani.endBehaviour
Labyrinth.playerHP_JText.myR.material.color = New Color(1!, 1!, 1!, 1!)
Else
Dim colors As Color() = New Color() { New Color(1!, 1!, 1!, 1!), New Color(1!, 0.3!, 0.3!, 1!), New Color(1!, 1!, 1!, 1!) }
Labyrinth.playerHP_JText_Ani.init(colors, 0.5!, CurveMode.linear, -1!, AniEndAction.disableScript, Nothing, 0)
End If
Labyrinth.CalculateDisplayKiller
End If
End Sub |
|