home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / bossbash.swf / scripts / DefineSprite_256 / frame_7 / DoAction.as
Encoding:
Text File  |  2007-09-28  |  1.3 KB  |  47 lines

  1. var really = this._parent._parent._parent.zel;
  2. var mag = this._parent._parent;
  3. if(really._y > mag._y - 35 && really._y < mag._y + mag._height / 2)
  4. {
  5.    if(really._x > mag._x - 80 && really._x < mag._x + 80)
  6.    {
  7.       if(!really.blinking)
  8.       {
  9.          this._parent._parent._parent.hurt.start();
  10.          really.guts.gotoAndStop("hit");
  11.          if(really.fairied != true)
  12.          {
  13.             really.attacking = true;
  14.             really.blinking = true;
  15.             really.jumping = true;
  16.          }
  17.          really.Xvel += 10 * (mag._xscale / 100);
  18.          really.Yvel = 15;
  19.          if(really.shielded)
  20.          {
  21.             really.life -= 10;
  22.          }
  23.          else
  24.          {
  25.             really.life -= 20;
  26.          }
  27.          if(really.fairied)
  28.          {
  29.             really.life = 0;
  30.          }
  31.          if(really.life > 0)
  32.          {
  33.             this._parent._parent._parent.dash.hlth._xscale = really.life;
  34.          }
  35.          else
  36.          {
  37.             this._parent._parent._parent.dash.hlth._xscale = 0;
  38.             really.life = 0;
  39.             this._parent._parent._parent.myDeath();
  40.             this._parent._parent._parent.pausy = true;
  41.             really.guts.gotoAndStop("hit");
  42.          }
  43.          this.double = true;
  44.       }
  45.    }
  46. }
  47.