FILES ----- effects\elemental\largeicecloud.effectsource items\active\weapons\bossdrop\dragonhead\dragonhead.activeitem items\active\weapons\bossdrop\dragonhead\dragonhead.animation items\active\weapons\other\chargegun\chargegun.activeitem items\active\weapons\other\chargegun\chargegun.animation items\active\weapons\ranged\abilities\chargefire\chargefire.lua items\active\weapons\ranged\abilities\chargefire\chargefire.weaponability items\buildscripts\weaponabilities.config particles\elemental\largecloud\largeicecloud1.particle particles\elemental\largecloud\largeicecloud2.particle particles\elemental\largecloud\largeicecloud3.particle particles\elemental\largecloud\largeicecloud4.particle [NEW] projectiles\activeitems\iceburstcloud\iceburstcloud.frames [NEW] projectiles\activeitems\iceburstcloud\iceburstcloud.png [NEW] projectiles\activeitems\iceburstcloud\iceburstcloud.projectile [NEW] projectiles\activeitems\iceburstcloud\icon.png [NEW] projectiles\activeitems\iceburster\iceburster.frames [NEW] projectiles\activeitems\iceburster\iceburster.png [NEW] projectiles\activeitems\iceburster\iceburster.projectile DIFFS ----- effects\elemental\largeicecloud.effectsource 4c4 < "duration" : 0.03, --- > "duration" : 0.04, items\active\weapons\bossdrop\dragonhead\dragonhead.activeitem 28,29c28,52 < "primaryAbilityType" : "dragonfire", < "primaryAbility" : {}, --- > "primaryAbilityType" : "chargefire", > "primaryAbility" : { > "chargeLevels" : [ > { > "time" : 0, > "energyCost" : 5, > "cooldown" : 0.1, > "projectileType" : "dragonfiresmall", > "projectileParameters" : {}, > "inaccuracy" : 0.008, > "baseDamage" : 1.5, > "fireSound" : "fire" > }, > { > "time" : 1.0, > "energyCost" : 40, > "cooldown" : 0.5, > "projectileType" : "dragonfirelarge", > "projectileParameters" : {}, > "inaccuracy" : 0, > "baseDamage" : 12, > "fireSound" : "fire2" > } > ] > }, items\active\weapons\bossdrop\dragonhead\dragonhead.animation 105c105,106 < "fire" : [ ] --- > "fire" : ["/sfx/projectiles/fireball_poof.ogg"], > "fire2" : ["/sfx/projectiles/fireball_spit.ogg"] items\active\weapons\other\chargegun\chargegun.activeitem 29c29,67 < "primaryAbility" : {}, --- > "primaryAbility" : { > "chargeLevels" : [ > { > "time" : 0, > "energyCost" : 10, > "cooldown" : 0.25, > "projectileType" : "iceburster", > "projectileCount" : 1, > "projectileParameters" : {}, > "inaccuracy" : 0, > "baseDamage" : 3, > "fireSound" : "fire" > }, > { > "time" : 0.5, > "energyCost" : 20, > "cooldown" : 0.25, > "projectileType" : "iceburster", > "projectileCount" : 2, > "spreadAngle" : 10, > "projectileParameters" : {}, > "inaccuracy" : 0, > "baseDamage" : 3, > "fireSound" : "fire" > }, > { > "time" : 1.0, > "energyCost" : 30, > "cooldown" : 0.25, > "projectileType" : "iceburster", > "projectileCount" : 3, > "spreadAngle" : 10, > "projectileParameters" : {}, > "inaccuracy" : 0, > "baseDamage" : 3, > "fireSound" : "fire" > } > ] > }, items\active\weapons\other\chargegun\chargegun.animation 105c105 < "fire" : [ ] --- > "fire" : ["/sfx/gun/grapplegun.ogg"] items\active\weapons\ranged\abilities\chargefire\chargefire.lua 1a2 > require "/scripts/vec2.lua" 9c10 < self.cooldownTimer = self.chargeFireTime --- > self.cooldownTimer = 0 45c46,50 < self:setState(self.fire) --- > self.chargeLevel = self:currentChargeLevel() > local energyCost = (self.chargeLevel and self.chargeLevel.energyCost) or 0 > if self.chargeLevel and (energyCost == 0 or status.overConsumeResource("energy", energyCost)) then > self:setState(self.fire) > end 51c56,57 < animator.setAnimationState("firing", "fire") --- > animator.setAnimationState("firing", self.chargeLevel.fireAnimationState or "fire") > animator.playSound(self.chargeLevel.fireSound or "fire") 59,63c65 < if self.chargeTimer >= self.chargeTime then < self.cooldownTimer = self.chargeFireTime < else < self.cooldownTimer = self.fireTime < end --- > self.cooldownTimer = self.chargeLevel.cooldown or 0 86c88 < local pConfig = self.chargeTimer >= self.chargeTime and self.chargedProjectile or self.projectile --- > local projectileCount = self.chargeLevel.projectileCount or 1 88c90,91 < local params = copy(pConfig.parameters) --- > local params = copy(self.chargeLevel.projectileParameters or {}) > params.power = (self.chargeLevel.baseDamage * config.getParameter("damageLevelMultiplier")) / projectileCount 91c94,97 < for i = 1, pConfig.count or 1 do --- > local spreadAngle = util.toRadians(self.chargeLevel.spreadAngle or 0) > local totalSpread = spreadAngle * (projectileCount - 1) > local currentAngle = totalSpread * -0.5 > for i = 1, projectileCount do 96,97c102,103 < projectileId = world.spawnProjectile( < pConfig.type, --- > world.spawnProjectile( > self.chargeLevel.projectileType, 100c106 < self:aimVector(self.inaccuracy), --- > self:aimVector(currentAngle, self.chargeLevel.inaccuracy or 0), 103a110,111 > > currentAngle = currentAngle + spreadAngle 111,112c119,120 < function ChargeFire:aimVector(inaccuracy) < local aimVector = vec2.rotate({1, 0}, self.weapon.aimAngle + sb.nrand(inaccuracy, 0)) --- > function ChargeFire:aimVector(angleAdjust, inaccuracy) > local aimVector = vec2.rotate({1, 0}, self.weapon.aimAngle + angleAdjust + sb.nrand(inaccuracy, 0)) 117,123c125,135 < -- function ChargeFire:energyPerShot() < -- return self.energyUsage * self.fireTime * (self.energyUsageMultiplier or 1.0) < -- end < < -- function ChargeFire:damagePerShot() < -- return (self.baseDamage or (self.baseDps * self.fireTime)) * config.getParameter("damageLevelMultiplier") / self.projectileCount < -- end --- > function ChargeFire:currentChargeLevel() > local bestChargeTime = 0 > local bestChargeLevel > for _, chargeLevel in pairs(self.chargeLevels) do > if self.chargeTimer >= chargeLevel.time and self.chargeTimer >= bestChargeTime then > bestChargeTime = chargeLevel.time > bestChargeLevel = chargeLevel > end > end > return bestChargeLevel > end 125a138 > items\active\weapons\ranged\abilities\chargefire\chargefire.weaponability 8c8,9 < "baseDps" : 7, // TODO: apply damage calculation in script --- > "chargeLevels" : [ > // this is just a template; let implementing weapons overwrite this with real config 10,26c11,31 < "fireTime" : 0.1, < "chargeFireTime" : 0.5, < "chargeTime" : 1.0, < < "energyUsage" : 21, // TODO: use energy < "inaccuracy" : 0.008, < < "projectile" : { < "type" : "chargeshotsmall", < "count" : 1, < "parameters" : {} < }, < "chargedProjectile" : { < "type" : "chargeshotlarge", < "count" : 1, < "parameters" : {} < }, --- > // { > // "time" : 0, > // "energyCost" : 5, > // "cooldown" : 0.1, > // "projectileType" : "chargeshotsmall", > // "projectileParameters" : {}, > // "inaccuracy" : 0.02, > // "baseDamage" : 0.75, > // "fireSound" : "fire" > // }, > // { > // "time" : 1.0, > // "energyCost" : 40, > // "cooldown" : 0.5, > // "projectileType" : "chargeshotlarge", > // "projectileParameters" : {}, > // "inaccuracy" : 0, > // "baseDamage" : 12, > // "fireSound" : "fire2" > // } > ], 32c37 < "twoHanded" : true, --- > "twoHanded" : false, 40c45 < "twoHanded" : true, --- > "twoHanded" : false, 49c54 < "twoHanded" : true, --- > "twoHanded" : false, 58c63 < "twoHanded" : true, --- > "twoHanded" : false, items\buildscripts\weaponabilities.config 66d65 < "dragonfire" : "/items/active/weapons/bossdrop/dragonhead/dragonfire.weaponability", particles\elemental\largecloud\largeicecloud1.particle 19c19,20 < } --- > }, > "collidesForeground" : false particles\elemental\largecloud\largeicecloud2.particle 18c18,19 < } --- > }, > "collidesForeground" : false particles\elemental\largecloud\largeicecloud3.particle 18c18,19 < } --- > }, > "collidesForeground" : false particles\elemental\largecloud\largeicecloud4.particle 15c15,16 < } --- > }, > "collidesForeground" : false