Bom,o Eclipse Origins tem um sistema não terminado,ou não feito de defesa,note que não importa o item que você use,o dano que você recebe será o mesmo.
Existem muitas formas de implantar o sistema de defesa,infelizmente vou fazer o mais demorado,pois não estou com o Visual Basic aqui,por isso não vou poder olhar a Source...
No modCombat procure por:
Depois de end function,adicione:
Agora,procure por:
E baixo disso:
Adicione:
Agora,procure por:
E abaixo disso:
Adicione:
Como funciona?
Defina a defesa do equipamento em "damage".
Em armas isso não funcionará,não se preocupe.
Existem muitas formas de implantar o sistema de defesa,infelizmente vou fazer o mais demorado,pois não estou com o Visual Basic aqui,por isso não vou poder olhar a Source...
No modCombat procure por:
- Código:
GetNpcMaxVita
Depois de end function,adicione:
- Código:
Function GetPlayerDef(ByVal index As Long) As Long
Dim DefNum As Long
Dim Def As Long
GetPlayerDef = 0
Def = 0
' Check for subscript out of range
If IsPlaying(index) = False Or index <= 0 Or index > MAX_PLAYERS Then
Exit Function
End If
If GetPlayerEquipment(index, Armor) > 0 Then
DefNum = GetPlayerEquipment(index, Armor)
Def = Def + Item(DefNum).Data2
End If
If GetPlayerEquipment(index, Helmet) > 0 Then
DefNum = GetPlayerEquipment(index, Helmet)
Def = Def + Item(DefNum).Data2
End If
If GetPlayerEquipment(index, Shield) > 0 Then
DefNum = GetPlayerEquipment(index, Shield)
Def = Def + Item(DefNum).Data2
End If
If Not GetPlayerEquipment(index, Armor) > 0 And Not GetPlayerEquipment(index, Helmet) > 0 And Not GetPlayerEquipment(index, Shield) > 0 Then
GetPlayerDef = 0.085 * GetPlayerStat(index, Endurance) + (GetPlayerLevel(index) / 5)
Else
GetPlayerDef = 0.085 * GetPlayerStat(index, Endurance) * Def + (GetPlayerLevel(index) / 5)
End If
End Function
Agora,procure por:
- Código:
Public Sub TryNpcAttackPlayer
E baixo disso:
- Código:
If Damage > 0 Then
Call NpcAttackPlayer(mapNpcNum, index, Damage)
End If
Adicione:
- Código:
Damage = Damage - GetPlayerDef(index)
Agora,procure por:
- Código:
TryPlayerAttackPlayer
E abaixo disso:
- Código:
If Damage > 0 Then
Call PlayerAttackPlayer(attacker, Victim, Damage)
Else
Call PlayerMsg(attacker, "Your attack does nothing.", BrightRed)
End If
Adicione:
- Código:
Damage = Damage - GetPlayerDef(Victim)
Como funciona?
Defina a defesa do equipamento em "damage".
Em armas isso não funcionará,não se preocupe.