<!--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>0</visible>
  <depth>-10000</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>audio_play_sound(sndpattack,0,0)
done = 0
noheal = 0;
s = global.item[ds_list_find_value(global.inv[global.current_inv],global.itemtouse[global._pl]),1]; //The name of the item
custom_lifeup = global.item[ds_list_find_value(global.inv[global.current_inv],global.itemtouse[global._pl]),21]
str = ""
str_str = ""
alarm[2] = 1
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" 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>if instance_exists(objBattleMsg) {
    alarm[10] = 1
} else {
    del_item_inv(global.itemtouse[global._pl],global._pl-1)
    with objTurnMaster { event_perform(ev_other,ev_user0) }
    with objVarDamage { instance_destroy() }
    instance_destroy()
}
</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>switch act[global._pl] {
    case "item_lifeup_a":
        lifeup = lifeup_effect(0);
        break;
    case "item_lifeup_b":
        lifeup = lifeup_effect(1);
        break;
    case "item_lifeup_g":
        lifeup = lifeup_effect(2);
        break;
    case "item_lifeup_o_one":
        lifeup = lifeup_effect(3);
        break;
    case "item_lifeup_custom":
        lifeup = custom_lifeup;
        //lifeup += choose(-1,1)*ceil(lifeup*0.25)
        break;
}

if (lifeup+global.s_hp[global.target[global._pl]]) &gt; global.s_hpmax[global.target[global._pl]] {
    lifeup = global.s_hpmax[global.target[global._pl]]-global.s_hp[global.target[global._pl]];
}

if lifeup = 0 {
    noheal = 1;
}

if global.target[global._pl] = global._pl {
    str = global.s_name[global._pl] + " had the "+objItemLifeup.s+"!"
    str_str = global.s_name[global._pl] + " tried to have the "+objItemLifeup.s+"!"
} else {
    str = global.s_name[global._pl] + " gave "+ global.s_name[global.target[global._pl]]+" the "+objItemLifeup.s+"!"
    str_str = global.s_name[global._pl] + " tried to give "+ global.s_name[global.target[global._pl]]+" the "+objItemLifeup.s+"!"
}

if !noheal {
    if !global.dead[global.target[global._pl]] {
        with instance_create(0,0,objBattleMsg) {
            if !global.s_strange[global._pl] {
                strno = 0;
                str[0] = objItemLifeup.str
            } else {
                if random(100) &lt;= 33 {
                    strno = 2;
                    objItemLifeup.noheal = 1
                } else {
                    strno = 1;
                }
                str[0] = global.s_name[global._pl] + " is feeling a little strange..."
                str[1] = objItemLifeup.str_str
                str[2] = global.s_name[global._pl] + " threw the "+objItemLifeup.s+" away instead!"
            }
        }
        alarm[0] = 1
    } else {
        with instance_create(0,0,objBattleMsg) {
            if !global.s_strange[global._pl] {
                strno = 1;
                str[0] = objItemLifeup.str
                str[1] = "...but it was already too late for "+global.s_name[global.target[global._pl]]+"."
            } else {
                strno = 2;
                str[0] = global.s_name[global._pl] + " is feeling a little strange..."
                str[1] = objItemLifeup.str_str
                if random(100) &lt;= 33 {
                    str[2] = global.s_name[global._pl] + " threw the "+objItemLifeup.s+" away instead!"
                } else {
                    str[2] = "...but it was already too late for "+global.s_name[global.target[global._pl]]+"."
                }
            }
        }
        objItemLifeup.noheal = 1
        alarm[1] = 1
    }
} else {
    with instance_create(0,0,objBattleMsg) {
        if !global.s_strange[global._pl] {
            strno = 1;
            str[0] = objItemLifeup.str
            str[1] = "...but it had no effect."
        } else {
            strno = 2;
            str[0] = global.s_name[global._pl] + " is feeling a little strange..."
            str[1] = objItemLifeup.str_str
            if random(100) &lt;= 33 {
                str[2] = global.s_name[global._pl] + " threw the "+objItemLifeup.s+" away instead!"
            } else {
                str[2] = "...but it had no effect."
            }
        }
    }
    //objItemLifeup.noheal = 1
    alarm[1] = 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>if instance_exists(objBattleMsg) {
    alarm[1] = 1
} else {
    if !noheal {
        var a = instance_create(0,0,objBattleMsg);
        a.strno = 0
        if global.target[global._pl] = global._pl {
            if global.s_hp[global._pl] == global.s_hpmax[global._pl]{
                a.str[0] = global.s_name[global._pl] + "'s HP are#   maxed out!"
            } else {
                a.str[0] = global.s_name[global._pl] + " recovered#   "+string(lifeup)+" HP!"
            }
        } else {
            if global.s_hp[global.target[global._pl]] == global.s_hpmax[global.target[global._pl]]{
                a.str[0] = global.s_name[global.target[global._pl]] + "'s HP are#   maxed out!"
            } else {
                a.str[0] = global.s_name[global.target[global._pl]] + " recovered#   "+string(lifeup)+" HP!"
            }
        }
    }
    alarm[10] = 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>if instance_exists(objBattleMsg) {
    alarm[0] = 1
} else {
    done = 1
    direction = 90
    speed = 4
    
    if global.s_hp[global.target[global._pl]] &lt;= 0 and global.healthbar[global.target[global._pl]].hp_actual = 0 { 
        global.healthbar[global.target[global._pl]].hp_actual = 1;
        global.s_hp[global.target[global._pl]] = 1;
        global.healthbar[global.target[global._pl]].dead = 0;
        lifeup -= 1
    }
    
    
    if global.s_hp[global.target[global._pl]] &gt;= 0 {
        global.s_hp[global.target[global._pl]] += lifeup
    } else {
        if lifeup &gt; global.s_hpmax[global.target[global._pl]] {
            global.s_hp[global.target[global._pl]] = global.s_hpmax[global.target[global._pl]]
        } else {
            global.s_hp[global.target[global._pl]] = lifeup
        }
    }
    audio_play_sound(sndheal1,0,0)
    with instance_create(global.healthbar[global.target[global._pl]].x,global.healthbar[global.target[global._pl]].y,objHealthBarRed) { 
        color = make_color_rgb(8,240,96);
    } 
    x = global.healthbar[global.target[global._pl]].x+30
    y = global.healthbar[global.target[global._pl]].y
    alarm[1] = 1
}
</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>
