home *** CD-ROM | disk | FTP | other *** search
- if(farmo >= 210)
- {
- farmo = 0;
- _root.castleHp += 3;
- if(_root.castleHp > _root.castleMaxHp)
- {
- _root.castleHp = _root.castleMaxHp;
- }
- }
- _root.castleLife = _root.castleHp / _root.castleMaxHp * 100;
- if(_root.castleLife <= 0)
- {
- _root.castleLife = 0;
- _root.castleHp = 0;
- _root.gameOvey._visible = true;
- }
- if(_root.castleLife != 100)
- {
- setProperty(bar, _yscale, _root.castleLife);
- }
- else
- {
- setProperty(bar, _yscale, 100);
- }
-