RuneI
Class DwarfWorkSword

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

class DwarfWorkSword
extends RuneI.Sword

//============================================================================= // DwarfWorkSword. //=============================================================================

Function Summary
 void PowerupEnded()
 void PowerupEndingPulseOff()
 void PowerupEndingPulseOn()
 void PowerupInit()
     
//=============================================================================
//
// Powerup: LightningSword
//
// This function is called when the weapon is initially powered up
//=============================================================================
 
simulated
RemovePowerupEffect()
 
simulated
SpawnPowerupEffect()
 void WeaponFire(int SwingCount)



Source Code


00001	//=============================================================================
00002	// DwarfWorkSword.
00003	//=============================================================================
00004	class DwarfWorkSword expands sword;
00005	
00006	//=============================================================================
00007	//
00008	// Powerup: LightningSword
00009	//
00010	// This function is called when the weapon is initially powered up
00011	//=============================================================================
00012	
00013	function PowerupInit()
00014	{
00015		DesiredColorAdjust.Y = 255;
00016		DesiredColorAdjust.Z = 255;
00017		SpawnPowerupEffect();
00018		SwipeClass = PoweredUpSwipeClass;
00019	
00020	/* Need changes to the bones in the sword
00021		local actor sigil;
00022	
00023		SwipeClass = PoweredUpSwipeClass;
00024	
00025		sigil = Spawn(class'SigilLightningSword', self);
00026		if(sigil != None)	
00027			AttachActorToJoint(sigil, 1);
00028	*/
00029	}
00030	
00031	function PowerupEndingPulseOn()
00032	{
00033		PlaySound(PoweredUpEndingSound, SLOT_None);
00034	}
00035	
00036	function PowerupEndingPulseOff()
00037	{
00038	}
00039	
00040	function PowerupEnded()
00041	{
00042		DesiredColorAdjust.Y = 0;
00043		DesiredColorAdjust.Z = 0;
00044		Super.PowerupEnded();
00045	
00046	/* Need changes to the bones in the sword first
00047		local actor a;
00048	
00049		// Lightning beam
00050		a = DetachActorFromJoint(1);	
00051		if(a != None)
00052			a.Destroy();
00053	
00054		// Lightning flash
00055		a = DetachActorFromJoint(2);	
00056		if(a != None)
00057			a.Destroy();
00058	*/
00059	}
00060	
00061	simulated function SpawnPowerupEffect()
00062	{
00063		local EffectSkeleton ES;
00064	
00065		// Spawn an EffectSkeleton that will display all powered up effects
00066		ES = Spawn(class'EffectSkelLightningSword', self);
00067		if (ES != None)
00068		{
00069			AttachActorToJoint(ES, 0);
00070		}
00071	}
00072	
00073	simulated function RemovePowerupEffect()
00074	{
00075		local actor A;
00076		// Remove Effect skeleton
00077		A = DetachActorFromJoint(0);
00078		A.Destroy();
00079	}
00080	
00081	function WeaponFire(int SwingCount)
00082	{
00083		local LightningPowerupBall b;
00084		local vector X, Y, Z;
00085	
00086		if(!bPoweredUp || SwingCount != 0)
00087			return;
00088	
00089		GetAxes(PlayerPawn(Owner).ViewRotation, X, Y, Z);
00090	
00091		b = Spawn(class'LightningPowerupBall', Owner,, Location + X * 15);	
00092		b.Velocity = X * 20 + Z * 35;
00093		
00094	}
00095	
00096	defaultproperties
00097	{
00098	     StowMesh=1
00099	     Damage=25
00100	     BloodTexture=Texture'weapons.workswordDwarf_work_swordblood'
00101	     rating=3
00102	     SweepJoint2=6
00103	     RunePowerRequired=75
00104	     RunePowerDuration=10.000000
00105	     PowerupMessage="Lightning!"
00106	     ThroughAir(0)=Sound'WeaponsSnd.Swings.swing19'
00107	     ThroughAirBerserk(0)=Sound'WeaponsSnd.Swings.bswing04'
00108	     HitFlesh(0)=Sound'WeaponsSnd.ImpFlesh.impfleshsword06'
00109	     HitWood(0)=Sound'WeaponsSnd.ImpWood.impactwood08'
00110	     HitStone(0)=Sound'WeaponsSnd.ImpStone.impactstone15'
00111	     HitMetal(0)=Sound'WeaponsSnd.ImpMetal.impactmetal16'
00112	     HitDirt(0)=Sound'WeaponsSnd.ImpEarth.impactearth05'
00113	     HitShield=Sound'WeaponsSnd.Shields.shield04'
00114	     HitWeapon=Sound'WeaponsSnd.Swords.sword04'
00115	     HitBreakableWood=Sound'WeaponsSnd.ImpWood.impactwood12'
00116	     HitBreakableStone=Sound'WeaponsSnd.ImpStone.impactstone13'
00117	     SheathSound=Sound'WeaponsSnd.Stows.xstow04'
00118	     UnsheathSound=Sound'WeaponsSnd.Stows.xunstow04'
00119	     ThrownSoundLOOP=Sound'WeaponsSnd.Throws.throw03L'
00120	     PowerUpSound=Sound'WeaponsSnd.PowerUps.powerstart42'
00121	     PoweredUpSoundLOOP=Sound'WeaponsSnd.PowerUps.power68L'
00122	     PitchDeviation=0.085000
00123	     PowerupIcon=Texture'RuneFX2.wsword'
00124	     PowerupIconAnim=Texture'RuneFX2.wsword1a'
00125	     PoweredUpSwipeClass=Class'RuneI.WeaponSwipeBlue'
00126	     A_Idle=S4_idle
00127	     A_Forward=S4_walk
00128	     A_Backward=S4_backup
00129	     A_Forward45Right=S4_walk45right
00130	     A_Forward45Left=S4_walk45left
00131	     A_Backward45Right=S4_backup45Right
00132	     A_Backward45Left=S4_backup45Left
00133	     A_StrafeRight=S4_strafeRight
00134	     A_StrafeLeft=S4_strafeLeft
00135	     A_AttackA=S4_attackA
00136	     A_AttackAReturn=s4_attackareturn
00137	     A_AttackB=S4_attackB
00138	     A_AttackC=S4_attackC
00139	     A_AttackCReturn=S4_attackCReturn
00140	     A_AttackStandA=S4_standingAttackA
00141	     A_AttackStandAReturn=S4_standingAttackAreturn
00142	     A_AttackStandB=S4_standingAttackB
00143	     A_AttackStandBReturn=S4_standingAttackBreturn
00144	     A_AttackBackupAReturn=S4_backupAttackAreturn
00145	     A_AttackStrafeRight=S4_StrafeRightAttack
00146	     A_AttackStrafeLeft=S4_StrafeLeftAttack
00147	     A_Throw=S4_throw
00148	     A_Powerup=S4_Powerup
00149	     A_Defend=None
00150	     A_DefendIdle=None
00151	     A_PainFront=S4_painFront
00152	     A_PainBack=S4_painBack
00153	     A_PainLeft=S4_painLeft
00154	     A_PainRight=S4_painRight
00155	     A_PickupGroundLeft=S4_pickupleft
00156	     A_PickupHighLeft=S4_pickuplefthigh
00157	     A_Taunt=s4_taunt
00158	     A_PumpTrigger=S4_pumptrigger
00159	     A_LeverTrigger=S4_LeverTrigger
00160	     PickupMessage="You now wield with a Dwarven Work Sword"
00161	     PickupSound=Sound'OtherSnd.Pickups.grab04'
00162	     DropSound=Sound'WeaponsSnd.Drops.sworddrop02'
00163	     Mass=16.000000
00164	     Skeletal=SkelModel'weapons.worksword'
00165	     SkelGroupSkins(0)=Texture'weapons.workswordDwarf_work_sword'
00166	     SkelGroupSkins(1)=Texture'weapons.workswordDwarf_work_sword'
00167	}

End Source Code