Navigation Menu

Skip to content
This repository has been archived by the owner on Jun 12, 2019. It is now read-only.

Commit

Permalink
Rewrote the code foundation for custom F3 stats. Object orientation ftw!
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Dinklage <pdinklag@googlemail.com>
  • Loading branch information
pdinklag committed Jun 29, 2014
1 parent a27f4cb commit 5db5e1a
Show file tree
Hide file tree
Showing 16 changed files with 127 additions and 168 deletions.
18 changes: 8 additions & 10 deletions Classes/DamTypeBioBomb.uc
@@ -1,16 +1,14 @@
class DamTypeBioBomb extends DamageType
abstract;
class DamTypeBioBomb extends RPGDamageType
abstract;

defaultproperties
{
defaultproperties {
StatWeapon=Class'DummyWeapon_BioBomb'
DeathString="%o was GOOPIFIED by %k's bio bomb."
MaleSuicide="%o was GOOPIFIED."
FemaleSuicide="%o was GOOPIFIED."
MaleSuicide="%o was GOOPIFIED."
FemaleSuicide="%o was GOOPIFIED."

bKUseTearOffMomentum=false

bKUseTearOffMomentum=false
//bDetonatesGoop=true
//bDelayedDamage=true

DeathOverlayMaterial=Material'XGameShaders.PlayerShaders.LinkHit'
}

12 changes: 6 additions & 6 deletions Classes/DamTypeCounterShove.uc
@@ -1,8 +1,8 @@
class DamTypeCounterShove extends DamageType
abstract;
class DamTypeCounterShove extends RPGDamageType
abstract;

defaultproperties
{
DeathString="%k went up up and away, courtesy of %o's Counter Shove."
KDamageImpulse=0.000000
defaultproperties {
StatWeapon=class'DummyWeapon_CounterShove'
DeathString="%k went up up and away, courtesy of %o's Counter Shove."
KDamageImpulse=0.000000
}
28 changes: 14 additions & 14 deletions Classes/DamTypeEmo.uc
@@ -1,5 +1,5 @@
class DamTypeEmo extends DamageType
abstract;
class DamTypeEmo extends RPGDamageType
abstract;

var localized string MaleSuicides[3], FemaleSuicides[3];

Expand All @@ -17,16 +17,16 @@ static function string SuicideMessage(PlayerReplicationInfo Victim)
return default.MaleSuicides[Rand(3)];
}

defaultproperties
{
MaleSuicides(0)="%o got all emotional."
MaleSuicides(1)="Things got too much for %o."
MaleSuicides(2)="%o couldn't take any more."
FemaleSuicides(0)="%o got all emotional."
FemaleSuicides(1)="Things got too much for %o."
FemaleSuicides(2)="%o couldn't take any more."
bArmorStops=False
bLocationalHit=False
bAlwaysSevers=True
GibPerterbation=1.000000
defaultproperties {
StatWeapon=class'DummyWeapon_Emo'
MaleSuicides(0)="%o got all emotional."
MaleSuicides(1)="Things got too much for %o."
MaleSuicides(2)="%o couldn't take any more."
FemaleSuicides(0)="%o got all emotional."
FemaleSuicides(1)="Things got too much for %o."
FemaleSuicides(2)="%o couldn't take any more."
bArmorStops=False
bLocationalHit=False
bAlwaysSevers=True
GibPerterbation=1.000000
}
5 changes: 3 additions & 2 deletions Classes/DamTypeFlakBomb.uc
@@ -1,7 +1,8 @@
class DamTypeFlakBomb extends DamageType
abstract;
class DamTypeFlakBomb extends RPGDamageType
abstract;

defaultproperties {
StatWeapon=Class'DummyWeapon_FlakBomb'
DeathString="%o was ate some flak from %k's flak bomb."
MaleSuicide="%o ate his own flak."
FemaleSuicide="%o was ate her own flak."
Expand Down
22 changes: 11 additions & 11 deletions Classes/DamTypeLightningRod.uc
@@ -1,5 +1,5 @@
class DamTypeLightningRod extends DamageType
abstract;
class DamTypeLightningRod extends RPGDamageType
abstract;

static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictemHealth)
{
Expand All @@ -8,13 +8,13 @@ static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictemHealt
HitEffects[1] = class'HitFlame';
}

defaultproperties
{
DeathString="%o was electrocuted by %k's lightning rod."
FemaleSuicide="%o had an electrifying experience."
MaleSuicide="%o had an electrifying experience."
bCauseConvulsions=True
DamageOverlayMaterial=Shader'XGameShaders.PlayerShaders.LightningHit'
DamageOverlayTime=1.000000
GibPerterbation=0.250000
defaultproperties {
StatWeapon=class'DummyWeapon_LightningRod'
DeathString="%o was electrocuted by %k's lightning rod."
FemaleSuicide="%o had an electrifying experience."
MaleSuicide="%o had an electrifying experience."
bCauseConvulsions=True
DamageOverlayMaterial=Shader'XGameShaders.PlayerShaders.LightningHit'
DamageOverlayTime=1.000000
GibPerterbation=0.250000
}
12 changes: 6 additions & 6 deletions Classes/DamTypeLightningTotem.uc
@@ -1,9 +1,9 @@
class DamTypeLightningTotem extends DamTypeLightningRod
abstract;
abstract;

defaultproperties
{
DeathString="%o was electrocuted by %k's lightning totem."
FemaleSuicide="%o had an electrifying experience."
MaleSuicide="%o had an electrifying experience."
defaultproperties {
StatWeapon=Class'DummyWeapon_Totem'
DeathString="%o was electrocuted by %k's lightning totem."
FemaleSuicide="%o had an electrifying experience."
MaleSuicide="%o had an electrifying experience."
}
24 changes: 12 additions & 12 deletions Classes/DamTypeMegaExplosion.uc
@@ -1,14 +1,14 @@
class DamTypeMegaExplosion extends DamageType
abstract;
class DamTypeMegaExplosion extends RPGDamageType
abstract;

defaultproperties
{
DeathString="%o was PULVERIZED by the power of %k's blast!"
FemaleSuicide="%o was PULVERIZED!"
MaleSuicide="%o was PULVERIZED!"
bArmorStops=False
bKUseOwnDeathVel=True
bDelayedDamage=True
KDeathVel=600
KDeathUpKick=600
defaultproperties {
StatWeapon=Class'DummyWeapon_MegaBlast'
DeathString="%o was PULVERIZED by the power of %k's blast!"
FemaleSuicide="%o was PULVERIZED!"
MaleSuicide="%o was PULVERIZED!"
bArmorStops=False
bKUseOwnDeathVel=True
bDelayedDamage=True
KDeathVel=600
KDeathUpKick=600
}
22 changes: 11 additions & 11 deletions Classes/DamTypePoison.uc
@@ -1,13 +1,13 @@
class DamTypePoison extends DamageType
abstract;
class DamTypePoison extends RPGDamageType
abstract;

defaultproperties
{
DeathString="%o couldn't find an antidote for %k's poison."
FemaleSuicide="%o poisoned herself."
MaleSuicide="%o poisoned himself."
bArmorStops=False
bCausesBlood=False
bExtraMomentumZ=False
bDelayedDamage=True
defaultproperties {
StatWeapon=class'DummyWeapon_Poison'
DeathString="%o couldn't find an antidote for %k's poison."
FemaleSuicide="%o poisoned herself."
MaleSuicide="%o poisoned himself."
bArmorStops=False
bCausesBlood=False
bExtraMomentumZ=False
bDelayedDamage=True
}
16 changes: 8 additions & 8 deletions Classes/DamTypeRepulsion.uc
@@ -1,10 +1,10 @@
class DamTypeRepulsion extends DamageType
abstract;
class DamTypeRepulsion extends RPGDamageType
abstract;

defaultproperties
{
DeathString="%o threw %k out of this world."
FemaleSuicide="%o threw herself out of this world."
MaleSuicide="%o threw himself out of this world."
bDelayedDamage=True
defaultproperties {
StatWeapon=Class'DummyWeapon_Repulsion'
DeathString="%o threw %k out of this world."
FemaleSuicide="%o threw herself out of this world."
MaleSuicide="%o threw himself out of this world."
bDelayedDamage=True
}
16 changes: 8 additions & 8 deletions Classes/DamTypeRetaliation.uc
@@ -1,10 +1,10 @@
class DamTypeRetaliation extends DamageType
abstract;
class DamTypeRetaliation extends RPGDamageType
abstract;

defaultproperties
{
DeathString="%k's strike back was too much for %o."
bArmorStops=False
bCausesBlood=False
bExtraMomentumZ=False
defaultproperties {
StatWeapon=class'DummyWeapon_Retaliation'
DeathString="%k's strike back was too much for %o."
bArmorStops=False
bCausesBlood=False
bExtraMomentumZ=False
}
18 changes: 9 additions & 9 deletions Classes/DamTypeSelfDestruct.uc
@@ -1,11 +1,11 @@
class DamTypeSelfDestruct extends DamageType
abstract;
class DamTypeSelfDestruct extends RPGDamageType
abstract;

defaultproperties
{
DeathString="%o fell victim to %k's self destructing vehicle."
FemaleSuicide="%o wasn't quick enough to get away from her self destructing vehicle..."
MaleSuicide="%o wasn't quick enough to get away from his self destructing vehicle..."
bCauseConvulsions=True
GibPerterbation=1.500000
defaultproperties {
StatWeapon=Class'DummyWeapon_SelfDestruct'
DeathString="%o fell victim to %k's self destructing vehicle."
FemaleSuicide="%o wasn't quick enough to get away from her self destructing vehicle..."
MaleSuicide="%o wasn't quick enough to get away from his self destructing vehicle..."
bCauseConvulsions=True
GibPerterbation=1.500000
}
14 changes: 3 additions & 11 deletions Classes/DamTypeTitanUltima.uc
@@ -1,14 +1,6 @@
class DamTypeTitanUltima extends DamageType
class DamTypeTitanUltima extends DamTypeUltima
abstract;

defaultproperties
{
DeathString="%o was PULVERIZED by the purple power of %k's ultima!"
FemaleSuicide="%o was PULVERIZED!"
MaleSuicide="%o was PULVERIZED!"
bArmorStops=False
bKUseOwnDeathVel=True
bDelayedDamage=True
KDeathVel=600.000000
KDeathUpKick=600.000000
defaultproperties {
DeathString="%o was PULVERIZED by the purple power of %k's ultima!"
}
22 changes: 11 additions & 11 deletions Classes/DamTypeUltima.uc
@@ -1,14 +1,14 @@
class DamTypeUltima extends DamageType
class DamTypeUltima extends RPGDamageType
abstract;

defaultproperties
{
DeathString="%o was PULVERIZED by the power of %k's vengeance!"
FemaleSuicide="%o was PULVERIZED!"
MaleSuicide="%o was PULVERIZED!"
bArmorStops=False
bKUseOwnDeathVel=True
bDelayedDamage=True
KDeathVel=600.000000
KDeathUpKick=600.000000
defaultproperties {
StatWeapon=class'DummyWeapon_Ultima'
DeathString="%o was PULVERIZED by the power of %k's vengeance!"
FemaleSuicide="%o was PULVERIZED!"
MaleSuicide="%o was PULVERIZED!"
bArmorStops=False
bKUseOwnDeathVel=True
bDelayedDamage=True
KDeathVel=600.000000
KDeathUpKick=600.000000
}
14 changes: 7 additions & 7 deletions Classes/DamTypeVorpal.uc
@@ -1,9 +1,9 @@
class DamTypeVorpal extends DamageType
abstract;
class DamTypeVorpal extends RPGDamageType
abstract;

defaultproperties
{
DeathString="%o was instantly killed by %k's Vorpal weapon."
FemaleSuicide="%o was instantly killed by her own Vorpal weapon."
MaleSuicide="%o was instantly killed by his own Vorpal weapon."
defaultproperties {
StatWeapon=Class'DummyWeapon_Vorpal'
DeathString="%o was instantly killed by %k's Vorpal weapon."
FemaleSuicide="%o was instantly killed by her own Vorpal weapon."
MaleSuicide="%o was instantly killed by his own Vorpal weapon."
}
8 changes: 8 additions & 0 deletions Classes/RPGDamageType.uc
@@ -0,0 +1,8 @@
//Damage Types that have custom weapon stat entries for "F3" (such as Lightning Rod, Ultima etc)
class RPGDamageType extends DamageType
abstract;

var class<Weapon> StatWeapon;

defaultproperties {
}
44 changes: 2 additions & 42 deletions Classes/RPGRules.uc
Expand Up @@ -95,17 +95,6 @@ var config float EXPMul_SummonKill; //you get the XP of a normal kill multiplied
var config float EXP_HeadHunter, EXP_ComboWhore, EXP_FlakMonkey, EXP_RoadRampage;
var config float EXP_Daredevil;

/*
*/

//Data to allow custom weapon stat entries for "F3" (such as Lightning Rod, Ultima etc)
struct CustomWeaponStatStruct
{
var class<DamageType> DamageType; //if a kill is done with this damage type...
var class<Weapon> WeaponClass; //...a kill with this weapon will be tracked
};
var config array<CustomWeaponStatStruct> CustomWeaponStats;

//Necromancy check queue
var config array<string> ResurrectionCombos;

Expand Down Expand Up @@ -368,9 +357,8 @@ function ScoreKill(Controller Killer, Controller Killed)
}
else
{
if(Killer.PlayerReplicationInfo != None)
{
KillWeaponType = GetCustomStatWeapon(KillDamageType);
if(Killer.PlayerReplicationInfo != None && ClassIsChildOf(KillDamageType, class'RPGDamageType')) {
KillWeaponType = class<RPGDamageType>(KillDamageType).default.StatWeapon;
if(KillWeaponType != None)
RegisterWeaponKill(Killer.PlayerReplicationInfo, Killed.PlayerReplicationInfo, KillWeaponType);
}
Expand Down Expand Up @@ -1210,18 +1198,6 @@ static function bool IsResurrectionCombo(string ComboName)
return false;
}

function class<Weapon> GetCustomStatWeapon(class<DamageType> DamageType)
{
local int i;

for(i = 0; i < CustomWeaponStats.Length; i++)
{
if(CustomWeaponStats[i].DamageType == DamageType)
return CustomWeaponStats[i].WeaponClass;
}
return None;
}

defaultproperties
{
bDamageLog=False
Expand All @@ -1234,22 +1210,6 @@ defaultproperties
DirectDamageTypes(3)=class'DamTypeFatality'
NoUDamageTypes(0)=class'DamTypeRetaliation'

//former RPGGameStats
CustomWeaponStats(0)=(DamageType=Class'DamTypeTitanUltima',WeaponClass=Class'DummyWeapon_Ultima')
CustomWeaponStats(1)=(DamageType=Class'DamTypeUltima',WeaponClass=Class'DummyWeapon_Ultima')
CustomWeaponStats(2)=(DamageType=Class'DamTypeLightningRod',WeaponClass=Class'DummyWeapon_LightningRod')
CustomWeaponStats(3)=(DamageType=Class'DamTypeCounterShove',WeaponClass=Class'DummyWeapon_CounterShove')
CustomWeaponStats(4)=(DamageType=Class'DamTypePoison',WeaponClass=Class'DummyWeapon_Poison')
CustomWeaponStats(5)=(DamageType=Class'DamTypeRetaliation',WeaponClass=Class'DummyWeapon_Retaliation')
CustomWeaponStats(6)=(DamageType=Class'DamTypeSelfDestruct',WeaponClass=Class'DummyWeapon_SelfDestruct')
CustomWeaponStats(7)=(DamageType=Class'DamTypeEmo',WeaponClass=Class'DummyWeapon_Emo')
CustomWeaponStats(8)=(DamageType=Class'DamTypeMegaExplosion',WeaponClass=Class'DummyWeapon_MegaBlast')
CustomWeaponStats(9)=(DamageType=Class'DamTypeRepulsion',WeaponClass=Class'DummyWeapon_Repulsion')
CustomWeaponStats(10)=(DamageType=Class'DamTypeVorpal',WeaponClass=Class'DummyWeapon_Vorpal')
CustomWeaponStats(11)=(DamageType=Class'DamTypeBioBomb',WeaponClass=Class'DummyWeapon_BioBomb')
CustomWeaponStats(12)=(DamageType=Class'DamTypeLightningTotem',WeaponClass=Class'DummyWeapon_Totem')
CustomWeaponStats(13)=(DamageType=Class'DamTypeFlakBomb',WeaponClass=Class'DummyWeapon_FlakBomb')

//Kills
EXP_Frag=1.00
EXP_SelfFrag=0.00 //-1.00 really, but we don't want to lose exp here
Expand Down

0 comments on commit 5db5e1a

Please sign in to comment.