Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

DruidsRPGcvs.ClassAdrenalineMaster


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
class ClassAdrenalineMaster extends RPGClass
    config(UT2004RPG)
    abstract;

static simulated function ModifyPawn(Pawn Other, int AbilityLevel)
{
    local RPGStatsInv StatsInv;
    local int y;
    local int RegenLevel;
    local int RegenIndex;
    RegenIndex = -1;
    class'ClassWeaponsMaster'.static.ModifyPawn(other, AbilityLevel); //give them the health regen.
    
    StatsInv = RPGStatsInv(Other.FindInventoryType(class'RPGStatsInv'));
    if (StatsInv != None && StatsInv.DataObject != None && StatsInv.DataObject.Level <= default.MediumLevel)
    {
        for (y = 0; y < StatsInv.Data.Abilities.length; y++)
        {
            if (ClassIsChildOf(StatsInv.Data.Abilities[y], class'DruidAdrenalineRegen'))
            {
                RegenLevel = StatsInv.Data.AbilityLevels[y];
                RegenIndex = y;
            }
        }

        if(StatsInv.DataObject.Level <= default.LowLevel)
        {
            if(RegenIndex >= 0)
                StatsInv.Data.Abilities[RegenIndex].static.ModifyPawn(Other, RegenLevel + 2);
            else
                class'DruidAdrenalineRegen'.static.ModifyPawn(Other, RegenLevel + 2);
        }
        else if(StatsInv.DataObject.Level <= default.MediumLevel)
        {
            if(RegenIndex >= 0)
                StatsInv.Data.Abilities[RegenIndex].static.ModifyPawn(Other, RegenLevel + 1);
            else
                class'DruidAdrenalineRegen'.static.ModifyPawn(Other, RegenLevel + 1);
        }
    }
}

defaultproperties
{
    AbilityName="Class: Adrenaline Master"
    Description="This class is the prerequisite for all adrenaline related abilities.|You can not be more than one class at any time."
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sat 28/10/2006 13:52:44.000 - Creation time: Wed 7/2/2007 19:16:35.703 - Created with UnCodeX