Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep hunter hidden while attacking with hunter armor, reduce inmo dur… #369

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Codigo/Admin.bas
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ Public AssistDamageValidTime As Long 'valid time for damage to count as a
Public AssistHelpValidTime As Long 'valid time for helpful spell to count as assist
Public HideAfterHitTime As Long 'required time to hide again after a hit remove us from this state
Public FactionReKillTime As Long 'required time between killing the same user to get factions points
Public AirHitReductParalisisTime As Integer 'you can hit to the air to reduce inmo/paralisis time

Public Puerto As Long

Expand Down
2 changes: 1 addition & 1 deletion Codigo/EffectOverTime/MultipleAttacks.cls
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Public Sub IBaseEffectOverTime_Update(ByVal deltaTime As Long)
If mPendingBlow > 0 Then
mPendingBlowTime = mPendingBlowTime + deltaTime
If mPendingBlowTime > 100 Then
Call UserAttackPosition(mDotInfo.TargetRef.ArrayIndex, mPendingBlowPos)
Call UserAttackPosition(mDotInfo.TargetRef.ArrayIndex, mPendingBlowPos, True)
mPendingBlow = mPendingBlow - 1
If mPendingBlow = 0 And mTicks = 0 Then
mDotInfo.RemoveEffect = True
Expand Down
1 change: 1 addition & 0 deletions Codigo/FileIO.bas
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,7 @@ Sub LoadBalance()
AssistHelpValidTime = val(BalanceIni.GetValue("EXTRA", "AssistHelpValidTime"))
HideAfterHitTime = val(BalanceIni.GetValue("EXTRA", "HideAfterHitTime"))
FactionReKillTime = val(BalanceIni.GetValue("EXTRA", "FactionReKillTime"))
AirHitReductParalisisTime = val(BalanceIni.GetValue("EXTRA", "AirHitReductParalisisTime"))
'stun
PlayerStunTime = val(BalanceIni.GetValue("STUN", "PlayerStunTime"))
NpcStunTime = val(BalanceIni.GetValue("STUN", "NpcStunTime"))
Expand Down
5 changes: 1 addition & 4 deletions Codigo/Protocol.bas
Original file line number Diff line number Diff line change
Expand Up @@ -3577,9 +3577,6 @@ Private Sub HandleWorkLeftClick(ByVal UserIndex As Integer)
Dim envie As Boolean
Dim Particula As Integer
Dim Tiempo As Long
If IsFeatureEnabled("remove-inv-on-attack") Then
Call RemoveUserInvisibility(UserIndex)
End If
208 Call UsuarioAtacaUsuario(UserIndex, tU, Ranged)
Dim FX As Integer
If .Invent.MunicionEqpObjIndex Then
Expand All @@ -3589,7 +3586,7 @@ Private Sub HandleWorkLeftClick(ByVal UserIndex As Integer)
UserList(tU).Counters.timeFx = 2
212 Call SendData(SendTarget.ToPCAliveArea, tU, PrepareMessageCreateFX(UserList(tU).Char.charindex, FX, 0, UserList(tU).Pos.X, UserList(tU).Pos.y))
End If
If ProjectileType > 0 And .flags.Oculto = 0 Then
If ProjectileType > 0 And (.flags.Oculto = 0 Or Not MapInfo(.pos.Map).KeepInviOnAttack) Then
Call SendData(SendTarget.ToPCAliveArea, UserIndex, PrepareCreateProjectile(UserList(UserIndex).Pos.X, UserList(UserIndex).Pos.y, X, y, ProjectileType))
End If
'Si no es GM invisible, le envio el movimiento del arma.
Expand Down
12 changes: 9 additions & 3 deletions Codigo/SistemaCombate.bas
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ UsuarioAtacaNpc_Err:

End Sub

Public Sub UserAttackPosition(ByVal UserIndex As Integer, ByRef TargetPos As t_WorldPos)
Public Sub UserAttackPosition(ByVal UserIndex As Integer, ByRef TargetPos As t_WorldPos, Optional ByVal IsExtraHit As Boolean = False)
'Exit if not legal
126 If TargetPos.X >= XMinMapSize And TargetPos.X <= XMaxMapSize And TargetPos.Y >= YMinMapSize And TargetPos.Y <= YMaxMapSize Then
128 If ((MapData(TargetPos.map, TargetPos.X, TargetPos.Y).Blocked And 2 ^ (UserList(UserIndex).Char.Heading - 1)) <> 0) Then
Expand Down Expand Up @@ -949,6 +949,12 @@ Public Sub UserAttackPosition(ByVal UserIndex As Integer, ByRef TargetPos As t_W
Exit Sub
Else
152 Call SendData(SendTarget.ToPCAliveArea, UserIndex, PrepareMessageCharSwing(UserList(UserIndex).Char.charindex, True, False))
With UserList(UserIndex)
If Not IsExtraHit And .flags.Inmovilizado + .flags.Paralizado > 0 Then
.Counters.Inmovilizado = max(0, .Counters.Inmovilizado - PlayerInmuneTime)
.Counters.Paralisis = max(0, .Counters.Paralisis - PlayerInmuneTime)
End If
End With
End If
Else
154 Call SendData(SendTarget.ToPCAliveArea, UserIndex, PrepareMessageCharSwing(UserList(UserIndex).Char.charindex, True, False))
Expand Down Expand Up @@ -1002,10 +1008,10 @@ Public Sub UsuarioAtaca(ByVal UserIndex As Integer)
Call IncreaseSingle(.Modifiers.PhysicalDamageBonus, -0.25) 'Side targets gets 50% damage
AttackPos = UserList(UserIndex).pos
Call GetHeadingRight(.Char.Heading, AttackPos)
Call UserAttackPosition(UserIndex, AttackPos)
Call UserAttackPosition(UserIndex, AttackPos, True)
AttackPos = UserList(UserIndex).pos
Call GetHeadingLeft(.Char.Heading, AttackPos)
Call UserAttackPosition(UserIndex, AttackPos)
Call UserAttackPosition(UserIndex, AttackPos, True)
Call IncreaseSingle(.Modifiers.PhysicalDamageBonus, 0.5) 'return to prev state
Else
Call UserAttackPosition(UserIndex, AttackPos)
Expand Down