home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / DomonicDefence4.swf / scripts / DefineSprite_1378 / frame_1 / DoAction.as
Encoding:
Text File  |  2005-09-27  |  620 b   |  31 lines

  1. if(farmo >= 210)
  2. {
  3.    farmo = 0;
  4.    _root.castleHp += 3;
  5.    if(_root.castleHp > _root.castleMaxHp)
  6.    {
  7.       _root.castleHp = _root.castleMaxHp;
  8.    }
  9. }
  10. _root.castleLife = _root.castleHp / _root.castleMaxHp * 100;
  11. if(_root.castleLife <= 0)
  12. {
  13.    _root.castleLife = 0;
  14.    _root.castleHp = 0;
  15.    this.stop();
  16.    if(_root.customPlay == true)
  17.    {
  18.       _root.gameOvey.gotoAndStop(2);
  19.       _root.gameOvey.textbox = "GAME OVER";
  20.    }
  21.    _root.gameOvey._visible = true;
  22. }
  23. if(_root.castleLife != 100)
  24. {
  25.    setProperty(bar, _yscale, _root.castleLife);
  26. }
  27. else
  28. {
  29.    setProperty(bar, _yscale, 100);
  30. }
  31.