<!--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(sndppsi,0,0)
type = 0
backfire = 0
dmg = 0
rounds = 1
nohit = 0
b = 0
alarm[0] = 1;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="11">
      <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[11] = 1
} else {
    with objTurnMaster { event_perform(ev_other,ev_user0) }
    with objVarDamage { instance_destroy() }
    instance_destroy()
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="9">
      <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[9] = 1
} else {
    var a;
    a = instance_create(0,0,objBattleMsg); 
    a.strno = 0;
    a.str[0] = "...But it didn't work very well!"
    alarm[11] = 1
}
</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>if instance_exists(objThunderFx){
    alarm[3] = 1
} else {
    randomize()
    var msg,countered,resist;
    if !backfire {
        resist = global.target[global._pl].thunder_resistance; 
    } else { 
        en_random_choser();
        resist = global.thunder_resistance[tgt]; 
    }
    
    dmg = ceil(dmg*(100-30*resist)/100)
    var a = instance_create(0,0,objBattleMsg);
    a.strno = 0
    if !backfire {
        if !nohit {
            if resist !=4 {
                with global.target[global._pl] { alarm[1] = 2 }
                global.target[global._pl].e_hp -= dmg;
                a.str[0] = string(dmg)+" HP of damage#   to "+global.target[global._pl].e_art + global.target[global._pl].e_name + "!"
                instance_create(0,0,objHitEffect)
            } else {
                a.str[0] = "It had no effect on "+global.target[global._pl].e_art + global.target[global._pl].e_name + "!"
                }
        } else {
            a.str[0] = "It didn't hit anyone!"
        }
    } else {
        if !nohit {
            if resist !=4 {
                with global.healthbar[tgt] {
                    x = xstart
                    y = ystart
                    path_start(p_shake,6,0,0)
                }
                
                if dmg &gt;= global.s_hp[tgt] {
                    instance_create(0,0,objMortalDamage)
                    msg = string(dmg)+" HP of mortal damage#   to "+global.s_name[tgt] + "!"
                } else {
                    audio_play_sound(sndbump,0,0)
                    msg = string(dmg)+" HP of damage#   to "+global.s_name[tgt] + "!"
                }
                
                global.s_hp[tgt] -= dmg
                a.str[0] = msg;
            } else {
                a.str[0] = "It had no effect on "+global.s_name[tgt] + "!"
            }
        } else {
            a.str[0] = "It didn't hit anyone!"
        }
    }
    rounds++
    alarm[2] = 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>if instance_exists(objBattleMsg){
    alarm[2] = 1
} else {
    if rounds &gt; type+1 {
        alarm[11] = 1
    } else {
        if !backfire { 
            random_choser(); 
            nohit = !(random(4) &lt; global.en_count)
            with instance_create(global.target[global._pl].x,global.target[global._pl].y,objThunderFx) {
                type = objPKThunder.type
                backfire = 0
                visible = !objPKThunder.nohit
            }
        } else {   
            nohit = !(random(4) &lt; global.pl_count)
            with instance_create(0,0,objThunderFx) {
                type = objPKThunder.type
                backfire = 1
                visible = !objPKThunder.nohit
            }
        }
        thunder_damage()
        alarm[3] = 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>///Damage goes here
var a;
a = instance_create(0,0,objBattleMsg);
switch type{
    case 0: b = "["; break;
    case 1: b = "\"; break;
    case 2: b = "]"; break;
    case 3: b = "_"; break;
}

if !global.s_strange[global._pl] {
    a.strno = 0;
    a.str[0] = global.s_name[global._pl] + " tried PK Thunder "+b+"!"
} else {
    if random(100)&lt;50 {
        backfire = 1
    } 
    a.strno = 1;
    a.str[0] = global.s_name[global._pl] + " is feeling a little strange..."
    a.str[1] = global.s_name[global._pl] + " tried PK Thunder "+b+"!"
}

if !global.s_cantconcentrate[global._pl] {
    alarm[2] = 1
} else {
    alarm[9] = 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>
    <point>0,0</point>
    <point>160,160</point>
  </PhysicsShapePoints>
</object>
