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 |
class AbilityReduceSelfDamage extends RPGAbility abstract; static simulated function int Cost(RPGPlayerDataObject Data, int CurrentLevel) { if (Data.HealthBonus < 50 || Data.Defense < 25) return 0; else 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 (Injured != Instigator || !bOwnedByInstigator || DamageType == class'Fell') return; Damage -= float(Damage) * 0.15 * AbilityLevel; } defaultproperties { AbilityName="Cautiousness" Description="Reduces self damage by 15% per level. Your Health Bonus stat must be at least 50 and your Damage Reduction stat at least 25 to purchase this ability. (Max Level: 5)" StartingCost=15 CostAddPerLevel=5 MaxLevel=5 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |