Skip to content

Commit

Permalink
Add cluster grenade
Browse files Browse the repository at this point in the history
  • Loading branch information
Arch-Shaman committed Mar 4, 2021
1 parent 90afb5b commit baf8fb5
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
local name = "commweapon_clustergrenade_fragment"
weaponDef = {
name = [[Cluster Grenade Fragment]],
accuracy = 400,
areaOfEffect = 160,
avoidFeature = false,
craterBoost = 1,
craterMult = 2,
cegTag = [[flamer]],
customParams = {
--lups_heat_fx = [[firewalker]],
light_camera_height = 2500,
light_color = [[0.25 0.13 0.05]],
light_radius = 500,
},
damage = {
default = 120,
},
model = [[diskball.s3o]],
explosionGenerator = [[custom:TORPEDOHITHUGE]],
firestarter = 180,
impulseBoost = 0,
impulseFactor = 0.4,
interceptedByShieldType = 1,
myGravity = 0.25,
projectiles = 10,
range = 900,
reloadtime = 12,
rgbColor = [[1 0.5 0.2]],
size = 5,
soundHit = [[weapon/clusters/napalm_break]],
soundStart = [[weapon/cannon/wolverine_fire]],
soundStartVolume = 3.2,
sprayangle = 2500,
turret = true,
weaponType = [[Cannon]],
weaponVelocity = 320,
waterweapon = true,
}

return name, weaponDef
-- NOTE: This weapon is a SECONDARY STAGE PROJECTILE. It is not intended for use as an actual weapon!
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
local name = "commweapon_clustergrenade_fragment"
weaponDef = {
name = [[Cluster Grenade Fragment]],
accuracy = 400,
areaOfEffect = 160,
avoidFeature = false,
craterBoost = 1,
craterMult = 2,
cegTag = [[flamer]],
customParams = {
--lups_heat_fx = [[firewalker]],
light_camera_height = 2500,
light_color = [[0.25 0.13 0.05]],
light_radius = 500,
},
damage = {
default = 120,
},
model = [[diskball.s3o]],
explosionGenerator = [[custom:TORPEDOHITHUGE]],
firestarter = 180,
impulseBoost = 0,
impulseFactor = 0.4,
interceptedByShieldType = 1,
myGravity = 0.25,
projectiles = 10,
range = 900,
reloadtime = 12,
rgbColor = [[1 0.5 0.2]],
size = 5,
soundHit = [[weapon/clusters/napalm_break]],
soundStart = [[weapon/cannon/wolverine_fire]],
soundStartVolume = 3.2,
sprayangle = 2500,
turret = true,
weaponType = [[Cannon]],
weaponVelocity = 320,
waterweapon = true,
}

return name, weaponDef
-- NOTE: This weapon is a SECONDARY STAGE PROJECTILE. It is not intended for use as an actual weapon!
23 changes: 9 additions & 14 deletions gamedata/modularcomms/weapons/napalmgrenade.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
local name = "commweapon_napalmgrenade"
local name = "commweapon_clustergrenade"
local weaponDef = {
name = [[Hellfire Grenade]], --CREDITS: Cliver5
name = [[Cluster Grenade]],
areaOfEffect = 256,
avoidFeature = true,
--cegTag = [[missiletrailred]],
cegTag = [[RAVENTRAIL_Light]],
commandFire = true,
craterBoost = 0,
craterMult = 0,
craterBoost = 20,
craterMult = 1,

customParams = {
is_unit_weapon = 1,
Expand All @@ -16,7 +16,7 @@ local weaponDef = {
light_radius = 220,
manualfire = 1,
numprojectiles1 = 24, -- how many of the weapondef we spawn. OPTIONAL. Default: 1.
projectile1 = "commweapon_napalm_fragment_dummy",
projectile1 = "commweapon_clustergrenade_fragment_dummy",
--spreadradius = 8, -- used in clusters. OPTIONAL. Default: 100.
clustervec1 = "randomxyz", -- accepted values: randomx, randomy, randomz, randomxy, randomxz, randomyz, random. OPTIONAL. default: random.
keepmomentum1 = 0,
Expand All @@ -25,27 +25,22 @@ local weaponDef = {
noairburst = "by your powers combined", -- if true, this projectile will skip all airburst checks
onexplode = "how can this fail", -- if true, this projectile will cluster when it explodes
spawndist = 69420, -- at what distance should we spawn the projectile(s)? REQUIRED.
area_damage = 1,
area_damage_radius = 128,
area_damage_dps = 40,
area_damage_duration = 12,
},

damage = {
default = 1440,
default = 1920,
},

explosionGenerator = [[custom:napalm_hellfire]],
explosionGenerator = [[custom:MEDMISSILE_EXPLOSION]],
fireStarter = 70,
flightTime = 3,
impulseBoost = 0,
impulseFactor = 0.4,
interceptedByShieldType = 2,
model = [[wep_b_fabby.s3o]], --TODO: replace with SharkGameDev's better model. delete this once it's done.
range = 440,
reloadtime = 14,
smokeTrail = true,
soundHit = [[weapon/missile/nalpalm_missile_hit]],
soundHit = [[weapon/clusters/cluster_grenade_hit]],
soundHitVolume = 8,
SoundStart = [[weapon/cannon/light_launcher]],
trajectoryHeight = 1,
Expand Down
Binary file added sounds/weapon/clusters/cluster_grenade_hit.wav
Binary file not shown.

0 comments on commit baf8fb5

Please sign in to comment.