Option Strict Off
Option Explicit On
Friend Class MonsterEditor
	Inherits System.Windows.Forms.Form
	'UPGRADE_WARNING: Arrays can't be declared with New. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="CC9D3AE5-6B95-4B43-91C7-28276302A5E8"'
    Private Monsters() As monster = ADGEDotNetUt.ArrayUt(Of monster).NewArray1(27)
	Public selectedmonster As Short
	Public subchange As Boolean
	
    Public Sub init()
        Dim i As Short

        MonsterList.Items.Clear()

        Dim c As Integer
        Dim rows As String() = DUt.Read_Dic_Creature()
        For c = 0 To 27 - 1
            MonsterList.Items.Add(c.ToString("00")).SubItems.Add(rows(c))
        Next

        For i = 1 To 27
            Monsters(i).Armor_Renamed = App.graphics.f559.monster(i).Armor_Renamed
            Monsters(i).attacksound = App.graphics.f559.monster(i).attacksound
            Monsters(i).BaseHealth = App.graphics.f559.monster(i).BaseHealth
            Monsters(i).byte22 = App.graphics.f559.monster(i).byte22
            Monsters(i).byte23 = App.graphics.f559.monster(i).byte23
            Monsters(i).damagetype = App.graphics.f559.monster(i).damagetype
            Monsters(i).IdNum = App.graphics.f559.monster(i).IdNum
            Monsters(i).Speed = App.graphics.f559.monster(i).Speed
            Monsters(i).MinSpeed = App.graphics.f559.monster(i).MinSpeed
            Monsters(i).Poison = App.graphics.f559.monster(i).Poison
            Monsters(i).power = App.graphics.f559.monster(i).power
            Monsters(i).quickness = App.graphics.f559.monster(i).quickness
            Monsters(i).word14 = App.graphics.f559.monster(i).word14
            Monsters(i).word16 = App.graphics.f559.monster(i).word16
            Monsters(i).word18 = App.graphics.f559.monster(i).word18
            Monsters(i).Word2 = App.graphics.f559.monster(i).Word2
            Monsters(i).word20 = App.graphics.f559.monster(i).word20
            Monsters(i).Word4 = App.graphics.f559.monster(i).Word4
        Next

        selectmonster(1)
    End Sub
	
    Public Sub selectmonster(ByVal num As Short)
        selectedmonster = num
        subchange = True

        MonsterList.Items(selectedmonster - 1).Focused = True
        MyUt.CheckSel(MonsterList, selectedmonster - 1, "BlueGem")

        IdNum.Text = Str(Monsters(num).IdNum)
        Sound.Text = Str(Monsters(num).attacksound)
        Armor.Text = Str(Monsters(num).Armor_Renamed)
        BaseHealth.Text = Str(Monsters(num).BaseHealth)
        Strength.Text = Str(Monsters(num).power)
        AttackType.Text = Str(Monsters(num).damagetype)
        Speed.Text = Str(Monsters(num).Speed)
        MinSpeed.Text = Str(Monsters(num).MinSpeed)
        HitProb.Text = Str(Monsters(num).quickness)
        Poison.Text = Str(Monsters(num).Poison)
        Unused1.Text = Str(Monsters(num).Unused1)
        Unused2.Text = Str(Monsters(num).Unused2)
        Word2.Text = Str(Monsters(num).Word2)
        Space_Renamed.Text = Str(Monsters(num).w2_space)
        Word4.Text = Str(Monsters(num).Word4)
        W14Sightrange.Text = Str(Monsters(num).w14_sightrange)
        W14Unused1.Text = Str(Monsters(num).w14_unused1)
        W14Awareness.Text = Str(Monsters(num).w14_awarenessrange)
        W14Spellrange.Text = Str(Monsters(num).w14_spellrange)
        W16Unused1.Text = Str(Monsters(num).w16_unused1)
        W16Bravery.Text = Str(Monsters(num).w16_bravery)
        W16Skill.Text = Str(Monsters(num).w16_skill)
        W16Teleport.Text = Str(Monsters(num).w16_teleportation)
        W18Unused1.Text = Str(Monsters(num).w18_unused1)
        W18Magicres.Text = Str(Monsters(num).w18_magicresistance)
        W18Poisonres.Text = Str(Monsters(num).w18_poisonresistance)
        W18Unused2.Text = Str(Monsters(num).w18_unused2)
        W20AttackLength.Text = Str(Monsters(num).w20_attacklength)
        W20StatusUpdate.Text = Str(Monsters(num).w20_statusupdate)
        W20AttackStatusUpdate.Text = Str(Monsters(num).w20_attackstatusupdate)
        W20Unused1.Text = Str(Monsters(num).w20_unused1)

        Dim i As Short
        Dim bit As Integer
        For i = 1 To CBW2.Count
            bit = 2 ^ (i + 1)
            CBW2(i - 1).CheckState = CShort(Monsters(num).Word2 And bit) / bit
        Next

        CBW4MirrorImage.CheckState = Monsters(num).w4_mirrorimage
        CBW4Unknown1.CheckState = Monsters(num).w4_unknown1
        CBW4Unknown2.CheckState = Monsters(num).w4_unknown2
        CBW4Unknown3.CheckState = Monsters(num).w4_unknown3
        CBW4Unknown4.CheckState = Monsters(num).w4_unknown4

        CBW4SideImage.CheckState = Monsters(selectedmonster).w4_sideimage
        CBW4BackImage.CheckState = Monsters(selectedmonster).w4_backimage
        CBW4AttackImage.CheckState = Monsters(selectedmonster).w4_attackimage
        CBW4MirrorAttack.CheckState = Monsters(selectedmonster).w4_mirroredattack
        CBW4DontMirrorWhileAttacking.CheckState = Monsters(selectedmonster).w4_dontmirrorwhileattacking
        W4XShiftGroup.Text = Str(Monsters(selectedmonster).w4_xshiftgroup)
        W4YShiftGroup.Text = Str(Monsters(selectedmonster).w4_yshiftgroup)
        W4FrontGraphics.Text = Str(Monsters(selectedmonster).w4_frontgraphics)

        subchange = False
    End Sub
	
	'UPGRADE_WARNING: Event CBW2.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW2_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW2.CheckStateChanged
		Dim Index As Short = CBW2.GetIndex(eventSender)
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Dim bit As Integer
		
		bit = 2 ^ (Index + 2)
		Monsters(selectedmonster).Word2 = (Monsters(selectedmonster).Word2 And (&HFFFF - bit))
		If CBW2(Index).CheckState = 1 Then
			Monsters(selectedmonster).Word2 = Monsters(selectedmonster).Word2 + bit
		End If
		
		Word2.Text = Str(Monsters(selectedmonster).Word2)
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event CBW4MirrorImage.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW4MirrorImage_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW4MirrorImage.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Monsters(selectedmonster).set_w4_mirrorimage((CBW4MirrorImage.CheckState))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event CBW4SideImage.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW4SideImage_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW4SideImage.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Monsters(selectedmonster).set_w4_sideimage((CBW4SideImage.CheckState))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event CBW4BackImage.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW4BackImage_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW4BackImage.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Monsters(selectedmonster).set_w4_backimage((CBW4BackImage.CheckState))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event CBW4AttackImage.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW4AttackImage_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW4AttackImage.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Monsters(selectedmonster).set_w4_attackimage((CBW4AttackImage.CheckState))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event CBW4Unknown1.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW4Unknown1_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW4Unknown1.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Monsters(selectedmonster).set_w4_unknown1((CBW4Unknown1.CheckState))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event CBW4Unknown2.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW4Unknown2_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW4Unknown2.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Monsters(selectedmonster).set_w4_unknown2((CBW4Unknown2.CheckState))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event CBW4Unknown3.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW4Unknown3_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW4Unknown3.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Monsters(selectedmonster).set_w4_unknown3((CBW4Unknown3.CheckState))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event CBW4Unknown4.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW4Unknown4_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW4Unknown4.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Monsters(selectedmonster).set_w4_unknown4((CBW4Unknown4.CheckState))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event CBW4MirrorAttack.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW4MirrorAttack_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW4MirrorAttack.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Monsters(selectedmonster).set_w4_mirroredattack((CBW4MirrorAttack.CheckState))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event CBW4DontMirrorWhileAttacking.CheckStateChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub CBW4DontMirrorWhileAttacking_CheckStateChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CBW4DontMirrorWhileAttacking.CheckStateChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		
		Monsters(selectedmonster).set_w4_dontmirrorwhileattacking((CBW4DontMirrorWhileAttacking.CheckState))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event W4XShiftGroup.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W4XShiftGroup_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W4XShiftGroup.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w4_xshiftgroup(App.EFChange8(W4XShiftGroup, 0, 3))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W4YShiftGroup.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W4YShiftGroup_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W4YShiftGroup.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w4_yshiftgroup(App.EFChange8(W4YShiftGroup, 0, 3))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event W4FrontGraphics.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W4FrontGraphics_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W4FrontGraphics.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w4_frontgraphics(App.EFChange8(W4FrontGraphics, 0, 3))
		Word4.Text = Str(Monsters(selectedmonster).Word4)
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event IdNum.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub IdNum_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles IdNum.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).IdNum = App.EFChange8(IdNum, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event sound.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub sound_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles sound.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).attacksound = App.EFChange8(Sound, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event armor.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub armor_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles armor.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).Armor_Renamed = App.EFChange8(Armor, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event basehealth.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub basehealth_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles basehealth.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).BaseHealth = App.EFChange8(BaseHealth, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event strength.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub strength_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles strength.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).power = App.EFChange8(Strength, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event attacktype.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub attacktype_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles attacktype.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).damagetype = App.EFChange8(AttackType, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event speed.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub speed_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles speed.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).Speed = App.EFChange8(Speed, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event minspeed.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub minspeed_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles minspeed.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).MinSpeed = App.EFChange8(MinSpeed, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event hitprob.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub hitprob_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles hitprob.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).quickness = App.EFChange8(HitProb, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event poison.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub poison_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles poison.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).Poison = App.EFChange8(Poison, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event Unused1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub Unused1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Unused1.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).Unused1 = App.EFChange8(Unused1, 0, 255)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event unused2.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub unused2_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles unused2.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).Unused2 = App.EFChange8(Unused2, 0, 255)
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event W14Sightrange.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W14Sightrange_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W14Sightrange.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w14_sightrange(App.EFChange8(W14Sightrange, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W14unused1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W14unused1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W14unused1.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w14_unused1(App.EFChange8(W14Unused1, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W14awareness.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W14awareness_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W14awareness.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w14_awarenessrange(App.EFChange8(W14Awareness, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W14spellrange.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W14spellrange_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W14spellrange.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w14_spellrange(App.EFChange8(W14Spellrange, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W16unused1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W16unused1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W16unused1.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w16_unused1(App.EFChange8(W16Unused1, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W16bravery.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W16bravery_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W16bravery.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w16_bravery(App.EFChange8(W16Bravery, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W16skill.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W16skill_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W16skill.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w16_skill(App.EFChange8(W16Skill, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W16teleport.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W16teleport_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W16teleport.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w16_teleportation(App.EFChange8(W16Teleport, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W18unused1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W18unused1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W18unused1.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w18_unused1(App.EFChange8(W18Unused1, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W18magicres.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W18magicres_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W18magicres.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w18_magicresistance(App.EFChange8(W18Magicres, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W18poisonres.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W18poisonres_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W18poisonres.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w18_poisonresistance(App.EFChange8(W18Poisonres, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W18unused2.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W18unused2_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W18unused2.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w18_unused2(App.EFChange8(W18Unused2, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W20AttackLength.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W20AttackLength_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W20AttackLength.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w20_attacklength(App.EFChange8(W20AttackLength, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W20StatusUpdate.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W20StatusUpdate_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W20StatusUpdate.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w20_statusupdate(App.EFChange8(W20StatusUpdate, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W20AttackStatusUpdate.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W20AttackStatusUpdate_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W20AttackStatusUpdate.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w20_attackstatusupdate(App.EFChange8(W20AttackStatusUpdate, 0, 15))
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event W20Unused1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub W20Unused1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles W20Unused1.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w20_unused1(App.EFChange8(W20Unused1, 0, 15))
		subchange = False
	End Sub
	
	'UPGRADE_WARNING: Event word2.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub word2_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles word2.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).Word2 = App.EFChange16(Word2, 0, 65535)
		Dim i As Short
		Dim bit As Integer
		
		For i = 1 To CBW2.Count
			bit = 2 ^ (i + 1)
			CBW2(i - 1).CheckState = CShort(Monsters(selectedmonster).Word2 And bit) / bit
		Next 
		Space_Renamed.Text = Str(Monsters(selectedmonster).w2_space)
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event word4.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub word4_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles word4.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).Word4 = App.EFChange16(Word4, 0, 65535)
		
		CBW4MirrorImage.CheckState = Monsters(selectedmonster).w4_mirrorimage
		CBW4SideImage.CheckState = Monsters(selectedmonster).w4_sideimage
		CBW4BackImage.CheckState = Monsters(selectedmonster).w4_backimage
		CBW4AttackImage.CheckState = Monsters(selectedmonster).w4_attackimage
		CBW4Unknown1.CheckState = Monsters(selectedmonster).w4_unknown1
		CBW4Unknown2.CheckState = Monsters(selectedmonster).w4_unknown2
		CBW4Unknown3.CheckState = Monsters(selectedmonster).w4_unknown3
		CBW4Unknown4.CheckState = Monsters(selectedmonster).w4_unknown4
		CBW4MirrorAttack.CheckState = Monsters(selectedmonster).w4_mirroredattack
		CBW4DontMirrorWhileAttacking.CheckState = Monsters(selectedmonster).w4_dontmirrorwhileattacking
		W4XShiftGroup.Text = Str(Monsters(selectedmonster).w4_xshiftgroup)
		W4YShiftGroup.Text = Str(Monsters(selectedmonster).w4_yshiftgroup)
		W4FrontGraphics.Text = Str(Monsters(selectedmonster).w4_frontgraphics)
		
		subchange = False
	End Sub
	'UPGRADE_WARNING: Event Space_Renamed.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub Space_Renamed_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Space_Renamed.TextChanged
		If subchange = True Then
			Exit Sub
		End If
		subchange = True
		Monsters(selectedmonster).set_w2_space(App.EFChange8(Space_Renamed, 0, 3))
		Word2.Text = Str(Monsters(selectedmonster).Word2)
		subchange = False
	End Sub
	
    Private Sub Cancel_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Cancel.Click
        Hide()

    End Sub
	
	
    Private Sub monsterList_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MonsterList.SelectedIndexChanged
        If MonsterList.FocusedItem Is Nothing Then Exit Sub
        selectmonster(MonsterList.FocusedItem.Index + 1)
    End Sub
	
	
    Private Sub Ok_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Ok.Click
        Dim i As Integer
        For i = 1 To 27
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).Armor_Renamed = Monsters(i).Armor_Renamed
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).attacksound = Monsters(i).attacksound
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).BaseHealth = Monsters(i).BaseHealth
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).byte22 = Monsters(i).byte22
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).byte23 = Monsters(i).byte23
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).damagetype = Monsters(i).damagetype
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).IdNum = Monsters(i).IdNum
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).MinSpeed = Monsters(i).MinSpeed
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).Speed = Monsters(i).Speed
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).Poison = Monsters(i).Poison
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).power = Monsters(i).power
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).quickness = Monsters(i).quickness
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).word14 = Monsters(i).word14
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).word16 = Monsters(i).word16
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).word18 = Monsters(i).word18
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).Word2 = Monsters(i).Word2
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).word20 = Monsters(i).word20
            'UPGRADE_WARNING: Couldn't resolve default property of object i. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            App.graphics.f559.monster(i).Word4 = Monsters(i).Word4
        Next
        App.graphics.f559.update()
        Hide()
    End Sub

    Private Sub MonsterEditor_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        If e.CloseReason = CloseReason.UserClosing Then
            e.Cancel = True
            Hide()
        End If
    End Sub

    Private Sub MonsterEditor_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MonsterList.SmallImageList = App.JewelIL
    End Sub
End Class