Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 |
class DruidArtifactLoaded extends RPGDeathAbility config(UT2004RPG) abstract; var config Array< class<RPGArtifact> > SlowArtifact; var config Array< class<RPGArtifact> > QuickArtifact; 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'ClassAdrenalineMaster') 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 int x; local LoadedInv LoadedInv; LoadedInv = LoadedInv(Other.FindInventoryType(class'LoadedInv')); if(LoadedInv != None) { if(LoadedInv.type != 'Artifacts' || LoadedInv.AbilityLevel != AbilityLevel) LoadedInv.Destroy(); //for when they buy a new level of this skill else return; } LoadedInv = Other.spawn(class'LoadedInv'); if(LoadedInv == None) return; LoadedInv.type = 'Artifacts'; LoadedInv.AbilityLevel = AbilityLevel; if(AbilityLevel >= 3) LoadedInv.ProtectArtifacts = true; else LoadedInv.ProtectArtifacts = false; for(x = 0; x < default.SlowArtifact.length; x++) giveArtifact(other, default.SlowArtifact[x]); if(AbilityLevel > 1) for(x = 0; x < default.QuickArtifact.length; x++) giveArtifact(other, default.QuickArtifact[x]); // 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(); LoadedInv.giveTo(Other); } static function giveArtifact(Pawn other, class<RPGArtifact> ArtifactClass) { local RPGArtifact Artifact; if(Other.IsA('Monster')) return; if(Other.findInventoryType(ArtifactClass) != None) return; //they already have one Artifact = Other.spawn(ArtifactClass, Other,,, rot(0,0,0)); if(Artifact != None) Artifact.giveTo(Other); } static function GenuineDeath(Pawn Killed, Controller Killer, class<DamageType> DamageType, vector HitLocation, int AbilityLevel) { Local Inventory inv; // If we end up with some wierdness here, it would be because we haven't // ejected the player. However, we shouldn't have to worry about that // any more; it should be handled elsewhere, if needed. if(Killed.isA('Vehicle')) { Killed = Vehicle(Killed).Driver; } // Wierdness - looks like sometimes PD called twice, particularly in VINV? // Killed can become "None" somewhere along the line. if(Killed == None) { return; } for (inv=Killed.Inventory ; inv != None ; inv=inv.Inventory) { if(ClassIsChildOf(inv.class, class'UT2004RPG.RPGArtifact')) { // Important note: *NO* artifact currently in possession will get dropped! inv.PickupClass = None; } } return; } DefaultProperties { AbilityName="Loaded Artifacts" Description="When you spawn:|Level 1: You are granted all slow drain artifacts and a magic weapon maker.|Level 2: You are granted all fast drain artifacts and some special artifacts.|Level 3: Your breakable artifacts are made unbreakable. You must be an Adrenaline Master to purchase this skill.|Cost (per level): 2,9,16" StartingCost=2 CostAddPerLevel=7 MaxLevel=3 SlowArtifact[0]=class'UT2004RPG.ArtifactFlight' SlowArtifact[1]=class'UT2004RPG.ArtifactTeleport' SlowArtifact[2]=class'DruidArtifactSpider' SlowArtifact[3]=class'DruidArtifactMakeMagicWeapon' QuickArtifact[0]=class'DruidDoubleModifier' QuickArtifact[1]=class'DruidMaxModifier' QuickArtifact[2]=class'DruidPlusOneModifier' QuickArtifact[3]=class'UT2004RPG.ArtifactInvulnerability' QuickArtifact[4]=class'DruidArtifactTripleDamage' QuickArtifact[5]=class'DruidArtifactLightningRod' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |