# SFCharacter4.SFReaverAssassin

00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 |
    //=============================================================================
    // Spatial Fear
    // Class: SFReaverAssassin
    // Description: Reaver variant.  This one is extremely violent and attacks with frenzy tactics.
    //
    // Author: Chris Rogers
    //=============================================================================
    Class SFReaverAssassin extends SFReaver;

    #exec TEXTURE IMPORT NAME=reavera1 FILE=Skins\reavera1.pcx GROUP="Skins" MIPS=ON
    #exec TEXTURE IMPORT NAME=reavera2 FILE=Skins\reavera2.pcx GROUP="Skins" MIPS=ON
    #exec TEXTURE IMPORT NAME=reavera3 FILE=Skins\reavera3.pcx GROUP="Skins" MIPS=ON

    //=============================================================================
    // General Functions

    // Overwritten because the assassin is very violent
    function eAttitude AttitudeToCreature(Pawn Other)
    {
    	local float fDecision;

    	if ( Other.IsA('SFScientist') || Other.IsA('SFMaleOfficer') || Other.IsA('SFFemaleOfficer') )
    	{
    		if (FRand() < 0.5)
    			return ATTITUDE_Hate;
    		else
    			return ATTITUDE_Frenzy;
    	}

    	// Check the global attitude flag
    	if(!bFightOtherCreatures)
    		return ATTITUDE_IGNORE;

    	if ( Other.IsA('SFReaver') || Other.IsA('SFReaverAssassin') )
    	{
    		fDecision	= FRand();
    		if(Self.IsA('SFBabyMite'))
    		{
    			if(fDecision < 0.05)
    				return ATTITUDE_Threaten;
    			else
    				return ATTITUDE_Friendly;
    		}

    		if(fDecision < 0.05)
    			return ATTITUDE_Threaten;
    		else if (fDecision < 0.09)
    			return ATTITUDE_Follow;
    		else if (fDecision < 0.10)
    			return ATTITUDE_Hate;
    		else
    			return ATTITUDE_Friendly;
    	}
    	else
    		if(ScriptedPawn(Other).Aggressiveness > Aggressiveness)
    		{
    			if(FRand() < 0.1)
    				return ATTITUDE_Threaten;
    			else
    				return ATTITUDE_Ignore;
    		}
    		else
    		{
    			if(FRand() < 0.05)
    				return ATTITUDE_Threaten;
    			else
    				return ATTITUDE_Ignore;
    		}
    }

    defaultproperties
    {
         WalkSound=None
         fMeleeDamage=22.000000
         bFightOtherCreatures=True
         Acquire=None
         Fear=None
         Roam=None
         Threaten=None
         GroundSpeed=700.000000
         AccelRate=700.000000
         JumpZ=-1.000000
         Health=280
         AttitudeToPlayer=ATTITUDE_Frenzy
         Skill=1.500000
         HitSound1=None
         HitSound2=None
         Die=None
         MultiSkins(0)=Texture'SFCharacter4.Skins.reavera1'
         MultiSkins(1)=Texture'SFCharacter4.Skins.reavera2'
         MultiSkins(2)=Texture'SFCharacter4.Skins.reavera3'
    }

class file time: 12/7/2003 3:58:26 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX