<!--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>-999999</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>

if global.enemy[1] = 0 { global.error = "The first enemy slot is empty"; instance_destroy(); room_goto(rmFallback); exit;}

with all { x = round(x); y =round(y)}

in_battle = 1;
ok = 0;
runaway = 0;
_turn = 1;

_x[1] = 23+v_offset
_x[2] = 88+v_offset
_x[3] = 152+v_offset
_y[1] = 14
_y[2] = 29

cursor_x = _x[1];
cursor_y = _y[1];
cursor_image_index = 0;
cursor_timer = 0;
//Labels
label_bash[4] = ""
label_goods[4] = ""
label_run[4] = ""
label_guard[4] = ""
label_psi[4] = ""
label_special[4] = ""
//Disabled buttons
no_bash[4] = 0
no_goods[4] = 0
no_run[4] = 0
no_guard[4] = 0
no_psi[4] = 0
no_special[4] = 0

//Place enemies on the screen and initialize drops
//var e;
for (var i=1;i&lt;6;i++) {
    e[i] = 0
}

switch global.en_count {
    case 1:
        e[1] = instance_create(160+v_offset,120,global.enemy[1]).id;
        dropenemy = e[1];
        break;
    case 2:
        e[1] = instance_create(102+v_offset,120,global.enemy[1]).id;
        e[2] = instance_create(218+v_offset,120,global.enemy[2]).id; 
        dropenemy = choose(e[1],e[2]);
        break;
    case 3:
        e[1] = instance_create(160+v_offset,120,global.enemy[1]).id; 
        e[2] = instance_create(80+v_offset,96,global.enemy[2]).id;
        e[3] = instance_create(240+v_offset,96,global.enemy[3]).id;
        dropenemy = choose(e[1],e[2],e[3]);
        break;
    case 4:
        e[1] = instance_create(25+v_offset,120,global.enemy[1]).id;
        e[2] = instance_create(115+v_offset,120,global.enemy[2]).id;
        e[3] = instance_create(205+v_offset,120,global.enemy[3]).id;
        e[4] = instance_create(295+v_offset,120,global.enemy[4]).id;
        dropenemy = choose(e[1],e[2],e[3],e[4]);
        break;
    case 5:
        e[1] = instance_create(160+v_offset,130,global.enemy[1]).id;
        e[2] = instance_create(100+v_offset,86,global.enemy[2]).id;
        e[3] = instance_create(220+v_offset,86,global.enemy[3]).id;
        e[4] = instance_create(40+v_offset,130,global.enemy[4]).id;
        e[5] = instance_create(280+v_offset,130,global.enemy[5]).id;
        dropenemy = choose(e[1],e[2],e[3],e[4],e[5]);
        break;
}

for (var i=1;i&lt;6;i++) {
    global.enemy[i] = e[i]
}

droprate = dropenemy.e_droprate
drop = dropenemy.e_drop
dropenemyname = upper(dropenemy.e_art)+dropenemy.e_name

//Create the in-battle NPC instances
switch global.helpernpc {
    case 1:
        instance_create(0,0,objMikuBattle)
        break;
}

//Load the animated backgrounds
with instance_create(0,0,objBattleBackground) {
    back = global.battle_bg[global.enemy[1].bg,0];
    effect = global.battle_bg[global.enemy[1].bg,1]
    frequency = global.battle_bg[global.enemy[1].bg,2];
    phaserate = global.battle_bg[global.enemy[1].bg,3];
    amplitude = global.battle_bg[global.enemy[1].bg,4];
    alpha = global.battle_bg[global.enemy[1].bg,5];
    speedx = global.battle_bg[global.enemy[1].bg,6];
    speedy = global.battle_bg[global.enemy[1].bg,7];
    scanline = global.battle_bg[global.enemy[1].bg,8];
    depth = 1000
}

if global.enemy[1].bg2 != -1 {
    with instance_create(0,0,objBattleBackground) {
        back = global.battle_bg[global.enemy[1].bg2,0];
        effect = global.battle_bg[global.enemy[1].bg2,1]
        frequency = global.battle_bg[global.enemy[1].bg2,2];
        phaserate = global.battle_bg[global.enemy[1].bg2,3];
        amplitude = global.battle_bg[global.enemy[1].bg2,4];
        alpha = global.battle_bg[global.enemy[1].bg2,5];
        speedx = global.battle_bg[global.enemy[1].bg2,6];
        speedy = global.battle_bg[global.enemy[1].bg2,7];
        scanline = global.battle_bg[global.enemy[1].bg2,8];
        depth = 999
    }
}

//Run away stuff
switch global.pl_count {
    case 1:
        highest_pc_speed = global.s_speed[1];
        break;
    case 2:
        highest_pc_speed = max(global.s_speed[1],global.s_speed[2]);
        break;
    case 3:
        highest_pc_speed = max(global.s_speed[1],global.s_speed[2],global.s_speed[3]);
        break;
    case 4:
        highest_pc_speed = max(global.s_speed[1],global.s_speed[2],global.s_speed[3],global.s_speed[4]);
        break;
}

switch global.en_count {
    case 1:
        highest_en_speed = global.enemy[1].e_speed;
        break;
    case 2:
        highest_en_speed = max(global.enemy[1].e_speed,global.enemy[2].e_speed);
        break;
    case 3:
        highest_en_speed = max(global.enemy[1].e_speed,global.enemy[2].e_speed,global.enemy[3].e_speed);
        break;
    case 4:
        highest_en_speed = max(global.enemy[1].e_speed,global.enemy[2].e_speed,global.enemy[3].e_speed,global.enemy[4].e_speed);
        break;
    case 5:
        highest_en_speed = max(global.enemy[1].e_speed,global.enemy[2].e_speed,global.enemy[3].e_speed,global.enemy[4].e_speed,global.enemy[5].e_speed);
        break;
}
number_of_turns = 0

//Other player variables
for (var i=1;i&lt;global.pl_count+1;i++) {
    global.s_realoff[i] = global.s_off[i];
    global.s_realdef[i] = global.s_def[i];
    global.s_realguts[i] = global.s_guts[i];
    global.s_guard[i] = 1;
}

msg = ""

alarm[0] = 1
alarm[4] = 60

// Play music
if !global.mute { audio_play_sound(global.enemy[1].e_music,1,1) }
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="5">
      <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="2" enumb="4">
      <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>///Second count
global.secondsplaying +=1
alarm[4] = room_speed
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="3">
      <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>/// Runaway result
if !instance_exists(objBattleMsg) {
    if runaway {
        stat_reset()
        instance_create(0,09,objFadeOutBattle)
    } else {
        //objTurnMaster.alarm[1] = 1; 
        with objTurnMaster { event_user(2) }
        turn = 1; 
        in_battle = 1;
        ok = 1;
    }
} else {
    alarm[3] = 1;
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="2">
      <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>///Run away

with instance_create(0,0,objBattleMsg) {
    strno = 1;
    str[0] = global.s_name[objBattleController._turn]+" tried to run away..."
    if random(100) &lt; (objBattleController.highest_pc_speed - objBattleController.highest_en_speed + 10*objBattleController.number_of_turns) {
        if global.boss {
            str[1] = "...but couldn't!"
        } else {
            str[1] = "...and did!"
            objBattleController.runaway = 1
        }
    } else {
        if global.battle_type == 1 {
            str[1] = "...and did!"
            objBattleController.runaway = 1
        } else {
            str[1] = "...but couldn't!"
        }
    }
}
alarm[3] = 1
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="1">
      <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>///Give control to player or enemy if battle type = 2
if !instance_exists(objBattleMsg) {
    if global.battle_type = 2 {
        act[1] = "none"; 
        act[2] = "none"; 
        act[3] = "none"; 
        act[4] = "none"; 
        with objTurnMaster { event_user(2) }
        //objTurnMaster.alarm[1] = 1; 
        turn = 1; 
        in_battle = 1;
    } else {
        in_battle = 0;
    }
    ok = 1;
} else {
    alarm[1] = 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>///Battle start messages
with instance_create(0,0,objBattleMsg) {
    strno = 0;
    switch global.battle_type {
        case 0:
            switch global.en_count {
                case 1: 
                    str[0] = global.enemy[1].e_welcome[1]; 
                    break;
                case 2: 
                    str[0] = global.enemy[1].e_welcome[2]; 
                    break;
                case 3:
                case 4:
                case 5:
                    str[0] = global.enemy[1].e_welcome[3]; 
                    break;
            }
            break;
        case 1:
            switch global.en_count {
                case 1:
                    str[0] = "You snuck up on "+global.enemy[1].e_art+global.enemy[1].e_name+" from behind!"
                    break;
                case 2: 
                    str[0] = "You snuck up on "+global.enemy[1].e_art+global.enemy[1].e_name+" and "+global.enemy[1].e_pron_pos+" cohort from behind!"
                    break;
                case 3: 
                case 4: 
                case 5: 
                    str[0] = "You snuck up on "+global.enemy[1].e_art+global.enemy[1].e_name+" and "+global.enemy[1].e_pron_pos+" cohorts from behind!"
                    break;
            }
            break;
        case 2:
            switch global.en_count {
                case 1: 
                    str[0] = upper(global.enemy[1].e_art)+global.enemy[1].e_name+" snuck up from behind!"
                    break;
                case 2: 
                    str[0] = upper(global.enemy[1].e_art)+global.enemy[1].e_name+" and "+global.enemy[1].e_pron_pos+" cohort snuck up from behind!"
                    break;
                case 3: 
                case 4:
                case 5:
                    str[0] = upper(global.enemy[1].e_art)+global.enemy[1].e_name+" and "+global.enemy[1].e_pron_pos+" cohorts snuck up from behind!"
                    break;
            }
            break;
    }
}

switch global.en_count {
    case 1: global.totalexp = global.enemy[1].e_exp; break;
    case 2: global.totalexp = global.enemy[1].e_exp+global.enemy[2].e_exp; break;
    case 3: global.totalexp = global.enemy[1].e_exp+global.enemy[2].e_exp+global.enemy[3].e_exp; break;
    case 4: global.totalexp = global.enemy[1].e_exp+global.enemy[2].e_exp+global.enemy[3].e_exp+global.enemy[4].e_exp; break;
    case 5: global.totalexp = global.enemy[1].e_exp+global.enemy[2].e_exp+global.enemy[3].e_exp+global.enemy[4].e_exp+global.enemy[5].e_exp; break;
}

alarm[1] = 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>if !in_battle {
    if (global.dead[1] or global.s_asleep[1] or global.s_solid[1]) and _turn = 1 {
        _turn = 2
    } else if (global.dead[2] or global.s_asleep[2] or global.s_solid[2]) and _turn = 2 {
        _turn = 3
    } else if (global.dead[3] or global.s_asleep[3] or global.s_solid[3]) and _turn = 3 {
        _turn = 4
    } else if (global.dead[4] or global.s_asleep[4] or global.s_solid[4]) and _turn = 4 {
        with objTargetSelector { instance_destroy() }
        with objPlayerSelector { instance_destroy() }
        with objSkillsMenu { instance_destroy() }
        with objBattleInv { instance_destroy() }
        with objTurnMaster { event_user(2) }
        turn = 1
        in_battle = 1;
        ok = 1; 
    }
    global.current_inv = _turn -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 !in_battle {
    if !instance_exists(objPlayerSelector) {
        for (var i=1;i&lt;global.pl_count+1;i++) {
            global.healthbar[i].y = global.healthbar[i].ystart
        }
        if !(global.dead[_turn] or global.s_asleep[_turn] or global.s_solid[_turn]) {
            global.healthbar[_turn].y -= 8
        }
    }
} 
</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>///Keyboard controls
if !in_battle and ok and !(global.dead[_turn] or global.s_asleep[_turn] or global.s_solid[_turn]){
    if keyboard_check_pressed(global.kb_back) {
        switch _turn {
            case 2:
                if !global.dead[1] and !global.s_asleep[1] and !global.s_solid[1]{ 
                    _turn = 1; 
                }
                break;
            case 3:
                if !global.dead[2] and !global.s_asleep[2] and !global.s_solid[2]{ 
                    _turn = 2; 
                } else if !global.dead[1] and !global.s_asleep[1] and !global.s_solid[1]{
                    _turn = 1; 
                }
                break;
            case 4:
                if !global.dead[3] and !global.s_asleep[3] and !global.s_solid[3]{ 
                    _turn = 3; 
                } else if !global.dead[2] and !global.s_asleep[2] and !global.s_solid[2]{
                    _turn = 2; 
                } else if !global.dead[1] and !global.s_asleep[1] and !global.s_solid[1]{
                    _turn = 1; 
                }
                break;
        }
        cursor_x = _x[1]
        cursor_y = _y[1]
        audio_play_sound(sndback,0,0); 
    } else if keyboard_check_pressed(global.kb_choose) {
        audio_play_sound(sndchoose,0,0)
        if cursor_y = _y[1] {
            if cursor_x = _x[1] {
                //Bash
                if !no_bash[_turn] {
                    ok = 0;
                    act[_turn] = "bash";
                    instance_create(0,0,objTargetSelector);
                } else {
                    audio_play_sound(snderror,0,0)
                }
            } else if cursor_x = _x[2] {
                //Goods
                if !no_goods[_turn] {
                    ok = 0;
                    instance_create(16,0,objBattleInv);
                } else {
                    audio_play_sound(snderror,0,0)
                }
            } else if cursor_x = _x[3] {
                //Run Away
                if !no_run[_turn] {
                    in_battle = 1;
                    msg = "";
                    act[1] = "none"; 
                    act[2] = "none"; 
                    act[3] = "none"; 
                    act[4] = "none"; 
                    ok = 0; 
                    alarm[2] = 1;
                    cursor_x = _x[1]
                    cursor_y = _y[1]
                } else {
                    audio_play_sound(snderror,0,0)
                }
            } 
        } else {
            if cursor_x = _x[2] {
                //Skills
                if !no_psi[_turn] {
                    ok = 0;
                    instance_create(16,0,objSkillsMenu);
                } else {
                    audio_play_sound(snderror,0,0)
                }
            } else if cursor_x = _x[1] {
                //Guard
                if !no_guard[_turn] {
                    act[_turn] = "guard";
                    if _turn &gt; global.pl_count-1 {
                        with objTurnMaster { event_user(2) }
                        turn = 1;
                        in_battle = 1;
                    } else {
                        _turn++;
                    }
                    cursor_x = _x[1]
                    cursor_y = _y[1]
                } else {
                    audio_play_sound(snderror,0,0)
                }
            } else if cursor_x = _x[3] {
                //Special action
                if !no_special[_turn] {
                    if _turn = 1 {
                        ok = 0;
                        act[_turn] = "inspect";
                        instance_create(0,0,objTargetSelector);
                    }
                } else {
                    audio_play_sound(snderror,0,0)
                }
            }
        }
    } else if keyboard_check_pressed(vk_left) {
        if cursor_x = _x[1] {
            //if /*_turn !=1 or*/ cursor_y = _y[2] {
            //    cursor_x = _x[2]
            //} else {
                cursor_x = _x[3]
            //}
        } else if cursor_x = _x[2] {
            cursor_x = _x[1]
        } else if cursor_x = _x[3] {
            cursor_x = _x[2]
        }
        audio_play_sound(sndselect,0,0)
    } else if keyboard_check_pressed(vk_up) {
        if cursor_y = _y[1] {
            //if cursor_x != _x[3] {
                cursor_y = _y[2]
            //}
        } else if cursor_y = _y[2] {
            cursor_y = _y[1]
        }
        audio_play_sound(sndselect2,0,0)
    } else if keyboard_check_pressed(vk_right) {
        if cursor_x = _x[1] {
            cursor_x = _x[2]
        } else if cursor_x = _x[2] {
            //if /*_turn !=1 or*/ cursor_y = _y[2] {
            //    cursor_x = _x[1]
            //} else {
                cursor_x = _x[3]
            //}
        } else {
            cursor_x = _x[1]
        }
        audio_play_sound(sndselect,0,0)
    } else if keyboard_check_pressed(vk_down) {
        if cursor_y = _y[1] {
            //if cursor_x != _x[3] {
                cursor_y = _y[2]
            //}
        } else if cursor_y = _y[2] {
            cursor_y = _y[1]
        }
        audio_play_sound(sndselect2,0,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>///Button labels
// Bash
if !no_bash[_turn] {
    label_bash[1] = "0 Clean";
    label_bash[2] = "1 Bash";
    label_bash[3] = "2 Shoot";
    label_bash[4] = "1 Bash";
            
    if instance_exists(e[1]) {
        if e[1].e_name = "Don't Tread On Me" {
            label_bash[1] = "8 Tread";
        } else if e[1].e_name = "Patrolling Royal Guard" {
            label_bash[1] = ": Demand";
        }
    }
} else {
    label_bash[_turn] = "////";
}

//Guard
if !no_guard[_turn] {
    label_guard[_turn] = "3 Guard";
            
    if instance_exists(e[1]) {
        if e[1].e_name = "Don't Tread On Me" {
            label_guard[1] = "9 Don't tread";
        }
    }
} else {
    label_guard[_turn] = "////";
}

// Goods
if !no_goods[_turn] {
    label_goods[_turn] = iff(!no_goods[_turn],"4 Goods","////")
} else {
    label_goods[_turn] = "////";
}

// PSI or skills
if !no_psi[_turn] {
    label_psi[_turn] = iff(global.psiuser[_turn],"6 PSI","6 Skills")
} else {
    label_psi[_turn] = "////";
}

// Run
if !no_run[_turn] {
    label_run[_turn] = iff(!no_run[_turn],"5 Run Away","////")
} else {
    label_run[_turn] = "////";
}

// Special
if !no_special[_turn] {
    label_special[1] = "7 Inspect";
    label_special[2] = ". Trick";
    label_special[3] = "/ Not implemented";
    label_special[4] = "/ Not implemented";
} else {
    label_special[_turn] = "////";
}
</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>cursor_x = _x[1]
cursor_y = _y[1]
_turn = 1
cursor_id = 1;
msg = "";
in_battle = 0;
ok = 1;
global.s_guard[1] = 1;
global.s_guard[2] = 1;
global.s_guard[3] = 1;
global.s_guard[4] = 1;

for (var i=1;i&lt;=5;i++) {
    if instance_exists(global.enemy[i]) { global.enemy[i].e_grd = 1 }
}

global.itemtouse[1] = -1
global.itemtouse[2] = -1
global.itemtouse[3] = -1
global.itemtouse[4] = -1
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" enumb="5">
      <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>/*global.defdownused = 0
global.offdownused = 0
global.defdownused_en = 0
global.offdownused_en = 0

global.defupused = 0
global.offupused = 0
global.defupused_en = 0
global.offupused_en = 0
</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_halign(fa_left)
draw_set_alpha(1)
draw_set_color(c_black)
draw_rectangle(426,0,640,240,0)
draw_set_font(global.thenfont3)
draw_rectangle(0,0,426,32,c_black)
draw_rectangle(0,208,426,240,c_black)
draw_set_color(c_white)
if in_battle == 0 {
    draw_window(8+v_offset,8,30,5)
    
    draw_text(_x[1],_y[1],label_bash[_turn])
    draw_text(_x[2],_y[1],label_goods[_turn])
    draw_text(_x[3],_y[1],label_run[_turn])
    draw_text(_x[1],_y[2],label_guard[_turn])
    draw_text(_x[2],_y[2],label_psi[_turn])
    draw_text(_x[3],_y[2],label_special[_turn])
    
    draw_sprite(spr_cursor,cursor_image_index,cursor_x-3,cursor_y+7)
} else {
    draw_set_font(global.thenfont)
    draw_window(8+v_offset,8,38,5)
    draw_set_color(c_white)
    if !instance_exists(objBattleMsg) and msg != "" {
        draw_text(x+16+v_offset,y+14,"@ "+msg)
    }
}


</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/>
</object>
