diff --git a/items/active/weapons/ranged/gunfire.lua b/items/active/weapons/ranged/gunfire.lua index 6c4f9704..b3351c79 100644 --- a/items/active/weapons/ranged/gunfire.lua +++ b/items/active/weapons/ranged/gunfire.lua @@ -26,7 +26,7 @@ function GunFire:init() self.playerMagBonus = status.stat("magazineSize",0) -- player ammo bonuses self.playerReloadBonus = status.stat("reloadTime",0) -- player reload bonuses - self.magazineSize = config.getParameter("magazineSize",1) + (self.playerMagBonus or 0) -- total count of the magazine + self.magazineSize = (config.getParameter("magazineSize",1) + (self.playerMagBonus or 0) or 6) -- total count of the magazine self.magazineAmount = (self.magazineSize or 0) -- current number of bullets in the magazine self.reloadTime = config.getParameter("reloadTime",1) + (self.playerReloadBonus or 0) -- how long does reloading mag take? diff --git a/player.config.patch b/player.config.patch index 311b8668..7962a099 100644 --- a/player.config.patch +++ b/player.config.patch @@ -13,6 +13,12 @@ "path": "/statusControllerSettings/stats/maxFood", "value": { "baseValue": 70 } }, + { + "op": "add", + "path": "/statusControllerSettings/stats/boostAmount", + "value": { "baseValue": 1 } + }, + { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : {"item": "robosnax"} }, //{ "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : {"item": "raceEffectEnabler"} }, { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : {"item": "meatkibble"} }, diff --git a/stats/effects/swimboost/swimboost1.lua b/stats/effects/swimboost/swimboost1.lua index 7f494240..0b720c1d 100644 --- a/stats/effects/swimboost/swimboost1.lua +++ b/stats/effects/swimboost/swimboost1.lua @@ -1,37 +1,16 @@ function init() - local bounds = mcontroller.boundBox() - animator.setParticleEmitterOffsetRegion("bubbles", mcontroller.boundBox()) - animator.setParticleEmitterActive("bubbles", true) + effect.addStatModifierGroup({{stat = "boostAmount", amount = 1}}) -- make sure to reset the value to 1 each time it inits so values never stack self.mouthPosition = status.statusProperty("mouthPosition") or {0,0} self.mouthBounds = {self.mouthPosition[1], self.mouthPosition[2], self.mouthPosition[1], self.mouthPosition[2]} - self.boostAmount = config.getParameter("boostAmount", 0) - self.riseAmount = config.getParameter("riseAmount", 0) + self.boostAmount = config.getParameter("boostAmount", 1) + effect.addStatModifierGroup({{stat = "boostAmount", effectiveMultiplier = self.boostAmount}}) -- add the swim boost stat + sb.logInfo("ive applied swimboost of x"..status.stat("boostAmount")) end function update(dt) - - mcontroller.controlParameters(self.liquidMovementParameter) - local position = mcontroller.position() - local worldMouthPosition = { - self.mouthPosition[1] + position[1], - self.mouthPosition[2] + position[2] - } - local liquidAtMouth = world.liquidAt(worldMouthPosition) - if liquidAtMouth and (liquidAtMouth[1] == 1 or liquidAtMouth[1] == 2) then - mcontroller.controlModifiers({ - speedModifier = self.boostAmount, - liquidJumpModifier = self.riseAmount, - liquidForce = 150, - liquidImpedance = 0.1 - }) - animator.setParticleEmitterActive("bubbles", mcontroller.running()) - else - - animator.setParticleEmitterActive("bubbles", false) - end end function uninit() - -- status.removeEphemeralEffect("liquidimmunity") + end \ No newline at end of file diff --git a/stats/effects/swimboost/swimboost1.statuseffect b/stats/effects/swimboost/swimboost1.statuseffect index 01d63975..c645ac60 100644 --- a/stats/effects/swimboost/swimboost1.statuseffect +++ b/stats/effects/swimboost/swimboost1.statuseffect @@ -1,21 +1,15 @@ { "name" : "swimboost1", "effectConfig" : { - "movementParameters" : { - "liquidImpedance" : 0.4, - "liquidForce" : 90, - "liquidJumpProfile" : { - "jumpSpeed" : 60.0 - }, - "speedModifier" : 1.37 - } + "boostAmount" : 1.2, + "riseAmount" : 1.2 }, "defaultDuration" : 220, "scripts" : [ - "swimboost.lua" + "swimboost1.lua" ], "animationConfig" : "swimboost1.animation", - "label" : "Swim +", + "label" : "Swim 1", "icon" : "/interface/statuses/swimboost.png" } diff --git a/stats/effects/swimboost/swimboost2.statuseffect b/stats/effects/swimboost/swimboost2.statuseffect index dd4c0257..8fcf65e7 100644 --- a/stats/effects/swimboost/swimboost2.statuseffect +++ b/stats/effects/swimboost/swimboost2.statuseffect @@ -1,21 +1,15 @@ { "name" : "swimboost2", "effectConfig" : { - "movementParameters" : { - "liquidImpedance" : 0.3, - "liquidForce" : 130, - "liquidJumpProfile" : { - "jumpSpeed" : 70.0 - }, - "speedModifier" : 1.8 - } + "boostAmount" : 1.4, + "riseAmount" : 1.4 }, "defaultDuration" : 220, "scripts" : [ - "swimboost.lua" + "swimboost1.lua" ], "animationConfig" : "swimboost1.animation", - "label" : "Swim +", + "label" : "Swim 2", "icon" : "/interface/statuses/swimboost.png" } diff --git a/stats/effects/swimboost/swimboost3.statuseffect b/stats/effects/swimboost/swimboost3.statuseffect index 8e57f61c..3de6394b 100644 --- a/stats/effects/swimboost/swimboost3.statuseffect +++ b/stats/effects/swimboost/swimboost3.statuseffect @@ -1,21 +1,15 @@ { "name" : "swimboost3", "effectConfig" : { - "movementParameters" : { - "liquidImpedance" : 0.15, - "liquidForce" : 160, - "liquidJumpProfile" : { - "jumpSpeed" : 75.0 - }, - "speedModifier" : 2.2 - } + "boostAmount" : 1.8, + "riseAmount" : 1.8 }, "defaultDuration" : 220, "scripts" : [ - "swimboost.lua" + "swimboost1.lua" ], "animationConfig" : "swimboost1.animation", - "label" : "Swim +", + "label" : "Swim 3", "icon" : "/interface/statuses/swimboost.png" } diff --git a/stats/effects/swimboost/swimboost4.statuseffect b/stats/effects/swimboost/swimboost4.statuseffect new file mode 100644 index 00000000..a7f5e438 --- /dev/null +++ b/stats/effects/swimboost/swimboost4.statuseffect @@ -0,0 +1,15 @@ +{ + "name" : "swimboost4", + "effectConfig" : { + "boostAmount" : 2.2, + "riseAmount" : 2.2 + }, + "defaultDuration" : 220, + + "scripts" : [ + "swimboost1.lua" + ], + "animationConfig" : "swimboost1.animation", + "label" : "Swim 4", + "icon" : "/interface/statuses/swimboost.png" +}