<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>&lt;undefined&gt;</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>-1000001</depth>
  <persistent>0</persistent>
  <parentName>&lt;undefined&gt;</parentName>
  <maskName>&lt;undefined&gt;</maskName>
  <events>
    <event eventtype="0" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>psimode = 0 // 0 - OFF, 1 - DEF, 2 - ASSIST
mode = 0

num = 1
ok = 0

x+=v_offset

//Mode 0
_x[1]=x+84+8
//Mode 1
_x[2]=x+144+8

_x[3]=x+204+24
_x[4]=x+220+24
_x[5]=x+236+24
_x[6]=x+252+24

_y[1]=7+8
_y[2]=21+8
_y[3]=35+8
_y[4]=49+8
_y[5]=63+8

cursor_x  = _x[1]
cursor_y  = _y[1]
cursor_image_index = 0
cursor_timer = 0

event_user(0)

alarm[0] = 1
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>ok = 1;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>///Keyboard controls
if ok {
    if keyboard_check_pressed(global.kb_back) {
        audio_play_sound(sndback,0,0)
        if mode = 0 {
            with objBattleController { ok = 1 }
            instance_destroy();
        } else {
            mode = 0
            cursor_x = _x[1]
            cursor_y = _y[psimode+1]
        }
    } else if keyboard_check_pressed(global.kb_choose) {
        if num !=0 {
            if mode = 0 and global.psiuser[global.current_inv+1] {
                ok = 0
                alarm[0] = 1
                mode = 1
                cursor_x = _x[3]
                cursor_y = _y[1]
                audio_play_sound(sndchoose,0,0)
            } else {
                if skillcost[num] &lt;= global.s_pp[objBattleController._turn] and skillname[num] != "" and skilllearnt[num] {
                    act[objBattleController._turn] = skillact[num];
                    global.remove_pp[objBattleController._turn] = skillcost[num];
                    audio_play_sound(sndchoose,0,0)
                    if skilltarget[num] = 0 {
                        instance_create(0,0,objPlayerSelector)
                        ok = 0;
                        exit;
                    } else if skilltarget[num] = 1 or skilltarget[num] = 3 {
                        if objBattleController._turn &gt; global.pl_count-1 {
                            with objTurnMaster { event_user(2) }
                            turn = 1
                            with objBattleController { in_battle = 1; ok = 1; }
                        } else {
                            with objBattleController { ok = 1; _turn++; cursor_x = _x[1]; cursor_y = _y[1] }
                        }
                        instance_destroy();
                    } else if skilltarget[num] = 2 {
                        instance_create(0,0,objTargetSelector)
                        ok = 0;
                        exit;
                    } 
                } else {
                    audio_play_sound(snderror,0,0)
                }
            }
        }
    } else if keyboard_check_pressed(vk_left) {
        audio_play_sound(sndselect,0,0)
        if mode = 1 {
            if cursor_x = _x[4] {
            cursor_x = _x[3]
            } else if cursor_x = _x[5] {
            cursor_x = _x[4]
            } else if cursor_x = _x[6] {
            cursor_x = _x[5]
            } else if cursor_x = _x[3] {
            cursor_x = _x[6]
            }
        } else if mode = 0 and !global.psiuser[global.current_inv+1]{
            if cursor_x = _x[1] {
                cursor_x = _x[2]+32
            } else {
                cursor_x = _x[1]
            }
        }
    } else if keyboard_check_pressed(vk_up) {
        audio_play_sound(sndselect2,0,0)
        if mode = 0 {
            if global.psiuser[global.current_inv+1] {
                if cursor_y = _y[1] {
                    cursor_y = _y[3]; psimode = 2;
                } else if cursor_y = _y[2] {
                    cursor_y = _y[1]; psimode = 0; 
                } else if cursor_y = _y[3] {
                    cursor_y = _y[2]; psimode = 1;
                }
            } else {
                if cursor_y = _y[1] {
                    cursor_y = _y[5];
                } else if cursor_y = _y[2] {
                    cursor_y = _y[1];
                } else if cursor_y = _y[3] {
                    cursor_y = _y[2];
                } else if cursor_y = _y[4] {
                    cursor_y = _y[3];
                } else if cursor_y = _y[5] {
                    cursor_y = _y[4];
                }
            }
        } else {
            if cursor_y = _y[1] {
                cursor_y = _y[4];
            } else if cursor_y = _y[2] {
                cursor_y = _y[1];
            } else if cursor_y = _y[3] {
                cursor_y = _y[2];
            } else if cursor_y = _y[4] {
                cursor_y = _y[3];
            }
        }
    } else if keyboard_check_pressed(vk_right) {
        audio_play_sound(sndselect,0,0)
        if mode = 1 {
            if cursor_x = _x[3] {
            cursor_x = _x[4]
            } else if cursor_x = _x[4] {
            cursor_x = _x[5]
            } else if cursor_x = _x[5] {
            cursor_x = _x[6]
            } else if cursor_x = _x[6] {
            cursor_x = _x[3]
            }
        } else if mode = 0 and !global.psiuser[global.current_inv+1]{
            if cursor_x = _x[1] {
                cursor_x = _x[2]+32
            } else {
                cursor_x = _x[1]
            }
        }
    } else if keyboard_check_pressed(vk_down) {
        audio_play_sound(sndselect2,0,0)
        if mode = 0 {
            if global.psiuser[global.current_inv+1] {
                if cursor_y = _y[1] {
                    cursor_y = _y[2]; psimode = 1;
                } else if cursor_y = _y[2] {
                    cursor_y = _y[3]; psimode = 2;
                } else if cursor_y = _y[3] {
                    cursor_y = _y[1]; psimode = 0;
                }
            } else {
                if cursor_y = _y[1] {
                    cursor_y = _y[2];
                } else if cursor_y = _y[2] {
                    cursor_y = _y[3];
                } else if cursor_y = _y[3] {
                    cursor_y = _y[4];
                } else if cursor_y = _y[4] {
                    cursor_y = _y[5];
                } else if cursor_y = _y[5] {
                    cursor_y = _y[1];
                }
            }
        } else {
            if cursor_y = _y[1] {
                cursor_y = _y[2];
            } else if cursor_y = _y[2] {
                cursor_y = _y[3];
            } else if cursor_y = _y[3] {
                cursor_y = _y[4];
            } else if cursor_y = _y[4] {
                cursor_y = _y[1];
            }
        }
    }
}
</string>
          </argument>
        </arguments>
      </action>
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>cursor_timer +=0.25

if cursor_timer = 1
{
cursor_image_index +=1
cursor_timer = 0
}
</string>
          </argument>
        </arguments>
      </action>
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if mode = 1 {
    if cursor_x = _x[3] {
            num = 1+16*psimode+4*(cursor_y = _y[2])+8*(cursor_y = _y[3])+12*(cursor_y = _y[4]);
    } else if cursor_x = _x[4] {
            num = 2+16*psimode+4*(cursor_y = _y[2])+8*(cursor_y = _y[3])+12*(cursor_y = _y[4]);
    } else if cursor_x = _x[5] {
            num = 3+16*psimode+4*(cursor_y = _y[2])+8*(cursor_y = _y[3])+12*(cursor_y = _y[4]);
    } else if cursor_x = _x[6] {
            num = 4+16*psimode+4*(cursor_y = _y[2])+8*(cursor_y = _y[3])+12*(cursor_y = _y[4]);
    }
} else if mode = 0 and !global.psiuser[global.current_inv+1] {
    if cursor_x = _x[1] {
        if cursor_y = _y[1] { num = 1 }
        else if cursor_y = _y[2] { num = 3 }
        else if cursor_y = _y[3] { num = 5 }
        else if cursor_y = _y[4] { num = 7 }
        else if cursor_y = _y[5] { num = 9 }
    } else {
        if cursor_y = _y[1] { num = 2 }
        else if cursor_y = _y[2] { num = 4 }
        else if cursor_y = _y[3] { num = 6 }
        else if cursor_y = _y[4] { num = 8 }
        else if cursor_y = _y[5] { num = 10 }
    }
}



visible = !(instance_exists(objTargetSelector) or instance_exists(objPlayerSelector))

</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" enumb="10">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>for (var i=1; i&lt;49; i++) {
    skillname[i] = global.skill[global.s_skill[objBattleController._turn,i],0]
    skillact[i] = global.skill[global.s_skill[objBattleController._turn,i],1]
    skillcost[i] = global.skill[global.s_skill[objBattleController._turn,i],2]
    skilltarget[i] = global.skill[global.s_skill[objBattleController._turn,i],3]
    skillletter[i] = global.skill[global.s_skill[objBattleController._turn,i],5]
    skilllearnt[i] = global.s_skill_learnt[objBattleController._turn,i]
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="8" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>draw_set_font(global.thenfont)
draw_set_halign(fa_left)
draw_set_color(c_white)
draw_set_alpha(1)
if global.psiuser[global.current_inv+1] {
    
    draw_window(x+72+8,y+8,8,7)
    draw_window(x+136+8,y+8,19,9)
    draw_text(_x[1],_y[1],"Offense")
    draw_text(_x[1],_y[2],"Assist")
    draw_text(_x[1],_y[3],"Recover")
    
    if skilllearnt[1+16*psimode]  or skilllearnt[2+16*psimode]  or skilllearnt[3+16*psimode]  or skilllearnt[4+16*psimode]  { draw_text(_x[2],_y[1],skillname[1+16*psimode])  }
    if skilllearnt[5+16*psimode]  or skilllearnt[6+16*psimode]  or skilllearnt[7+16*psimode]  or skilllearnt[8+16*psimode]  { draw_text(_x[2],_y[2],skillname[5+16*psimode])  }
    if skilllearnt[9+16*psimode]  or skilllearnt[10+16*psimode] or skilllearnt[11+16*psimode] or skilllearnt[12+16*psimode] { draw_text(_x[2],_y[3],skillname[9+16*psimode])  }
    if skilllearnt[13+16*psimode] or skilllearnt[14+16*psimode] or skilllearnt[15+16*psimode] or skilllearnt[16+16*psimode] { draw_text(_x[2],_y[4],skillname[13+16*psimode]) }
    
    if skilllearnt[1+16*psimode] { draw_text(_x[3],_y[1],skillletter[1+16*psimode]) }
    if skilllearnt[5+16*psimode] { draw_text(_x[3],_y[2],skillletter[5+16*psimode]) }
    if skilllearnt[9+16*psimode] { draw_text(_x[3],_y[3],skillletter[9+16*psimode]) }
    if skilllearnt[13+16*psimode] { draw_text(_x[3],_y[4],skillletter[13+16*psimode]) }
    
    if skilllearnt[2+16*psimode] { draw_text(_x[4],_y[1],skillletter[2+16*psimode]) } 
    if skilllearnt[6+16*psimode] { draw_text(_x[4],_y[2],skillletter[6+16*psimode]) }
    if skilllearnt[10+16*psimode] { draw_text(_x[4],_y[3],skillletter[10+16*psimode]) }
    if skilllearnt[14+16*psimode] { draw_text(_x[4],_y[4],skillletter[14+16*psimode]) }
    
    if skilllearnt[3+16*psimode] { draw_text(_x[5],_y[1],skillletter[3+16*psimode]) }
    if skilllearnt[7+16*psimode] { draw_text(_x[5],_y[2],skillletter[7+16*psimode]) }
    if skilllearnt[11+16*psimode] { draw_text(_x[5],_y[3],skillletter[11+16*psimode]) }
    if skilllearnt[15+16*psimode] { draw_text(_x[5],_y[4],skillletter[15+16*psimode]) }
    
    if skilllearnt[4+16*psimode] { draw_text(_x[6],_y[1],skillletter[4+16*psimode]) }
    if skilllearnt[8+16*psimode] { draw_text(_x[6],_y[2],skillletter[8+16*psimode]) }
    if skilllearnt[12+16*psimode] { draw_text(_x[6],_y[3],skillletter[12+16*psimode]) }
    if skilllearnt[16+16*psimode] { draw_text(_x[6],_y[4],skillletter[16+16*psimode]) }
    
    if mode = 1 and skillname[num] !="" and skilllearnt[num] {
        draw_window(x+64,y+32,10,6)
        if skilltarget[num] = 0 {
            draw_text(x+72,_y[3],"To one of us")
        } else if skilltarget[num] = 1 {
            draw_text(x+72,_y[3],"To all of us")
        } else if skilltarget[num] = 2 {
            draw_text(x+72,_y[3],"To one enemy")
        } else if skilltarget[num] = 3 {
            draw_text(x+72,_y[3],"To all enemies")
        }
        draw_text(x+72,_y[4],"PP Cost: "+string(skillcost[num]))
    }
} else {
    draw_window(x+80,y+8,27,11)
    if skilllearnt[1] { draw_text(_x[1],y+_y[1],skillname[1]) }
    if skilllearnt[2] { draw_text(_x[2]+32,y+_y[1],skillname[2]) }
    if skilllearnt[3] { draw_text(_x[1],y+_y[2],skillname[3]) }
    if skilllearnt[4] { draw_text(_x[2]+32,y+_y[2],skillname[4]) }
    if skilllearnt[5] { draw_text(_x[1],y+_y[3],skillname[5]) }
    if skilllearnt[6] { draw_text(_x[2]+32,y+_y[3],skillname[6]) }
    if skilllearnt[7] { draw_text(_x[1],y+_y[4],skillname[7]) }
    if skilllearnt[8] { draw_text(_x[2]+32,y+_y[4],skillname[8]) }
    if skilllearnt[9] { draw_text(_x[1],y+_y[5],skillname[9]) }
    if skilllearnt[10] { draw_text(_x[2]+32,y+_y[5],skillname[10]) }
}

draw_sprite(spr_cursor,cursor_image_index,cursor_x-3,cursor_y+8)
</string>
          </argument>
        </arguments>
      </action>
    </event>
  </events>
  <PhysicsObject>0</PhysicsObject>
  <PhysicsObjectSensor>0</PhysicsObjectSensor>
  <PhysicsObjectShape>0</PhysicsObjectShape>
  <PhysicsObjectDensity>0.5</PhysicsObjectDensity>
  <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
  <PhysicsObjectGroup>0</PhysicsObjectGroup>
  <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
  <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
  <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
  <PhysicsObjectAwake>-1</PhysicsObjectAwake>
  <PhysicsObjectKinematic>0</PhysicsObjectKinematic>
  <PhysicsShapePoints>
    <point>0,0</point>
    <point>144,144</point>
  </PhysicsShapePoints>
</object>
