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 |
class AbilityRetaliate extends RPGAbility abstract; static simulated function int Cost(RPGPlayerDataObject Data, int CurrentLevel) { if (Data.Defense < 50) 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 (bOwnedByInstigator) { // do not allow this ability to kill another player if (DamageType == class'DamTypeRetaliation' && Damage >= Injured.Health + Injured.GetShieldStrength()) { Damage = Injured.Health + Injured.GetShieldStrength() - 1; } return; } if (DamageType == class'DamTypeRetaliation' || Injured == Instigator || Instigator == None) return; Instigator.TakeDamage(int(float(Damage) * (0.05 * AbilityLevel)), Injured, Instigator.Location, vect(0,0,0), class'DamTypeRetaliation'); } defaultproperties { AbilityName="Retaliation" Description="Whenever you are damaged by another player, 5% of the damage per level is also done to the player that hurt you. Your Damage Bonus stat and your opponent's Damage Reduction stat are applied to this extra damage. You can't retaliate to retaliation damage and retaliation damage will not kill the enemy by itself. You must have a Damage Reduction of at least 50 to purchase this ability. (Max Level: 10)" StartingCost=10 CostAddPerLevel=5 MaxLevel=10 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |