Custom Warheads refactor

Changes included:

Warhead code split out of weapon code and refactored.
Warhead functionality now split into several classes, each handling one effect/impact.

Additional custom warheads can now be defined and called via yaml.
Custom warheads inherit the abstract class Warhead,
which provides target check functions.

Custom warheads have to define their own impact functions,
and can also define their own replacement for check
functions.
This commit is contained in:
UberWaffe
2014-07-09 17:58:06 +02:00
parent f84b1c145e
commit c972b39687
59 changed files with 2275 additions and 1233 deletions

View File

@@ -615,7 +615,7 @@ Weapons:
Range: 5c0
ROF: 20
Burst: 1
Warhead:
Warhead: SpreadDamage
Damage: 20
Voices:

View File

@@ -951,7 +951,7 @@ Weapons:
Range: 5c0
ROF: 20
Burst: 1
Warhead:
Warhead: SpreadDamage
Damage: 20
Voices:

View File

@@ -364,7 +364,7 @@ Weapons:
PortaTesla:
ROF: 20
Range: 10c0
Warhead:
Warhead: SpreadDamage
Spread: 42
InfDeath: 5
Damage: 80

View File

@@ -313,20 +313,22 @@ Weapons:
Inaccuracy: 3c341
Image: 120MM
ContrailLength: 30
Warhead:
Warhead: SpreadDamage
Spread: 128
Versus:
None: 60%
Wood: 75%
Light: 60%
Heavy: 25%
InfDeath: 2
Damage: 250
Warhead@1Eff: CreateEffect
Explosion: large_explosion
WaterExplosion: large_splash
InfDeath: 2
SmudgeType: Crater
Damage: 250
ImpactSound: kaboom12.aud
WaterImpactSound: splash9.aud
Warhead@2Smu: LeaveSmudge
SmudgeType: Crater
SubMissile:
ROF: 250
Range: 32c0
@@ -340,19 +342,21 @@ Weapons:
Image: MISSILE
Trail: smokey
ContrailLength: 30
Warhead:
Warhead: SpreadDamage
Spread: 426
Versus:
None: 40%
Light: 30%
Heavy: 30%
InfDeath: blownaway
Damage: 400
Warhead@1Eff: CreateEffect
Explosion: large_explosion
WaterExplosion: large_splash
InfDeath: blownaway
SmudgeType: Crater
Damage: 400
ImpactSound: kaboom12.aud
WaterImpactSound: splash9.aud
Warhead@2Smu: LeaveSmudge
SmudgeType: Crater
Voices:

View File

@@ -259,7 +259,7 @@ Weapons:
PortaTesla:
ROF: 20
Range: 10c0
Warhead:
Warhead: SpreadDamage
Spread: 42
InfDeath: 5
Damage: 80

View File

@@ -771,24 +771,26 @@ Weapons:
Inaccuracy: 1c682
Image: 120MM
ContrailLength: 50
Warhead:
Warhead: SpreadDamage
Spread: 256
Versus:
None: 75%
Wood: 75%
Light: 75%
Concrete: 100%
InfDeath: 4
Damage: 150
Warhead@2Smu: LeaveSmudge
SmudgeType: Crater
Warhead@3Eff: CreateEffect
Explosion: self_destruct
WaterExplosion: self_destruct
InfDeath: 4
SmudgeType: Crater
Damage: 150
MammothTusk:
ROF: 300
Range: 10c0
Report: MISSILE6.AUD
Burst: 2
ValidTargets: Ground, Air
ValidTargets: Ground, Air, Enemy, Neutral, Ally
Projectile: Missile
Speed: 128
Arm: 2
@@ -801,7 +803,7 @@ Weapons:
Image: DRAGON
ROT: 10
RangeLimit: 80
Warhead:
Warhead: SpreadDamage
Spread: 640
Versus:
None: 125%
@@ -809,16 +811,18 @@ Weapons:
Light: 110%
Heavy: 100%
Concrete: 200%
InfDeath: 3
Damage: 250
Warhead@2Smu: LeaveSmudge
SmudgeType: Crater
Warhead@3Eff: CreateEffect
Explosion: nuke
WaterExplosion: nuke
InfDeath: 3
SmudgeType: Crater
Damage: 250
TankNapalm:
ROF: 40
Range: 8c0
Report: AACANON3.AUD
ValidTargets: Ground
ValidTargets: Ground, Enemy, Neutral, Ally
Burst: 6
BurstDelay: 1
Projectile: Bullet
@@ -827,7 +831,7 @@ Weapons:
Inaccuracy: 2c512
Trail: smokey
ContrailLength: 2
Warhead:
Warhead: SpreadDamage
Spread: 341
Versus:
None: 90%
@@ -835,31 +839,35 @@ Weapons:
Light: 100%
Heavy: 100%
Concrete: 100%
InfDeath: 4
Damage: 15
Warhead@2Smu: LeaveSmudge
SmudgeType: Scorch
Warhead@3Eff: CreateEffect
Explosion: small_explosion
WaterExplosion: small_explosion
InfDeath: 4
SmudgeType: Scorch
ImpactSound: firebl3.aud
Damage: 15
ParaBomb:
ROF: 5
Range: 5c0
Report: CHUTE1.AUD
Projectile: GravityBomb
Image: BOMBLET
Warhead:
Warhead: SpreadDamage
Spread: 426
Versus:
None: 125%
Wood: 100%
Light: 60%
Concrete: 25%
InfDeath: 5
Damage: 200
Warhead@2Smu: LeaveSmudge
SmudgeType: Crater
Warhead@3Eff: CreateEffect
Explosion: napalm
ImpactSound: firebl3.aud
WaterExplosion: napalm
InfDeath: 5
SmudgeType: Crater
Damage: 200
155mm:
ROF: 10
Range: 7c5
@@ -874,7 +882,7 @@ Weapons:
Angle: 30
Inaccuracy: 1c682
ContrailLength: 2
Warhead:
Warhead: SpreadDamage
Spread: 426
Versus:
None: 80%
@@ -882,21 +890,23 @@ Weapons:
Light: 60%
Heavy: 75%
Concrete: 35%
InfDeath: 5
Damage: 10
Warhead@2Smu: LeaveSmudge
SmudgeType: Scorch
Warhead@3Eff: CreateEffect
Explosion: small_napalm
WaterExplosion: small_napalm
InfDeath: 5
SmudgeType: Scorch
ImpactSound: firebl3.aud
Damage: 10
FLAK-23:
ROF: 10
Range: 8c0
Report: AACANON3.AUD
ValidTargets: Air,Ground
ValidTargets: Air, Ground, Enemy, Neutral, Ally
Projectile: Bullet
Speed: 1c682
High: true
Warhead:
Warhead: SpreadDamage
Spread: 213
Versus:
None: 35%
@@ -904,8 +914,11 @@ Weapons:
Light: 30%
Heavy: 40%
Concrete: 30%
Explosion: med_explosion
Damage: 25
Warhead@2Smu: LeaveSmudge
SmudgeType: Scorch
Warhead@3Eff: CreateEffect
Explosion: med_explosion
SCUD:
ROF: 280
Range: 7c0
@@ -921,18 +934,20 @@ Weapons:
Inaccuracy: 426
Image: V2
Angle: 216
Warhead:
Warhead: SpreadDamage
Spread: 853
Versus:
None: 100%
Wood: 90%
Light: 80%
Heavy: 70%
InfDeath: 3
Damage: 500
Warhead@2Smu: LeaveSmudge
SmudgeType: Crater
Warhead@3Eff: CreateEffect
Explosion: nuke
WaterExplosion: large_splash
InfDeath: 3
SmudgeType: Crater
Damage: 500
ImpactSound: kaboom1.aud
WaterImpactSound: kaboom1.aud
SilencedPPK:
@@ -941,16 +956,17 @@ Weapons:
Report: silppk.aud
Projectile: Bullet
Speed: 1c682
Warhead:
Warhead: SpreadDamage
Spread: 128
Versus:
Wood: 0%
Light: 0%
Heavy: 50%
Concrete: 0%
Explosion: piffs
InfDeath: 2
Damage: 150
Warhead@2Eff: CreateEffect
Explosion: piffs
Voices:

View File

@@ -2333,7 +2333,7 @@ Weapons:
Nike:
Range: 9c0
Maverick:
Warhead:
Warhead: SpreadDamage
Damage: 175
Voices:

View File

@@ -1076,12 +1076,10 @@ VoxelSequences:
Weapons:
CrateNuke:
Warhead@areanuke2:
Warhead@areanuke2: SpreadDamage
DamageModel: PerCell
Damage: 250
SmudgeType: Scorch
Size: 4,3
Ore: true
Size: 4
Versus:
None: 90%
Light: 60%
@@ -1089,13 +1087,21 @@ Weapons:
Concrete: 50%
Delay: 12
InfDeath: 4
Warhead@areanuke2Smu: LeaveSmudge
SmudgeType: Scorch
Size: 4,3
Delay: 12
Warhead@areanuke2Res: DestroyResource
DestroyResources: true
Size: 4,3
Delay: 12
Warhead@areanuke2Eff: CreateEffect
ImpactSound: kaboom22
Warhead@areanuke3:
Delay: 12
Warhead@areanuke3: SpreadDamage
DamageModel: PerCell
Damage: 250
SmudgeType: Scorch
Size: 3,2
Ore: true
Size: 3
Versus:
None: 90%
Light: 60%
@@ -1103,13 +1109,20 @@ Weapons:
Concrete: 50%
Delay: 24
InfDeath: 4
Warhead@areanuke3Smu: LeaveSmudge
SmudgeType: Scorch
Size: 3,2
Delay: 24
Warhead@areanuke3Res: DestroyResource
DestroyResources: true
Size: 3,2
Delay: 24
Warhead@areanuke3Eff: CreateEffect
ImpactSound: kaboom22
Warhead@areanuke4:
Delay: 24
Warhead@areanuke4: SpreadDamage
DamageModel: PerCell
Damage: 250
SmudgeType: Scorch
Size: 2,1
Ore: true
Versus:
None: 90%
Light: 60%
@@ -1117,7 +1130,17 @@ Weapons:
Concrete: 50%
Delay: 36
InfDeath: 4
Warhead@areanuke4Smu: LeaveSmudge
SmudgeType: Scorch
Size: 2,1
Delay: 36
Warhead@areanuke4Res: DestroyResource
DestroyResources: true
Size: 2,1
Delay: 36
Warhead@areanuke4Eff: CreateEffect
ImpactSound: kaboom22
Delay: 36
Voices: