RuneI
Class DwarfWorkHammer

source: c:\runehov\RuneI\Classes\DwarfWorkHammer.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Weapon
            |
            +--RuneI.Hammer
               |
               +--RuneI.DwarfWorkHammer
Direct Known Subclasses:None

class DwarfWorkHammer
extends RuneI.Hammer

//============================================================================= // DwarfWorkHammer. //=============================================================================

Function Summary
 void PowerupEnded()
 void PowerupEndingPulseOff()
 void PowerupEndingPulseOn()
 void PowerupInit()
     
//=============================================================================
//
// WeaponFire
//
// Ground effect
//=============================================================================
 
simulated
RemovePowerupEffect()
 
simulated
SpawnPowerupEffect()
 void WeaponFire(int SwingCount)



Source Code


00001	//=============================================================================
00002	// DwarfWorkHammer.
00003	//=============================================================================
00004	class DwarfWorkHammer expands Hammer;
00005	
00006	var(Sounds) Sound PoweredUpFireSound;
00007	
00008	//=============================================================================
00009	//
00010	// WeaponFire
00011	//
00012	// Ground effect
00013	//=============================================================================
00014	function PowerupInit()
00015	{	
00016		SpawnPowerupEffect();
00017		SwipeClass = PoweredUpSwipeClass;
00018	
00019		DesiredColorAdjust.X = 77;
00020		DesiredColorAdjust.Z = 110;
00021	}
00022	
00023	function PowerupEndingPulseOn()
00024	{
00025		DesiredFatness = 140;
00026		DesiredColorAdjust.Z = 110;
00027		PlaySound(PoweredUpEndingSound, SLOT_None);
00028	}
00029	
00030	function PowerupEndingPulseOff()
00031	{
00032		DesiredFatness = 128;
00033		DesiredColorAdjust.X = 77;
00034		DesiredColorAdjust.Z = 0;
00035	}
00036	
00037	function PowerupEnded()
00038	{
00039		Super.PowerupEnded();
00040		DesiredColorAdjust.X = 0;
00041		DesiredColorAdjust.Z = 0;
00042	}
00043	
00044	
00045	simulated function SpawnPowerupEffect()
00046	{
00047		local EffectSkeleton ES;
00048	
00049		// Spawn an EffectSkeleton that will display all powered up effects
00050		ES = Spawn(class'EffectSkelGroundHammer', self);
00051		if (ES != None)
00052		{
00053			AttachActorToJoint(ES, 0);
00054		}
00055	}
00056	
00057	simulated function RemovePowerupEffect()
00058	{
00059		local actor A;
00060		// Remove Effect skeleton
00061		A = DetachActorFromJoint(0);
00062		A.Destroy();
00063	}
00064	
00065	function WeaponFire(int SwingCount)
00066	{
00067		local vector loc;
00068		local rotator rot;
00069		local GroundProjectile proj;
00070	
00071		if(!bPoweredUp)
00072			return;
00073	
00074		loc = Owner.Location;
00075		loc.Z -= Owner.CollisionHeight;
00076		proj = Spawn(class'GroundProjectile', Owner,, loc, Rotation);
00077	
00078		// Forward projectile
00079		if(proj != None)
00080		{
00081			proj.Velocity = vector(Owner.Rotation) * (450 + FRand() * 100);
00082			proj.TimeToExplode = 1.5 + FRand() * 0.5;
00083		}
00084	
00085		// Left projectile
00086		proj = Spawn(class'GroundProjectile', Owner,, loc, Rotation);
00087		if(proj != None)
00088		{
00089			rot = Owner.Rotation;
00090			rot.Yaw += 3000;
00091			proj.Velocity = vector(rot) * (450 + FRand() * 100);
00092			proj.TimeToExplode = 1.5 + FRand() * 0.5;
00093		}
00094	
00095		// Right projectile
00096		proj = Spawn(class'GroundProjectile', Owner,, loc, Rotation);
00097		if(proj != None)
00098		{
00099			rot = Owner.Rotation;
00100			rot.Yaw -= 3000;
00101			proj.Velocity = vector(rot) * (450 + FRand() * 100);
00102			proj.TimeToExplode = 1.5 + FRand() * 0.5;
00103		}
00104		PlaySound(PoweredUpFireSound, SLOT_Interface);
00105	}
00106	
00107	defaultproperties
00108	{
00109	     PoweredUpFireSound=Sound'WeaponsSnd.PowerUps.apowerrocks01'
00110	     bCrouchTwoHands=True
00111	     StowMesh=1
00112	     Damage=45
00113	     BloodTexture=Texture'weapons.WorkHammerd_work_hammerblood'
00114	     rating=3
00115	     RunePowerRequired=75
00116	     RunePowerDuration=5.000000
00117	     PowerupMessage="Earth Attack!"
00118	     SweepVector=(Y=0.867000,Z=-0.500000)
00119	     ThroughAir(0)=Sound'WeaponsSnd.Swings.swing01'
00120	     ThroughAirBerserk(0)=Sound'WeaponsSnd.Swings.bswing09'
00121	     HitFlesh(0)=Sound'WeaponsSnd.ImpFlesh.impfleshhammer02'
00122	     HitWood(0)=Sound'WeaponsSnd.ImpWood.impactwood13'
00123	     HitStone(0)=Sound'WeaponsSnd.ImpStone.impactstone12'
00124	     HitMetal(0)=Sound'WeaponsSnd.ImpWood.impactcombo03'
00125	     HitDirt(0)=Sound'WeaponsSnd.ImpEarth.impactearth07'
00126	     HitShield=Sound'WeaponsSnd.Shields.shield09'
00127	     HitWeapon=Sound'WeaponsSnd.Swords.sword09'
00128	     HitBreakableWood=Sound'WeaponsSnd.ImpWood.impactwood12'
00129	     HitBreakableStone=Sound'WeaponsSnd.ImpStone.impactstone13'
00130	     SheathSound=Sound'WeaponsSnd.Stows.xstow02'
00131	     UnsheathSound=Sound'WeaponsSnd.Stows.xunstow02'
00132	     ThrownSoundLOOP=Sound'WeaponsSnd.Throws.throw03L'
00133	     PowerUpSound=Sound'WeaponsSnd.PowerUps.powerstart07'
00134	     PoweredUpSoundLOOP=Sound'WeaponsSnd.PowerUps.power69L'
00135	     PitchDeviation=0.085000
00136	     PowerupIcon=Texture'RuneFX2.whammer'
00137	     PowerupIconAnim=Texture'RuneFX2.whammer1a'
00138	     PoweredUpSwipeClass=Class'RuneI.WeaponSwipeRed'
00139	     A_Idle=H5_Idle
00140	     A_Forward=walkforwardTwohands
00141	     A_Backward=H5_Backup
00142	     A_Forward45Right=H5_Walk45Right
00143	     A_Forward45Left=H5_Walk45Left
00144	     A_Backward45Right=H5_BackupRight
00145	     A_Backward45Left=H5_BackupLeft
00146	     A_StrafeRight=H5_StrafeRight
00147	     A_StrafeLeft=H5_StrafeLeft
00148	     A_Jump=H5_Jump
00149	     A_AttackA=H4_AttackA
00150	     A_AttackAReturn=H4_attackAreturn
00151	     A_AttackB=H4_AttackB
00152	     A_AttackBReturn=H4_attackBreturn
00153	     A_AttackC=None
00154	     A_AttackCReturn=None
00155	     A_AttackStandA=H4_StandingAttackA
00156	     A_AttackStandAReturn=H4_StandingAttackAreturn
00157	     A_AttackStandB=H4_StandingAttackB
00158	     A_AttackStandBReturn=H4_StandingAttackBreturn
00159	     A_AttackBackupA=H5_Backupattack
00160	     A_AttackBackupAReturn=None
00161	     A_AttackStrafeRight=H5_StrafeRightAttack
00162	     A_AttackStrafeLeft=H5_StrafeLeftAttack
00163	     A_JumpAttack=H5_jumpattack
00164	     A_Throw=H5_Throw
00165	     A_Powerup=H5_Powerup
00166	     A_Defend=None
00167	     A_DefendIdle=None
00168	     A_PainFront=H5_painFront
00169	     A_PainBack=H5_painFront
00170	     A_PainLeft=H5_painFront
00171	     A_PainRight=H5_painFront
00172	     A_PickupGroundLeft=H5_PickupLeft
00173	     A_PickupHighLeft=H5_PickupLeftHigh
00174	     A_Taunt=H5_Taunt
00175	     A_PumpTrigger=H5_PumpTrigger
00176	     A_LeverTrigger=H5_LeverTrigger
00177	     PickupMessage="You are armed with a Dwarven Work Hammer"
00178	     PickupSound=Sound'OtherSnd.Pickups.grab04'
00179	     DropSound=Sound'WeaponsSnd.Drops.hammerdrop02'
00180	     Mass=16.000000
00181	     Skeletal=SkelModel'weapons.WorkHammer'
00182	     SkelGroupSkins(0)=Texture'weapons.WorkHammerd_work_hammer'
00183	     SkelGroupSkins(1)=Texture'weapons.WorkHammerd_work_hammer'
00184	}

End Source Code