FILES ----- [NEW] items\active\weapons\weapon2.lua [NEW] items\active\weapons\melee\meleeslash.lua items\active\weapons\melee\meleeweapon.lua items\active\weapons\melee\altabilities\broadsword\dashattack.altability items\active\weapons\melee\altabilities\broadsword\dashattack.lua items\active\weapons\melee\altabilities\broadsword\leapattack.altability items\active\weapons\melee\altabilities\broadsword\leapattack.lua items\active\weapons\melee\altabilities\broadsword\bladecharge\bladecharge.altability items\active\weapons\melee\altabilities\broadsword\bladecharge\bladecharge.lua items\active\weapons\melee\altabilities\broadsword\downstab\downstab.altability items\active\weapons\melee\altabilities\broadsword\downstab\downstab.lua items\active\weapons\melee\altabilities\broadsword\giantsword\giantsword.altability items\active\weapons\melee\altabilities\broadsword\giantsword\giantsword.lua items\active\weapons\melee\altabilities\broadsword\parry\parry.altability items\active\weapons\melee\altabilities\broadsword\parry\parry.lua items\active\weapons\melee\altabilities\broadsword\risingslash\risingslash.altability items\active\weapons\melee\altabilities\broadsword\risingslash\risingslash.lua items\active\weapons\melee\altabilities\broadsword\travelingslash\travelingslash.altability items\active\weapons\melee\altabilities\broadsword\travelingslash\travelingslash.lua items\active\weapons\melee\altabilities\generic\blinkexplosion\blinkexplosion.altability items\active\weapons\melee\altabilities\generic\blinkexplosion\blinkexplosion.lua items\active\weapons\melee\altabilities\hammer\shockwave\shockwave.altability items\active\weapons\melee\altabilities\hammer\shockwave\shockwave.lua items\active\weapons\melee\altabilities\hammer\uppercut\uppercut.altability items\active\weapons\melee\altabilities\hammer\uppercut\uppercut.lua items\active\weapons\melee\altabilities\spear\barrier\barrier.altability items\active\weapons\melee\altabilities\spear\barrier\barrier.lua items\active\weapons\melee\altabilities\spear\charge\charge.altability items\active\weapons\melee\altabilities\spear\charge\charge.lua items\active\weapons\melee\altabilities\spear\flurry\flurry.altability items\active\weapons\melee\altabilities\spear\flurry\flurry.lua items\active\weapons\melee\altabilities\spear\spin\spin.altability items\active\weapons\melee\altabilities\spear\spin\spin.lua items\active\weapons\melee\axe\axe.animation items\active\weapons\melee\axe\commonaxe.activeitem items\active\weapons\melee\axe\rareaxe.activeitem items\active\weapons\melee\axe\uncommonaxe.activeitem items\active\weapons\melee\broadsword\broadsword.animation items\active\weapons\melee\broadsword\commonbroadsword.activeitem items\active\weapons\melee\broadsword\rarebroadsword.activeitem items\active\weapons\melee\broadsword\uncommonbroadsword.activeitem items\active\weapons\melee\dagger\commondagger.activeitem items\active\weapons\melee\dagger\dagger.animation items\active\weapons\melee\dagger\raredagger.activeitem items\active\weapons\melee\dagger\uncommondagger.activeitem items\active\weapons\melee\hammer\commonhammer.activeitem items\active\weapons\melee\hammer\hammer.animation items\active\weapons\melee\hammer\hammer.lua items\active\weapons\melee\hammer\rarehammer.activeitem items\active\weapons\melee\hammer\uncommonhammer.activeitem items\active\weapons\melee\shortsword\commonshortsword.activeitem items\active\weapons\melee\shortsword\rareshortsword.activeitem items\active\weapons\melee\shortsword\shortsword.animation items\active\weapons\melee\shortsword\uncommonshortsword.activeitem items\active\weapons\melee\spear\commonspear.activeitem items\active\weapons\melee\spear\rarespear.activeitem items\active\weapons\melee\spear\spear.animation items\active\weapons\melee\spear\spear.lua items\active\weapons\melee\spear\uncommonspear.activeitem items\fishing\fishingrod.sword items\swords\apex\broadsword\apexstarter.sword items\swords\apex\broadsword\apextier10broadsword.sword items\swords\apex\broadsword\apextier1broadsword.sword items\swords\apex\broadsword\apextier2broadsword.sword items\swords\apex\broadsword\apextier3broadsword.sword items\swords\apex\broadsword\apextier4broadsword.sword items\swords\apex\broadsword\apextier8broadsword.sword items\swords\apex\broadsword\unused\apextier5broadsword.sword items\swords\apex\broadsword\unused\apextier6broadsword.sword items\swords\apex\broadsword\unused\apextier7broadsword.sword items\swords\apex\broadsword\unused\apextier9broadsword.sword items\swords\apex\shortsword\apextier0shortsword.sword items\swords\apex\shortsword\apextier10shortsword.sword items\swords\apex\shortsword\apextier1shortsword.sword items\swords\apex\shortsword\apextier2shortsword.sword items\swords\apex\shortsword\apextier3shortsword.sword items\swords\apex\shortsword\apextier4shortsword.sword items\swords\apex\shortsword\apextier8shortsword.sword items\swords\apex\shortsword\unused\apextier5shortsword.sword items\swords\apex\shortsword\unused\apextier6shortsword.sword items\swords\apex\shortsword\unused\apextier7shortsword.sword items\swords\apex\shortsword\unused\apextier9shortsword.sword items\swords\avian\broadsword\avianstarter.sword items\swords\avian\broadsword\aviantier10broadsword.sword items\swords\avian\broadsword\aviantier1broadsword.sword items\swords\avian\broadsword\aviantier2broadsword.sword items\swords\avian\broadsword\aviantier3broadsword.sword items\swords\avian\broadsword\aviantier4broadsword.sword items\swords\avian\broadsword\aviantier8broadsword.sword items\swords\avian\broadsword\unused\aviantier5broadsword.sword items\swords\avian\broadsword\unused\aviantier6broadsword.sword items\swords\avian\broadsword\unused\aviantier7broadsword.sword items\swords\avian\broadsword\unused\aviantier9broadsword.sword items\swords\avian\shortsword\aviantier0shortsword.sword items\swords\avian\shortsword\aviantier10shortsword.sword items\swords\avian\shortsword\aviantier1shortsword.sword items\swords\avian\shortsword\aviantier2shortsword.sword items\swords\avian\shortsword\aviantier3shortsword.sword items\swords\avian\shortsword\aviantier4shortsword.sword items\swords\avian\shortsword\aviantier8shortsword.sword items\swords\avian\shortsword\unused\aviantier5shortsword.sword items\swords\avian\shortsword\unused\aviantier6shortsword.sword items\swords\avian\shortsword\unused\aviantier7shortsword.sword items\swords\avian\shortsword\unused\aviantier9shortsword.sword items\swords\biome\alpine\legendblade\legendblade.sword items\swords\biome\alpine\stonesword\stonesword.sword items\swords\biome\bioluminescent\lightsword.sword items\swords\biome\bioluminescent\watersword.sword items\swords\biome\bone\bonesword.sword items\swords\biome\colorful\crayonblue.sword items\swords\biome\colorful\crayongreen.sword items\swords\biome\colorful\crayonorange.sword items\swords\biome\colorful\crayonpurple.sword items\swords\biome\colorful\crayonred.sword items\swords\biome\colorful\crayonyellow.sword items\swords\biome\colorful\rainbowsword.sword items\swords\biome\mushroom\mushroomsword.sword items\swords\biome\slime\cutarrh.sword items\swords\biome\slime\katarrhna.sword items\swords\biome\wilderness\overgrownmower.sword items\swords\biome\wilderness\undergrowthtrimmer.sword items\swords\floran\broadsword\floranstarter.sword items\swords\floran\broadsword\florantier10broadsword.sword items\swords\floran\broadsword\florantier1broadsword.sword items\swords\floran\broadsword\florantier2broadsword.sword items\swords\floran\broadsword\florantier3broadsword.sword items\swords\floran\broadsword\florantier4broadsword.sword items\swords\floran\broadsword\florantier8broadsword.sword items\swords\floran\broadsword\unused\florantier5broadsword.sword items\swords\floran\broadsword\unused\florantier6broadsword.sword items\swords\floran\broadsword\unused\florantier7broadsword.sword items\swords\floran\broadsword\unused\florantier9broadsword.sword items\swords\floran\shortsword\florantier0shortsword.sword items\swords\floran\shortsword\florantier10shortsword.sword items\swords\floran\shortsword\florantier1shortsword.sword items\swords\floran\shortsword\florantier2shortsword.sword items\swords\floran\shortsword\florantier3shortsword.sword items\swords\floran\shortsword\florantier4shortsword.sword items\swords\floran\shortsword\florantier8shortsword.sword items\swords\floran\shortsword\unused\florantier5shortsword.sword items\swords\floran\shortsword\unused\florantier6shortsword.sword items\swords\floran\shortsword\unused\florantier7shortsword.sword items\swords\floran\shortsword\unused\florantier9shortsword.sword items\swords\glitch\broadsword\glitchstarter.sword items\swords\glitch\broadsword\glitchtier10broadsword.sword items\swords\glitch\broadsword\glitchtier1broadsword.sword items\swords\glitch\broadsword\glitchtier2broadsword.sword items\swords\glitch\broadsword\glitchtier3broadsword.sword items\swords\glitch\broadsword\glitchtier4broadsword.sword items\swords\glitch\broadsword\glitchtier8broadsword.sword items\swords\glitch\broadsword\unused\glitchtier5broadsword.sword items\swords\glitch\broadsword\unused\glitchtier6broadsword.sword items\swords\glitch\broadsword\unused\glitchtier7broadsword.sword items\swords\glitch\broadsword\unused\glitchtier9broadsword.sword items\swords\glitch\shortsword\glitchtier0shortsword.sword items\swords\glitch\shortsword\glitchtier10shortsword.sword items\swords\glitch\shortsword\glitchtier1shortsword.sword items\swords\glitch\shortsword\glitchtier2shortsword.sword items\swords\glitch\shortsword\glitchtier3shortsword.sword items\swords\glitch\shortsword\glitchtier4shortsword.sword items\swords\glitch\shortsword\glitchtier8shortsword.sword items\swords\glitch\shortsword\unused\glitchtier5shortsword.sword items\swords\glitch\shortsword\unused\glitchtier6shortsword.sword items\swords\glitch\shortsword\unused\glitchtier7shortsword.sword items\swords\glitch\shortsword\unused\glitchtier9shortsword.sword items\swords\human\broadsword\humanstarter.sword items\swords\human\broadsword\humantier10broadsword.sword items\swords\human\broadsword\humantier1broadsword.sword items\swords\human\broadsword\humantier2broadsword.sword items\swords\human\broadsword\humantier3broadsword.sword items\swords\human\broadsword\humantier4broadsword.sword items\swords\human\broadsword\humantier8broadsword.sword items\swords\human\broadsword\unused\humantier5broadsword.sword items\swords\human\broadsword\unused\humantier6broadsword.sword items\swords\human\broadsword\unused\humantier7broadsword.sword items\swords\human\broadsword\unused\humantier9broadsword.sword items\swords\human\shortsword\humantier0shortsword.sword items\swords\human\shortsword\humantier10shortsword.sword items\swords\human\shortsword\humantier1shortsword.sword items\swords\human\shortsword\humantier2shortsword.sword items\swords\human\shortsword\humantier3shortsword.sword items\swords\human\shortsword\humantier4shortsword.sword items\swords\human\shortsword\humantier8shortsword.sword items\swords\human\shortsword\unused\humantier5shortsword.sword items\swords\human\shortsword\unused\humantier6shortsword.sword items\swords\human\shortsword\unused\humantier7shortsword.sword items\swords\human\shortsword\unused\humantier9shortsword.sword items\swords\hylotl\broadsword\hylotlstarter.sword items\swords\hylotl\broadsword\hylotltier10broadsword.sword items\swords\hylotl\broadsword\hylotltier1broadsword.sword items\swords\hylotl\broadsword\hylotltier2broadsword.sword items\swords\hylotl\broadsword\hylotltier3broadsword.sword items\swords\hylotl\broadsword\hylotltier4broadsword.sword items\swords\hylotl\broadsword\hylotltier8broadsword.sword items\swords\hylotl\broadsword\unused\hylotltier5broadsword.sword items\swords\hylotl\broadsword\unused\hylotltier6broadsword.sword items\swords\hylotl\broadsword\unused\hylotltier7broadsword.sword items\swords\hylotl\broadsword\unused\hylotltier9broadsword.sword items\swords\hylotl\shortsword\hylotltier0shortsword.sword items\swords\hylotl\shortsword\hylotltier10shortsword.sword items\swords\hylotl\shortsword\hylotltier1shortsword.sword items\swords\hylotl\shortsword\hylotltier2shortsword.sword items\swords\hylotl\shortsword\hylotltier3shortsword.sword items\swords\hylotl\shortsword\hylotltier4shortsword.sword items\swords\hylotl\shortsword\hylotltier8shortsword.sword items\swords\hylotl\shortsword\unused\hylotltier5shortsword.sword items\swords\hylotl\shortsword\unused\hylotltier6shortsword.sword items\swords\hylotl\shortsword\unused\hylotltier7shortsword.sword items\swords\hylotl\shortsword\unused\hylotltier9shortsword.sword items\swords\other\flowerbouquet.sword items\swords\other\huntingknife.sword items\swords\randomgenerated\biome\bonesword.generatedsword items\swords\randomgenerated\biome\rustsword.generatedsword items\swords\randomgenerated\biome\toxicbroadsword.generatedsword items\swords\randomgenerated\dungeon\aviansword.generatedsword items\swords\randomgenerated\dungeon\floranmace.generatedsword items\swords\randomgenerated\dungeon\glitchsmallmace.generatedsword items\swords\randomgenerated\dungeon\nightstick.generatedsword items\swords\randomgenerated\dungeon\steelchair.generatedsword items\swords\randomgenerated\other\bonehammer.generatedsword items\swords\randomgenerated\other\eyesword.generatedsword items\swords\randomgenerated\other\firesword.generatedsword items\swords\randomgenerated\other\fryingpan.generatedsword items\swords\randomgenerated\other\starcleaversword.generatedsword items\swords\randomgenerated\other\watersword.generatedsword items\swords\randomgenerated\standard\commonbroadsword.generatedsword items\swords\randomgenerated\standard\commonshortsword.generatedsword items\swords\randomgenerated\standard\rarebroadsword.generatedsword items\swords\randomgenerated\standard\rareshortsword.generatedsword items\swords\randomgenerated\standard\uncommonbroadsword.generatedsword items\swords\randomgenerated\standard\uncommonshortsword.generatedsword items\swords\randomgenerated\unused\mushroomsword.generatedsword items\swords\unsorted\rockbat.sword items\tools\bugnet.sword [NEW] scripts\poly.lua scripts\util.lua [NEW] sfx\melee\spear_twirl_loop.wav [NEW] sfx\melee\spear_twirl_loop_shorter.ogg [NEW] sfx\melee\spear_twirl_loop_windy.ogg [NEW] sfx\melee\spear_twirl_loop_windy_quieter.ogg [NEW] sfx\melee\spear_twirl_start.wav [NEW] sfx\melee\swing_axe_electric1.wav [NEW] sfx\melee\swing_axe_electric2.wav [NEW] sfx\melee\swing_axe_electric3.wav [NEW] sfx\melee\swing_axe_ice1.wav [NEW] sfx\melee\swing_axe_ice2.wav [NEW] sfx\melee\swing_axe_ice3.wav [NEW] sfx\melee\swing_axe_poison1.wav [NEW] sfx\melee\swing_axe_poison2.wav [NEW] sfx\melee\swing_axe_poison3.wav [NEW] sfx\melee\swing_broadsword.wav [NEW] sfx\melee\swing_broadsword_electric1.wav [NEW] sfx\melee\swing_broadsword_electric2.wav [NEW] sfx\melee\swing_broadsword_electric3.wav [NEW] sfx\melee\swing_broadsword_fire1.wav [NEW] sfx\melee\swing_broadsword_fire2.wav [NEW] sfx\melee\swing_broadsword_fire3.wav [NEW] sfx\melee\swing_broadsword_ice1.wav [NEW] sfx\melee\swing_broadsword_ice2.wav [NEW] sfx\melee\swing_broadsword_ice3.wav [NEW] sfx\melee\swing_broadsword_poison1.wav [NEW] sfx\melee\swing_broadsword_poison2.wav [NEW] sfx\melee\swing_broadsword_poison3.wav [NEW] sfx\melee\swing_broadsword_water1.wav [NEW] sfx\melee\swing_broadsword_water2.wav [NEW] sfx\melee\swing_broadsword_water3.wav [NEW] sfx\melee\swing_broadsword_water4.wav [NEW] sfx\melee\swing_dagger_electric1.wav [NEW] sfx\melee\swing_dagger_electric2.wav [NEW] sfx\melee\swing_dagger_electric3.wav [NEW] sfx\melee\swing_dagger_ice1.wav [NEW] sfx\melee\swing_dagger_ice2.wav [NEW] sfx\melee\swing_dagger_ice3.wav [NEW] sfx\melee\swing_dagger_poison1.wav [NEW] sfx\melee\swing_dagger_poison2.wav [NEW] sfx\melee\swing_dagger_poison3.wav [NEW] sfx\melee\swing_hammer_electric1.wav [NEW] sfx\melee\swing_hammer_electric2.wav [NEW] sfx\melee\swing_hammer_electric3.wav [NEW] sfx\melee\swing_hammer_ice1.wav [NEW] sfx\melee\swing_hammer_ice2.wav [NEW] sfx\melee\swing_hammer_ice3.wav [NEW] sfx\melee\swing_hammer_poison1.wav [NEW] sfx\melee\swing_hammer_poison2.wav [NEW] sfx\melee\swing_hammer_poison3.wav [NEW] sfx\melee\swing_shortsword.wav [NEW] sfx\melee\swing_shortsword_electric1.wav [NEW] sfx\melee\swing_shortsword_electric2.wav [NEW] sfx\melee\swing_shortsword_electric3.wav [NEW] sfx\melee\swing_shortsword_fire1.wav [NEW] sfx\melee\swing_shortsword_fire2.wav [NEW] sfx\melee\swing_shortsword_fire3.wav [NEW] sfx\melee\swing_shortsword_ice1.wav [NEW] sfx\melee\swing_shortsword_ice2.wav [NEW] sfx\melee\swing_shortsword_ice3.wav [NEW] sfx\melee\swing_shortsword_poison1.wav [NEW] sfx\melee\swing_shortsword_poison2.wav [NEW] sfx\melee\swing_shortsword_poison3.wav [NEW] sfx\melee\swing_spear_electric1.wav [NEW] sfx\melee\swing_spear_electric2.wav [NEW] sfx\melee\swing_spear_electric3.wav [NEW] sfx\melee\swing_spear_ice1.wav [NEW] sfx\melee\swing_spear_ice2.wav [NEW] sfx\melee\swing_spear_ice3.wav [NEW] sfx\melee\swing_spear_poison1.wav [NEW] sfx\melee\swing_spear_poison2.wav [NEW] sfx\melee\swing_spear_poison3.wav DIFFS ----- items\active\weapons\melee\meleeweapon.lua 3c3,4 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" > require "/items/active/weapons/melee/meleeslash.lua" 6c7,8 < weapon.setGeneratedMeleeStats() --- > animator.setGlobalTag("directives", "") > animator.setGlobalTag("bladeDirectives", "") 8,9c10 < self.attackTimer = 0 < self.stances = item.instanceValue("stances") --- > self.weapon = Weapon:new(meleeWeaponConfig()) 11,27c12,13 < cooldown() < end < < function activate(fireMode, shiftHeld) < weapon.activate() < end < < function update(dt, fireMode, shiftHeld) < self.attackTimer = math.max(0, self.attackTimer - dt) < < if self.attackState == "idle" then < weapon.meleeUpdateAim(self.stances.idle.allowRotate, self.stances.idle.allowFlip) < activeItem.setFacingDirection(self.aimDirection) < if fireMode == "primary" and self.attackTimer == 0 then < windup() < end < end --- > self.weapon:addTransformationGroup("weapon", {0,0}, 0) > self.weapon:addTransformationGroup("swoosh", {0,0}, math.pi/2) 29,34c15,16 < if self.attackState == "windup" then < weapon.meleeUpdateAim(self.stances.windup.allowRotate, self.stances.windup.allowFlip) < if self.attackTimer == 0 then < swing() < end < end --- > local primaryAttack = MeleeSlash:new(meleeAttackConfig(item.instanceValue("primaryAttack"), self.weapon.elementalType), item.instanceValue("stances")) > self.weapon:addAbility(primaryAttack) 36,42c18,20 < if self.attackState == "swing" then < weapon.meleeUpdateAim(self.stances.swing.allowRotate, self.stances.swing.allowFlip) < if self.attackTimer > 0 then < weapon.setDamage() < else < cooldown() < end --- > local secondaryAttack = getAltAbility() > if secondaryAttack then > self.weapon:addAbility(secondaryAttack) 44d21 < end 46,49c23 < function idle() < self.attackState = "idle" < weapon.setStance(self.stances.idle) < weapon.clearDamage() --- > self.weapon:init() 52,64c26,27 < function windup() < self.attackState = "windup" < self.attackTimer = self.stances.windup.duration < weapon.setStance(self.stances.windup) < end < < function swing() < self.attackState = "swing" < self.attackTimer = self.stances.swing.duration < weapon.setStance(self.stances.swing) < animator.setAnimationState("swoosh", "swing") < animator.playSound("fire") < animator.burstParticleEmitter(self.elementalType .. "swoosh") --- > function update(dt, fireMode, shiftHeld) > self.weapon:update(dt, fireMode, shiftHeld) 67,69c30,31 < function cooldown() < self.attackTimer = self.fireTime - self.stances.windup.duration - self.stances.swing.duration < idle() --- > function uninit() > self.weapon:uninit() items\active\weapons\melee\altabilities\broadsword\dashattack.altability 11d10 < "baseDamage" : [5, 12], 13a13,21 > > "damageConfig" : { > "baseDamage" : 5, > "knockback" : 0, > "timeout" : 0.4, > "timeoutGroup" : "alt" > }, > "baseDamageRange" : [5, 12], // overrides baseDamage in damageConfig > 17,19c25,31 < "armRotation" : [70, 100], < "weaponRotation" : [0, 0], < "twoHanded" : true --- > "armRotation" : 70, > "endArmRotation" : 100, > "weaponRotation" : 0, > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true 24c36,39 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true items\active\weapons\melee\altabilities\broadsword\dashattack.lua 2c2 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" 5c5 < local dashAttack = altAbilityConfig --- > local dashAttack = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,8c7,8 < function dashAttack.init() < -- world.logInfo("Initializing dash attack") --- > function dashAttack:init() > self.cooldownTimer = self.cooldownTime 11,18c11,12 < function dashAttack.update(dt, fireMode, shiftHeld) < if self.attackState == "idle" < and fireMode == "alt" < and self.attackTimer == 0 < and status.overConsumeResource("energy", dashAttack.energyCost[1]) then < < dashAttack.windup() < end --- > function dashAttack:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 20,39c14 < if self.attackState == "dashAttack.windup" then < weapon.meleeUpdateAim(false,false) < dashAttack.chargeTimer = math.min(dashAttack.chargeTimer + dt, dashAttack.chargeTime) < < local energyCost = (dashAttack.energyCost[2] - dashAttack.energyCost[1]) * dashAttack.chargeTime * dt < if fireMode == "alt" < and (dashAttack.chargeTimer == dashAttack.chargeTime or status.overConsumeResource("energy", energyCost)) then < < dashAttack.chargeRatio = dashAttack.chargeTimer / dashAttack.chargeTime < local windupStance = { < armRotation = util.lerp(dashAttack.chargeRatio, dashAttack.stances.windup.armRotation), < weaponRotation = util.lerp(dashAttack.chargeRatio, dashAttack.stances.windup.weaponRotation), < twoHanded = dashAttack.stances.windup.twoHanded < } < weapon.setStance(windupStance) < mcontroller.controlModifiers({runningSuppressed=true}) < else < dashAttack.dash() < end < end --- > self.cooldownTimer = math.max(0, self.cooldownTimer - self.dt) 41,52c16,17 < if self.attackState == "dashAttack.dash" then < weapon.meleeUpdateAim(false,false) < if self.attackTimer > 0 then < mcontroller.controlParameters({runSpeed=dashAttack.dashSpeed}) < mcontroller.controlMove(mcontroller.facingDirection()) < mcontroller.controlApproachXVelocity(mcontroller.facingDirection() * dashAttack.dashSpeed, dashAttack.dashControlForce) < weapon.setDamage({baseDamage = util.lerp(dashAttack.chargeRatio, dashAttack.baseDamage),knockback=0}) < else < animator.setParticleEmitterActive("movement", false) < self.attackTimer = dashAttack.cooldownTime < idle() < end --- > if self.weapon.currentAbility == nil and self.fireMode == "alt" and self.cooldownTimer == 0 and status.overConsumeResource("energy", self.energyCost[1]) then > self:setState(self.windup) 56,59c21,37 < function dashAttack.windup() < self.attackState = "dashAttack.windup" < dashAttack.chargeTimer = 0 < dashAttack.chargeRatio = 0 --- > function dashAttack:windup() > self.weapon:setStance(self.stances.windup) > self.weapon:updateAim() > > local chargeTimer = 0 > local chargeRatio = 0 > local energyCost = (self.energyCost[2] - self.energyCost[1]) * self.chargeTime * self.dt > while self.fireMode == "alt" and (self.chargeTimer == self.chargeTime or status.overConsumeResource("energy", energyCost)) do > chargeTimer = math.min(chargeTimer + self.dt, self.chargeTime) > chargeRatio = chargeTimer / self.chargeTime > > self.weapon.relativeArmRotation = util.toRadians(util.lerp(chargeRatio, {self.stances.windup.armRotation, self.stances.windup.endArmRotation})) > mcontroller.controlModifiers({runningSuppressed=true}) > coroutine.yield() > end > > self:setState(self.dash, chargeRatio) 62,65c40,43 < function dashAttack.dash() < self.attackState = "dashAttack.dash" < self.attackTimer = util.lerp(dashAttack.chargeRatio, dashAttack.dashTime) < weapon.setStance(dashAttack.stances.dash) --- > function dashAttack:dash(chargeRatio) > self.weapon:setStance(self.stances.dash) > self.weapon:updateAim() > 67c45 < animator.setAnimationState("swoosh", "slash") --- > animator.setAnimationState("swoosh", "fire") 68a47,63 > > self.damageConfig.baseDamage = util.lerp(chargeRatio, self.baseDamageRange) > util.wait(util.lerp(chargeRatio, self.dashTime), function(dt) > mcontroller.controlParameters({runSpeed=self.dashSpeed}) > mcontroller.controlMove(mcontroller.facingDirection()) > mcontroller.controlApproachXVelocity(mcontroller.facingDirection() * self.dashSpeed, self.dashControlForce) > > local damageArea = partDamageArea("swoosh") or partDamageArea("blade") > self.weapon:setDamage(self.damageConfig, damageArea) > end) > > self.cooldownTimer = self.cooldownTime > end > > function dashAttack:uninit() > self.weapon:setDamage() > animator.setParticleEmitterActive("movement", false) items\active\weapons\melee\altabilities\broadsword\leapattack.altability 10c10,12 < "baseDamage" : 10 --- > "baseDamage" : 10, > "timeout" : 1.0, > "timeoutGroup" : "alt" 22c24,27 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 29c34,37 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 35c43,46 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 41c52,55 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false items\active\weapons\melee\altabilities\broadsword\leapattack.lua 0a1,3 > require "/scripts/util.lua" > require "/items/active/weapons/weapon2.lua" > 2c5 < local leapAttack = altAbilityConfig --- > local leapAttack = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 4,5c7 < function leapAttack.init() < -- world.logInfo("Initializing leap attack") --- > function leapAttack:init() 8,25c10,11 < function leapAttack.update(dt, fireMode, shiftHeld) < if self.attackState == "idle" < and fireMode == "alt" < and self.attackTimer == 0 < and mcontroller.onGround() < and status.overConsumeResource("energy", leapAttack.energyCost) then < < leapAttack.windup() < end < < if self.attackState == "leapAttack.windup" then < weapon.meleeUpdateAim(false,false) < if self.attackTimer > 0 then < mcontroller.controlCrouch() < else < leapAttack.leap() < end < end --- > function leapAttack:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 27,34c13,14 < if self.attackState == "leapAttack.leap" then < weapon.meleeUpdateAim(false,false) < if mcontroller.yVelocity() > 0 then < mcontroller.controlParameters(leapAttack.leapMovementParameters) < mcontroller.controlMove(mcontroller.facingDirection()) < else < leapAttack.drop() < end --- > if self.weapon.currentAbility == nil and self.fireMode == "alt" and mcontroller.onGround() and status.overConsumeResource("energy", self.energyCost) then > self:setState(self.windup) 35a16 > end 37,54c18,24 < if self.attackState == "leapAttack.drop" then < weapon.meleeUpdateAim(false,false) < if self.attackTimer == 0 or mcontroller.liquidPercentage() > 0.5 then < animator.setAnimationRate(1.0) < animator.setParticleEmitterActive("movement", false) < idle() < else < if mcontroller.onGround() then < animator.setAnimationRate(1.0) < animator.setParticleEmitterActive("movement", false) < leapAttack.land() < else < weapon.setDamage(leapAttack.damageConfig) < mcontroller.controlParameters(leapAttack.leapMovementParameters) < mcontroller.controlMove(mcontroller.facingDirection()) < end < end < end --- > function leapAttack:windup() > self.weapon:setStance(self.stances.windup) > self.weapon:updateAim() > > util.wait(self.stances.windup.duration, function(dt) > mcontroller.controlCrouch() > end) 56,64c26 < if self.attackState == "leapAttack.land" then < weapon.meleeUpdateAim(false,false) < if self.attackTimer > 0 then < -- mcontroller.controlModifiers({movementSuppressed = true}) < mcontroller.controlCrouch() < else < idle() < end < end --- > self:setState(self.leap) 67,71c29,31 < function leapAttack.windup() < self.attackState = "leapAttack.windup" < self.attackTimer = leapAttack.stances.windup.duration < weapon.setStance(leapAttack.stances.windup) < end --- > function leapAttack:leap() > self.weapon:setStance(self.stances.leap) > self.weapon:updateAim() 73,76d32 < function leapAttack.leap() < self.attackState = "leapAttack.leap" < self.attackTimer = leapAttack.stances.leap.duration < weapon.setStance(leapAttack.stances.leap) 78,80c34,36 < leapAttack.stances.leap.velocity[1] * mcontroller.facingDirection(), < leapAttack.stances.leap.velocity[2] < }) --- > self.stances.leap.velocity[1] * mcontroller.facingDirection(), > self.stances.leap.velocity[2] > }) 81a38,45 > > while mcontroller.yVelocity() > 0 do > mcontroller.controlParameters(self.leapMovementParameters) > mcontroller.controlMove(mcontroller.facingDirection()) > coroutine.yield() > end > > self:setState(self.drop) 84,87c48,51 < function leapAttack.drop() < self.attackState = "leapAttack.drop" < self.attackTimer = leapAttack.stances.drop.duration < weapon.setStance(leapAttack.stances.drop) --- > function leapAttack:drop() > self.weapon:setStance(self.stances.drop) > self.weapon:updateAim() > 89c53 < animator.setAnimationState("swoosh", "slash") --- > animator.setAnimationState("swoosh", "fire") 90a55,68 > > util.wait(self.stances.drop.duration, function(dt) > if mcontroller.liquidMovement() or mcontroller.onGround() then return true end > > local damageArea = partDamageArea("swoosh") or partDamageArea("blade") > self.weapon:setDamage(self.damageConfig, damageArea) > > mcontroller.controlParameters(self.leapMovementParameters) > mcontroller.controlMove(mcontroller.facingDirection()) > end) > > if mcontroller.onGround() then > self:setState(self.land) > end 93,96c71,75 < function leapAttack.land() < self.attackState = "leapAttack.land" < self.attackTimer = leapAttack.stances.land.duration < weapon.setStance(leapAttack.stances.land) --- > function leapAttack:land() > self:reset() > self.weapon:setStance(self.stances.land) > self.weapon:updateAim() > 98c77,90 < weapon.clearDamage() --- > > util.wait(self.stances.land.duration, function(dt) > mcontroller.controlCrouch() > end) > end > > function leapAttack:reset() > self.weapon:setDamage() > animator.setAnimationRate(1.0) > animator.setParticleEmitterActive("movement", false) > end > > function leapAttack:uninit() > self:reset() items\active\weapons\melee\altabilities\broadsword\bladecharge\bladecharge.altability 47a48,53 > "damageConfig" : { > "baseDamage" : 12, > "timeoutGroup" : "alt", > "timeout" : 0.5 > }, > 49d54 < "baseDamage" : 12, 51a57 > 56c62,65 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true 62c71,74 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false items\active\weapons\melee\altabilities\broadsword\bladecharge\bladecharge.lua 2c2 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" 5c5 < local bladeCharge = altAbilityConfig --- > local bladeCharge = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,10c7,8 < function bladeCharge.init() < animator.setAnimationState("bladeCharge", "idle") < animator.setParticleEmitterActive("bladeCharge", false) < animator.setPartTag("blade", "directives", "") --- > function bladeCharge:init() > bladeCharge:reset() 11a10 > self.cooldownTimer = 0 13,14c12,13 < local damageAmount = bladeCharge.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() < bladeCharge.energyUsage = bladeCharge.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * damageAmount --- > local damageAmount = self.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() > self.energyUsage = self.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * damageAmount 17,22c16,17 < function bladeCharge.update(dt, fireMode, shiftHeld) < if self.attackState == "idle" < and not status.resourceLocked("energy") < and fireMode == "alt" then < bladeCharge.windup() < end --- > function bladeCharge:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 24,34c19,22 < if self.attackState == "bladeCharge.windup" then < weapon.meleeUpdateAim(false, true) < bladeCharge.chargeTimer = math.max(0, bladeCharge.chargeTimer - dt) < < if bladeCharge.chargeTimer == 0 and fireMode ~= "alt" and status.overConsumeResource("energy", bladeCharge.energyUsage) then < bladeCharge.slash() < elseif fireMode ~= "alt" then < bladeCharge.idle() < elseif bladeCharge.chargeTimer == 0 then < animator.setGlobalTag("bladeDirectives", "border=3;"..bladeCharge.chargeBorder..";00000000") < end --- > self.cooldownTimer = math.max(0, self.cooldownTimer - self.dt) > > if self.cooldownTimer == 0 and not self.weapon.currentAbility and not status.resourceLocked("energy") and self.fireMode == "alt" then > self:setState(self.windup) 35a24 > end 37,38c26,27 < if self.attackState == "bladeCharge.slash" then < weapon.meleeUpdateAim(false, false) --- > function bladeCharge:windup() > self.weapon:setStance(self.stances.windup) 40,43c29,36 < if self.attackTimer > 0 then < weapon.setDamage({baseDamage = bladeCharge.baseDamage}) < else < bladeCharge.cooldown() --- > animator.setAnimationState("bladeCharge", "charge") > animator.setParticleEmitterActive("bladeCharge", true) > > local chargeTimer = self.chargeTime > while self.fireMode == "alt" do > chargeTimer = math.max(0, chargeTimer - self.dt) > if chargeTimer == 0 then > animator.setGlobalTag("bladeDirectives", "border=3;"..self.chargeBorder..";00000000") 44a38 > coroutine.yield() 46d39 < end 48,52c41,43 < function bladeCharge.idle() < animator.setGlobalTag("bladeDirectives", "") < animator.setParticleEmitterActive("bladeCharge", false) < animator.setAnimationState("bladeCharge", "idle") < idle() --- > if chargeTimer == 0 and status.overConsumeResource("energy", self.energyUsage) then > self:setState(self.slash) > end 55,58c46,48 < function bladeCharge.cooldown() < self.attackTimer = bladeCharge.cooldownTime < bladeCharge.idle() < end --- > function bladeCharge:slash() > self.weapon:setStance(self.stances.slash) > self.weapon:updateAim() 60,63c50,52 < function bladeCharge.windup() < self.attackState = "bladeCharge.windup" < weapon.setStance(bladeCharge.stances.windup) < bladeCharge.chargeTimer = bladeCharge.chargeTime --- > animator.setParticleEmitterActive("bladeCharge", false) > animator.setAnimationState("swoosh", "fire") > animator.playSound("fire") 65,67c54,57 < animator.setAnimationState("bladeCharge", "charge") < animator.setParticleEmitterActive("bladeCharge", true) < end --- > util.wait(self.stances.slash.duration, function() > local damageArea = partDamageArea("swoosh") > self.weapon:setDamage(self.damageConfig, damageArea) > end) 69,72c59,60 < function bladeCharge.slash() < self.attackState = "bladeCharge.slash" < self.attackTimer = bladeCharge.stances.slash.duration < weapon.setStance(bladeCharge.stances.slash) --- > self.cooldownTimer = self.cooldownTime > end 73a62,63 > function bladeCharge:reset() > animator.setGlobalTag("bladeDirectives", "") 75,76c65,69 < animator.setAnimationState("swoosh", "slash") < animator.playSound("fire") --- > animator.setAnimationState("bladeCharge", "idle") > end > > function bladeCharge:uninit() > bladeCharge:reset() items\active\weapons\melee\altabilities\broadsword\downstab\downstab.altability 13c13,15 < "statusEffects" : [ "damagefreeze" ] --- > "statusEffects" : [ "damagefreeze" ], > "timeout" : 0.2, > "timeoutGroup" : "alt" 15d16 < "damageTimeout" : 0.2, 27c28,31 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true 33c37,40 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true items\active\weapons\melee\altabilities\broadsword\downstab\downstab.lua 3c3 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" 6c6 < local downstab = altAbilityConfig --- > local downstab = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 8,11c8,9 < function downstab.init() < downstab.cooldownTimer = downstab.cooldownTime < < downstab.damageListener = damageListener("inflictedHits", downstab.hitOther) --- > function downstab:init() > self.cooldownTimer = self.cooldownTime 14,22c12,13 < function downstab.update(dt, fireMode, shiftHeld) < downstab.cooldownTimer = math.max(0, downstab.cooldownTimer - dt) < downstab.damageListener:update() < < if self.attackState == "idle" < and downstab.cooldownTimer == 0 < and fireMode == "alt" then < downstab.hold() < end --- > function downstab:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 24,25c15 < if self.attackState == "downstab.hold" then < weapon.meleeUpdateAim(false, true) --- > self.cooldownTimer = math.max(0, self.cooldownTimer - self.dt) 27,35c17,20 < mcontroller.controlParameters({ < airForce = downstab.holdAirControl < }) < < if self.attackTimer == 0 then < if mcontroller.yVelocity() < downstab.stabVelocity or mcontroller.onGround() then < downstab.stab() < end < end --- > if not self.weapon.currentAbility > and self.cooldownTimer == 0 > and self.fireMode == "alt" then > self:setState(self.hold) 36a22 > end 38,39c24,30 < if self.attackState == "downstab.stab" then < weapon.meleeUpdateAim(false, true) --- > function downstab:hold() > self.weapon:setStance(self.stances.hold) > self.weapon:setDamage() > > mcontroller.controlParameters({ > airForce = self.holdAirControl > }) 41c32 < weapon.setDamage(downstab.damageConfig, "blade", "", downstab.damageTimeout) --- > util.wait(self.stances.hold.duration) 43,49c34,35 < if self.attackTimer == 0 then < if mcontroller.yVelocity() > 0 then < downstab.hold() < elseif mcontroller.onGround() then < downstab.idle() < end < end --- > while mcontroller.yVelocity() > self.stabVelocity and not mcontroller.onGround() do > coroutine.yield() 51d36 < end 53,57c38 < function downstab.hold() < self.attackState = "downstab.hold" < self.attackTimer = downstab.stances.hold.duration < weapon.setStance(downstab.stances.hold) < weapon.clearDamage() --- > self:setState(self.stab) 60,64c41,44 < function downstab.stab() < self.attackState = "downstab.stab" < self.attackTimer = downstab.stances.stab.duration < weapon.setStance(downstab.stances.stab) < --- > function downstab:stab() > self.weapon:setStance(self.stances.stab) > self.weapon:updateAim() > 66d45 < end 68,71c47,63 < function downstab.hitOther(notifications) < if self.attackState == "downstab.stab" then < mcontroller.setYVelocity(downstab.bounceYVelocity) < downstab.hold() --- > local damageListener = damageListener("inflictedHits", function() > mcontroller.setYVelocity(self.bounceYVelocity) > self:setState(self.hold) > end) > > local duration = self.stances.stab.duration > while duration > 0 or not mcontroller.onGround() do > duration = math.max(0, duration - self.dt) > > local damageArea = partDamageArea("blade") > self.weapon:setDamage(self.damageConfig, damageArea) > if mcontroller.yVelocity() > 0 then > self:setState(self.hold) > end > > damageListener:update() > coroutine.yield() 75,78c67,69 < function downstab.idle() < weapon.clearDamage() < downstab.cooldownTimer = downstab.cooldownTime < idle() --- > function downstab:uninit() > self.weapon:setDamage() > self.cooldownTimer = self.cooldownTime 81,82c72,73 < function downstab.damageAmount() < return downstab.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() --- > function downstab:damageAmount() > return self.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() 85,86c76,77 < function downstab.energyUsage() < return downstab.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * downstab.damageAmount() --- > function downstab:energyUsage() > return self.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * self:damageAmount() items\active\weapons\melee\altabilities\broadsword\giantsword\giantsword.altability 165c165,169 < "baseDamage" : 12, --- > "damageConfig" : { > "baseDamage" : 12, > "timeoutGroup" : "alt", > "timeout" : 0.8 > }, 171c175,178 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true 177c184,187 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false items\active\weapons\melee\altabilities\broadsword\giantsword\giantsword.lua 2c2 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" 5c5 < local giantBladeAttack = altAbilityConfig --- > local giantBladeAttack = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,9c7,9 < function giantBladeAttack.init() < animator.setAnimationState("giantBlade", "idle") < animator.setParticleEmitterActive(self.elementalType.."SwordCharge", false) --- > function giantBladeAttack:init() > self.cooldownTimer = self.cooldownTime > self:reset() 12,17c12,15 < function giantBladeAttack.update(dt, fireMode, shiftHeld) < if self.attackState == "idle" < and not status.resourceLocked("energy") < and fireMode == "alt" then < giantBladeAttack.windup() < end --- > function giantBladeAttack:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) > > self.cooldownTimer = math.max(0, self.cooldownTimer - self.dt) 19,32c17,18 < if self.attackState == "giantBladeAttack.windup" then < weapon.meleeUpdateAim(false, true) < giantBladeAttack.chargeTimer = math.max(0, giantBladeAttack.chargeTimer - dt) < < if fireMode ~= "alt" then < local damageAmount = giantBladeAttack.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() < local energyUsage = giantBladeAttack.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * damageAmount < < if giantBladeAttack.chargeTimer == 0 and status.overConsumeResource("energy", energyUsage) then < giantBladeAttack.slash() < else < giantBladeAttack.idle() < end < end --- > if self.fireMode == "alt" and self.weapon.currentState == nil and self.cooldownTimer == 0 and not status.resourceLocked("energy")then > self:setState(self.windup) 33a20,24 > end > > function giantBladeAttack:windup() > self.weapon:setStance(self.stances.windup) > self.weapon:updateAim() 35,36c26,27 < if self.attackState == "giantBladeAttack.slash" then < weapon.meleeUpdateAim(false, false) --- > animator.setAnimationState("giantBlade", "charge") > animator.setParticleEmitterActive(self.weapon.elementalType.."SwordCharge", true) 38,42c29,32 < if self.attackTimer > 0 then < weapon.setDamage({baseDamage = giantBladeAttack.baseDamage}, "giantswoosh", "giantblade") < else < giantBladeAttack.cooldown() < end --- > local chargeTimer = self.chargeTime > while self.fireMode == "alt" do > chargeTimer = math.max(0, chargeTimer - self.dt) > coroutine.yield() 44d33 < end 46,49c35,37 < function giantBladeAttack.idle() < animator.setAnimationState("giantBlade", "idle") < animator.setParticleEmitterActive(self.elementalType.."SwordCharge", false) < idle() --- > if chargeTimer == 0 and status.overConsumeResource("energy", self:energyUsage()) then > self:setState(self.slash) > end 52,54c40,52 < function giantBladeAttack.cooldown() < self.attackTimer = giantBladeAttack.cooldownTime < giantBladeAttack.idle() --- > function giantBladeAttack:slash() > self.weapon:setStance(self.stances.slash) > self.weapon:updateAim() > > animator.setAnimationState("giantSwoosh", "slash") > animator.playSound("fire") > > util.wait(self.stances.slash.duration, function(dt) > local damageArea = partDamageArea("giantswoosh") > self.weapon:setDamage(self.damageConfig, damageArea) > end) > > self.cooldownTimer = self.cooldownTime 57,61c55,57 < function giantBladeAttack.windup() < self.attackState = "giantBladeAttack.windup" < weapon.setStance(giantBladeAttack.stances.windup) < giantBladeAttack.chargeTimer = giantBladeAttack.chargeTime < animator.setAnimationState("giantBlade", "charge") --- > function giantBladeAttack:damageAmount() > return self.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() > end 63c59,60 < animator.setParticleEmitterActive(self.elementalType.."SwordCharge", true) --- > function giantBladeAttack:energyUsage() > return self.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * self:damageAmount() 66,69c63,66 < function giantBladeAttack.slash() < self.attackState = "giantBladeAttack.slash" < self.attackTimer = giantBladeAttack.stances.slash.duration < weapon.setStance(giantBladeAttack.stances.slash) --- > function giantBladeAttack:reset() > animator.setAnimationState("giantBlade", "idle") > animator.setParticleEmitterActive(self.weapon.elementalType.."SwordCharge", false) > end 71,72c68,69 < animator.setAnimationState("giantSwoosh", "slash") < animator.playSound("fire") --- > function giantBladeAttack:uninit() > self:reset() items\active\weapons\melee\altabilities\broadsword\parry\parry.altability 9c9 < "cooldownTime" : 2.5, --- > "cooldownTime" : 1.2, 15c15,18 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true items\active\weapons\melee\altabilities\broadsword\parry\parry.lua 5c5 < local parry = altAbilityConfig --- > local parry = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,8c7,8 < function parry.init() < parry.cooldownTimer = 0 --- > function parry:init() > self.cooldownTimer = 0 11,12c11,12 < function parry.update(dt, fireMode, shiftHeld) < parry.cooldownTimer = math.max(0, parry.cooldownTimer - dt) --- > function parry:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 14,22c14 < if self.attackState == "idle" < and fireMode == "alt" < and parry.cooldownTimer == 0 then < < parry.parry() < end < < if self.attackState == "parry.parry" then < weapon.meleeUpdateAim(false,true) --- > self.cooldownTimer = math.max(0, self.cooldownTimer - dt) 24,32c16,17 < local blockPoly = animator.partPoly("blade", "damageArea") < activeItem.setShieldPolys({blockPoly}) < < if self.attackTimer == 0 or status.resource("shieldStamina") <= 0 then < parry.cooldownTimer = parry.cooldownTime < status.clearPersistentEffects("broadswordParry") < status.setResourcePercentage("shieldStamina", 1.0) < idle() < end --- > if self.weapon.currentAbility == nil and fireMode == "alt" and self.cooldownTimer == 0 then > self:setState(self.parry) 36,40c21,36 < function parry.parry() < self.attackState = "parry.parry" < weapon.setStance(parry.stances.parry) < status.setPersistentEffects("broadswordParry", {{stat = "shieldHealth", amount = parry.shieldHealth}}) < self.attackTimer = parry.parryTime --- > function parry:parry() > self.weapon:setStance(self.stances.parry) > self.weapon:updateAim() > > status.setPersistentEffects("broadswordParry", {{stat = "shieldHealth", amount = self.shieldHealth}}) > > local blockPoly = partDamageArea("blade") > activeItem.setShieldPolys({blockPoly}) > > util.wait(self.parryTime, function(dt) > --Interrupt when running out of shield stamina > return status.resource("shieldStamina") <= 0 > end) > > self.cooldownTimer = self.cooldownTime > activeItem.setShieldPolys({}) 43c39 < function parry.uninit() --- > function parry:uninit() items\active\weapons\melee\altabilities\broadsword\risingslash\risingslash.altability 62c62,64 < "statusEffects" : ["shortparalysis"] --- > "statusEffects" : ["shortparalysis"], > "timeout" : 0.3, > "timeoutGroup" : "alt" 64c66 < "damageTimeout" : 0.3, --- > 70c72,75 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 76c81,84 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 82c90,93 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false items\active\weapons\melee\altabilities\broadsword\risingslash\risingslash.lua 5c5 < local risingSlash = altAbilityConfig --- > local risingSlash = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,9c7,8 < function risingSlash.init() < animator.setGlobalTag("directives", "") < risingSlash.cooldownTimer = 0 --- > function risingSlash:init() > self:reset() 11,12c10 < local damageAmount = risingSlash.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() < risingSlash.energyUsage = risingSlash.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * damageAmount --- > self.cooldownTimer = 0 15,23c13,14 < function risingSlash.update(dt, fireMode, shiftHeld) < risingSlash.cooldownTimer = math.max(0, risingSlash.cooldownTimer - dt) < < if self.attackState == "idle" < and risingSlash.cooldownTimer == 0 < and not status.resourceLocked("energy") < and fireMode == "alt" then < risingSlash.windup() < end --- > function risingSlash:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 25,26c16 < if self.attackState == "risingSlash.windup" then < weapon.meleeUpdateAim(false, true) --- > self.cooldownTimer = math.max(0, self.cooldownTimer - dt) 28,34c18,19 < if self.attackTimer == 0 or status.resourceLocked("energy") then < if status.overConsumeResource("energy", risingSlash.energyUsage) then < risingSlash.slash() < else < risingSlash.idle() < end < end --- > if self.weapon.currentAbility == nil and self.cooldownTimer == 0 and not status.resourceLocked("energy") and self.fireMode == "alt" then > self:setState(self.windup) 35a21,25 > end > > function risingSlash:windup() > self.weapon:setStance(self.stances.windup) > self.weapon:updateAim() 37,38c27 < if self.attackState == "risingSlash.slash" then < weapon.meleeUpdateAim(false, false) --- > animator.setGlobalTag("directives", "?flipx") 40,41c29,31 < if self.attackTimer > 0 then < mcontroller.controlApproachYVelocity(risingSlash.dashSpeed, risingSlash.dashControlForce) --- > util.wait(self.stances.windup.duration, function() > return status.resourceLocked("energy") > end) 43,47c33,34 < weapon.setDamage(risingSlash.damageConfig, "risingSwoosh", "", risingSlash.damageTimeout) < else < risingSlash.cooldownTimer = risingSlash.cooldownTime < risingSlash.freeze() < end --- > if status.overConsumeResource("energy", self:energyUsage()) then > self:setState(self.slash) 48a36 > end 50,51c38,40 < if self.attackState == "risingSlash.freeze" then < weapon.meleeUpdateAim(false, false) --- > function risingSlash:slash() > self.weapon:setStance(self.stances.slash) > self.weapon:updateAim() 53,55c42,43 < if self.attackTimer == 0 then < risingSlash.idle() < end --- > animator.setAnimationState("risingSwoosh", "slash") > animator.playSound("fire") 57,59c45,46 < mcontroller.controlApproachVelocity({0,0}, risingSlash.dashControlForce) < end < end --- > util.wait(self.stances.slash.duration, function() > mcontroller.controlApproachYVelocity(self.dashSpeed, self.dashControlForce) 61,62c48,53 < function risingSlash.uninit() < animator.setGlobalTag("directives", "") --- > local damageArea = partDamageArea("risingSwoosh") > self.weapon:setDamage(self.damageConfig, damageArea) > end) > > self.cooldownTimer = self.cooldownTime > self:setState(self.freeze) 65,67c56,62 < function risingSlash.idle() < animator.setGlobalTag("directives", "") < idle() --- > function risingSlash:freeze() > self.weapon:setStance(self.stances.freeze) > self.weapon:updateAim() > > util.wait(self.stances.freeze.duration, function() > mcontroller.setVelocity({0,0}) > end) 70,74c65,66 < function risingSlash.windup() < self.attackState = "risingSlash.windup" < self.attackTimer = risingSlash.stances.windup.duration < weapon.setStance(risingSlash.stances.windup) < animator.setGlobalTag("directives", "?flipx") --- > function risingSlash:damageAmount() > return self.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() 77,80c69,71 < function risingSlash.slash() < self.attackState = "risingSlash.slash" < self.attackTimer = risingSlash.stances.slash.duration < weapon.setStance(risingSlash.stances.slash) --- > function risingSlash:energyUsage() > return self.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * self:damageAmount() > end 82,83c73,74 < animator.setAnimationState("risingSwoosh", "slash") < animator.playSound("fire") --- > function risingSlash:reset() > animator.setGlobalTag("directives", "") 86,89c77,78 < function risingSlash.freeze() < self.attackState = "risingSlash.freeze" < self.attackTimer = risingSlash.stances.freeze.duration < weapon.setStance(risingSlash.stances.freeze) --- > function risingSlash:uninit() > self:reset() items\active\weapons\melee\altabilities\broadsword\travelingslash\travelingslash.altability 24c24,26 < "baseDamage" : 10, --- > "damageConfig" : { > "baseDamage" : 10 > }, 33c35,38 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 39c44,47 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false items\active\weapons\melee\altabilities\broadsword\travelingslash\travelingslash.lua 5c5 < local travelingSlash = altAbilityConfig --- > local travelingSlash = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,8c7,8 < function travelingSlash.init() < travelingSlash.cooldownTimer = travelingSlash.cooldownTime --- > function travelingSlash:init() > self.cooldownTimer = self.cooldownTime 11,12c11,12 < function travelingSlash.update(dt, fireMode, shiftHeld) < travelingSlash.cooldownTimer = math.max(0, travelingSlash.cooldownTimer - dt) --- > function travelingSlash:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 14,26c14 < if self.attackState == "idle" < and fireMode == "alt" < and travelingSlash.cooldownTimer == 0 < and status.overConsumeResource("energy", travelingSlash.energyUsage()) then < travelingSlash.windup() < end < < if self.attackState == "travelingSlash.windup" then < weapon.meleeUpdateAim(false, false) < if self.attackTimer == 0 then < travelingSlash.fire() < end < end --- > self.cooldownTimer = math.max(0, self.cooldownTimer - dt) 28,32c16,17 < if self.attackState == "travelingSlash.fire" then < weapon.meleeUpdateAim(false, false) < if self.attackTimer == 0 then < travelingSlash.idle() < end --- > if self.weapon.currentAbility == nil and self.fireMode == "alt" and self.cooldownTimer == 0 and status.overConsumeResource("energy", self:energyUsage()) then > self:setState(self.windup) 36,45c21,23 < function travelingSlash.windup() < self.attackState = "travelingSlash.windup" < self.attackTimer = travelingSlash.stances.windup.duration < weapon.setStance(travelingSlash.stances.windup) < end < < function travelingSlash.fire() < self.attackState = "travelingSlash.fire" < self.attackTimer = travelingSlash.stances.fire.duration < weapon.setStance(travelingSlash.stances.fire) --- > function travelingSlash:windup() > self.weapon:setStance(self.stances.windup) > self.weapon:updateAim() 47c25 < travelingSlash.cooldownTimer = travelingSlash.cooldownTime --- > util.wait(self.stances.windup.duration) 49,50c27 < animator.playSound(self.elementalType.."TravelSlash") < travelingSlash.fireProjectile() --- > self:setState(self.fire) 53,56c30,32 < function travelingSlash.fireProjectile() < local projectile = travelingSlash.elementalProjectiles[self.elementalType] < local position = vec2.add(mcontroller.position(), travelingSlash.projectileOffset) < local aimVector = {mcontroller.facingDirection(), 0} --- > function travelingSlash:fire() > self.weapon:setStance(self.stances.fire) > self.weapon:updateAim() 57a34,36 > local projectile = self.elementalProjectiles[self.weapon.elementalType] > local position = vec2.add(mcontroller.position(), self.projectileOffset) > local aimVector = {mcontroller.facingDirection(), 0} 59c38 < power = travelingSlash.damageAmount() --- > power = self:damageAmount() 61a41,45 > > animator.playSound(self.weapon.elementalType.."TravelSlash") > > util.wait(self.stances.fire.duration) > self.cooldownTimer = self.cooldownTime 64,65c48,49 < function travelingSlash.idle() < idle() --- > function travelingSlash:damageAmount() > return self.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() 68,69c52,53 < function travelingSlash.damageAmount() < return travelingSlash.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() --- > function travelingSlash:energyUsage() > return self.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * self:damageAmount() 72,73c56 < function travelingSlash.energyUsage() < return travelingSlash.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * travelingSlash.damageAmount() --- > function travelingSlash:uninit() items\active\weapons\melee\altabilities\generic\blinkexplosion\blinkexplosion.altability 40,42c40 < "chargeTime" : 0.5, < "energyCost" : 100, < --- > "energyUsageMultiplier" : 1.0, 46,47c44,46 < < "baseDamage" : 10, --- > "damageConfig" : { > "baseDamage" : 10 > }, 56a56 > "duration" : 0.5, 60c60,63 < "weaponOffset" : [0.0, 0.0] --- > "weaponOffset" : [0.0, 0.0], > > "allowRotate" : false, > "allowFlip" : false items\active\weapons\melee\altabilities\generic\blinkexplosion\blinkexplosion.lua 7c7 < local blinkExplosion = altAbilityConfig --- > local blinkExplosion = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 9,11c9,10 < function blinkExplosion.init() < blinkExplosion.cooldownTimer = blinkExplosion.cooldownTime < status.setPersistentEffects("blinkExplosion", {}) --- > function blinkExplosion:init() > self.cooldownTimer = self.cooldownTime 14,15c13,16 < function blinkExplosion.update(dt, fireMode, shiftHeld) < blinkExplosion.cooldownTimer = math.max(0, blinkExplosion.cooldownTimer - dt) --- > function blinkExplosion:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) > > self.cooldownTimer = math.max(0, self.cooldownTimer - dt) 17,22c18,19 < if self.attackState == "idle" < and blinkExplosion.cooldownTimer == 0 < and fireMode == "alt" < and mcontroller.onGround() < and not status.resourceLocked("energy") then < blinkExplosion.charge() --- > if self.weapon.currentAbility == nil and fireMode == "alt" and self.cooldownTimer == 0 and mcontroller.onGround() and not status.resourceLocked("energy") then > self:setState(self.charge) 23a21 > end 25,26c23,25 < if self.attackState == "blinkExplosion.charge" then < weapon.meleeUpdateAim(false, false) --- > function blinkExplosion:charge() > self.weapon.aimAngle = 0 > self.weapon:setStance(self.stances.charge) 27a27,30 > status.setPersistentEffects("blinkExplosion", { { stat = "invulnerable", amount = 1.0}, self.weapon.elementalType.."charge" }) > animator.setAnimationState("blinkCharge", "charge") > > util.wait(self.stances.charge.duration, function(dt) 29,31c32,38 < if self.attackTimer == 0 and status.overConsumeResource("energy", blinkExplosion.energyUsage()) then < blinkExplosion.blink() < end --- > > -- Interrupt wait if we run out of energy > return status.resourceLocked("energy") > end) > > if status.overConsumeResource("energy", self:energyUsage()) then > self:setState(self.blink) 32a40 > end 34,35c42,44 < if self.attackState == "blinkExplosion.blink" then < weapon.meleeUpdateAim(false, false) --- > function blinkExplosion:blink() > status.setPersistentEffects("blinkExplosion", { { stat = "invulnerable", amount = 1.0} }) > status.addEphemeralEffect("blink") 36a46,47 > -- wait until a certain point in the blink animation > util.wait(0.25, function(dt) 37a49 > end) 39,42c51,53 < if self.attackTimer == 0 then < local damageAmount = blinkExplosion.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) < local projectileType = blinkExplosion.elementalProjectiles[self.elementalType] < world.spawnProjectile(projectileType, mcontroller.position(), activeItem.ownerEntityId(), {0,0}, false, {power = damageAmount, powerMultiplier = activeItem.ownerPowerMultiplier()}) --- > -- explode > local projectileType = self.elementalProjectiles[self.weapon.elementalType] > world.spawnProjectile(projectileType, mcontroller.position(), activeItem.ownerEntityId(), {0,0}, false, {power = self:damageAmount()}) 44,45c55,57 < local blinkPosition = blinkExplosion.findBlinkPosition() < mcontroller.setPosition(blinkPosition) --- > -- move to blink position > local blinkPosition = self:findBlinkPosition() > mcontroller.setPosition(blinkPosition) 47,49c59 < blinkExplosion.idle() < end < end --- > self.cooldownTimer = self.cooldownTime 52,53c62,63 < function blinkExplosion.uninit() < status.setPersistentEffects("blinkExplosion", {}) --- > function blinkExplosion:damageAmount() > return self.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() 56,57c66,67 < function blinkExplosion.energyUsage() < return blinkExplosion.energyCost * activeItem.ownerPowerMultiplier() --- > function blinkExplosion:energyUsage() > return self.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * self:damageAmount() 60,76c70,71 < function blinkExplosion.charge() < self.attackState = "blinkExplosion.charge" < self.aimAngle = 0 < weapon.setStance(blinkExplosion.stances.charge) < self.attackTimer = blinkExplosion.chargeTime < < status.setPersistentEffects("blinkExplosion", { { stat = "invulnerable", amount = 1.0}, self.elementalType.."charge" }) < < animator.setAnimationState("blinkCharge", "charge") < end < < function blinkExplosion.blink() < self.attackState = "blinkExplosion.blink" < self.attackTimer = 0.25 < blinkExplosion.cooldownTimer = blinkExplosion.cooldownTime < status.setPersistentEffects("blinkExplosion", { { stat = "invulnerable", amount = 1.0} }) < status.addEphemeralEffect("blink") --- > function blinkExplosion:reset() > status.setPersistentEffects("blinkExplosion", {}) 79,81c74,75 < function blinkExplosion.idle() < status.setPersistentEffects("blinkExplosion", { }) < idle() --- > function blinkExplosion:uninit() > self:reset() 84c78 < function blinkExplosion.findBlinkPosition() --- > function blinkExplosion:findBlinkPosition() 88c82 < for i = 0, blinkExplosion.maxDistance do --- > for i = 0, self.maxDistance do 102c96 < if position[1] == lastPosition or i == blinkExplosion.maxDistance then --- > if position[1] == lastPosition or i == self.maxDistance then items\active\weapons\melee\altabilities\hammer\shockwave\shockwave.altability 59,61d58 < "chargeTime" : 1.5, < "minChargeTime" : 0.5, < 63a61,63 > "chargeTime" : 1.5, > "minChargeTime" : 0.5, > 84,87c84,87 < "startArmRotation" : 0, < "armRotation" : 110, < "startWeaponRotation" : 180, < "weaponRotation" : 130, --- > "armRotation" : 0, > "endArmRotation" : 110, > "weaponRotation" : 180, > "endWeaponRotation" : 130, 89c89,92 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true 95c98,101 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true items\active\weapons\melee\altabilities\hammer\shockwave\shockwave.lua 3c3 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" 6c6 < local shockWave = altAbilityConfig --- > local shockWave = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 8,10c8 < function shockWave.init() < local damageAmount = shockWave.projectileParameters.power * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() < shockWave.energyUsage = shockWave.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * damageAmount --- > function shockWave:init() 13,19c11,12 < function shockWave.update(dt, fireMode, shiftHeld) < if self.attackState == "idle" < and mcontroller.onGround() < and not status.resourceLocked("energy") < and fireMode == "alt" then < shockWave.windup() < end --- > function shockWave:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 21,25c14,17 < if self.attackState == "shockWave.windup" then < shockWave.chargeTimer = math.min(shockWave.chargeTime, math.max(0, shockWave.chargeTimer + dt)) < local progress = math.sin(shockWave.chargeTimer / shockWave.chargeTime * 1.57) < self.relativeArmRotation = util.toRadians(util.lerp(progress, shockWave.stances.windup.startArmRotation, shockWave.stances.windup.armRotation)) < self.relativeWeaponRotation = util.toRadians(util.lerp(progress, shockWave.stances.windup.startWeaponRotation, shockWave.stances.windup.weaponRotation)) --- > if self.weapon.currentAbility == nil and self.fireMode == "alt" and mcontroller.onGround() and not status.resourceLocked("energy") then > self:setState(self.windup) > end > end 27c19,32 < weapon.meleeUpdateAim(false, true) --- > -- Attack state: windup > function shockWave:windup() > self.weapon:setStance(self.stances.windup) > self.weapon:updateAim() > > animator.setParticleEmitterActive(self.weapon.elementalType.."Charge", true) > > local chargeTimer = 0 > while self.fireMode == "alt" and (chargeTimer == self.chargeTime or status.overConsumeResource("energy", (self:energyUsage() * self.maxDistance) * self.dt)) do > chargeTimer = math.min(self.chargeTime, chargeTimer + self.dt) > > local chargeRatio = math.sin(chargeTimer / self.chargeTime * 1.57) > self.weapon.relativeArmRotation = util.toRadians(util.lerp(chargeRatio, {self.stances.windup.armRotation, self.stances.windup.endArmRotation})) > self.weapon.relativeWeaponRotation = util.toRadians(util.lerp(chargeRatio, {self.stances.windup.weaponRotation, self.stances.windup.endWeaponRotation})) 31c36 < runningSuppressed = true --- > runningSuppressed = true 33,45c38 < < local energyRate = (shockWave.energyUsage * shockWave.maxDistance) * dt < if shockWave.chargeTimer == shockWave.chargeTime then < energyRate = 0 < end < < if fireMode ~= "alt" or not status.overConsumeResource("energy", energyRate) then < if shockWave.chargeTimer > shockWave.minChargeTime then < shockWave.fire() < else < shockWave.idle() < end < end --- > coroutine.yield() 48,53c41,42 < if self.attackState == "shockWave.fire" then < weapon.meleeUpdateAim(false, false) < < if self.attackTimer == 0 then < shockWave.idle() < end --- > if chargeTimer > self.minChargeTime then > self:setState(self.fire, chargeTimer / self.chargeTime) 57,60c46,51 < function shockWave.idle() < animator.setParticleEmitterActive(self.elementalType.."Charge", false) < idle() < end --- > -- Attack state: fire > function shockWave:fire(charge) > self.weapon:setStance(self.stances.fire) > > self:fireShockwave(charge) > animator.playSound("fire") 62,65c53,54 < function shockWave.windup() < self.attackState = "shockWave.windup" < weapon.setStance(shockWave.stances.windup) < shockWave.chargeTimer = 0 --- > util.wait(self.stances.fire.duration) > end 67c56,57 < animator.setParticleEmitterActive(self.elementalType.."Charge", true) --- > function shockWave:reset() > animator.setParticleEmitterActive(self.weapon.elementalType.."Charge", false) 70,73c60,62 < function shockWave.fire() < self.attackState = "shockWave.fire" < self.attackTimer = shockWave.stances.fire.duration < weapon.setStance(shockWave.stances.fire) --- > function shockWave:uninit() > self:reset() > end 75c64,66 < shockWave.fireShockwave() --- > function shockWave:damageAmount() > return self.projectileParameters.power * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() > end 77c68,69 < animator.playSound("fire") --- > function shockWave:energyUsage() > return self.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * self:damageAmount() 80,81c72,74 < function shockWave.fireShockwave() < local impact, impactHeight = shockWave.impactPosition() --- > -- Helper functions > function shockWave:fireShockwave(charge) > local impact, impactHeight = self:impactPosition() 84c77 < self.weaponOffset = {0, impactHeight + shockWave.impactWeaponOffset} --- > self.weaponOffset = {0, impactHeight + self.impactWeaponOffset} 86,87c79,80 < local charge = math.floor((shockWave.chargeTimer / shockWave.chargeTime) * shockWave.maxDistance) < local positions = shockWave.findShockwavePositions(impact, charge) --- > local charge = math.floor(charge * self.maxDistance) > local positions = self:shockwaveProjectilePositions(impact, charge) 90c83 < shockWave.projectileParameters.actionOnReap = { --- > self.projectileParameters.actionOnReap = { 94c87 < type = shockWave.elementalProjectiles[self.elementalType] --- > type = self.elementalProjectiles[self.weapon.elementalType] 98c91 < shockWave.projectileParameters.timeToLive = (i - 1) * 0.025 --- > self.projectileParameters.timeToLive = (i - 1) * 0.025 100c93 < shockWave.projectileParameters --- > self.projectileParameters 107c100 < function shockWave.impactPosition() --- > function shockWave:impactPosition() 109,110c102,103 < local startLine = vec2.add(mcontroller.position(), vec2.mul(shockWave.impactLine[1], {dir, 1})) < local endLine = vec2.add(mcontroller.position(), vec2.mul(shockWave.impactLine[2], {dir, 1})) --- > local startLine = vec2.add(mcontroller.position(), vec2.mul(self.impactLine[1], {dir, 1})) > local endLine = vec2.add(mcontroller.position(), vec2.mul(self.impactLine[2], {dir, 1})) 118c111 < function shockWave.findShockwavePositions(position, maxDistance) --- > function shockWave:shockwaveProjectilePositions(position, maxDistance) 125c118 < local wavePosition = {position[1] + direction * i, position[2] + 0.5 + yDir + shockWave.shockwaveHeight} --- > local wavePosition = {position[1] + direction * i, position[2] + 0.5 + yDir + self.shockwaveHeight} 127c120 < local bounds = rect.translate(shockWave.shockWaveBounds, wavePosition) --- > local bounds = rect.translate(self.shockWaveBounds, wavePosition) items\active\weapons\melee\altabilities\hammer\uppercut\uppercut.altability 59c59,61 < "statusEffects" : ["shortparalysis"] --- > "statusEffects" : ["shortparalysis"], > "timeout" : 0.6, > "timeoutGroup" : "alt" 61d62 < "damageTimeout" : 0.6, 69c70,73 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 76c80,83 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false items\active\weapons\melee\altabilities\hammer\uppercut\uppercut.lua 2c2 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" 5c5 < local uppercut = altAbilityConfig --- > local uppercut = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,9c7,9 < function uppercut.init() < animator.setGlobalTag("directives", "") < uppercut.cooldownTimer = 0 --- > function uppercut:init() > self:reset() > self.cooldownTimer = 0 12,13c12,15 < function uppercut.update(dt, fireMode, shiftHeld) < uppercut.cooldownTimer = math.max(0, uppercut.cooldownTimer - dt) --- > function uppercut:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) > > self.cooldownTimer = math.max(0, self.cooldownTimer - self.dt) 15,19c17,18 < if self.attackState == "idle" < and uppercut.cooldownTimer == 0 < and fireMode == "alt" < and status.overConsumeResource("energy", uppercut.energyUsage()) then < uppercut.windup() --- > if self.weapon.currentAbility == nil and self.cooldownTimer == 0 and self.fireMode == "alt" and status.overConsumeResource("energy", self:energyUsage()) then > self:setState(self.windup) 20a20 > end 22,23c22,24 < if self.attackState == "uppercut.windup" then < weapon.meleeUpdateAim(false, true) --- > function uppercut:windup() > self.weapon:setStance(self.stances.windup) > self.weapon:updateAim() 24a26,28 > animator.setGlobalTag("directives", "?flipx") > > util.wait(self.stances.windup.duration, function(dt) 28a33,35 > -- Interrupt wait on running out of energy > return status.resourceLocked("energy") > end) 30,32c37,38 < if self.attackTimer == 0 or status.resourceLocked("energy") then < uppercut.fire() < end --- > if status.overConsumeResource("energy", self:energyUsage()) then > self:setState(self.fire) 33a40 > end 35,36c42,44 < if self.attackState == "uppercut.fire" then < weapon.meleeUpdateAim(false, false) --- > function uppercut:fire() > self.weapon:setStance(self.stances.fire) > self.weapon:updateAim() 37a46,49 > animator.setAnimationState("uppercutSwoosh", "fire") > animator.playSound("fire") > > util.wait(self.stances.fire.duration, function(dt) 42,43d53 < < weapon.setDamage(uppercut.damageConfig, "uppercutSwoosh", "", uppercut.damageTimeout) 45,49c55,59 < if self.attackTimer == 0 then < uppercut.cooldownTimer = uppercut.cooldownTime < uppercut.idle() < end < end --- > local damageArea = partDamageArea("uppercutSwoosh") > self.weapon:setDamage(self.damageConfig, damageArea) > end) > > self.cooldownTimer = self.cooldownTime 52,53c62,63 < function uppercut.uninit() < animator.setGlobalTag("directives", "") --- > function uppercut:damageAmount() > return self.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() 56,74c66,67 < function uppercut.idle() < animator.setGlobalTag("directives", "") < idle() < end < < function uppercut.windup() < self.attackState = "uppercut.windup" < self.attackTimer = uppercut.stances.windup.duration < weapon.setStance(uppercut.stances.windup) < animator.setGlobalTag("directives", "?flipx") < end < < function uppercut.fire() < self.attackState = "uppercut.fire" < self.attackTimer = uppercut.stances.fire.duration < weapon.setStance(uppercut.stances.fire) < < animator.setAnimationState("uppercutSwoosh", "fire") < animator.playSound("fire") --- > function uppercut:energyUsage() > return self.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * self:damageAmount() 77,78c70,72 < function uppercut.damageAmount() < return uppercut.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() --- > function uppercut:reset() > self.weapon:setDamage() > animator.setGlobalTag("directives", "") 81,82c75,76 < function uppercut.energyUsage() < return uppercut.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * uppercut.damageAmount() --- > function uppercut:uninit() > self:reset() items\active\weapons\melee\altabilities\spear\barrier\barrier.altability 71c71 < "projectileDistance" : 1.0, --- > "projectileInterval" : 1.0, 91c91,94 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : true, > "allowFlip" : true items\active\weapons\melee\altabilities\spear\barrier\barrier.lua 2c2 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" 5c5 < local barrier = altAbilityConfig --- > local barrier = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,11c7,8 < function barrier.init() < animator.setAnimationState("orbGlow", "off") < animator.setLightActive("orbLight", false) < < barrier.energyUsage = barrier.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * barrier.damageAmount() --- > function barrier:init() > self:reset() 14,18c11,14 < function barrier.update(dt, fireMode, shiftHeld) < if self.attackState == "idle" < and fireMode == "alt" < and not status.resourceLocked("energy") then < barrier.hold() --- > function barrier:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) > if self.weapon.currentAbility == nil and self.fireMode == "alt" and not status.resourceLocked("energy") then > self:setState(self.hold) 19a16 > end 21,22c18,23 < if self.attackState == "barrier.hold" then < weapon.meleeUpdateAim(true, true) --- > function barrier:hold() > self.weapon:setStance(self.stances.hold) > self.weapon:updateAim() > > animator.setAnimationState("orbGlow", "idle") > animator.setLightActive("orbLight", true) 24,25c25,28 < local projectileSource = barrier.projectileSource() < local minDistance = world.magnitude(mcontroller.position(), projectileSource) - barrier.projectileDistance --- > local lastProjectilePosition = self:projectileSource() > while self.fireMode == "alt" and not status.resourceLocked("energy") do > local projectileSource = self:projectileSource() > local minDistance = world.magnitude(mcontroller.position(), projectileSource) - self.projectileInterval 28,32c31,34 < while world.magnitude(projectileSource, barrier.lastProjectilePosition) >= barrier.projectileDistance do < local step = vec2.mul(vec2.norm(world.distance(projectileSource, barrier.lastProjectilePosition)), barrier.projectileDistance) < local nextPosition = vec2.add(barrier.lastProjectilePosition, step) < local position, aimVector = barrier.projectilePositionAndAim(barrier.lastProjectilePosition, nextPosition) < barrier.lastProjectilePosition = nextPosition --- > local dir = vec2.mul(vec2.norm(world.distance(projectileSource, lastProjectilePosition)), self.projectileInterval) > local steps = math.floor(world.magnitude(projectileSource, lastProjectilePosition)) > for step = 1, steps do > local position, aimVector = self:projectilePositionAndAim(lastProjectilePosition, vec2.add(lastProjectilePosition, vec2.mul(dir, step))) 35,37c37 < if not status.overConsumeResource("energy", barrier.energyUsage) then < break < end --- > if not status.overConsumeResource("energy", self:energyUsage()) then break end 39c39 < world.spawnProjectile(barrier.elementalProjectiles[self.elementalType], position, activeItem.ownerEntityId(), aimVector, false, {power = barrier.damageAmount()}) --- > world.spawnProjectile(self.elementalProjectiles[self.weapon.elementalType], position, activeItem.ownerEntityId(), aimVector, false, {power = self:damageAmount()}) 43,45c43,44 < < if fireMode ~= "alt" or status.resourceLocked("energy") then < barrier.idle() --- > if steps > 0 then > lastProjectilePosition = vec2.add(lastProjectilePosition, vec2.mul(dir, steps)) 46a46 > coroutine.yield() 50,51c50,51 < function barrier.damageAmount() < return barrier.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() --- > function barrier:damageAmount() > return self.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() 54,64c54,55 < function barrier.hold() < self.attackState = "barrier.hold" < weapon.setStance(barrier.stances.hold) < < -- need to update the aim to get an updated part point < weapon.meleeUpdateAim(true, true) < barrier.lastProjectilePosition = barrier.projectileSource() < < animator.setAnimationState("orbGlow", "idle") < -- TODO: Also set light color to the correct elemental color < animator.setLightActive("orbLight", true) --- > function barrier:energyUsage() > return self.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * self:damageAmount() 67c58 < function barrier.idle() --- > function barrier:reset() 70d60 < idle() 73c63,67 < function barrier.projectileSource() --- > function barrier:uninit() > self:reset() > end > > function barrier:projectileSource() 78c72 < function barrier.projectilePositionAndAim(from, to) --- > function barrier:projectilePositionAndAim(from, to) items\active\weapons\melee\altabilities\spear\charge\charge.altability 85c85,90 < "baseDps" : 6, --- > "damageConfig" : { > "baseDamage" : 6, > "timeout" : 0.25, > "timeoutGroup" : "alt" > }, > "baseDps" : 6, // overrides baseDamage in damageConfig 93c98,101 < "weaponOffset" : [0.0, 0.0] --- > "weaponOffset" : [0.0, 0.0], > > "allowRotate" : true, > "allowFlip" : true 99c107,110 < "weaponOffset" : [0.0, 2.0] --- > "weaponOffset" : [0.0, 2.0], > > "allowRotate" : false, > "allowFlip" : false items\active\weapons\melee\altabilities\spear\charge\charge.lua 2c2 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" 5c5 < local charge = altAbilityConfig --- > local charge = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,9c7,8 < function charge.init() < activeItem.setScriptedAnimationParameter("lightning", {}) < animator.setAnimationState("dashSwoosh", "idle") --- > function charge:init() > self:reset() 12,15c11,12 < function charge.update(dt, fireMode, shiftHeld) < if self.attackState == "idle" and fireMode == "alt" and not status.resourceLocked("energy") then < charge.charge() < end --- > function charge:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 17,29c14,15 < if self.attackState == "charge.charge" then < weapon.meleeUpdateAim(true, true) < charge.chargeTimer = math.min(charge.chargeTime, charge.chargeTimer + dt) < < charge.setChargeLevel() < < if fireMode ~= "alt" or (charge.chargeLevel < charge.chargeLevels and not status.overConsumeResource("energy", (charge.maxEnergyUsage / charge.chargeTime) * dt)) then < if charge.chargeTimer > charge.minChargeTime then < charge.dash() < else < charge.idle() < end < end --- > if self.weapon.currentAbility == nil and self.fireMode == "alt" and not status.resourceLocked("energy") then > self:setState(self.charge) 30a17 > end 32,33c19,21 < if self.attackState == "charge.dash" then < weapon.meleeUpdateAim(false, false) --- > function charge:charge() > self.weapon:setStance(self.stances.charge) > self.weapon:updateAim() 35,46c23 < if self.attackTimer == 0 then < mcontroller.setVelocity({0,0}) < charge.freeze() < else < local aimDirection = {mcontroller.facingDirection() * math.cos(self.aimAngle), math.sin(self.aimAngle)} < mcontroller.controlApproachVelocity(vec2.mul(aimDirection, charge.dashMaxSpeed), charge.dashControlForce) < mcontroller.controlParameters({ < airFriction = 0, < groundFriction = 0, < liquidFriction = 0, < gravityEnabled = false < }) --- > animator.setAnimationState("dashSwoosh", "charge") 48,49c25,30 < weapon.setDamage({baseDamage = charge.baseDps * charge.chargeTimer}, "dashSwoosh") < end --- > local chargeTimer = 0 > local chargeLevel = 0 > while self.fireMode == "alt" and (chargeLevel == self.chargeLevels or status.overConsumeResource("energy", (self.maxEnergyUsage / self.chargeTime) * self.dt)) do > chargeTimer = math.min(self.chargeTime, chargeTimer + self.dt) > chargeLevel = self:setChargeLevel(chargeTimer, chargeLevel) > coroutine.yield() 52,60c33,34 < if self.attackState == "charge.freeze" then < weapon.meleeUpdateAim(false, false) < mcontroller.controlParameters({ < gravityEnabled = false < }) < mcontroller.setVelocity({0,0}) < if self.attackTimer == 0 then < charge.idle() < end --- > if chargeTimer > self.minChargeTime then > self:setState(self.dash, chargeTimer / self.chargeTime) 64,66c38,40 < function charge.uninit() < activeItem.setScriptedAnimationParameter("lightning", {}) < animator.setAnimationState("dashSwoosh", "idle") --- > function charge:dash(charge) > self.weapon:setStance(self.stances.dash) > self.weapon:updateAim() 68,71c42,57 < if self.attackState == "charge.dash" then < mcontroller.setVelocity({0,0}) < end < end --- > self:setLightning(3, self.dashLightning[1], self.dashLightning[2], self.dashLightning[3], self.dashLightning[4], 8) > > animator.burstParticleEmitter(self.weapon.elementalType .. "swoosh") > animator.setAnimationState("swoosh", "fire") > animator.setAnimationState("dashSwoosh", "full") > animator.playSound("fire") > > util.wait(self.maxDashTime * charge, function(dt) > local aimDirection = {mcontroller.facingDirection() * math.cos(self.weapon.aimAngle), math.sin(self.weapon.aimAngle)} > mcontroller.controlApproachVelocity(vec2.mul(aimDirection, self.dashMaxSpeed), self.dashControlForce) > mcontroller.controlParameters({ > airFriction = 0, > groundFriction = 0, > liquidFriction = 0, > gravityEnabled = false > }) 73,77c59,62 < function charge.charge() < self.attackState = "charge.charge" < weapon.setStance(charge.stances.charge) < charge.chargeTimer = 0 < charge.chargeLevel = 0 --- > local damageArea = partDamageArea("dashSwoosh") > self.damageConfig.baseDamage = self.baseDps * self.chargeTime * charge > self.weapon:setDamage(self.damageConfig, damageArea) > end) 79c64,73 < animator.setAnimationState("dashSwoosh", "charge") --- > -- clear damage > self.weapon:setDamage() > > -- freeze in mid air for a short amount of time > util.wait(self.freezeTime, function(dt) > mcontroller.controlParameters({ > gravityEnabled = false > }) > mcontroller.setVelocity({0,0}) > end) 82c76,77 < function charge.idle() --- > function charge:reset() > self.weapon:setDamage() 85,102d79 < weapon.clearDamage() < idle() < end < < function charge.dash() < self.attackState = "charge.dash" < weapon.setStance(charge.stances.dash) < self.attackTimer = charge.maxDashTime * math.min(1.0, (charge.chargeTimer / charge.chargeTime)) < < local dashBolt = charge.dashLightning < local endPosition = vec2.add(mcontroller.position(), activeItem.handPosition()) < charge.setLightning(3, dashBolt[1], dashBolt[2], dashBolt[3], dashBolt[4], endPosition) < < animator.burstParticleEmitter(self.elementalType .. "swoosh") < animator.setAnimationState("weapon", "stab") < animator.setAnimationState("swoosh", "stab") < animator.setAnimationState("dashSwoosh", "full") < animator.playSound("fire") 105,107c82,86 < function charge.freeze() < self.attackState = "charge.freeze" < self.attackTimer = charge.freezeTime --- > function charge:uninit() > self:reset() > if self.weapon.currentState == self.dash then > mcontroller.setVelocity({0,0}) > end 110,115c89,93 < function charge.setChargeLevel() < local level = math.min(charge.chargeLevels, math.ceil(charge.chargeTimer / charge.chargeTime * charge.chargeLevels)) < if charge.chargeLevel < level then < charge.chargeLevel = level < local lightningCharge = charge.lightningChargeLevels[charge.chargeLevel] < charge.setLightning(3, lightningCharge[1], lightningCharge[2], lightningCharge[3], lightningCharge[4]) --- > function charge:setChargeLevel(chargeTimer, currentLevel) > local level = math.min(self.chargeLevels, math.ceil(chargeTimer / self.chargeTime * self.chargeLevels)) > if currentLevel < level then > local lightningCharge = self.lightningChargeLevels[level] > self:setLightning(3, lightningCharge[1], lightningCharge[2], lightningCharge[3], lightningCharge[4], 2.75 + level) 116a95 > return level 119c98 < function charge.setLightning(amount, width, forks, branching, color, endPosition) --- > function charge:setLightning(amount, width, forks, branching, color, length) 128,129c107 < endPointDisplacement = -branching + (i * 2 * branching), < endPosition = endPosition --- > endPointDisplacement = -branching + (i * 2 * branching) 131,132c109,110 < bolt.startLine = vec2.rotate(vec2.add(self.weaponOffset, {0, 4.0}), self.relativeWeaponRotation) < bolt.endLine = vec2.rotate(vec2.add(self.weaponOffset, {0, 1.25 - (charge.chargeTimer / charge.chargeTime) * 3}), self.relativeWeaponRotation) --- > bolt.startLine = vec2.rotate(vec2.add(self.weapon.weaponOffset, {0, 4.0}), self.weapon.relativeWeaponRotation) > bolt.endLine = vec2.rotate(vec2.add(self.weapon.weaponOffset, {0, 4.0 - length}), self.weapon.relativeWeaponRotation) items\active\weapons\melee\altabilities\spear\flurry\flurry.altability 13c13,19 < "baseDamage" : 0.75, --- > > "damageConfig" : { > "baseDamage" : 0.75, > "knockback" : 0, > "timeout" : 0.15, > "timeoutGroup" : "alt" > }, 16a23,31 > "idle" : { > "armRotation" : -90, > "weaponRotation" : 0, > "twoHanded" : false, > "weaponOffset" : [0, 0.5], > > "allowRotate" : true, > "allowFlip" : true > }, 22c37,40 < "weaponOffset" : [0.0, 0.0] --- > "weaponOffset" : [0.0, 0.0], > > "allowRotate" : false, > "allowFlip" : false items\active\weapons\melee\altabilities\spear\flurry\flurry.lua 2c2 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" 5c5 < local flurry = altAbilityConfig --- > local flurry = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,16c7,8 < function flurry.init() < local damageAmount = flurry.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() < flurry.energyUsage = flurry.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * damageAmount < < flurry.cooldownTimer = 0 < flurry.cooldownTime = flurry.maxCooldownTime < < flurry.cooldownResetTimer = 0 < < flurry.currentRotationOffset = 1 --- > function flurry:init() > self:reset() 19,20c11,12 < function flurry.update(dt, fireMode, shiftHeld) < flurry.cooldownTimer = math.max(0, flurry.cooldownTimer - dt) --- > function flurry:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 22,30c14,15 < if self.attackState == "idle" and flurry.cooldownTimer == 0 then < if fireMode == "alt" and status.overConsumeResource("energy", flurry.energyUsage) then < flurry.swing() < end < < flurry.cooldownResetTimer = math.max(0, flurry.cooldownResetTimer - dt) < if flurry.cooldownResetTimer == 0 then < flurry.cooldownTime = flurry.maxCooldownTime < end --- > if self.weapon.currentAbility == nil and self.fireMode == "alt" and not status.resourceLocked("energy") then > self:setState(self.swing) 31a17 > end 33,39c19,48 < if self.attackState == "flurry.swing" then < weapon.meleeUpdateAim(false, false) < < if self.attackTimer > 0 then < weapon.setDamage({baseDamage = flurry.baseDamage, knockback = 0}, nil, nil, flurry.minCooldownTime) < else < idle() --- > function flurry:swing() > local cooldownTime = self.maxCooldownTime > local currentRotationOffset = 1 > while self.fireMode == "alt" do > if not status.overConsumeResource("energy", self:energyUsage()) then break end > > self.weapon:setStance(self.stances.swing) > self.weapon.relativeWeaponRotation = util.toRadians(self.stances.swing.weaponRotation + self.cycleRotationOffsets[currentRotationOffset]) > self.weapon.relativeArmRotation = util.toRadians(self.stances.swing.armRotation + self.cycleRotationOffsets[currentRotationOffset]) > self.weapon:updateAim() > > animator.setAnimationState("swoosh", "fire") > animator.playSound("fire") > util.wait(self.stances.swing.duration, function(dt) > local damageArea = partDamageArea("swoosh") > self.weapon:setDamage(self.damageConfig, damageArea) > end) > self.weapon:setDamage() > > -- allow changing aim during cooldown > self.weapon:setStance(self.stances.idle) > util.wait(cooldownTime - self.stances.swing.duration, function(dt) > return self.fireMode ~= "alt" > end) > > cooldownTime = math.max(self.minCooldownTime, cooldownTime - self.cooldownSwingReduction) > > currentRotationOffset = currentRotationOffset + 1 > if currentRotationOffset > #self.cycleRotationOffsets then > currentRotationOffset = 1 44,45c53,55 < function flurry.swing() < self.attackState = "flurry.swing" --- > function flurry:damageAmount() > return self.damageConfig.baseDamage * root.evalFunction("swordDamageLevelMultiplier", item.instanceValue("level", 1)) * activeItem.ownerPowerMultiplier() > end 47,60c57,63 < self.attackTimer = flurry.stances.swing.duration < local stance = copy(flurry.stances.swing) < stance.weaponRotation = stance.weaponRotation + flurry.cycleRotationOffsets[flurry.currentRotationOffset] < stance.armRotation = stance.armRotation + flurry.cycleRotationOffsets[flurry.currentRotationOffset] < weapon.setStance(stance) < < flurry.cooldownTime = math.max(flurry.minCooldownTime, flurry.cooldownTime - flurry.cooldownSwingReduction) < flurry.cooldownResetTimer = flurry.cooldownResetTime < flurry.cooldownTimer = flurry.cooldownTime < < flurry.currentRotationOffset = flurry.currentRotationOffset + 1 < if flurry.currentRotationOffset > #flurry.cycleRotationOffsets then < flurry.currentRotationOffset = 1 < end --- > function flurry:energyUsage() > return self.energyUsageMultiplier * root.evalFunction("gunLevelEnergyCostPerDamage", item.instanceValue("level", 1)) * self:damageAmount() > end > > function flurry:reset() > self.weapon:setDamage() > end 62,63c65,66 < animator.setAnimationState("swoosh", "stab") < animator.playSound("fire") --- > function flurry:uninit() > self:reset() items\active\weapons\melee\altabilities\spear\spin\spin.altability 50a51,57 > "damageConfig" : { > "baseDamage" : 3.5, > "knockbackMode" : "none", > "knockback" : 30, > "timeout" : 0.5, > "timeoutGroup" : "alt" > }, 52d58 < "baseDps" : 7, 61c67,70 < "weaponOffset" : [0, 0] --- > "weaponOffset" : [0, 0], > > "allowRotate" : false, > "allowFlip" : false items\active\weapons\melee\altabilities\spear\spin\spin.lua 5c5 < local spin = altAbilityConfig --- > local spin = WeaponAbility:new(altAbilityConfig, altAbilityConfig.stances) 7,8c7,8 < function spin.init() < animator.setAnimationState("spinSwoosh", "idle") --- > function spin:init() > self:reset() 11,20c11,12 < function spin.update(dt, fireMode, shiftHeld) < if self.attackState == "idle" and fireMode == "alt" and not status.resourceLocked("energy") then < spin.spin() < end < < if self.attackState == "spin.spin" then < self.relativeWeaponRotation = self.relativeWeaponRotation + util.toRadians(spin.spinRate * dt) < weapon.meleeUpdateAim(false, true) < weapon.setDamage({baseDamage = spin.baseDps / 2, knockbackDirectional = false}, "spinSwoosh", nil, 0.5) < mcontroller.controlModifiers({runningSuppressed=true}) --- > function spin:update(dt, fireMode, shiftHeld) > WeaponAbility.update(self, dt, fireMode, shiftHeld) 22,24c14,15 < if fireMode ~= "alt" or not status.overConsumeResource("energy", spin.energyCost * dt) then < spin.idle() < end --- > if self.weapon.currentAbility == nil and fireMode == "alt" and not status.resourceLocked("energy") then > self:setState(self.spin) 28,30c19,21 < function spin.uninit() < spin.idle() < end --- > function spin:spin() > self.weapon:setStance(self.stances.spin) > self.weapon:updateAim() 32,33d22 < function spin.spin() < self.attackState = "spin.spin" 35c24 < self.aimAngle = 0 --- > self.weapon.aimAngle = 0 37c26,34 < weapon.setStance(spin.stances.spin) --- > > while self.fireMode == "alt" and status.overConsumeResource("energy", self.energyCost * self.dt) do > self.weapon.relativeWeaponRotation = self.weapon.relativeWeaponRotation + util.toRadians(self.spinRate * self.dt) > local damageArea = partDamageArea("spinSwoosh") > self.weapon:setDamage(self.damageConfig, damageArea) > mcontroller.controlModifiers({runningSuppressed=true}) > > coroutine.yield() > end 40c37 < function spin.idle() --- > function spin:reset() 42c39 < self.relativeWeaponRotation = 0 --- > self.weapon:setDamage() 44,45c41,44 < weapon.clearDamage() < idle() --- > end > > function spin:uninit() > self:reset() items\active\weapons\melee\axe\axe.animation 8,10c8 < "windup" : {}, < "swing" : {}, < "cooldown" : {} --- > "fire" : {} 18c16 < "swing" : { --- > "fire" : { 40,50c38 < "idle" : { < "properties" : { < "offset" : [0.25, 2.0] < } < }, < "windup" : { < "properties" : { < "offset" : [0.25, 2.5] < } < }, < "swing" : { --- > "fire" : { 52d39 < "offset" : [0.25, 2.75], 55,59d41 < }, < "cooldown" : { < "properties" : { < "offset" : [0.25, 2.0] < } 71,95d52 < }, < < "partStates" : { < "weapon" : { < "idle" : { < "properties" : { < "offset" : [0.25, 2.0] < } < }, < "windup" : { < "properties" : { < "offset" : [0.25, 2.5] < } < }, < "swing" : { < "properties" : { < "offset" : [0.25, 2.75] < } < }, < "cooldown" : { < "properties" : { < "offset" : [0.25, 2.0] < } < } < } 102c59 < "offset" : [0.75, 0.75], --- > "offset" : [-2.25, 1.0], 114c71 < "swing" : { --- > "fire" : { 136c93 < "offsetRegion" : [0.75, -0.25, 3.5, 2.5], --- > "offsetRegion" : [-2.25, -0.25, 0.0, 2.5], 143c100 < "offsetRegion" : [0.75, -0.25, 3.5, 2.5], --- > "offsetRegion" : [-2.25, -0.25, 0.0, 2.5], 157c114 < "offsetRegion" : [0.75, -0.25, 3.5, 2.5], --- > "offsetRegion" : [-2.25, -0.25, 0.0, 2.5], 168c125 < "offsetRegion" : [0.75, -0.25, 3.5, 2.5], --- > "offsetRegion" : [-2.25, -0.25, 0.0, 2.5], 182c139 < "offsetRegion" : [0.75, -0.25, 3.5, 2.5], --- > "offsetRegion" : [-2.25, -0.25, 0.0, 2.5], items\active\weapons\melee\axe\commonaxe.activeitem 22,27c22,33 < "fireTime" : [0.83, 1.1], < "baseDps" : [11, 12], < "damageConfig" : { < "damageSourceKind" : "axe", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 30 --- > "aimOffset" : -1.0, > > "primaryAttack" : { > "fireTime" : [0.83, 1.1], > "baseDps" : [11, 12], > "damageConfig" : { > "damageSourceKind" : "axe", > "statusEffects" : [ "damagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 30, > "timeoutGroup" : "primary" > } 29d34 < "knockbackMode" : "aim", 31d35 < "aimOffset" : -1.0, // vertical offset of the cursor from the weapon's 'line of fire' for aiming 34c38 < "idle" : { // idle stance is required --- > "idle" : { 36a41 > "weaponOffset" : [0.25, 2.0], 37a43 > 39,40c45 < "allowRotate" : true, < "transition" : "windup" --- > "allowRotate" : true 45a51 > "weaponOffset" : [0.25, 2.5], 46a53 > 48,62c55 < "allowRotate" : false, < "transition" : "swing" < }, < "swing" : { < "duration" : 0.4, // duration before transitioning to the next stance < "armRotation" : -45, // rotation of the arms relative to aim position (or horizontal) < "weaponRotation" : -45, // rotation of the weapon relative to arms < "twoHanded" : true, // grip the weapon in both hands < "allowFlip" : false, // allow the player's aim position to set facing direction < "allowRotate" : false, // allow the player's aim position to rotate the arms < "transition" : "cooldown", // stance to enter after this one ends < < "sound" : "swing", // sound to play < "swoosh" : "swing", // set animation state for swoosh < "damageConfig" : {} // indicates that this state deals damage and can override config --- > "allowRotate" : false 64,71c57,65 < "cooldown" : { < "duration" : 0.3, < "armRotation" : -90, < "weaponRotation" : 0, < "twoHanded" : false, < "allowFlip" : true, < "allowRotate" : false, < "transition" : "idle" --- > "fire" : { > "duration" : 0.4, > "armRotation" : -45, > "weaponRotation" : -45, > "weaponOffset" : [0.25, 2.75], > "twoHanded" : true, > > "allowFlip" : false, > "allowRotate" : false 91c85,89 < "physical" : [ "/sfx/melee/swing_axe.wav" ] --- > "physical" : [ "/sfx/melee/swing_axe.wav" ], > "fire" : [ [ "/sfx/melee/swing_axe_fire1.wav", "/sfx/melee/swing_axe_fire2.wav", "/sfx/melee/swing_axe_fire3.wav" ] ], > "electric" : [ [ "/sfx/melee/swing_axe_electric1.wav", "/sfx/melee/swing_axe_electric2.wav", "/sfx/melee/swing_axe_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_axe_ice1.wav", "/sfx/melee/swing_axe_ice2.wav", "/sfx/melee/swing_axe_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_axe_poison1.wav", "/sfx/melee/swing_axe_poison2.wav", "/sfx/melee/swing_axe_poison3.wav" ] ] items\active\weapons\melee\axe\rareaxe.activeitem 23,35c23,39 < "fireTime" : [0.71, 0.9], < "baseDps" : [11.5, 12.5], < "damageConfig" : { < "damageSourceKind" : "axe", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 30 < }, < "knockbackMode" : "aim", < "elementalStatusEffects" : { < "fire" : [ "burning" ], < "ice" : [ "frostslow" ], < "poison" : [ "weakpoison" ], < "electric" : [ "paralysis" ] --- > "aimOffset" : -1.0, > "primaryAttack" : { > "fireTime" : [0.71, 0.9], > "baseDps" : [11.5, 12.5], > "damageConfig" : { > "damageSourceKind" : "axe", > "statusEffects" : [ "damagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 30, > "timeoutGroup" : "primary" > }, > "elementalStatusEffects" : { > "fire" : [ "burning" ], > "ice" : [ "frostslow" ], > "poison" : [ "weakpoison" ], > "electric" : [ "paralysis" ] > } 38d41 < "aimOffset" : -1.0, // vertical offset of the cursor from the weapon's 'line of fire' for aiming 41c44 < "idle" : { // idle stance is required --- > "idle" : { 43a47 > "weaponOffset" : [0.25, 2.0], 44a49 > 46,47c51 < "allowRotate" : true, < "transition" : "windup" --- > "allowRotate" : true 52a57 > "weaponOffset" : [0.25, 2.5], 53a59 > 55,69c61 < "allowRotate" : false, < "transition" : "swing" < }, < "swing" : { < "duration" : 0.4, // duration before transitioning to the next stance < "armRotation" : -45, // rotation of the arms relative to aim position (or horizontal) < "weaponRotation" : -45, // rotation of the weapon relative to arms < "twoHanded" : true, // grip the weapon in both hands < "allowFlip" : false, // allow the player's aim position to set facing direction < "allowRotate" : false, // allow the player's aim position to rotate the arms < "transition" : "cooldown", // stance to enter after this one ends < < "sound" : "swing", // sound to play < "swoosh" : "swing", // set animation state for swoosh < "damageConfig" : {} // indicates that this state deals damage and can override config --- > "allowRotate" : false 71,78c63,71 < "cooldown" : { < "duration" : 0.3, < "armRotation" : -90, < "weaponRotation" : 0, < "twoHanded" : false, < "allowFlip" : true, < "allowRotate" : false, < "transition" : "idle" --- > "fire" : { > "duration" : 0.4, > "armRotation" : -45, > "weaponRotation" : -45, > "weaponOffset" : [0.25, 2.75], > "twoHanded" : true, > > "allowFlip" : false, > "allowRotate" : false 106,108c99,101 < "electric" : [ "/sfx/melee/swing_axe.wav" ], < "ice" : [ "/sfx/melee/swing_axe.wav" ], < "poison" : [ "/sfx/melee/swing_axe.wav" ] --- > "electric" : [ [ "/sfx/melee/swing_axe_electric1.wav", "/sfx/melee/swing_axe_electric2.wav", "/sfx/melee/swing_axe_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_axe_ice1.wav", "/sfx/melee/swing_axe_ice2.wav", "/sfx/melee/swing_axe_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_axe_poison1.wav", "/sfx/melee/swing_axe_poison2.wav", "/sfx/melee/swing_axe_poison3.wav" ] ] items\active\weapons\melee\axe\uncommonaxe.activeitem 23,30c23 < "fireTime" : [0.71, 0.9], < "baseDps" : [11.5, 12.5], < "damageConfig" : { < "damageSourceKind" : "axe", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 30 < }, < "knockbackMode" : "aim", --- > "aimOffset" : -1.0, 32c25,34 < "aimOffset" : -1.0, // vertical offset of the cursor from the weapon's 'line of fire' for aiming --- > "primaryAttack" : { > "fireTime" : [0.71, 0.9], > "baseDps" : [11.5, 12.5], > "damageConfig" : { > "statusEffects" : [ "damagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 30, > "timeoutGroup" : "primary" > } > }, 35c37 < "idle" : { // idle stance is required --- > "idle" : { 37a40 > "weaponOffset" : [0.25, 2.0], 38a42 > 40,41c44 < "allowRotate" : true, < "transition" : "windup" --- > "allowRotate" : true 46a50 > "weaponOffset" : [0.25, 2.5], 47a52 > 49,63c54 < "allowRotate" : false, < "transition" : "swing" < }, < "swing" : { < "duration" : 0.4, // duration before transitioning to the next stance < "armRotation" : -45, // rotation of the arms relative to aim position (or horizontal) < "weaponRotation" : -45, // rotation of the weapon relative to arms < "twoHanded" : true, // grip the weapon in both hands < "allowFlip" : false, // allow the player's aim position to set facing direction < "allowRotate" : false, // allow the player's aim position to rotate the arms < "transition" : "cooldown", // stance to enter after this one ends < < "sound" : "swing", // sound to play < "swoosh" : "swing", // set animation state for swoosh < "damageConfig" : {} // indicates that this state deals damage and can override config --- > "allowRotate" : false 65,72c56,64 < "cooldown" : { < "duration" : 0.3, < "armRotation" : -90, < "weaponRotation" : 0, < "twoHanded" : false, < "allowFlip" : true, < "allowRotate" : false, < "transition" : "idle" --- > "fire" : { > "duration" : 0.4, > "armRotation" : -45, > "weaponRotation" : -45, > "weaponOffset" : [0.25, 2.75], > "twoHanded" : true, > > "allowFlip" : false, > "allowRotate" : false 95a88,94 > }, > "elementalFireSounds" : { > "physical" : [ "/sfx/melee/swing_axe.wav" ], > "fire" : [ [ "/sfx/melee/swing_axe_fire1.wav", "/sfx/melee/swing_axe_fire2.wav", "/sfx/melee/swing_axe_fire3.wav" ] ], > "electric" : [ [ "/sfx/melee/swing_axe_electric1.wav", "/sfx/melee/swing_axe_electric2.wav", "/sfx/melee/swing_axe_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_axe_ice1.wav", "/sfx/melee/swing_axe_ice2.wav", "/sfx/melee/swing_axe_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_axe_poison1.wav", "/sfx/melee/swing_axe_poison2.wav", "/sfx/melee/swing_axe_poison3.wav" ] ] items\active\weapons\melee\broadsword\broadsword.animation 9c9 < "slash" : { --- > "fire" : { 57c57 < "slash" : { --- > "fire" : { items\active\weapons\melee\broadsword\commonbroadsword.activeitem 17c17 < "scripts" : ["broadsword.lua"], --- > "scripts" : ["/items/active/weapons/melee/meleeweapon.lua"], 21,26c21,30 < "fireTime" : [0.71, 0.9], < "baseDps" : [10, 11], < "damageConfig" : { < "damageSourceKind" : "2hsword", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 20 --- > "primaryAttack" : { > "fireTime" : [0.71, 0.9], > "baseDps" : [10, 11], > "damageConfig" : { > "damageSourceKind" : "2hsword", > "statusEffects" : [ "damagefreeze" ], > "knockback" : 20, > "knockbackMode" : "facing", > "timeoutGroup" : "primary" > } 28d31 < "knockbackMode" : "facing", 33c36,38 < "weaponRotation" : -10 --- > "weaponRotation" : -10, > "allowRotate" : false, > "allowFlip" : true 39c44,47 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true 45c53,56 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 47c58 < "slash" : { --- > "fire" : { 51c62,65 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 71,75c85,89 < "physical" : [ "/sfx/melee/swing_twohanded.wav" ], < "fire" : [ [ "/sfx/melee/swing_twohanded_fire1.wav", "/sfx/melee/swing_twohanded_fire2.wav", "/sfx/melee/swing_twohanded_fire3.wav" ] ], < "electric" : [ "/sfx/melee/swing_twohanded.wav" ], < "ice" : [ "/sfx/melee/swing_twohanded.wav" ], < "poison" : [ "/sfx/melee/swing_twohanded.wav" ] --- > "physical" : [ "/sfx/melee/swing_broadsword.wav" ], > "fire" : [ [ "/sfx/melee/swing_broadsword_fire1.wav", "/sfx/melee/swing_broadsword_fire2.wav", "/sfx/melee/swing_broadsword_fire3.wav" ] ], > "electric" : [ [ "/sfx/melee/swing_broadsword_electric1.wav", "/sfx/melee/swing_broadsword_electric2.wav", "/sfx/melee/swing_broadsword_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_broadsword_ice1.wav", "/sfx/melee/swing_broadsword_ice2.wav", "/sfx/melee/swing_broadsword_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_broadsword_poison1.wav", "/sfx/melee/swing_broadsword_poison2.wav", "/sfx/melee/swing_broadsword_poison3.wav" ] ] 78,80d91 < //"/items/active/weapons/melee/altabilities/broadsword/dashattack.altability", < //"/items/active/weapons/melee/altabilities/broadsword/leapattack.altability", < "/items/active/weapons/melee/altabilities/broadsword/parry/parry.altability", 81a93,94 > "/items/active/weapons/melee/altabilities/broadsword/downstab/downstab.altability", > "/items/active/weapons/melee/altabilities/broadsword/parry/parry.altability", 83c96,97 < "/items/active/weapons/melee/altabilities/broadsword/downstab/downstab.altability" --- > "/items/active/weapons/melee/altabilities/broadsword/dashattack.altability", > "/items/active/weapons/melee/altabilities/broadsword/leapattack.altability" items\active\weapons\melee\broadsword\rarebroadsword.activeitem 21c21 < "scripts" : ["broadsword.lua"], --- > "scripts" : ["/items/active/weapons/melee/meleeweapon.lua"], 23,35c23,37 < "fireTime" : [0.71, 0.9], < "baseDps" : [10.5, 11.5], < "damageConfig" : { < "damageSourceKind" : "2hsword", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 20 < }, < "knockbackMode" : "facing", < "elementalStatusEffects" : { < "fire" : [ "burning" ], < "ice" : [ "frostslow" ], < "poison" : [ "weakpoison" ], < "electric" : [ "paralysis" ] --- > "primaryAttack" : { > "fireTime" : [0.71, 0.9], > "baseDps" : [10.5, 11.5], > "damageConfig" : { > "statusEffects" : [ "damagefreeze" ], > "knockbackMode" : "facing", > "knockback" : 20, > "timeoutGroup" : "primary" > }, > "elementalStatusEffects" : { > "fire" : [ "burning" ], > "ice" : [ "frostslow" ], > "poison" : [ "weakpoison" ], > "electric" : [ "paralysis" ] > } 41c43,45 < "weaponRotation" : -10 --- > "weaponRotation" : -10, > "allowRotate" : false, > "allowFlip" : true 47c51,54 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true 52,53c59,63 < "weaponRotation" : -35, < "twoHanded" : true --- > "weaponRotation" : -45, > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 55c65 < "slash" : { --- > "fire" : { 59c69,72 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 85,89c98,102 < "physical" : [ "/sfx/melee/swing_twohanded.wav" ], < "fire" : [ [ "/sfx/melee/swing_twohanded_fire1.wav", "/sfx/melee/swing_twohanded_fire2.wav", "/sfx/melee/swing_twohanded_fire3.wav" ] ], < "electric" : [ "/sfx/melee/swing_twohanded.wav" ], < "ice" : [ "/sfx/melee/swing_twohanded.wav" ], < "poison" : [ "/sfx/melee/swing_twohanded.wav" ] --- > "physical" : [ "/sfx/melee/swing_broadsword.wav" ], > "fire" : [ [ "/sfx/melee/swing_broadsword_fire1.wav", "/sfx/melee/swing_broadsword_fire2.wav", "/sfx/melee/swing_broadsword_fire3.wav" ] ], > "electric" : [ [ "/sfx/melee/swing_broadsword_electric1.wav", "/sfx/melee/swing_broadsword_electric2.wav", "/sfx/melee/swing_broadsword_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_broadsword_ice1.wav", "/sfx/melee/swing_broadsword_ice2.wav", "/sfx/melee/swing_broadsword_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_broadsword_poison1.wav", "/sfx/melee/swing_broadsword_poison2.wav", "/sfx/melee/swing_broadsword_poison3.wav" ] ] 92,93d104 < //"/items/active/weapons/melee/altabilities/broadsword/dashattack.altability", < //"/items/active/weapons/melee/altabilities/broadsword/leapattack.altability", 95,97c106,107 < "/items/active/weapons/melee/altabilities/broadsword/parry/parry.altability", < "/items/active/weapons/melee/altabilities/generic/blinkexplosion/blinkexplosion.altability", < "/items/active/weapons/melee/altabilities/broadsword/travelingslash/travelingslash.altability" --- > "/items/active/weapons/melee/altabilities/broadsword/travelingslash/travelingslash.altability", > "/items/active/weapons/melee/altabilities/generic/blinkexplosion/blinkexplosion.altability" items\active\weapons\melee\broadsword\uncommonbroadsword.activeitem 21c21 < "scripts" : ["broadsword.lua"], --- > "scripts" : ["/items/active/weapons/melee/meleeweapon.lua"], 23,28c23,31 < "fireTime" : [0.71, 0.9], < "baseDps" : [10.5, 11.5], < "damageConfig" : { < "damageSourceKind" : "2hsword", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 20 --- > "primaryAttack" : { > "fireTime" : [0.71, 0.9], > "baseDps" : [10.5, 11.5], > "damageConfig" : { > "statusEffects" : [ "damagefreeze" ], > "knockbackMode" : "facing", > "knockback" : 20, > "timeoutGroup" : "primary" > } 30d32 < "knockbackMode" : "facing", 35c37,39 < "weaponRotation" : -10 --- > "weaponRotation" : -10, > "allowRotate" : false, > "allowFlip" : true 41c45,48 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : true 46,47c53,57 < "weaponRotation" : -35, < "twoHanded" : true --- > "weaponRotation" : -45, > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 49c59 < "slash" : { --- > "fire" : { 53c63,66 < "twoHanded" : true --- > "twoHanded" : true, > > "allowRotate" : false, > "allowFlip" : false 79,83c92,96 < "physical" : [ "/sfx/melee/swing_twohanded.wav" ], < "fire" : [ [ "/sfx/melee/swing_twohanded_fire1.wav", "/sfx/melee/swing_twohanded_fire2.wav", "/sfx/melee/swing_twohanded_fire3.wav" ] ], < "electric" : [ "/sfx/melee/swing_twohanded.wav" ], < "ice" : [ "/sfx/melee/swing_twohanded.wav" ], < "poison" : [ "/sfx/melee/swing_twohanded.wav" ] --- > "physical" : [ "/sfx/melee/swing_broadsword.wav" ], > "fire" : [ [ "/sfx/melee/swing_broadsword_fire1.wav", "/sfx/melee/swing_broadsword_fire2.wav", "/sfx/melee/swing_broadsword_fire3.wav" ] ], > "electric" : [ [ "/sfx/melee/swing_broadsword_electric1.wav", "/sfx/melee/swing_broadsword_electric2.wav", "/sfx/melee/swing_broadsword_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_broadsword_ice1.wav", "/sfx/melee/swing_broadsword_ice2.wav", "/sfx/melee/swing_broadsword_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_broadsword_poison1.wav", "/sfx/melee/swing_broadsword_poison2.wav", "/sfx/melee/swing_broadsword_poison3.wav" ] ] items\active\weapons\melee\dagger\commondagger.activeitem 22,29d21 < "fireTime" : [0.27, 0.33], < "baseDps" : [7, 8], < "damageConfig" : { < "damageSourceKind" : "dagger", < "statusEffects" : [ "shortdamagefreeze" ], < "knockback" : 10 < }, < 30a23,33 > "primaryAttack" : { > "fireTime" : [0.27, 0.33], > "baseDps" : [7, 8], > "damageConfig" : { > "damageSourceKind" : "dagger", > "statusEffects" : [ "shortdamagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 10, > "timeoutGroup" : "primary" > } > }, 35a39,40 > "weaponOffset" : [0, 2.25], > 37,38c42 < "allowRotate" : true, < "transition" : "windup" --- > "allowRotate" : true 43a48,49 > "weaponOffset" : [0, 2.25], > 45,46c51 < "allowRotate" : false, < "transition" : "swing" --- > "allowRotate" : false 48c53 < "swing" : { --- > "fire" : { 52,54c57 < "allowFlip" : false, < "allowRotate" : false, < "transition" : "cooldown", --- > "weaponOffset" : [0, 2.5], 56,67c59,60 < "sound" : "swing", < "swoosh" : "swing", < "damageConfig" : {} < }, < "cooldown" : { < "duration" : 0.1, < "armRotation" : -90, < "weaponRotation" : -10, < "twoHanded" : false, < "allowFlip" : true, < "allowRotate" : false, < "transition" : "idle" --- > "allowFlip" : false, > "allowRotate" : false 89,91c82,84 < "electric" : [ "/sfx/melee/swing_dagger.wav" ], < "ice" : [ "/sfx/melee/swing_dagger.wav" ], < "poison" : [ "/sfx/melee/swing_dagger.wav" ] --- > "electric" : [ [ "/sfx/melee/swing_dagger_electric1.wav", "/sfx/melee/swing_dagger_electric2.wav", "/sfx/melee/swing_dagger_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_dagger_ice1.wav", "/sfx/melee/swing_dagger_ice2.wav", "/sfx/melee/swing_dagger_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_dagger_poison1.wav", "/sfx/melee/swing_dagger_poison2.wav", "/sfx/melee/swing_dagger_poison3.wav" ] ] items\active\weapons\melee\dagger\dagger.animation 4,12d3 < "weapon" : { < "default" : "idle", < "states" : { < "idle" : {}, < "windup" : {}, < "swing" : {}, < "cooldown" : {} < } < }, 18c9 < "swing" : { --- > "fire" : { 34,60c25 < "rotationCenter" : [0, 0], < "groundImpactPoint" : [1.5, 1.0] < }, < < "partStates" : { < "weapon" : { < "idle" : { < "properties" : { < "offset" : [0, 2.25] < } < }, < "windup" : { < "properties" : { < "offset" : [0, 2.25] < } < }, < "swing" : { < "properties" : { < "offset" : [0, 2.5] < } < }, < "cooldown" : { < "properties" : { < "offset" : [0, 2.25] < } < } < } --- > "rotationCenter" : [0, 0] 70,94d34 < }, < < "partStates" : { < "weapon" : { < "idle" : { < "properties" : { < "offset" : [0, 2.25] < } < }, < "windup" : { < "properties" : { < "offset" : [0, 2.25] < } < }, < "swing" : { < "properties" : { < "offset" : [0, 2.5] < } < }, < "cooldown" : { < "properties" : { < "offset" : [0, 2.25] < } < } < } 101c41 < "offset" : [3.0, 0.75], --- > "offset" : [0.5, 0.75], 113c53 < "swing" : { --- > "fire" : { 135c75 < "offsetRegion" : [1.0, -0.25, 4.0, 2.0], --- > "offsetRegion" : [-1.5, -0.25, 1.5, 2.0], 142c82 < "offsetRegion" : [1.0, -0.25, 4.0, 2.0], --- > "offsetRegion" : [-1.5, -0.25, 1.5, 2.0], 156c96 < "offsetRegion" : [1.0, -0.25, 4.0, 2.0], --- > "offsetRegion" : [-1.5, -0.25, 1.5, 2.0], 167c107 < "offsetRegion" : [1.0, -0.25, 4.0, 2.0], --- > "offsetRegion" : [-1.5, -0.25, 1.5, 2.0], 181c121 < "offsetRegion" : [1.0, -0.25, 4.0, 2.0], --- > "offsetRegion" : [-1.5, -0.25, 1.5, 2.0], items\active\weapons\melee\dagger\raredagger.activeitem 23,36d22 < "fireTime" : [0.27, 0.33], < "baseDps" : [7.5, 8.5], < "damageConfig" : { < "damageSourceKind" : "dagger", < "statusEffects" : [ "shortdamagefreeze" ], < "knockback" : 10 < }, < "elementalStatusEffects" : { < "fire" : [ "burning" ], < "ice" : [ "frostslow" ], < "poison" : [ "weakpoison" ], < "electric" : [ "paralysis" ] < }, < 37a24,39 > "primaryAttack" : { > "fireTime" : [0.27, 0.33], > "baseDps" : [7.5, 8.5], > "damageConfig" : { > "statusEffects" : [ "shortdamagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 10, > "timeoutGroup" : "primary" > }, > "elementalStatusEffects" : { > "fire" : [ "burning" ], > "ice" : [ "frostslow" ], > "poison" : [ "weakpoison" ], > "electric" : [ "paralysis" ] > } > }, 42a45,46 > "weaponOffset" : [0, 2.25], > 44,45c48 < "allowRotate" : true, < "transition" : "windup" --- > "allowRotate" : true 50a54,55 > "weaponOffset" : [0, 2.25], > 52,53c57 < "allowRotate" : false, < "transition" : "swing" --- > "allowRotate" : false 55c59 < "swing" : { --- > "fire" : { 59,61c63 < "allowFlip" : false, < "allowRotate" : false, < "transition" : "cooldown", --- > "weaponOffset" : [0, 2.5], 63,74c65,66 < "sound" : "swing", < "swoosh" : "swing", < "damageConfig" : {} < }, < "cooldown" : { < "duration" : 0.1, < "armRotation" : -90, < "weaponRotation" : -10, < "twoHanded" : false, < "allowFlip" : true, < "allowRotate" : false, < "transition" : "idle" --- > "allowFlip" : false, > "allowRotate" : false 102,104c94,96 < "electric" : [ "/sfx/melee/swing_dagger.wav" ], < "ice" : [ "/sfx/melee/swing_dagger.wav" ], < "poison" : [ "/sfx/melee/swing_dagger.wav" ] --- > "electric" : [ [ "/sfx/melee/swing_dagger_electric1.wav", "/sfx/melee/swing_dagger_electric2.wav", "/sfx/melee/swing_dagger_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_dagger_ice1.wav", "/sfx/melee/swing_dagger_ice2.wav", "/sfx/melee/swing_dagger_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_dagger_poison1.wav", "/sfx/melee/swing_dagger_poison2.wav", "/sfx/melee/swing_dagger_poison3.wav" ] ] items\active\weapons\melee\dagger\uncommondagger.activeitem 23,30d22 < "fireTime" : [0.27, 0.33], < "baseDps" : [7.5, 8.5], < "damageConfig" : { < "damageSourceKind" : "dagger", < "statusEffects" : [ "shortdamagefreeze" ], < "knockback" : 10 < }, < 31a24,33 > "primaryAttack" : { > "fireTime" : [0.27, 0.33], > "baseDps" : [7.5, 8.5], > "damageConfig" : { > "statusEffects" : [ "shortdamagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 10, > "timeoutGroup" : "primary" > } > }, 36a39,40 > "weaponOffset" : [0, 2.25], > 38,39c42 < "allowRotate" : true, < "transition" : "windup" --- > "allowRotate" : true 44a48,49 > "weaponOffset" : [0, 2.25], > 46,47c51 < "allowRotate" : false, < "transition" : "swing" --- > "allowRotate" : false 49c53 < "swing" : { --- > "fire" : { 53,55c57 < "allowFlip" : false, < "allowRotate" : false, < "transition" : "cooldown", --- > "weaponOffset" : [0, 2.5], 57,68c59,60 < "sound" : "swing", < "swoosh" : "swing", < "damageConfig" : {} < }, < "cooldown" : { < "duration" : 0.1, < "armRotation" : -90, < "weaponRotation" : -10, < "twoHanded" : false, < "allowFlip" : true, < "allowRotate" : false, < "transition" : "idle" --- > "allowFlip" : false, > "allowRotate" : false 96,98c88,90 < "electric" : [ "/sfx/melee/swing_dagger.wav" ], < "ice" : [ "/sfx/melee/swing_dagger.wav" ], < "poison" : [ "/sfx/melee/swing_dagger.wav" ] --- > "electric" : [ [ "/sfx/melee/swing_dagger_electric1.wav", "/sfx/melee/swing_dagger_electric2.wav", "/sfx/melee/swing_dagger_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_dagger_ice1.wav", "/sfx/melee/swing_dagger_ice2.wav", "/sfx/melee/swing_dagger_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_dagger_poison1.wav", "/sfx/melee/swing_dagger_poison2.wav", "/sfx/melee/swing_dagger_poison3.wav" ] ] items\active\weapons\melee\hammer\commonhammer.activeitem 21,26c21,31 < "fireTime" : [1.2, 1.5], < "baseDps" : [10, 11], < "damageConfig" : { < "damageSourceKind" : "hammer", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 45 --- > "primaryAttack" : { > "fireTime" : [1.2, 1.5], > "baseDps" : [10, 11], > "damageConfig" : { > "damageSourceKind" : "hammer", > "statusEffects" : [ "damagefreeze" ], > "knockbackMode" : "facing", > "knockback" : 45 > }, > "smashMomentum" : [0, -45], > "bladeDamageMultiplier" : 0.5 29,32d33 < "knockbackMode" : "facing", < "smashMomentum" : [0, -45], < "bladeDamageMultiplier" : 0.5, < 37c38,41 < "weaponOffset" : [-0.125, 0.5] --- > "weaponOffset" : [-0.125, 0.5], > > "allowRotate" : false, > "allowFlip" : true 45a50,52 > "allowRotate" : false, > "allowFlip" : true, > 55c62 < "presmash" : { --- > "preslash" : { 60c67,70 < "weaponOffset" : [0, 2.0] --- > "weaponOffset" : [0, 2.0], > > "allowRotate" : false, > "allowFlip" : false 62c72 < "smash" : { --- > "fire" : { 68c78,81 < "weaponOffset" : [0, 2.0] --- > "weaponOffset" : [0, 2.0], > > "allowRotate" : false, > "allowFlip" : false 90,92c103,105 < "electric" : [ "/sfx/melee/swing_hammer.wav" ], < "ice" : [ "/sfx/melee/swing_hammer.wav" ], < "poison" : [ "/sfx/melee/swing_hammer.wav" ] --- > "electric" : [ [ "/sfx/melee/swing_hammer_electric1.wav", "/sfx/melee/swing_hammer_electric2.wav", "/sfx/melee/swing_hammer_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_hammer_ice1.wav", "/sfx/melee/swing_hammer_ice2.wav", "/sfx/melee/swing_hammer_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_hammer_poison1.wav", "/sfx/melee/swing_hammer_poison2.wav", "/sfx/melee/swing_hammer_poison3.wav" ] ] items\active\weapons\melee\hammer\hammer.animation 4,10d3 < "weapon" : { < "default" : "idle", < "states" : { < "idle" : {}, < "smash" : {} < } < }, 16c9 < "smash" : { --- > "fire" : { 36,44d28 < }, < "partStates" : { < "weapon" : { < "smash" : { < "properties" : { < "damageArea" : [[-1.25, -0.25], [-1.25, 1.75], [1.25, 2.0], [1.25, -0.5]] < } < } < } 54,62d37 < }, < "partStates" : { < "weapon" : { < "smash" : { < "properties" : { < "damageArea" : [[-1.25, -0.25], [-1.25, 1.75], [1.25, 2.0], [1.25, -0.5]] < } < } < } 81c56 < "smash" : { --- > "fire" : { 103c78 < "offsetRegion" : [0.75, 0.0, 4.25, 5.0], --- > "offsetRegion" : [-2.0, 0.0, 1.5, 5.0], 111c86 < "offsetRegion" : [0.75, 0.0, 4.25, 5.0], --- > "offsetRegion" : [-2.0, 0.0, 1.5, 5.0], 125c100 < "offsetRegion" : [0.75, 0.0, 4.25, 5.0], --- > "offsetRegion" : [-2.0, 0.0, 1.5, 5.0], 136c111 < "offsetRegion" : [0.75, 0.0, 4.25, 5.0], --- > "offsetRegion" : [-2.0, 0.0, 1.5, 5.0], 150c125 < "offsetRegion" : [0.75, 0.0, 4.25, 5.0], --- > "offsetRegion" : [-2.0, 0.0, 1.5, 5.0], items\active\weapons\melee\hammer\hammer.lua 3c3,5 < require "/items/active/weapons/weapon.lua" --- > require "/scripts/poly.lua" > require "/items/active/weapons/weapon2.lua" > require "/items/active/weapons/melee/meleeslash.lua" 6,10d7 < weapon.setGeneratedMeleeStats() < < self.attackTimer = 0 < self.stances = item.instanceValue("stances") < 11a9 > animator.setGlobalTag("bladeDirectives", "") 13c11 < weapon.setAltAbility() --- > self.weapon = Weapon:new(meleeWeaponConfig()) 15,16c13,14 < cooldown() < end --- > self.weapon:addTransformationGroup("weapon", {0,0}, 0) > self.weapon:addTransformationGroup("swoosh", {0,0}, math.pi/2) 18,20c16,21 < function activate(fireMode, shiftHeld) < if self.altAbility and self.altAbility.activate then < self.altAbility.activate(fireMode, shiftHeld) --- > local primaryAttack = HammerSmash:new(meleeAttackConfig(item.instanceValue("primaryAttack"), self.weapon.elementalType), item.instanceValue("stances")) > self.weapon:addAbility(primaryAttack) > > local secondaryAttack = getAltAbility() > if secondaryAttack then > self.weapon:addAbility(secondaryAttack) 21a23,24 > > self.weapon:init() 25,59c28,29 < animator.setGlobalTag("elementalType", self.elementalType) < self.attackTimer = math.max(0, self.attackTimer - dt) < < if self.attackState == "idle" then < weapon.meleeUpdateAim(false, true) < if fireMode == "primary" and self.attackTimer == 0 then < windup() < end < end < < if self.attackState == "winddown" then < local winddownProgress = self.attackTimer / self.stances.windup.duration < applyWindupRotation(winddownProgress) < weapon.meleeUpdateAim(false, true) < < if self.attackTimer == 0 then < idle() < elseif fireMode == "primary" then < windup(self.stances.windup.duration - self.attackTimer) < end < end < < if self.attackState == "windup" then < local windupProgress = 1 - (self.attackTimer / self.stances.windup.duration) < if fireMode == "primary" then < applyWindupRotation(windupProgress) < weapon.meleeUpdateAim(false, true) < else < if windupProgress > 0.8 then < presmash() < else < winddown() < end < end < end --- > self.weapon:update(dt, fireMode, shiftHeld) > end 61,66c31,33 < if self.attackState == "presmash" then < weapon.meleeUpdateAim(false, false) < if self.attackTimer == 0 then < smash() < end < end --- > function uninit() > self.weapon:uninit() > end 68,71c35,37 < if self.attackState == "smash" then < weapon.meleeUpdateAim(false, false) < if self.smashTimer > 0 then < self.smashTimer = math.max(0, self.smashTimer - dt) --- > -- Hammer primary attack > -- Extends default melee attack and overrides windup and fire > HammerSmash = MeleeSlash:new() 73,81c39,40 < local groundImpact = world.polyCollision(translatePoly(polyHandPosition(animator.partPoly("blade", "groundImpactPoly")), mcontroller.position())) < if mcontroller.onGround() or groundImpact then < self.smashTimer = 0 < if groundImpact then < animator.burstParticleEmitter("groundImpact") < animator.playSound("groundImpact") < end < end < end --- > function HammerSmash:windup() > self.weapon:setStance(self.stances.windup) 83,87c42,46 < if self.attackTimer > 0 or self.smashTimer > 0 then < weapon.setDamage() < else < cooldown() < end --- > local windupProgress = 0 > while self.fireMode == "primary" do > windupProgress = math.min(1, windupProgress + (self.dt / self.stances.windup.duration)) > self.weapon.relativeArmRotation, self.weapon.relativeWeaponRotation = self:windupRotation(windupProgress) > coroutine.yield() 90,91c49,52 < if self.altAbility then < self.altAbility.update(dt, fireMode, shiftHeld) --- > if windupProgress > 0.8 then > self:setState(self.preslash) > else > self:setState(self.winddown, windupProgress) 95,100c56,57 < function idle() < self.attackState = "idle" < animator.setAnimationState("weapon", "idle") < weapon.setStance(self.stances.idle) < weapon.clearDamage() < end --- > function HammerSmash:winddown(windupProgress) > self.weapon:setStance(self.stances.windup) 102,110c59,63 < function windup(attackTimer) < self.attackState = "windup" < self.attackTimer = attackTimer or self.stances.windup.duration < weapon.setStance(self.stances.windup) < end < function winddown() < self.attackState = "winddown" < weapon.setStance(self.stances.windup) < self.attackTimer = self.stances.windup.duration - self.attackTimer --- > while windupProgress > 0 do > windupProgress = math.max(0, windupProgress - (self.dt / self.stances.windup.duration)) > self.weapon.relativeArmRotation, self.weapon.relativeWeaponRotation = self:windupRotation(windupProgress) > coroutine.yield() > end 113,116c66,68 < function presmash() < self.attackState = "presmash" < < self.smashDirection = activeItem.aimAngleAndDirection(0, activeItem.ownerAimPosition())[2] --- > function HammerSmash:fire() > self.weapon:setStance(self.stances.fire) > self.weapon:updateAim() 118,126c70,72 < animator.setAnimationState("weapon", "smash") < self.attackTimer = self.stances.presmash.duration < weapon.setStance(self.stances.presmash) < end < < function smash() < self.attackState = "smash" < self.attackTimer = self.stances.smash.duration < self.smashTimer = self.stances.smash.smashTimer --- > animator.setAnimationState("swoosh", "fire") > animator.playSound("fire") > animator.burstParticleEmitter(self.weapon.elementalType .. "swoosh") 128c74 < local smashMomentum = item.instanceValue("smashMomentum") --- > local smashMomentum = self.smashMomentum 132,137c78,88 < weapon.setStance(self.stances.smash) < animator.setAnimationState("swoosh", "smash") < animator.setAnimationState("weapon", "smash") < animator.playSound("fire") < animator.burstParticleEmitter(self.elementalType .. "swoosh") < end --- > local smashTimer = self.stances.fire.smashTimer > local duration = self.stances.fire.duration > while smashTimer > 0 or duration > 0 do > smashTimer = math.max(0, smashTimer - self.dt) > duration = math.max(0, duration - self.dt) > > local damageArea = partDamageArea("swoosh") > if not damageArea and smashTimer > 0 then > damageArea = partDamageArea("blade") > end > self.weapon:setDamage(self.damageConfig, damageArea, self.fireTime) 139,141c90,103 < function cooldown() < self.attackTimer = self.fireTime - self.stances.windup.duration - self.stances.smash.duration < idle() --- > if smashTimer > 0 then > local groundImpact = world.polyCollision(poly.translate(poly.handPosition(animator.partPoly("blade", "groundImpactPoly")), mcontroller.position())) > if mcontroller.onGround() or groundImpact then > smashTimer = 0 > if groundImpact then > animator.burstParticleEmitter("groundImpact") > animator.playSound("groundImpact") > end > end > end > coroutine.yield() > end > > self.cooldownTimer = self:cooldownTime() 144,146c106,108 < function applyWindupRotation(progress) < self.relativeArmRotation = util.toRadians(self.stances.windup.windupBaseAngle) + math.sin(progress * 1.57) * util.toRadians(self.stances.windup.windupAngleRange) < local hammerAngle = self.stances.windup.idleHammerAngle + (1 - (self.attackTimer / (self.stances.windup.duration * 0.7))) * self.stances.windup.hammerAngleRange --- > function HammerSmash:windupRotation(progress) > local armRotation = util.toRadians(self.stances.windup.windupBaseAngle) + math.sin(progress * 1.57) * util.toRadians(self.stances.windup.windupAngleRange) > local hammerAngle = self.stances.windup.idleHammerAngle + (1 - progress * 0.7) * self.stances.windup.hammerAngleRange 152,168c114,115 < self.relativeWeaponRotation = util.toRadians(hammerAngle) < end < < function polyHandPosition(poly) < local translated = {} < for _,point in pairs(poly) do < table.insert(translated, activeItem.handPosition(point)) < end < return translated < end < < function translatePoly(poly, offset) < local translated = {} < for _,point in pairs(poly) do < table.insert(translated, vec2.add(point, offset)) < end < return translated --- > local weaponRotation = util.toRadians(hammerAngle) > return armRotation, weaponRotation items\active\weapons\melee\hammer\rarehammer.activeitem 22,23d21 < < "elementalType" : "physical", 25,36c23,38 < "fireTime" : [1.2, 1.5], < "baseDps" : [10.5, 11.5], < "damageConfig" : { < "damageSourceKind" : "2hsword", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 45 < }, < "elementalStatusEffects" : { < "fire" : [ "burning" ], < "ice" : [ "frostslow" ], < "poison" : [ "weakpoison" ], < "electric" : [ "paralysis" ] --- > "primaryAttack" : { > "fireTime" : [1.2, 1.5], > "baseDps" : [10.5, 11.5], > "damageConfig" : { > "statusEffects" : [ "damagefreeze" ], > "knockbackMode" : "facing", > "knockback" : 45 > }, > "elementalStatusEffects" : { > "fire" : [ "burning" ], > "ice" : [ "frostslow" ], > "poison" : [ "weakpoison" ], > "electric" : [ "paralysis" ] > }, > "smashMomentum" : [0, -45], > "bladeDamageMultiplier" : 0.5 39,42d40 < "knockbackMode" : "facing", < "smashMomentum" : [0, -45], < "bladeDamageMultiplier" : 0.5, < 47c45,48 < "weaponOffset" : [-0.125, 0.5] --- > "weaponOffset" : [-0.125, 0.5], > > "allowRotate" : false, > "allowFlip" : true 55a57,59 > "allowRotate" : false, > "allowFlip" : true, > 65c69 < "presmash" : { --- > "preslash" : { 70c74,77 < "weaponOffset" : [0, 2.0] --- > "weaponOffset" : [0, 2.0], > > "allowRotate" : false, > "allowFlip" : false 72c79 < "smash" : { --- > "fire" : { 78c85,88 < "weaponOffset" : [0, 2.0] --- > "weaponOffset" : [0, 2.0], > > "allowRotate" : false, > "allowFlip" : false 109,111c119,121 < "electric" : [ "/sfx/melee/swing_hammer.wav" ], < "ice" : [ "/sfx/melee/swing_hammer.wav" ], < "poison" : [ "/sfx/melee/swing_hammer.wav" ] --- > "electric" : [ [ "/sfx/melee/swing_hammer_electric1.wav", "/sfx/melee/swing_hammer_electric2.wav", "/sfx/melee/swing_hammer_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_hammer_ice1.wav", "/sfx/melee/swing_hammer_ice2.wav", "/sfx/melee/swing_hammer_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_hammer_poison1.wav", "/sfx/melee/swing_hammer_poison2.wav", "/sfx/melee/swing_hammer_poison3.wav" ] ] 114c124 < //"/items/active/weapons/melee/altabilities/generic/blinkexplosion/blinkexplosion.altability", --- > "/items/active/weapons/melee/altabilities/generic/blinkexplosion/blinkexplosion.altability", items\active\weapons\melee\hammer\uncommonhammer.activeitem 22,23d21 < < "elementalType" : "physical", 25,30c23,32 < "fireTime" : [1.2, 1.5], < "baseDps" : [10.5, 11.5], < "damageConfig" : { < "damageSourceKind" : "2hsword", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 45 --- > "primaryAttack" : { > "fireTime" : [1.2, 1.5], > "baseDps" : [10.5, 11.5], > "damageConfig" : { > "statusEffects" : [ "damagefreeze" ], > "knockbackMode" : "facing", > "knockback" : 45 > }, > "smashMomentum" : [0, -45], > "bladeDamageMultiplier" : 0.5 33,36d34 < "knockbackMode" : "facing", < "smashMomentum" : [0, -45], < "bladeDamageMultiplier" : 0.5, < 41c39,42 < "weaponOffset" : [-0.125, 0.5] --- > "weaponOffset" : [-0.125, 0.5], > > "allowRotate" : false, > "allowFlip" : true 49a51,53 > "allowRotate" : false, > "allowFlip" : true, > 59c63 < "presmash" : { --- > "preslash" : { 64c68,71 < "weaponOffset" : [0, 2.0] --- > "weaponOffset" : [0, 2.0], > > "allowRotate" : false, > "allowFlip" : false 66c73 < "smash" : { --- > "fire" : { 72c79,82 < "weaponOffset" : [0, 2.0] --- > "weaponOffset" : [0, 2.0], > > "allowRotate" : false, > "allowFlip" : false 103,105c113,115 < "electric" : [ "/sfx/melee/swing_hammer.wav" ], < "ice" : [ "/sfx/melee/swing_hammer.wav" ], < "poison" : [ "/sfx/melee/swing_hammer.wav" ] --- > "electric" : [ [ "/sfx/melee/swing_hammer_electric1.wav", "/sfx/melee/swing_hammer_electric2.wav", "/sfx/melee/swing_hammer_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_hammer_ice1.wav", "/sfx/melee/swing_hammer_ice2.wav", "/sfx/melee/swing_hammer_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_hammer_poison1.wav", "/sfx/melee/swing_hammer_poison2.wav", "/sfx/melee/swing_hammer_poison3.wav" ] ] items\active\weapons\melee\shortsword\commonshortsword.activeitem 22,30d21 < "fireTime" : [0.5, 0.67], < "baseDps" : [6, 7], < "damageConfig" : { < "damageSourceKind" : "1hsword", < "statusEffects" : [ "shortdamagefreeze" ], < "knockback" : 10 < }, < "knockbackMode" : "aim", < 31a23,33 > "primaryAttack" : { > "fireTime" : [0.5, 0.67], > "baseDps" : [6, 7], > "damageConfig" : { > "damageSourceKind" : "1hsword", > "statusEffects" : [ "shortdamagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 10, > "timeoutGroup" : "primary" > } > }, 36a39,40 > "weaponOffset" : [0, 2.25], > 38,39c42 < "allowRotate" : true, < "transition" : "windup" --- > "allowRotate" : true 44a48,49 > "weaponOffset" : [0, 2.25], > 46,47c51 < "allowRotate" : false, < "transition" : "swing" --- > "allowRotate" : false 49c53 < "swing" : { --- > "fire" : { 53,55c57 < "allowFlip" : false, < "allowRotate" : false, < "transition" : "cooldown", --- > "weaponOffset" : [0, 2.5], 57,66c59 < "sound" : "swing", < "swoosh" : "swing", < "damageConfig" : {} < }, < "cooldown" : { < "duration" : 0.1, < "armRotation" : -90, < "weaponRotation" : -10, < "twoHanded" : false, < "allowFlip" : true, --- > "allowFlip" : false, 87,91c80,84 < "physical" : [ "/sfx/melee/swing_onehanded.wav" ], < "fire" : [ [ "/sfx/melee/swing_onehanded_fire1.wav", "/sfx/melee/swing_onehanded_fire2.wav", "/sfx/melee/swing_onehanded_fire3.wav" ] ], < "electric" : [ "/sfx/melee/swing_onehanded.wav" ], < "ice" : [ "/sfx/melee/swing_onehanded.wav" ], < "poison" : [ "/sfx/melee/swing_onehanded.wav" ] --- > "physical" : [ "/sfx/melee/swing_shortsword.wav" ], > "fire" : [ [ "/sfx/melee/swing_shortsword_fire1.wav", "/sfx/melee/swing_shortsword_fire2.wav", "/sfx/melee/swing_shortsword_fire3.wav" ] ], > "electric" : [ [ "/sfx/melee/swing_shortsword_electric1.wav", "/sfx/melee/swing_shortsword_electric2.wav", "/sfx/melee/swing_shortsword_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_shortsword_ice1.wav", "/sfx/melee/swing_shortsword_ice2.wav", "/sfx/melee/swing_shortsword_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_shortsword_poison1.wav", "/sfx/melee/swing_shortsword_poison2.wav", "/sfx/melee/swing_shortsword_poison3.wav" ] ] items\active\weapons\melee\shortsword\rareshortsword.activeitem 23,37d22 < "fireTime" : [0.5, 0.67], < "baseDps" : [6.5, 7.5], < "damageConfig" : { < "damageSourceKind" : "1hsword", < "statusEffects" : [ "shortdamagefreeze" ], < "knockback" : 10 < }, < "knockbackMode" : "aim", < "elementalStatusEffects" : { < "fire" : [ "burning" ], < "ice" : [ "frostslow" ], < "poison" : [ "weakpoison" ], < "electric" : [ "paralysis" ] < }, < 38a24,39 > "primaryAttack" : { > "fireTime" : [0.5, 0.67], > "baseDps" : [6.5, 7.5], > "damageConfig" : { > "statusEffects" : [ "shortdamagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 10, > "timeoutGroup" : "primary" > }, > "elementalStatusEffects" : { > "fire" : [ "burning" ], > "ice" : [ "frostslow" ], > "poison" : [ "weakpoison" ], > "electric" : [ "paralysis" ] > } > }, 43a45,46 > "weaponOffset" : [0, 2.25], > 45,46c48 < "allowRotate" : true, < "transition" : "windup" --- > "allowRotate" : true 51a54,55 > "weaponOffset" : [0, 2.25], > 53,54c57 < "allowRotate" : false, < "transition" : "swing" --- > "allowRotate" : false 56c59 < "swing" : { --- > "fire" : { 60,62c63 < "allowFlip" : false, < "allowRotate" : false, < "transition" : "cooldown", --- > "weaponOffset" : [0, 2.5], 64,73c65 < "sound" : "swing", < "swoosh" : "swing", < "damageConfig" : {} < }, < "cooldown" : { < "duration" : 0.1, < "armRotation" : -90, < "weaponRotation" : -10, < "twoHanded" : false, < "allowFlip" : true, --- > "allowFlip" : false, 100,104c92,96 < "physical" : [ "/sfx/melee/swing_onehanded.wav" ], < "fire" : [ [ "/sfx/melee/swing_onehanded_fire1.wav", "/sfx/melee/swing_onehanded_fire2.wav", "/sfx/melee/swing_onehanded_fire3.wav" ] ], < "electric" : [ "/sfx/melee/swing_onehanded.wav" ], < "ice" : [ "/sfx/melee/swing_onehanded.wav" ], < "poison" : [ "/sfx/melee/swing_onehanded.wav" ] --- > "physical" : [ "/sfx/melee/swing_shortsword.wav" ], > "fire" : [ [ "/sfx/melee/swing_shortsword_fire1.wav", "/sfx/melee/swing_shortsword_fire2.wav", "/sfx/melee/swing_shortsword_fire3.wav" ] ], > "electric" : [ [ "/sfx/melee/swing_shortsword_electric1.wav", "/sfx/melee/swing_shortsword_electric2.wav", "/sfx/melee/swing_shortsword_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_shortsword_ice1.wav", "/sfx/melee/swing_shortsword_ice2.wav", "/sfx/melee/swing_shortsword_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_shortsword_poison1.wav", "/sfx/melee/swing_shortsword_poison2.wav", "/sfx/melee/swing_shortsword_poison3.wav" ] ] items\active\weapons\melee\shortsword\shortsword.animation 4,12d3 < "weapon" : { < "default" : "idle", < "states" : { < "idle" : {}, < "windup" : {}, < "swing" : {}, < "cooldown" : {} < } < }, 18c9 < "swing" : { --- > "fire" : { 36,60d26 < }, < < "partStates" : { < "weapon" : { < "idle" : { < "properties" : { < "offset" : [0, 2.25] < } < }, < "windup" : { < "properties" : { < "offset" : [0, 2.25] < } < }, < "swing" : { < "properties" : { < "offset" : [0, 2.5] < } < }, < "cooldown" : { < "properties" : { < "offset" : [0, 2.25] < } < } < } 70,94d35 < }, < < "partStates" : { < "weapon" : { < "idle" : { < "properties" : { < "offset" : [0, 2.25] < } < }, < "windup" : { < "properties" : { < "offset" : [0, 2.25] < } < }, < "swing" : { < "properties" : { < "offset" : [0, 2.5] < } < }, < "cooldown" : { < "properties" : { < "offset" : [0, 2.25] < } < } < } 101c42 < "offset" : [4.25, 0.75], --- > "offset" : [1.75, 0.75], 113c54 < "swing" : { --- > "fire" : { 135c76 < "offsetRegion" : [1.0, -0.25, 4.0, 2.0], --- > "offsetRegion" : [-1.5, -0.25, 1.5, 2.0], 142c83 < "offsetRegion" : [1.0, -0.25, 4.0, 2.0], --- > "offsetRegion" : [-1.5, -0.25, 1.5, 2.0], 156c97 < "offsetRegion" : [1.0, -0.25, 4.0, 2.0], --- > "offsetRegion" : [-1.5, -0.25, 1.5, 2.0], 167c108 < "offsetRegion" : [1.0, -0.25, 4.0, 2.0], --- > "offsetRegion" : [-1.5, -0.25, 1.5, 2.0], 181c122 < "offsetRegion" : [1.0, -0.25, 4.0, 2.0], --- > "offsetRegion" : [-1.5, -0.25, 1.5, 2.0], items\active\weapons\melee\shortsword\uncommonshortsword.activeitem 23,31d22 < "fireTime" : [0.5, 0.67], < "baseDps" : [6.5, 7.5], < "damageConfig" : { < "damageSourceKind" : "1hsword", < "statusEffects" : [ "shortdamagefreeze" ], < "knockback" : 10 < }, < "knockbackMode" : "aim", < 32a24,33 > "primaryAttack" : { > "fireTime" : [0.5, 0.67], > "baseDps" : [6.5, 7.5], > "damageConfig" : { > "statusEffects" : [ "shortdamagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 10, > "timeoutGroup" : "primary" > } > }, 37a39,40 > "weaponOffset" : [0, 2.25], > 39,40c42 < "allowRotate" : true, < "transition" : "windup" --- > "allowRotate" : true 45a48,49 > "weaponOffset" : [0, 2.25], > 47,48c51 < "allowRotate" : false, < "transition" : "swing" --- > "allowRotate" : false 50c53 < "swing" : { --- > "fire" : { 54,56c57 < "allowFlip" : false, < "allowRotate" : false, < "transition" : "cooldown", --- > "weaponOffset" : [0, 2.5], 58,67c59 < "sound" : "swing", < "swoosh" : "swing", < "damageConfig" : {} < }, < "cooldown" : { < "duration" : 0.1, < "armRotation" : -90, < "weaponRotation" : -10, < "twoHanded" : false, < "allowFlip" : true, --- > "allowFlip" : false, 94,98c86,90 < "physical" : [ "/sfx/melee/swing_onehanded.wav" ], < "fire" : [ [ "/sfx/melee/swing_onehanded_fire1.wav", "/sfx/melee/swing_onehanded_fire2.wav", "/sfx/melee/swing_onehanded_fire3.wav" ] ], < "electric" : [ "/sfx/melee/swing_onehanded.wav" ], < "ice" : [ "/sfx/melee/swing_onehanded.wav" ], < "poison" : [ "/sfx/melee/swing_onehanded.wav" ] --- > "physical" : [ "/sfx/melee/swing_shortsword.wav" ], > "fire" : [ [ "/sfx/melee/swing_shortsword_fire1.wav", "/sfx/melee/swing_shortsword_fire2.wav", "/sfx/melee/swing_shortsword_fire3.wav" ] ], > "electric" : [ [ "/sfx/melee/swing_shortsword_electric1.wav", "/sfx/melee/swing_shortsword_electric2.wav", "/sfx/melee/swing_shortsword_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_shortsword_ice1.wav", "/sfx/melee/swing_shortsword_ice2.wav", "/sfx/melee/swing_shortsword_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_shortsword_poison1.wav", "/sfx/melee/swing_shortsword_poison2.wav", "/sfx/melee/swing_shortsword_poison3.wav" ] ] items\active\weapons\melee\spear\commonspear.activeitem 22,27c22,37 < "fireTime" : [0.83, 1.11], < "baseDps" : [9, 10], < "damageConfig" : { < "damageSourceKind" : "spear", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 30 --- > "aimOffset" : -1.0, > "primaryAttack" : { > "fireTime" : [0.83, 1.11], > "baseDps" : [9, 10], > "damageConfig" : { > "damageSourceKind" : "spear", > "statusEffects" : [ "damagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 30, > "timeoutGroup" : "primary" > }, > "holdDamageMultiplier" : 0.1, > "holdDamageConfig" : { > "timeoutGroup" : "hold", > "timeout" : 0.5 > } 30,34d39 < "knockbackMode" : "aim", < "bladeDamageMultiplier" : 0.1, < "bladeDamageTimeout" : 0.5, < < "aimOffset" : -1.0, 40c45,48 < "weaponOffset" : [0, 0.5] --- > "weaponOffset" : [0, 0.5], > > "allowRotate" : true, > "allowFlip" : true 47c55,58 < "weaponOffset" : [0, 0.5] --- > "weaponOffset" : [0, 0.5], > > "allowRotate" : false, > "allowFlip" : false 49c60 < "stab" : { --- > "fire" : { 54c65,68 < "weaponOffset" : [0, 2.5] --- > "weaponOffset" : [0, 2.5], > > "allowRotate" : false, > "allowFlip" : false 60,67c74,77 < "weaponOffset" : [0, 2.0] < }, < "cooldown" : { < "duration" : 0.4, < "armRotation" : -90, < "weaponRotation" : 0, < "twoHanded" : false, < "weaponOffset" : [0, 0.5] --- > "weaponOffset" : [0, 2.0], > > "allowRotate" : true, > "allowFlip" : true 89,91c99,101 < "electric" : [ "/sfx/melee/swing_spear.wav" ], < "ice" : [ "/sfx/melee/swing_spear.wav" ], < "poison" : [ "/sfx/melee/swing_spear.wav" ] --- > "electric" : [ [ "/sfx/melee/swing_spear_electric1.wav", "/sfx/melee/swing_spear_electric2.wav", "/sfx/melee/swing_spear_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_spear_ice1.wav", "/sfx/melee/swing_spear_ice2.wav", "/sfx/melee/swing_spear_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_spear_poison1.wav", "/sfx/melee/swing_spear_poison2.wav", "/sfx/melee/swing_spear_poison3.wav" ] ] 94d103 < "/items/active/weapons/melee/altabilities/spear/flurry/flurry.altability", 95a105 > "/items/active/weapons/melee/altabilities/spear/flurry/flurry.altability", items\active\weapons\melee\spear\rarespear.activeitem 23,34c23,43 < "fireTime" : [0.83, 1.11], < "baseDps" : [9.5, 10.5], < "damageConfig" : { < "damageSourceKind" : "spear", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 30 < }, < "elementalStatusEffects" : { < "fire" : [ "burning" ], < "ice" : [ "frostslow" ], < "poison" : [ "weakpoison" ], < "electric" : [ "paralysis" ] --- > "aimOffset" : -1.0, > "primaryAttack" : { > "fireTime" : [0.83, 1.11], > "baseDps" : [9.5, 10.5], > "damageConfig" : { > "statusEffects" : [ "damagefreeze" ], > "knockback" : 30, > "timeoutGroup" : "primary" > }, > "knockbackMode" : "aim", > "holdDamageMultiplier" : 0.1, > "holdDamageConfig" : { > "timeoutGroup" : "hold", > "timeout" : 0.5 > }, > "elementalStatusEffects" : { > "fire" : [ "burning" ], > "ice" : [ "frostslow" ], > "poison" : [ "weakpoison" ], > "electric" : [ "paralysis" ] > } 36,39d44 < < "knockbackMode" : "aim", < "bladeDamageMultiplier" : 0.1, < "bladeDamageTimeout" : 0.5, 41d45 < "aimOffset" : -1.0, 47c51,54 < "weaponOffset" : [0, 0.5] --- > "weaponOffset" : [0, 0.5], > > "allowRotate" : true, > "allowFlip" : true 54c61,64 < "weaponOffset" : [0, 0.5] --- > "weaponOffset" : [0, 0.5], > > "allowRotate" : false, > "allowFlip" : false 56c66 < "stab" : { --- > "fire" : { 61c71,74 < "weaponOffset" : [0, 2.5] --- > "weaponOffset" : [0, 2.5], > > "allowRotate" : false, > "allowFlip" : false 67,74c80,83 < "weaponOffset" : [0, 2.0] < }, < "cooldown" : { < "duration" : 0.4, < "armRotation" : -90, < "weaponRotation" : 0, < "twoHanded" : false, < "weaponOffset" : [0, 0.5] --- > "weaponOffset" : [0, 2.0], > > "allowRotate" : true, > "allowFlip" : true 102,104c111,113 < "electric" : [ "/sfx/melee/swing_spear.wav" ], < "ice" : [ "/sfx/melee/swing_spear.wav" ], < "poison" : [ "/sfx/melee/swing_spear.wav" ] --- > "electric" : [ [ "/sfx/melee/swing_spear_electric1.wav", "/sfx/melee/swing_spear_electric2.wav", "/sfx/melee/swing_spear_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_spear_ice1.wav", "/sfx/melee/swing_spear_ice2.wav", "/sfx/melee/swing_spear_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_spear_poison1.wav", "/sfx/melee/swing_spear_poison2.wav", "/sfx/melee/swing_spear_poison3.wav" ] ] 107c116 < //"/items/active/weapons/melee/altabilities/generic/blinkexplosion/blinkexplosion.altability", --- > "/items/active/weapons/melee/altabilities/generic/blinkexplosion/blinkexplosion.altability", items\active\weapons\melee\spear\spear.animation 4,11d3 < "weapon" : { < "default" : "idle", < "states" : { < "idle" : {}, < "stab" : {}, < "hold" : {} < } < }, 17c9 < "stab" : { --- > "fire" : { 22,23d13 < }, < "hold" : { 36,54c26,27 < "transformationGroup" : "weapon" < }, < < "partStates" : { < "weapon" : { < "idle" : { < "properties" : {} < }, < "stab" : { < "properties" : { < "damageArea" : [[0, -0.5], [-0.75, 1.0], [-0.75, 2.75], [0, 4.25], [0.75, 2.75], [0.75, 1.0]] < } < }, < "hold" : { < "properties" : { < "damageArea" : [[0, -0.5], [-0.75, 1.0], [-0.75, 2.75], [0, 4.25], [0.75, 2.75], [0.75, 1.0]] < } < } < } --- > "transformationGroup" : "weapon", > "damageArea" : [[0, -0.5], [-0.75, 1.0], [-0.75, 2.75], [0, 4.25], [0.75, 2.75], [0.75, 1.0]] 64,75d36 < }, < < "partStates" : { < "weapon" : { < "idle" : { < "properties" : {} < }, < "stab" : { < }, < "hold" : { < } < } 93c54 < "stab" : { --- > "fire" : { 97,101d57 < } < }, < "hold" : { < "properties" : { < "image" : "" items\active\weapons\melee\spear\spear.lua 3c3,4 < require "/items/active/weapons/weapon.lua" --- > require "/items/active/weapons/weapon2.lua" > require "/items/active/weapons/melee/meleeslash.lua" 6c7,8 < weapon.setGeneratedMeleeStats() --- > animator.setGlobalTag("directives", "") > animator.setGlobalTag("bladeDirectives", "") 8,11c10 < self.attackTimer = 0 < self.stances = item.instanceValue("stances") < < weapon.setAltAbility() --- > self.weapon = Weapon:new(meleeWeaponConfig()) 13,14c12,13 < cooldown() < end --- > self.weapon:addTransformationGroup("weapon", {0,0}, 0) > self.weapon:addTransformationGroup("swoosh", {0,0}, math.pi/2) 16,18c15,20 < function activate(fireMode, shiftHeld) < if self.altAbility and self.altAbility.activate then < self.altAbility.activate(fireMode, shiftHeld) --- > local primaryAttack = SpearStab:new(meleeAttackConfig(item.instanceValue("primaryAttack"), self.weapon.elementalType), item.instanceValue("stances")) > self.weapon:addAbility(primaryAttack) > > local secondaryAttack = getAltAbility() > if secondaryAttack then > self.weapon:addAbility(secondaryAttack) 19a22,23 > > self.weapon:init() 23,65c27 < self.attackTimer = math.max(0, self.attackTimer - dt) < if self.attackState == "idle" then < weapon.meleeUpdateAim(true, true) < if fireMode == "primary" then < windup() < end < end < < if self.attackState == "windup" then < weapon.meleeUpdateAim(false, false) < if self.attackTimer == 0 then < stab() < end < end < < if self.attackState == "stab" then < weapon.meleeUpdateAim(false, false) < if self.attackTimer > 0 then < weapon.setDamage(self.stances.stab.damageConfig) < elseif fireMode == "primary" then < hold() < else < cooldown() < end < end < < if self.attackState == "hold" then < weapon.meleeUpdateAim(true, true) < if fireMode == "primary" then < weapon.setDamage(self.stances.hold.damageConfig) < else < cooldown() < end < end < < if self.attackState == "cooldown" then < weapon.meleeUpdateAim(true, true) < if self.attackTimer == 0 then < idle() < end < end < < weapon.update(dt, fireMode, shiftHeld) --- > self.weapon:update(dt, fireMode, shiftHeld) 69c31 < weapon.uninit() --- > self.weapon:uninit() 72,76c34,36 < function idle() < self.attackState = "idle" < weapon.setStance(self.stances.idle) < weapon.meleeUpdateAim(true, true) < end --- > -- Spear stab attack > -- Extends normal melee attack and adds a hold state > SpearStab = MeleeSlash:new() 78,83c38,39 < function windup() < self.attackState = "windup" < self.attackTimer = self.stances.windup.duration < weapon.setStance(self.stances.windup) < weapon.meleeUpdateAim(false, false) < end --- > function SpearStab:init() > MeleeSlash.init(self) 85,94c41,42 < function stab() < self.attackState = "stab" < self.attackTimer = self.stances.stab.duration < weapon.setStance(self.stances.stab) < weapon.meleeUpdateAim(false, false) < < animator.burstParticleEmitter(self.elementalType .. "swoosh") < animator.setAnimationState("weapon", "stab") < animator.setAnimationState("swoosh", "stab") < animator.playSound("fire") --- > self.holdDamageConfig = sb.jsonMerge(self.damageConfig, self.holdDamageConfig) > self.holdDamageConfig.baseDamage = self.holdDamageMultiplier * self.damageConfig.baseDamage 97,99c45,46 < function hold() < self.attackState = "hold" < weapon.setStance(self.stances.hold) --- > function SpearStab:fire() > MeleeSlash.fire(self) 101,102c48,50 < animator.setAnimationState("weapon", "hold") < animator.setAnimationState("swoosh", "hold") --- > if self.fireMode == "primary" then > self:setState(self.hold) > end 105,109c53,61 < function cooldown() < self.attackState = "cooldown" < self.attackTimer = self.stances.cooldown.duration < weapon.setStance(self.stances.cooldown) < weapon.clearDamage() --- > function SpearStab:hold() > self.weapon:setStance(self.stances.hold) > self.weapon:updateAim() > > while self.fireMode == "primary" do > local damageArea = partDamageArea("blade") > self.weapon:setDamage(self.holdDamageConfig, damageArea) > coroutine.yield() > end 111,112c63 < animator.setAnimationState("weapon", "idle") < animator.setAnimationState("swoosh", "idle") --- > self.cooldownTimer = self:cooldownTime() items\active\weapons\melee\spear\uncommonspear.activeitem 23,28c23,37 < "fireTime" : [0.83, 1.11], < "baseDps" : [9.5, 10.5], < "damageConfig" : { < "damageSourceKind" : "spear", < "statusEffects" : [ "damagefreeze" ], < "knockback" : 30 --- > "aimOffset" : -1.0, > "primaryAttack" : { > "fireTime" : [0.83, 1.11], > "baseDps" : [9.5, 10.5], > "damageConfig" : { > "statusEffects" : [ "damagefreeze" ], > "knockbackMode" : "aim", > "knockback" : 30, > "timeoutGroup" : "primary" > }, > "holdDamageMultiplier" : 0.1, > "holdDamageConfig" : { > "timeoutGroup" : "hold", > "timeout" : 0.5 > } 31,35d39 < "knockbackMode" : "aim", < "bladeDamageMultiplier" : 0.1, < "bladeDamageTimeout" : 0.5, < < "aimOffset" : -1.0, 41c45,48 < "weaponOffset" : [0, 0.5] --- > "weaponOffset" : [0, 0.5], > > "allowRotate" : true, > "allowFlip" : true 48c55,58 < "weaponOffset" : [0, 0.5] --- > "weaponOffset" : [0, 0.5], > > "allowRotate" : false, > "allowFlip" : false 50c60 < "stab" : { --- > "fire" : { 55c65,68 < "weaponOffset" : [0, 2.5] --- > "weaponOffset" : [0, 2.5], > > "allowRotate" : false, > "allowFlip" : false 61,68c74,77 < "weaponOffset" : [0, 2.0] < }, < "cooldown" : { < "duration" : 0.4, < "armRotation" : -90, < "weaponRotation" : 0, < "twoHanded" : false, < "weaponOffset" : [0, 0.5] --- > "weaponOffset" : [0, 2.0], > > "allowRotate" : true, > "allowFlip" : true 96,98c105,107 < "electric" : [ "/sfx/melee/swing_spear.wav" ], < "ice" : [ "/sfx/melee/swing_spear.wav" ], < "poison" : [ "/sfx/melee/swing_spear.wav" ] --- > "electric" : [ [ "/sfx/melee/swing_spear_electric1.wav", "/sfx/melee/swing_spear_electric2.wav", "/sfx/melee/swing_spear_electric3.wav" ] ], > "ice" : [ [ "/sfx/melee/swing_spear_ice1.wav", "/sfx/melee/swing_spear_ice2.wav", "/sfx/melee/swing_spear_ice3.wav" ] ], > "poison" : [ [ "/sfx/melee/swing_spear_poison1.wav", "/sfx/melee/swing_spear_poison2.wav", "/sfx/melee/swing_spear_poison3.wav" ] ] items\fishing\fishingrod.sword 16c16 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\apexstarter.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\apextier10broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\apextier1broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\apextier2broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\apextier3broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\apextier4broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\apextier8broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\unused\apextier5broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\unused\apextier6broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\unused\apextier7broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\broadsword\unused\apextier9broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\apex\shortsword\apextier0shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\apex\shortsword\apextier10shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\apex\shortsword\apextier1shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\apex\shortsword\apextier2shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\apex\shortsword\apextier3shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\apex\shortsword\apextier4shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\apex\shortsword\apextier8shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\apex\shortsword\unused\apextier5shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\apex\shortsword\unused\apextier6shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\apex\shortsword\unused\apextier7shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\apex\shortsword\unused\apextier9shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\broadsword\avianstarter.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\broadsword\aviantier10broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\broadsword\aviantier1broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\broadsword\aviantier2broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\broadsword\aviantier3broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\broadsword\aviantier4broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\broadsword\aviantier8broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\broadsword\unused\aviantier5broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\broadsword\unused\aviantier6broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\broadsword\unused\aviantier7broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\broadsword\unused\aviantier9broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\avian\shortsword\aviantier0shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\shortsword\aviantier10shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\shortsword\aviantier1shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\shortsword\aviantier2shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\shortsword\aviantier3shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\shortsword\aviantier4shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\shortsword\aviantier8shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\shortsword\unused\aviantier5shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\shortsword\unused\aviantier6shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\shortsword\unused\aviantier7shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\avian\shortsword\unused\aviantier9shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\alpine\legendblade\legendblade.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\biome\alpine\stonesword\stonesword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\biome\bioluminescent\lightsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded_fire1.wav" }, { "file" : "/sfx/melee/swing_twohanded_fire2.wav" }, { "file" : "/sfx/melee/swing_twohanded_fire3.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword_fire1.wav" }, { "file" : "/sfx/melee/swing_broadsword_fire2.wav" }, { "file" : "/sfx/melee/swing_broadsword_fire3.wav" } ] }, items\swords\biome\bioluminescent\watersword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded_water1.wav" }, { "file" : "/sfx/melee/swing_twohanded_water2.wav" }, { "file" : "/sfx/melee/swing_twohanded_water3.wav" }, { "file" : "/sfx/melee/swing_twohanded_water4.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword_water1.wav" }, { "file" : "/sfx/melee/swing_broadsword_water2.wav" }, { "file" : "/sfx/melee/swing_broadsword_water3.wav" }, { "file" : "/sfx/melee/swing_broadsword_water4.wav" } ] }, items\swords\biome\bone\bonesword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\colorful\crayonblue.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\colorful\crayongreen.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\colorful\crayonorange.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\colorful\crayonpurple.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\colorful\crayonred.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\colorful\crayonyellow.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\colorful\rainbowsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\biome\mushroom\mushroomsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\slime\cutarrh.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\slime\katarrhna.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\wilderness\overgrownmower.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\biome\wilderness\undergrowthtrimmer.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\broadsword\floranstarter.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\broadsword\florantier10broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\broadsword\florantier1broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\broadsword\florantier2broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\broadsword\florantier3broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\broadsword\florantier4broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\broadsword\florantier8broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\broadsword\unused\florantier5broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\broadsword\unused\florantier6broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\broadsword\unused\florantier7broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\broadsword\unused\florantier9broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\floran\shortsword\florantier0shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\shortsword\florantier10shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\shortsword\florantier1shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\shortsword\florantier2shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\shortsword\florantier3shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\shortsword\florantier4shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\shortsword\florantier8shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\shortsword\unused\florantier5shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\shortsword\unused\florantier6shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\shortsword\unused\florantier7shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\floran\shortsword\unused\florantier9shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\broadsword\glitchstarter.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\broadsword\glitchtier10broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\broadsword\glitchtier1broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\broadsword\glitchtier2broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\broadsword\glitchtier3broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\broadsword\glitchtier4broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\broadsword\glitchtier8broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\broadsword\unused\glitchtier5broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\broadsword\unused\glitchtier6broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\broadsword\unused\glitchtier7broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\broadsword\unused\glitchtier9broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\glitch\shortsword\glitchtier0shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\shortsword\glitchtier10shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\shortsword\glitchtier1shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\shortsword\glitchtier2shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\shortsword\glitchtier3shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\shortsword\glitchtier4shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\shortsword\glitchtier8shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\shortsword\unused\glitchtier5shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\shortsword\unused\glitchtier6shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\shortsword\unused\glitchtier7shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\glitch\shortsword\unused\glitchtier9shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\broadsword\humanstarter.sword 18c18 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\broadsword\humantier10broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\broadsword\humantier1broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\broadsword\humantier2broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\broadsword\humantier3broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\broadsword\humantier4broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\broadsword\humantier8broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\broadsword\unused\humantier5broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\broadsword\unused\humantier6broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\broadsword\unused\humantier7broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\broadsword\unused\humantier9broadsword.sword 16c16 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\human\shortsword\humantier0shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\shortsword\humantier10shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\shortsword\humantier1shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\shortsword\humantier2shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\shortsword\humantier3shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\shortsword\humantier4shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\shortsword\humantier8shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\shortsword\unused\humantier5shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\shortsword\unused\humantier6shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\shortsword\unused\humantier7shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\human\shortsword\unused\humantier9shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\broadsword\hylotlstarter.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\broadsword\hylotltier10broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\broadsword\hylotltier1broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\broadsword\hylotltier2broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\broadsword\hylotltier3broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\broadsword\hylotltier4broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\broadsword\hylotltier8broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\broadsword\unused\hylotltier5broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\broadsword\unused\hylotltier6broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\broadsword\unused\hylotltier7broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\broadsword\unused\hylotltier9broadsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\hylotl\shortsword\hylotltier0shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\shortsword\hylotltier10shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\shortsword\hylotltier1shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\shortsword\hylotltier2shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\shortsword\hylotltier3shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\shortsword\hylotltier4shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\shortsword\hylotltier8shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\shortsword\unused\hylotltier5shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\shortsword\unused\hylotltier6shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\shortsword\unused\hylotltier7shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\hylotl\shortsword\unused\hylotltier9shortsword.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\other\flowerbouquet.sword 17c17 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\swords\other\huntingknife.sword 18c18 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_onehanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_shortsword.wav" } ] }, items\swords\randomgenerated\biome\bonesword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_onehanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_shortsword.wav" ], items\swords\randomgenerated\biome\rustsword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_onehanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_shortsword.wav" ], items\swords\randomgenerated\biome\toxicbroadsword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_twohanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword.wav" ], items\swords\randomgenerated\dungeon\aviansword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_onehanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_shortsword.wav" ], items\swords\randomgenerated\dungeon\floranmace.generatedsword 14c14 < "soundEffect" : [ "/sfx/melee/swing_twohanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword.wav" ], items\swords\randomgenerated\dungeon\glitchsmallmace.generatedsword 14c14 < "soundEffect" : [ "/sfx/melee/swing_onehanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_shortsword.wav" ], items\swords\randomgenerated\dungeon\nightstick.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_onehanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_shortsword.wav" ], items\swords\randomgenerated\dungeon\steelchair.generatedsword 14c14 < "soundEffect" : [ "/sfx/melee/swing_twohanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword.wav" ], items\swords\randomgenerated\other\bonehammer.generatedsword 14c14 < "soundEffect" : [ "/sfx/melee/swing_twohanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword.wav" ], items\swords\randomgenerated\other\eyesword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_twohanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword.wav" ], items\swords\randomgenerated\other\firesword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_twohanded_fire1.wav", "/sfx/melee/swing_twohanded_fire2.wav", "/sfx/melee/swing_twohanded_fire3.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword_fire1.wav", "/sfx/melee/swing_broadsword_fire2.wav", "/sfx/melee/swing_broadsword_fire3.wav" ], items\swords\randomgenerated\other\fryingpan.generatedsword 14c14 < "soundEffect" : [ "/sfx/melee/swing_twohanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword.wav" ], items\swords\randomgenerated\other\starcleaversword.generatedsword 14c14 < "soundEffect" : [ "/sfx/melee/swing_twohanded_fire1.wav", "/sfx/melee/swing_twohanded_fire2.wav", "/sfx/melee/swing_twohanded_fire3.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword_fire1.wav", "/sfx/melee/swing_broadsword_fire2.wav", "/sfx/melee/swing_broadsword_fire3.wav" ], items\swords\randomgenerated\other\watersword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_twohanded_water1.wav", "/sfx/melee/swing_twohanded_water2.wav", "/sfx/melee/swing_twohanded_water3.wav", "/sfx/melee/swing_twohanded_water4.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword_water1.wav", "/sfx/melee/swing_broadsword_water2.wav", "/sfx/melee/swing_broadsword_water3.wav", "/sfx/melee/swing_broadsword_water4.wav" ], items\swords\randomgenerated\standard\commonbroadsword.generatedsword 11c11 < "soundEffect" : [ "/sfx/melee/swing_twohanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword.wav" ], items\swords\randomgenerated\standard\commonshortsword.generatedsword 11c11 < "soundEffect" : [ "/sfx/melee/swing_onehanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_shortsword.wav" ], items\swords\randomgenerated\standard\rarebroadsword.generatedsword 14c14 < "soundEffect" : [ "/sfx/melee/swing_twohanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword.wav" ], items\swords\randomgenerated\standard\rareshortsword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_onehanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_shortsword.wav" ], items\swords\randomgenerated\standard\uncommonbroadsword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_twohanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_broadsword.wav" ], items\swords\randomgenerated\standard\uncommonshortsword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_onehanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_shortsword.wav" ], items\swords\randomgenerated\unused\mushroomsword.generatedsword 13c13 < "soundEffect" : [ "/sfx/melee/swing_onehanded.wav" ], --- > "soundEffect" : [ "/sfx/melee/swing_shortsword.wav" ], items\swords\unsorted\rockbat.sword 16c16 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, items\tools\bugnet.sword 19c19 < "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_twohanded.wav" } ] }, --- > "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_broadsword.wav" } ] }, scripts\util.lua 316a317,337 > -- Config and randomization helpers > function util.randomInRange(numberRange) > if type(numberRange) == "table" then > return numberRange[1] + (math.random() * (numberRange[2] - numberRange[1])) > else > return numberRange > end > end > > function util.randomFromList(list) > return list[math.random(1,#list)] > end > > function util.mergeLists(first, second) > local merged = copy(first) > for _,item in pairs(second) do > table.insert(merged, item) > end > return merged > end >