Option Strict Off
Option Explicit On
Friend Class combo
	
	Public attack1 As Byte
	Public attack2 As Byte
	Public attack3 As Byte
	Public byte4 As Byte
	Public byte5 As Byte
	Public byte6 As Byte
	Public unused1 As Byte
	Public unused2 As Byte
	
	'UPGRADE_NOTE: tostring was upgraded to tostring_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
	Public Function tostring_Renamed() As String
		If attack1 >= 0 And attack1 <= 44 Then
			tostring_Renamed = App.graphics.f560.attack(attack1 + 1).name
		Else
			tostring_Renamed = "-"
		End If
		
		tostring_Renamed = tostring_Renamed & "/"
		
		If attack2 >= 0 And attack3 < 44 Then
			tostring_Renamed = tostring_Renamed & App.graphics.f560.attack(attack2 + 1).name
		Else
			tostring_Renamed = tostring_Renamed & "-"
		End If
		
		tostring_Renamed = tostring_Renamed & "/"
		
		If attack2 >= 0 And attack3 <= 44 Then
			tostring_Renamed = tostring_Renamed & App.graphics.f560.attack(attack3 + 1).name
		Else
			tostring_Renamed = tostring_Renamed & "-"
		End If
		
	End Function
	Public Function skill1() As Byte
		skill1 = byte4 And &H7F
	End Function
	Public Function skill2() As Byte
		skill2 = byte5 And &H7F
	End Function
	Public Function skill3() As Byte
		skill3 = byte6 And &H7F
	End Function
	Public Function charges1() As Short
		If (byte4 And &H80) > 0 Then
			charges1 = 1
		Else
			charges1 = 0
		End If
	End Function
	Public Function charges2() As Short
		If (byte5 And &H80) > 0 Then
			charges2 = 1
		Else
			charges2 = 0
		End If
	End Function
	Public Function charges3() As Short
		If (byte6 And &H80) > 0 Then
			charges3 = 1
		Else
			charges3 = 0
		End If
	End Function
    Public Sub setskill1(ByRef num As Short)
        If num > 127 Then
            num = 127
        End If
        If num < 0 Then
            num = 0
        End If
        byte4 = CShort(byte4 And &H80) + num
    End Sub
    Public Sub setskill2(ByRef num As Short)
        If num > 127 Then
            num = 127
        End If
        If num < 0 Then
            num = 0
        End If
        byte5 = CShort(byte5 And &H80) + num
    End Sub
    Public Sub setskill3(ByRef num As Short)
        If num > 127 Then
            num = 127
        End If
        If num < 0 Then
            num = 0
        End If
        byte6 = CShort(byte6 And &H80) + num
    End Sub
    Public Sub setcharges1(ByRef num As Short)
        If num = 1 Then
            byte4 = CShort(byte4 And &H7F) + &H80
        Else
            byte4 = byte4 And &H7F
        End If
    End Sub
    Public Sub setcharges2(ByRef num As Short)
        If num = 1 Then
            byte5 = CShort(byte5 And &H7F) + &H80
        Else
            byte5 = byte5 And &H7F
        End If
    End Sub
    Public Sub setcharges3(ByRef num As Short)
        If num = 1 Then
            byte6 = CShort(byte6 And &H7F) + &H80
        Else
            byte6 = byte6 And &H7F
        End If
    End Sub
End Class