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

DruidsRPGcvs.AbilityExpHealing


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

var config float EXPBonusPerLevel;

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

    for (x = 0; x < Data.Abilities.length; x++)
    {
        if (Data.Abilities[x] == class'ClassMonsterMaster')
            ok = true;

        else if (Data.Abilities[x] == class'AbilityLoadedHealing')
            foundLoadedHealing = true;
    }

    if(!ok || !foundLoadedHealing)
    {
        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;
    }

    return super.Cost(Data, CurrentLevel);
}

static function ModifyPawn(Pawn Other, int AbilityLevel)
{
    local ArtifactMakeSuperHealer AMSH;
    if(Monster(Other) != None)
        return; //Not for pets

    AMSH = ArtifactMakeSuperHealer(Other.FindInventoryType(class'ArtifactMakeSuperHealer'));

    //spawn one. AbilityLoadedHealing will come along and populate the other data in a moment.
    if(AMSH == None)
    {
        AMSH = Other.spawn(class'ArtifactMakeSuperHealer', Other,,, rot(0,0,0));
        if(AMSH == None)
            return; //get em next pass I guess?

        AMSH.giveTo(Other);
    }
    AMSH.EXPMultiplier = class'RW_Healer'.default.EXPMultiplier + (Default.EXPBonusPerLevel * AbilityLevel);
}

defaultproperties
{
     AbilityName="Experienced Healing"
     Description="Allows you to gain additional experience for healing others with the Medic Gun.|Each level allows you to gain an additional 1% experience from healing. (Max Level: 9)|You must be a Monster Master and have Loaded Medic to purchase this skill.|Cost (per level): 5,8,11,14,17,20,23,26,29"
     StartingCost=5
     CostAddPerLevel=3
     MaxLevel=9
     EXPBonusPerLevel=0.010000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fri 28/4/2006 09:30:46.000 - Creation time: Wed 7/2/2007 19:16:32.062 - Created with UnCodeX