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

DruidsRPGcvs.AbilityLoadedHealing


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
00095
00096
00097
00098
00099
00100
class AbilityLoadedHealing extends RPGAbility
    config(UT2004RPG)
    abstract;

var config int Lev2Cap;
var config int Lev3Cap;

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

    for (x = 0; x < Data.Abilities.length; 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;
    }

    return super.Cost(Data, CurrentLevel);
}

static function ModifyPawn(Pawn Other, int AbilityLevel)
{
    local ArtifactMakeSuperHealer AMSH;
    local ArtifactHealingBlast AHB;
    local ArtifactSphereHealing ASpH;

    if(Monster(Other) != None)
        return; //Not for pets

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

    if(AMSH != None)
    {
        if(AMSH.AbilityLevel == AbilityLevel)
            return;
    }
    else
    {
        AMSH = Other.spawn(class'ArtifactMakeSuperHealer', Other,,, rot(0,0,0));
        if(AMSH == None)
            return; //get em next pass I guess?

        AMSH.giveTo(Other);
// I'm guessing that NextItem is here to ensure players don't start with
// no item selected.  So the if should stop wierd artifact scrambles.
        if(Other.SelectedItem == None)
            Other.NextItem();
    }
    AMSH.AbilityLevel = AbilityLevel;
    if(AbilityLevel == 2)
        AMSH.MaxHealth = Default.Lev2Cap;
    if(AbilityLevel == 3)
    {
        AMSH.MaxHealth = Default.Lev3Cap;
        // ok let's give them some artifacts
        AHB = ArtifactHealingBlast(Other.FindInventoryType(class'ArtifactHealingBlast'));
        if(AHB == None)
        {
            AHB = Other.spawn(class'ArtifactHealingBlast', Other,,, rot(0,0,0));
            if(AHB == None)
                return; //get em next pass I guess?

            AHB.giveTo(Other);
// I'm guessing that NextItem is here to ensure players don't start with
// no item selected.  So the if should stop wierd artifact scrambles.
            if(Other.SelectedItem == None)
                Other.NextItem();
        }
        ASpH = ArtifactSphereHealing(Other.FindInventoryType(class'ArtifactSphereHealing'));
        if(ASpH == None)
        {
            ASpH = Other.spawn(class'ArtifactSphereHealing', Other,,, rot(0,0,0));
            if(ASpH == None)
                return; //get em next pass I guess?

            ASpH.giveTo(Other);
// I'm guessing that NextItem is here to ensure players don't start with
// no item selected.  So the if should stop wierd artifact scrambles.
            if(Other.SelectedItem == None)
                Other.NextItem();
        }
    }
}

defaultproperties
{
     AbilityName="Loaded Medic"
     Description="Gives you bonuses towards healing.|Level 1 gives you a Medic Weapon Maker. |Level 2 allows you to use the Medic Gun to heal teammates +100 beyond their max health. |Level 3 allows you to heal teammates +150 points beyond their max health. (Max Level: 3)|You must be a Monster Master to purchase this skill.|Cost (per level): 3,6,9"
     StartingCost=3
     CostAddPerLevel=3
     Lev2Cap=100
     Lev3Cap=150
     MaxLevel=3
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Thu 19/10/2006 15:21:20.000 - Creation time: Wed 7/2/2007 19:16:32.125 - Created with UnCodeX