//************************************************************************** //** //** ## ## ## ## ## #### #### ### ### //** ## ## ## ## ## ## ## ## ## ## #### #### //** ## ## ## ## ## ## ## ## ## ## ## ## ## ## //** ## ## ######## ## ## ## ## ## ## ## ### ## //** ### ## ## ### ## ## ## ## ## ## //** # ## ## # #### #### ## ## //** //** $Id: PowerMask.vc 2607 2007-08-09 21:41:28Z 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 PowerMask : PowerIronFeet; //========================================================================== // // DoEffect // //========================================================================== void DoEffect() { ::DoEffect(); if (!Owner) { return; } if (!(Level.XLevel.TicTime & 0x3f)) { Owner.PlaySound('misc/mask', CHAN_VOICE); } } //========================================================================== // // AbsorbDamage // //========================================================================== void AbsorbDamage(int damage, name DmgType, out int NewDamage) { if (DmgType == 'Fire') { // If the player wears an environmental suit it's not // damaged by fire damage NewDamage = 0; } else { ::AbsorbDamage(damage, DmgType, NewDamage); } } defaultproperties { EffectTime = 80.0; BlendColour = 0; bHubPower = true; }