RuneI
Class VikingAxe

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

class VikingAxe
extends RuneI.Axe

//============================================================================= // VikingAxe. //=============================================================================

Function Summary
 int CalculateDamage(Actor Victim)
 void PowerupEnded()
 void PowerupEndingPulseOff()
 void PowerupEndingPulseOn()
 void PowerupInit()
     
//=============================================================================
//
// Powerup: Friendly
//
//=============================================================================
 
simulated
RemovePowerupEffect()
 
simulated
SpawnPowerupEffect()



Source Code


00001	//=============================================================================
00002	// VikingAxe.
00003	//=============================================================================
00004	class VikingAxe expands axe;
00005	
00006	//=============================================================================
00007	//
00008	// Powerup: Friendly
00009	//
00010	//=============================================================================
00011	function PowerupInit()
00012	{	
00013		SpawnPowerupEffect();
00014		SwipeClass = PoweredUpSwipeClass;
00015		DesiredColorAdjust.Z = 140;
00016	}
00017	
00018	function PowerupEndingPulseOn()
00019	{
00020		DesiredFatness = 140;
00021		DesiredColorAdjust.Y = 0;
00022		DesiredColorAdjust.Z = 0;
00023		PlaySound(PoweredUpEndingSound, SLOT_None);
00024	}
00025	
00026	function PowerupEndingPulseOff()
00027	{
00028		DesiredFatness = 128;
00029		DesiredColorAdjust.Y = 80;
00030		DesiredColorAdjust.Z = 80;
00031	}
00032	
00033	function PowerupEnded()
00034	{
00035		Super.PowerupEnded();
00036		DesiredColorAdjust.Y = 0;
00037		DesiredColorAdjust.Z = 0;
00038	}
00039	
00040	
00041	simulated function SpawnPowerupEffect()
00042	{
00043		local EffectSkeleton ES;
00044	
00045		// Spawn an EffectSkeleton that will display all powered up effects
00046		ES = Spawn(class'EffectSkelEmpathyAxe', self);
00047		if (ES != None)
00048		{
00049			AttachActorToJoint(ES, 0);
00050		}
00051	}
00052	
00053	simulated function RemovePowerupEffect()
00054	{
00055		local actor A;
00056		// Remove Effect skeleton
00057		A = DetachActorFromJoint(0);
00058		A.Destroy();
00059	}
00060	
00061	
00062	function int CalculateDamage(actor Victim)
00063	{
00064		if(bPoweredUp && Pawn(Victim) != None && Level.NetMode == NM_StandAlone)
00065		{	// Make non-boss scriptpawns friendly towards you (only in Single-player)
00066			Pawn(Victim).PowerupFriend(Pawn(Owner));
00067			Spawn(class'EmpathyFlash',,,Location,);
00068			return 0;
00069		}
00070	
00071		return(Super.CalculateDamage(Victim));
00072	}
00073	
00074	defaultproperties
00075	{
00076	     StowMesh=1
00077	     Damage=20
00078	     BloodTexture=Texture'weapons.VikingAxeAxeskinblood'
00079	     rating=2
00080	     RunePowerRequired=50
00081	     RunePowerDuration=15.000000
00082	     PowerupMessage="Ally!"
00083	     ThroughAir(0)=Sound'WeaponsSnd.Swings.swing11'
00084	     ThroughAirBerserk(0)=Sound'WeaponsSnd.Swings.bswing13'
00085	     HitFlesh(0)=Sound'WeaponsSnd.ImpFlesh.impfleshaxe05'
00086	     HitWood(0)=Sound'WeaponsSnd.ImpWood.impactwood05'
00087	     HitStone(0)=Sound'WeaponsSnd.ImpIce.impactice02'
00088	     HitMetal(0)=Sound'WeaponsSnd.ImpMetal.impactmetal04'
00089	     HitDirt(0)=Sound'WeaponsSnd.ImpEarth.impactearth01'
00090	     HitShield=Sound'WeaponsSnd.Shields.shield13'
00091	     HitWeapon=Sound'WeaponsSnd.Swords.sword13'
00092	     HitBreakableWood=Sound'WeaponsSnd.ImpWood.impactwood12'
00093	     HitBreakableStone=Sound'WeaponsSnd.ImpStone.impactstone11'
00094	     SheathSound=Sound'WeaponsSnd.Stows.xstow05'
00095	     UnsheathSound=Sound'WeaponsSnd.Stows.xunstow05'
00096	     PowerUpSound=Sound'WeaponsSnd.PowerUps.powerstart12'
00097	     PoweredUpSoundLOOP=Sound'WeaponsSnd.PowerUps.power44L'
00098	     PitchDeviation=0.080000
00099	     PowerupIcon=Texture'RuneFX2.vaxe'
00100	     PowerupIconAnim=Texture'RuneFX2.vaxe1a'
00101	     PoweredUpSwipeClass=Class'RuneI.WeaponSwipeGray'
00102	     A_Idle=S2_idle
00103	     A_AttackA=X3_attackA
00104	     A_AttackAReturn=X3_attackAreturn
00105	     A_AttackB=X3_attackB
00106	     A_AttackBReturn=X3_attackBreturn
00107	     A_AttackC=X3_attackC
00108	     A_AttackCReturn=X3_attackCreturn
00109	     A_AttackStandA=X3_StandingAttackA
00110	     A_AttackStandAReturn=X3_StandingAttackAReturn
00111	     A_AttackStandB=X3_StandingAttackB
00112	     A_AttackStandBReturn=X3_StandingAttackBReturn
00113	     A_AttackBackupB=S1_BackupAttackB
00114	     A_AttackBackupBReturn=S1_BackupAttackBReturn
00115	     A_AttackStrafeRight=H1_StrafeRightAttack
00116	     A_AttackStrafeLeft=H1_StrafeLeftAttack
00117	     A_Throw=S2_Throw
00118	     A_Powerup=s2_powerup
00119	     A_Defend=S2_DefendTo
00120	     A_DefendIdle=S2_DefendIdle
00121	     A_PainFront=S2_painFront
00122	     A_PainRight=S1_painBack
00123	     A_PickupGroundLeft=S2_PickupLeft
00124	     A_PickupHighLeft=S2_PickupLeftHigh
00125	     A_Taunt=X3_Taunt
00126	     A_PumpTrigger=S2_PumpTrigger
00127	     A_LeverTrigger=S2_LeverTrigger
00128	     PickupMessage="You are armed with a Viking Axe"
00129	     PickupSound=Sound'OtherSnd.Pickups.grab03'
00130	     DropSound=Sound'WeaponsSnd.Drops.axedrop03'
00131	     CollisionRadius=22.000000
00132	     Mass=14.000000
00133	     Skeletal=SkelModel'weapons.VikingAxe'
00134	     SkelGroupSkins(0)=Texture'weapons.VikingAxeAxeskin'
00135	     SkelGroupSkins(1)=Texture'weapons.VikingAxeAxeskin'
00136	}

End Source Code