Option Strict Off
Option Explicit On
Friend Class armor
	Public Weight As Byte
	'UPGRADE_NOTE: armor was upgraded to armor_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
	Public armor_Renamed As Byte
	Public byte2 As Byte
	Public Unused1 As Byte
	
	
	Public Function scaledarmor() As Byte
		scaledarmor = (byte2 And &HF)
	End Function
	
	Public Function noarmor() As Byte
		noarmor = CShort(byte2 And &H80) / &H80
	End Function
	
    Public Sub setscaledarmor(ByRef num As Short)
        If num > 7 Then
            num = 7
        End If
        If num < 0 Then
            num = 0
        End If
        byte2 = CShort(byte2 And &H80) + num
    End Sub
	
    Public Sub setnoarmor(ByRef num As Short)
        byte2 = (byte2 And &H7F)
        If num = 1 Then
            byte2 = byte2 + &H80
        End If
    End Sub
End Class