//************************************************************************** //** //** ## ## ## ## ## #### #### ### ### //** ## ## ## ## ## ## ## ## ## ## #### #### //** ## ## ## ## ## ## ## ## ## ## ## ## ## ## //** ## ## ######## ## ## ## ## ## ## ## ### ## //** ### ## ## ### ## ## ## ## ## ## //** # ## ## # #### #### ## ## //** //** $Id: BossBrain.vc 2669 2007-08-23 23:01:35Z dj_jl $ //** //** Copyright (C) 1999-2006 Jānis Legzdiņš //** //** This program is free software; you can redistribute it and/or //** modify it under the terms of the GNU General Public License //** as published by the Free Software Foundation; either version 2 //** of the License, or (at your option) any later version. //** //** This program is distributed in the hope that it will be useful, //** but WITHOUT ANY WARRANTY; without even the implied warranty of //** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //** GNU General Public License for more details. //** //************************************************************************** class BossBrain : Actor __mobjinfo__(88); //========================================================================== // // A_BrainPain // // Brain pain sound. // //========================================================================== final void A_BrainPain() { PlaySound('brain/pain', CHAN_VOICE, 1.0, ATTN_NONE); } //========================================================================== // // A_BrainScream // // Brain death sound, make explosions. // //========================================================================== final void A_BrainScream() { TVec org; Actor A; for (org.x = Origin.x - 196.0; org.x < Origin.x + 320.0; org.x += 8.0) { org.y = Origin.y - 320.0; org.z = 1.0 / 512.0 + Random() * 512.0; A = Spawn(Rocket, org); A.Velocity.z = Random() * 2.0 * 35.0; A.SetState(FindClassState(BossBrain, 'BrainExplode')); A.StateTime -= Random() * 0.2; if (A.StateTime < 0.1) A.StateTime = 0.1; } PlaySound('brain/death', CHAN_VOICE, 1.0, ATTN_NONE); } //========================================================================== // // A_BrainDie // // Killed brain, exit level. // //========================================================================== final void A_BrainDie() { Level.ExitLevel(0); } //========================================================================== // // A_BrainExplode // // Brain explosions. // //========================================================================== final void A_BrainExplode() { TVec org; Actor A; org.x = Origin.x + (Random() - Random()) * 8.0; org.y = Origin.y; org.z = 1.0 / 512.0 + Random() * 512.0; A = Spawn(Rocket, org); A.Velocity.z = Random() * 2.0 * 35.0; A.SetState(FindClassState(BossBrain, 'BrainExplode')); A.StateTime -= Random() * 0.2; if (A.StateTime < 0.1) A.StateTime = 0.1; } states { BrainExplode: MISL BC 10 Bright MISL D 10 Bright A_BrainExplode Stop Spawn: BBRN A -1 Stop Pain: BBRN B 36 A_BrainPain Goto Spawn Death: BBRN A 100 A_BrainScream BBRN AA 10 BBRN A -1 A_BrainDie Stop } defaultproperties { Health = 250; Radius = 16.0; Mass = 10000000.0; PainChance = 1.0; bSolid = true; bShootable = true; bFloorClip = true; PainSound = 'brain/pain'; DeathSound = 'brain/death'; }