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

DruidsRPGcvs.AbilityEnhancedReduction


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

var config int RequiredLevel;
var config float LevMultiplier;

static simulated function int Cost(RPGPlayerDataObject Data, int CurrentLevel)
{
    local int x;
    local bool ok;

    for (x = 0; x < Data.Abilities.length && !ok; x++)
        if (Data.Abilities[x] == class'ClassMonsterMaster')
            ok = true;
    if(!ok)
    {
        if(CurrentLevel > 0)
            log("Warning:"@data.Name@"has"@default.class@"Level"@CurrentLevel@"but does not have an associated Class to allow them to purchase it");
        return 0;
    }
    
    if(Data.Level < (default.RequiredLevel + CurrentLevel))
        return 0;

    return Super.Cost(Data, CurrentLevel);
}

static function HandleDamage(out int Damage, Pawn Injured, Pawn Instigator, out vector Momentum, class<DamageType> DamageType, bool bOwnedByInstigator, int AbilityLevel)
{
    if(bOwnedByInstigator)
        return; //if the instigator is doing the damage, ignore this.
    if(Damage > 0)
        Damage *= (abs((AbilityLevel * default.LevMultiplier)-1));
}

DefaultProperties
{
    AbilityName="Advanced Damage Reduction"
    Description="Increases your cumulative total damage reduction by 4% per level. You must be a Medic / Monster Master to purchase this skill. Does not apply to self damage.|Cost (per level): 5. Max Level: 10. You must be level 40 to purchase the first level of this ability, level 41 to purchase the second level, and so on."
    
    LevMultiplier=0.040000
    RequiredLevel=40
    StartingCost=5
    CostAddPerLevel=0
    MaxLevel=10
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sun 23/7/2006 11:52:56.000 - Creation time: Wed 7/2/2007 19:16:32.046 - Created with UnCodeX