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 |
class AbilityMonsterSummon extends RPGAbility abstract; static function bool AbilityIsAllowed(GameInfo Game, MutUT2004RPG RPGMut) { //make sure invasion monsters get loaded if (DynamicLoadObject("SkaarjPack.Invasion", class'Class', true) == None) return false; return true; } static simulated function int Cost(RPGPlayerDataObject Data, int CurrentLevel) { if (Data.Attack < 75 || Data.Defense < 75) return 0; else if (CurrentLevel == 0) return 20; else return Super.Cost(Data, CurrentLevel); } static simulated function ModifyPawn(Pawn Other, int AbilityLevel) { local MonsterInv M; if (Other.Role != ROLE_Authority || Other.Controller == None || !Other.Controller.bIsPlayer) return; //remove old one, if it exists //might happen if player levels up this ability while still alive M = MonsterInv(Other.FindInventoryType(class'MonsterInv')); if (M != None) { if (M.AbilityLevel != AbilityLevel) { M.CurrentMonster.Pawn.Died(None, class'DamageType', vect(0,0,0)); M.AbilityLevel = AbilityLevel; M.SpawnMonster(true); } return; } M = Other.spawn(class'MonsterInv', Other,,,rot(0,0,0)); M.AbilityLevel = AbilityLevel; M.GiveTo(Other); } defaultproperties { AbilityName="Monster Tongue" Description="With this ability, you can convince monsters to come to your aid. A monster will appear and follow you around, attacking any enemies it sees, and if it dies, another will eventually come to take its place. You will get the score and EXP for any of its kills. The level of the ability determines the type of monster that will assist you. Additionally, the monster will have the benefits of all of your stats and abilities except those which act on your death. You must have at least 75 Damage Bonus and 75 Damage Reduction to purchase this ability. (Max Level: 8)" StartingCost=5 CostAddPerLevel=5 MaxLevel=8 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |