Derbis:
	Warhead@1Dam: SpreadDamage
		AffectsParent: False

#
# Debris wehicles, parts
#

empty_shell01:
	ReloadDelay: 60
	Range: 6c0
	ValidTargets: Infantry, Vehicle, Building, Wall, Ground, Water, Air
	Projectile: Bullet
		Speed: 50, 70
		Inaccuracy: 1c512
		InaccuracyType: PerCellIncrement
		LaunchAngle: 91, 140
		Image: empty_shell01
		Shadow: true
	Warhead@effect: CreateEffect
		Explosions: empty_shell_frame_01


debris_vehicle01:
	Inherits: Debris2
	Projectile: Bullet
		Image: shrapnel_vehicle01
	Warhead: CreateEffect
		Explosions: tiny_explosion
		ImpactSoundChance: 50
		ImpactActors: false
		ImpactSounds: new_DerbisHeavy01.wav, new_DerbisHeavy02.wav, new_derbisLight01.wav, new_derbisHeavy_bounce02.wav

debris_vehicle02:
	Inherits: Debris3
	Projectile: Bullet
		Image: shrapnel_vehicle02
		BounceSound: new_derbisLight_bounce01.wav
		BounceCount: 2
	Warhead: CreateEffect
		Explosions: tiny_explosion
		ImpactSoundChance: 50
		ImpactActors: false
		ImpactSounds: new_DerbisHeavy01.wav, new_DerbisHeavy02.wav, new_derbisHeave_bounce01.wav, new_derbisHeavy_bounce02.wav

debris_harvester_wheel01:
	Inherits: Debris3
	Projectile: Bullet
		Image: harvester_wheel01
		BounceCount: 2
	Warhead: CreateEffect
		Explosions: tiny_explosion
		ImpactSoundChance: 50
		ImpactActors: false
		ImpactSounds: new_DerbisHeavy01.wav, new_DerbisHeavy02.wav, new_derbisHeave_bounce01.wav, new_derbisHeavy_bounce02.wav

debris_harvester_wheel02:
	Inherits: Debris3
	Projectile: Bullet
		Image: harvester_wheel02
		BounceSound: new_DerbisHeavy02.wav
		BounceCount: 1
		TrailImage: bazooka_trail2
		TrailPalette: effect75alpha
		TrailInterval: 2
	Warhead: CreateEffect
		Explosions: tiny_explosion
		ImpactSoundChance: 50
		ImpactActors: false
		ImpactSounds: new_DerbisHeavy01.wav, new_DerbisHeavy02.wav, new_derbisLight01.wav, new_Cliff_Destroyed.wav

debris.rotor:
	Inherits: ^derbis.turret
	Range: 1c512
	Projectile: 
		Image: debris_rotor_anim
		Speed: 90, 110
		BounceCount: 2
		Blockable: false
		BounceRangeModifier: 60
		TrailImage: bazooka_trail2
		TrailPalette: effect75alpha
		TrailInterval: 2
	Warhead: CreateEffect
		Explosions: tiny_explosion, 
		ExplosionPalette: palette_d2k
		ImpactSounds: new_Cliff_Destroyed.wav
#
# Debris turrets
#

^derbis.turret:
	ReloadDelay: 60
	Range: 0c512
	Projectile: Bullet
		Image: siege_turret_husk_anim
		Speed: 50, 70
		Inaccuracy: 200
		Blockable: true
		LaunchAngle: 40, 150
		BounceCount: 2
		Shadow: true
		BounceRangeModifier: 20
		BounceSound: new_DerbisHeavy02.wav 
	Warhead: CreateEffect
		Explosions: tiny_explosion
		ImpactSoundChance: 50
		ImpactActors: false
		ImpactSounds: new_DerbisHeavy01.wav, new_DerbisHeavy02.wav, new_derbisLight01.wav
	Warhead@dmg: SpreadDamage
		Damage: 5000
		Spread: 512
		Falloff: 100, 0
		Versus:
			none: 100
			wall: 10
			building: 10
			buildingWeak: 10
			wood: 10
			light: 20
			heavy: 5
			invulnerable: 0
			cy: 5
			harvester: 5
		DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath

derbisSiegetank.turret:
	Inherits: ^derbis.turret
	Warhead: CreateEffect
		Explosions: siege_turret_frame01, siege_turret_frame02, siege_turret_frame03, siege_turret_frame04, siege_turret_frame05

debris_turret.atreides:
	Inherits: ^derbis.turret
	Projectile: Bullet
		Image: tank_turrethusk_anim.atreides
	Warhead: CreateEffect
		Explosions: atreidis_turret_frame01, atreidis_turret_frame02, atreidis_turret_frame03, atreidis_turret_frame04

debris_turret01.atreides:
	Inherits: debris_turret.atreides
	Projectile: Bullet
		Image: tank_turrethusk_anim01.atreides

debris_turret.harkonnen:
	Inherits: ^derbis.turret
	Projectile: Bullet
		Image: tank_turrethusk_anim.harkonnen
	Warhead: CreateEffect
		Explosions: harkonnen_turret_frame01, harkonnen_turret_frame02, harkonnen_turret_frame03, harkonnen_turret_frame04

debris_turret01.harkonnen:
	Inherits: debris_turret.harkonnen
	Projectile: Bullet
		Image: tank_turrethusk_anim01.harkonnen

debris_turret.ordos:
	Inherits: ^derbis.turret
	Projectile: Bullet
		Image: tank_turrethusk_anim.ordos
	Warhead: CreateEffect
		Explosions: ordos_turret_frame01, ordos_turret_frame02, ordos_turret_frame03, ordos_turret_frame04


#
# Rock debris
#

derbisRock01:
	Inherits: Debris
	Projectile: Bullet
	Warhead@3Eff: CreateEffect
		Explosions: tiny_explosion
		ImpactActors: false
		ImpactSoundChance: 20
		ImpactSounds: new_derbisRock01.wav, new_derbisRock02.wav, new_derbisLight01.wav, new_DerbisHeavy01.wav, new_DerbisHeavy02.wav

derbisRock02:
	Inherits: Debris2
	Projectile: Bullet
		Image: shrapnel_rock02
		-TrailImage:
		Speed: 64, 90
		LaunchAngle: 20, 60
	Warhead@3Eff: CreateEffect
		Explosions: tiny_explosion
		ImpactActors: false
		ImpactSoundChance: 30
		ImpactSounds: new_derbisRock01.wav, new_derbisRock02.wav, new_derbisRock03.wav

derbisRock03:
	Inherits: Debris3
	Projectile: Bullet
		Image: shrapnel_rock01
		BounceSound: new_derbisRock02.wav
		Speed: 40, 70
		LaunchAngle: 40, 110
		-TrailImage:
	Warhead@3Eff: CreateEffect
		Explosions: tiny_explosion
		ImpactActors: false
		ImpactSoundChance: 20
		ImpactSounds: new_derbisRock01.wav, new_derbisRock03.wav



#
# Explosions
#
# tanks, siege and missile
UnitExplodeMed:
	Warhead@2Eff: CreateEffect
		ImpactSounds: new_HuskExplosion01.wav, new_HuskExplosion02.wav, new_DerbisHeavy01.wav
		ImpactSoundChance: 20
		Delay: 10
		ImpactActors: false
	Warhead@explosiondmg: SpreadDamage
		Damage: 1000
		Falloff: 100, 80
		DamageTypes: TriggerProne, SmallExplosionDeath
		DamageCalculationType: ClosestTargetablePosition
		Spread: 1c112
			none: 100
			wall: 20
			building: 20
			wood: 50
			light: 50
			heavy: 20
			concrete: 100
			invulnerable: 0
			cy: 20
			harvester: 30

BuildingExplode:
	Warhead@1Eff: CreateEffect
		Explosions: building
		ImpactActors: false
		Delay: 0
	Warhead@Smudges: LeaveSmudge
		SmudgeType: Building_smudge
		Size: 2,2

cliffExplode01:
	Warhead@1Eff: CreateEffect
		Explosions: building
		ImpactActors: false
		Delay: 0
		ImpactSounds: new_Cliff_Destroyed.wav
	Warhead@areadmg: TargetDamage
		Spread: 1c512
		Damage: 10000
		DamageTypes: SmallExplosionDeath
		Versus: 
			none: 100
			wall: 100
			building: 100
			buildingWeak: 100
			wood: 100
			light: 100
			heavy: 100
			invulnerable: 0
			cy: 100
			harvester: 100

buildingExplosions02:
	Warhead@2Eff: CreateEffect
		Explosions: self_destruct
		ImpactActors: false
		ImpactSounds: EXPLSML1.WAV
		Delay: 10
		Inaccuracy: 0c512
	Warhead@3Eff: CreateEffect
		Explosions: large_explosion
		ImpactActors: false
		ImpactSounds: ExplosionBuildingLightResonance01.wav
		Delay: 10
		Inaccuracy: 1c0

buildingExplosions03:
	Warhead@4Eff: CreateEffect
		Explosions: building, self_destruct, large_explosion
		ImpactActors: false
		ImpactSounds: new_DerbisBigExplosion01.wav
		ImpactSoundChance: 60
		Inaccuracy: 1c512
		Delay: 10

buildingExplosions04_big:
	Warhead@4Eff: CreateEffect
		Explosions: building, self_destruct, large_explosion
		ImpactActors: false
		ImpactSounds: bigxplosion17.wav
		Inaccuracy: 1c512
		Delay: 0

buildingExplosions05: # medium explosion
	Warhead@3Eff: CreateEffect
		Explosions: building
		ImpactActors: false
		ImpactSounds: explosion_large_2.wav
		Inaccuracy: 1c512
		Delay: 10

buildingBigExplosion: # used when building is demolished by saboteur
	Inherits: PlasmaExplosion
	Warhead@1Dam: SpreadDamage
		Spread: 3c0
		Damage: 5000
		Falloff: 100, 50
		ValidRelationships: Neutral, Enemy, Ally
	Warhead@flash: FlashPaletteEffect
		FlashType: UsePlayerColor
		Duration: 20
	Warhead@concrete: DamagesConcrete
		Damage: 10000
		AffectsParent: true
	-Warhead@2Dam:
	-Warhead@3Smu:
	-Warhead@4Smu:

huskExplode01:
	Warhead@1Eff: CreateEffect
		Explosions: building, self_destruct
		ImpactSounds: EXPLHG2.WAV , EBoD_MortarExplosion.wav, EXPLSML1.WAV
		ImpactActors: false
		ImpactSoundChance: 70


ExplosionWithDamege_large:
	Inherits: UnitExplodeLarge
	Warhead@dmg: SpreadDamage
		Damage: 2500
		Spread: 1c512
		DamageTypes: Prone50Percent, TriggerProne, ExplosionDeath

ExplosionAircraft:
	Warhead@sound: CreateEffect
		Explosions: building
		ImpactSounds: EXPLLG3.WAV
		Inaccuracy: 1c0
	Warhead@eff: CreateEffect
		Explosions: large_explosion
		ImpactSounds: bigxplosion17.wav
		ImpactActors: false
		Delay: 10
	Warhead@areadmg: TargetDamage
		Spread: 1c512
		Damage: 10000
		DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath
		Versus:
			none: 110
			light: 90
			heavy: 30
			building: 100
			harvester: 70
			buildingWeak: 100
			wall: 80
			invulnerable: 0
			cy: 30