RuneI
Class SigurdAxe

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

class SigurdAxe
extends RuneI.Axe

//============================================================================= // SigurdAxe. //=============================================================================
Variables
 bool bWasBloody
           Remember whether BloodTexture was on Axe before powerup..


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



Source Code


00001	//=============================================================================
00002	// SigurdAxe.
00003	//=============================================================================
00004	class SigurdAxe expands axe;
00005	
00006	var bool bWasBloody;	//Remember whether BloodTexture was on Axe before powerup..
00007	//=============================================================================
00008	//
00009	// Powerup: IceStatue
00010	//
00011	//=============================================================================
00012	function PowerupInit()
00013	{	
00014		SpawnPowerupEffect();
00015		SwipeClass = PoweredUpSwipeClass;
00016		DamageType='ice';
00017		ThrownDamageType='ice';
00018		if(SkelGroupSkins[1] == BloodTexture)
00019			bWasBloody = True;
00020	
00021		BloodTexture = None;	//Stop from placing blood texture while Powered-Up...
00022		SkelGroupSkins[0]=Texture'weapons.sigurdaxesigurds_axeice';
00023	    SkelGroupSkins[1]=Texture'weapons.sigurdaxesigurds_axeice';
00024		bUnlit = true;
00025	}
00026	
00027	function PowerupEndingPulseOn()
00028	{
00029		DesiredFatness = 140;
00030		DesiredColorAdjust.Z = 0;
00031		PlaySound(PoweredUpEndingSound, SLOT_None);
00032	}
00033	
00034	function PowerupEndingPulseOff()
00035	{
00036		DesiredFatness = 128;
00037		DesiredColorAdjust.Z = 150;
00038	}
00039	
00040	function PowerupEnded()
00041	{
00042		local int i;
00043		local debris IceChunk;
00044		
00045		Super.PowerupEnded();
00046		DesiredColorAdjust.Z = 0;
00047	
00048		DamageType=Default.DamageType;
00049		ThrownDamageType=Default.ThrownDamageType;
00050		BloodTexture=Default.BloodTexture;
00051		SkelGroupSkins[0]=Default.SkelGroupSkins[0];
00052	
00053		if(bWasBloody)
00054			SkelGroupSkins[1]=BloodTexture;
00055		else
00056			SkelGroupSkins[1]=Default.SkelGroupSkins[1];
00057	
00058		bUnlit = false;
00059	
00060		for(i=0; i<15; i++)
00061		{
00062			IceChunk = spawn(class'DebrisIce',,,GetJointPos(1));
00063			if(IceChunk != None)
00064			{
00065				IceChunk.SetSize(0.2);
00066				IceChunk.bUnlit = true;
00067			}
00068		}
00069	}
00070	
00071	simulated function SpawnPowerupEffect()
00072	{
00073		local EffectSkeleton ES;
00074	
00075		// Spawn an EffectSkeleton that will display all powered up effects
00076		ES = Spawn(class'EffectSkelIceAxe', self);
00077		if (ES != None)
00078		{
00079			AttachActorToJoint(ES, 0);
00080		}
00081	}
00082	
00083	simulated function RemovePowerupEffect()
00084	{
00085		local actor A;
00086		// Remove Effect skeleton
00087		A = DetachActorFromJoint(0);
00088		A.Destroy();
00089	}
00090	
00091	
00092	
00093	function int CalculateDamage(actor Victim)
00094	{
00095		if (bPoweredUp && Victim.IsA('Pawn') && Pawn(Victim).CanBeStatued()
00096			&& !Victim.Region.Zone.bNeutralZone)
00097		{
00098			Pawn(Victim).PowerupIce(Pawn(Owner));
00099			return 0;
00100		}
00101	
00102		return Super.CalculateDamage(Victim);
00103	}
00104	
00105	defaultproperties
00106	{
00107	     StowMesh=1
00108	     Damage=30
00109	     BloodTexture=Texture'weapons.sigurdaxesigurds_axeblood'
00110	     rating=3
00111	     RunePowerRequired=75
00112	     RunePowerDuration=15.000000
00113	     PowerupMessage="Freeze!"
00114	     ThroughAir(0)=Sound'WeaponsSnd.Swings.swing12'
00115	     ThroughAirBerserk(0)=Sound'WeaponsSnd.Swings.bswing14'
00116	     HitFlesh(0)=Sound'WeaponsSnd.ImpFlesh.impfleshaxe07'
00117	     HitWood(0)=Sound'WeaponsSnd.ImpWood.impactwood09'
00118	     HitStone(0)=Sound'WeaponsSnd.ImpStone.impactstone03'
00119	     HitMetal(0)=Sound'WeaponsSnd.ImpMetal.impactcombo01'
00120	     HitDirt(0)=Sound'WeaponsSnd.ImpEarth.impactearth03'
00121	     HitShield=Sound'WeaponsSnd.Shields.shield14'
00122	     HitWeapon=Sound'WeaponsSnd.Swords.sword14'
00123	     HitBreakableWood=Sound'WeaponsSnd.ImpWood.impactwood12'
00124	     HitBreakableStone=Sound'WeaponsSnd.ImpStone.impactstone13'
00125	     SheathSound=Sound'WeaponsSnd.Stows.xstow06'
00126	     UnsheathSound=Sound'WeaponsSnd.Stows.xunstow06'
00127	     ThrownSoundLOOP=Sound'WeaponsSnd.Throws.throw03L'
00128	     PowerUpSound=Sound'WeaponsSnd.PowerUps.powerstart32'
00129	     PoweredUpSoundLOOP=Sound'WeaponsSnd.PowerUps.power50L'
00130	     PitchDeviation=0.085000
00131	     PowerupIcon=Texture'RuneFX2.saxe'
00132	     PowerupIconAnim=Texture'RuneFX2.saxe1a'
00133	     PoweredUpSwipeClass=Class'RuneI.WeaponSwipeGray'
00134	     A_Idle=X4_idle
00135	     A_Forward=X4_walk
00136	     A_Backward=X4_Backup
00137	     A_Forward45Right=X4_walk45Right
00138	     A_Forward45Left=X4_walk45Left
00139	     A_Backward45Right=X4_Backup45Right
00140	     A_Backward45Left=X4_Backup45Left
00141	     A_StrafeRight=X4_Straferight
00142	     A_StrafeLeft=X4_Strafeleft
00143	     A_AttackA=S4_attackA
00144	     A_AttackAReturn=X4_attackAreturn
00145	     A_AttackB=S4_attackB
00146	     A_AttackBReturn=X4_attackBreturn
00147	     A_AttackC=S4_attackC
00148	     A_AttackCReturn=X4_attackCreturn
00149	     A_AttackStandA=X4_StandingAttackA
00150	     A_AttackStandAReturn=X4_StandingAttackAreturn
00151	     A_AttackStandB=X4_StandingAttackB
00152	     A_AttackStandBReturn=X4_StandingAttackBreturn
00153	     A_AttackBackupA=X4_Backupattack
00154	     A_AttackBackupAReturn=None
00155	     A_AttackStrafeRight=X4_StrafeRightAttack
00156	     A_AttackStrafeLeft=X4_StrafeLeftAttack
00157	     A_Throw=X4_throw
00158	     A_Powerup=X4_Powerup
00159	     A_Defend=None
00160	     A_DefendIdle=None
00161	     A_PainFront=X4_painFront
00162	     A_PainBack=X4_painBack
00163	     A_PainLeft=X4_painLeft
00164	     A_PainRight=X4_painRight
00165	     A_PickupGroundLeft=X4_PickupLeft
00166	     A_PickupHighLeft=X4_PickupLeftHigh
00167	     A_Taunt=X4_Taunt
00168	     A_PumpTrigger=X4_PumpTrigger
00169	     A_LeverTrigger=X4_LeverTrigger
00170	     PickupMessage="You now wield Sigurd's Axe"
00171	     PickupSound=Sound'OtherSnd.Pickups.grab04'
00172	     DropSound=Sound'WeaponsSnd.Drops.axedrop02'
00173	     Mass=16.000000
00174	     Skeletal=SkelModel'weapons.sigurdaxe'
00175	     SkelGroupSkins(0)=Texture'weapons.sigurdaxesigurds_axe'
00176	     SkelGroupSkins(1)=Texture'weapons.sigurdaxesigurds_axe'
00177	}

End Source Code