diff --git a/codex/documents/ffguide6.codex b/codex/documents/ffguide6.codex index 4f914b240a..3be8a55916 100644 --- a/codex/documents/ffguide6.codex +++ b/codex/documents/ffguide6.codex @@ -7,6 +7,7 @@ "contentPages": [ "Use the Enhanced Codex Viewer to read this. Access it in your Tricorder." ], "longContentPages":[ "FrackinUniverse adds a large amount of armors (and foods) and enhances some older ones, allowing for a greater variety of playstyles. These can be very useful through gameplay and provide exceptionally useful benefits!\n +^yellow;Set Bonus Inheritance^reset;: As an important note, armors that are used to craft other armors can still be used to complete armor set bonuses for sets that were used in the crafting chain, so partially upgrading your set is still viable.\n ^orange;Stats^reset; : Vanilla players may notice there are more than they are used to, and even the ones they are used to have different ranges. FU presents a wider variety of armor classes to spice up your play, and does the same with food.\n If you are more interested in damage, pick up Power Armor or Hyper Power Armor to trade defensive stats for offensive ones. Alternatively, pick up Tank or Hyper Tank sets to outlast your enemy. They come in melee OR ranged! Fighting not quite your thing? Pick up an Exploration oriented set, and be at home in your environment! You're guaranteed to locate a set that suits your playstyle somewhere out there!\n ^orange;Resistances^reset; : Many armors in FU come with inherent resistances. Many biome weather effects will simply stop affecting you once you hit an appropriate amount, and various enemy attacks will do less damage. Nifty, right? It gets better; upgrade your armor, and those resistances will increase!\n @@ -16,8 +17,8 @@ Of course, some bonuses have hidden components we couldn't easily include, for t As a small side-note, some terms or symbols are used loosely. If you see a bonus with x/y, that means the bonuses are different based on how their conditions are met. For weapons, this means how many of that type. If you see something like (Machine) Pistols, that means the bonus applies to Machine Pistols OR Pistols. This is typically done for tooltip space.\n ^cyan;Mining Sets^reset; :\n Mining laser sets grant a lot more mining laser damage...but that bonus is reduced significantly if you are pairing them with something else. Using a mining laser with a pistol, as example: 2x Mining Laser Damage becomes 1.25x. ^orange;Colors^reset;: Colors are important in identifying and understanding bonuses. To start with, set bonuses are identified by a ^yellow;^reset;, while a ^green;^reset; is only visible in crafting interfaces to display resistances. If a bonus stat is ^green;GREEN^reset;, that means it is a good thing. ^red;RED^reset; means it is a bad thing. ^cyan;Cyan^reset; is for bonuses that are binary. They typically do not stack with similar effects. This will be especially apparent with various foods...so choose carefully. It is worth noticing that there is ONE exception to the rules regarding colors: Glow. If you see Glow in a color, that is usually the color of the glow effect.\n -^orange;Special Bonuses^reset; : Some sets have special bonuses that don't really display much information due to lack of space, an unfortunate limitation of the game.. Here, some bonuses will be explained. -^cyan;Adaptive Armor^reset;: Applies a defense multiplier that scales between the two listed values as your health moves between 10% (left) and 100% (right). +^orange;Special Bonuses^reset; : Some sets have special bonuses that don't really display much information due to lack of space, an unfortunate limitation of the game. Here, some bonuses will be explained.\n +^cyan;Adaptive Armor^reset;: Multiplies the wearer's total defense based on current health percentage, scaling between the left value at 20% health and the right value at 100% health.\n ^cyan;Auto-Medic^reset;: More complicated than ordinary regeneration, this effect will restore more health per second at the cost of an equal percentage of energy. It will also decrease energy regen and increase energy regen lock-out multiplicatively at 2x the heal percent.\n ^cyan;Thorns^reset;: a nova of thorns when hit, ^cyan;Fire Burst^reset; makes a nova of fire instead.\n ^cyan;Summons Minions^reset;: summons short-lived allies to fight alongside you or distract enemies. These minions scale based on the lowest armor's tier, so upgrading it is essential! Upgrade ALL of the pieces.\n diff --git a/items/armors/tier7/densiniumarmor_khe/densinium_khe.head b/items/armors/tier7/densiniumarmor_khe/densinium_khe.head index 6a328b6c85..952dc7b788 100644 --- a/items/armors/tier7/densiniumarmor_khe/densinium_khe.head +++ b/items/armors/tier7/densiniumarmor_khe/densinium_khe.head @@ -8,7 +8,7 @@ "description" : "^cyan;Headlamp^reset;\n ^orange;Set Bonuses^reset; (^orange;Part 1^reset;): ^yellow;^reset; ^cyan;Auto-Medic^reset;: 10% -^yellow;^reset; ^cyan;Adaptive Armor^reset;: 0.8x-0.5x", +^yellow;^reset; ^cyan;Adaptive Armor^reset;: ^red;0.8^reset;x^gray;-^red;0.5^reset;x", "shortdescription" : "Densinium EVA Helm", "category" : "headarmour", "tooltipKind" : "armornew2", diff --git a/objects/pilch_shieldgenerator/pilch_shieldgenerator.lua b/objects/pilch_shieldgenerator/pilch_shieldgenerator.lua index 171eff666c..da76560b7b 100644 --- a/objects/pilch_shieldgenerator/pilch_shieldgenerator.lua +++ b/objects/pilch_shieldgenerator/pilch_shieldgenerator.lua @@ -203,6 +203,8 @@ function removeField() end setStatus("Error: Failed to load field region", "red") incDirty() + + handleRemoveFail() else world.setDungeonId(storage.fieldActive, 65531) if (storage.dungeonId ~= -1) then @@ -213,6 +215,8 @@ function removeField() storage.fieldActive = nil world.setProperty(tostring(storage.dungeonId), propertyRecord()) setActive(false) + + handleEitherSuccess() end end end @@ -225,6 +229,8 @@ function applyField() end setStatus("Error: Failed to load field region", "red") incDirty() + + handleApplyFail() else world.setDungeonId(storage.targetRect, storage.dungeonId) world.setTileProtection(storage.dungeonId, storage.applyProtected) @@ -237,6 +243,8 @@ function applyField() storage.fieldActive = storage.targetRect world.setProperty(tostring(storage.dungeonId), propertyRecord()) setActive(true) + + handleEitherSuccess() end end @@ -321,6 +329,60 @@ function setGravity(msgName, isLocal, gravity, level) incDirty() end +function handleQueueRetries(dt) + if (self.reApplyTimer) then + self.reApplyTimer=self.reApplyTimer+dt + if (self.reApplyTimer>=(dt*2)) then + applyField() + end + end + if (self.reRemoveTimer) then + self.reRemoveTimer=self.reRemoveTimer+dt + if (self.reRemoveTimer>=(dt*2)) then + removeField() + end + end +end + +function handleEitherSuccess() + self.reRemoveRetries=nil + self.reApplyTimer=nil + self.reApplyRetries=nil + self.reRemoveTimer=nil +end + +function handleApplyFail() + self.reRemoveRetries=nil + if (self.reApplyRetries==2) then + object.setAllOutputNodes(false) + self.reApplyTimer=nil + else + if(self.reApplyRetries==nil) then + self.reApplyRetries=0 + else + self.reApplyRetries=self.reApplyRetries+1 + end + self.reApplyTimer=0.0 + object.setAllOutputNodes(true) + end +end + +function handleRemoveFail() + self.reApplyRetries=nil + if (self.reRemoveRetries==2) then + object.setAllOutputNodes(true) + self.reRemoveTimer=nil + else + if(self.reRemoveRetries==nil) then + self.reRemoveRetries=0 + else + self.reRemoveRetries=self.reRemoveRetries+1 + end + self.reRemoveTimer=0.0 + object.setAllOutputNodes(true) + end +end + function setActive(isActive) object.setConfigParameter("pilch_shieldgenerator_active", isActive) if (isActive) then @@ -350,8 +412,7 @@ function setStatus(message, colour) end function incDirty() - self.dirtyCounter = self.dirtyCounter or 0 - self.dirtyCounter = self.dirtyCounter + 1 + self.dirtyCounter = (self.dirtyCounter or 0) + 1 object.setConfigParameter("pilch_shieldgenerator_dirty", self.dirtyCounter) end @@ -360,6 +421,7 @@ function update(dt) if (coroutine.status(self.cor) == "suspended") then assert(coroutine.resume(self.cor)) end + handleQueueRetries(dt) end -- ping for markers when wires are connected/disconnected diff --git a/objects/pilch_shieldgenerator/pilch_shieldgeneratorasteroid.lua b/objects/pilch_shieldgenerator/pilch_shieldgeneratorasteroid.lua index a72a833a8f..47579d9ee9 100644 --- a/objects/pilch_shieldgenerator/pilch_shieldgeneratorasteroid.lua +++ b/objects/pilch_shieldgenerator/pilch_shieldgeneratorasteroid.lua @@ -197,6 +197,8 @@ function removeField() end setStatus("Error: Failed to load field region", "red") incDirty() + + handleRemoveFail() else world.setDungeonId(storage.fieldActive, 65531) if (storage.dungeonId ~= -1) then @@ -207,6 +209,8 @@ function removeField() storage.fieldActive = nil world.setProperty(tostring(storage.dungeonId), propertyRecord()) setActive(false) + + handleEitherSuccess() end end end @@ -219,6 +223,8 @@ function applyField() end setStatus("Error: Failed to load field region", "red") incDirty() + + handleApplyFail() else world.setDungeonId(storage.targetRect, storage.dungeonId) world.setTileProtection(storage.dungeonId, storage.applyProtected) @@ -231,6 +237,8 @@ function applyField() storage.fieldActive = storage.targetRect world.setProperty(tostring(storage.dungeonId), propertyRecord()) setActive(true) + + handleEitherSuccess() end end @@ -249,7 +257,7 @@ function checkArea() if (dId >= LOWID) and (dId <= HIGHID) then overlaps = overlaps + 1 if storage.debugMode then - table.insert("\n"..overlapList,tostring(dId) .. " @ " .. tostring(x) .. ", " .. tostring(y)) + table.insert(overlapList,"\n"..tostring(dId) .. " @ " .. tostring(x) .. ", " .. tostring(y)) end end iterations = iterations + 1 @@ -311,6 +319,60 @@ function setGravity(msgName, isLocal, gravity, level) incDirty() end +function handleQueueRetries(dt) + if (self.reApplyTimer) then + self.reApplyTimer=self.reApplyTimer+dt + if (self.reApplyTimer>=(dt*2)) then + applyField() + end + end + if (self.reRemoveTimer) then + self.reRemoveTimer=self.reRemoveTimer+dt + if (self.reRemoveTimer>=(dt*2)) then + removeField() + end + end +end + +function handleEitherSuccess() + self.reRemoveRetries=nil + self.reApplyTimer=nil + self.reApplyRetries=nil + self.reRemoveTimer=nil +end + +function handleApplyFail() + self.reRemoveRetries=nil + if (self.reApplyRetries==2) then + object.setAllOutputNodes(false) + self.reApplyTimer=nil + else + if(self.reApplyRetries==nil) then + self.reApplyRetries=0 + else + self.reApplyRetries=self.reApplyRetries+1 + end + self.reApplyTimer=0.0 + object.setAllOutputNodes(true) + end +end + +function handleRemoveFail() + self.reApplyRetries=nil + if (self.reRemoveRetries==2) then + object.setAllOutputNodes(true) + self.reRemoveTimer=nil + else + if(self.reRemoveRetries==nil) then + self.reRemoveRetries=0 + else + self.reRemoveRetries=self.reRemoveRetries+1 + end + self.reRemoveTimer=0.0 + object.setAllOutputNodes(true) + end +end + function setActive(isActive) object.setConfigParameter("pilch_shieldgenerator_active", isActive) if (isActive) then @@ -340,8 +402,7 @@ function setStatus(message, colour) end function incDirty() - self.dirtyCounter = self.dirtyCounter or 0 - self.dirtyCounter = self.dirtyCounter + 1 + self.dirtyCounter = (self.dirtyCounter or 0) + 1 object.setConfigParameter("pilch_shieldgenerator_dirty", self.dirtyCounter) end @@ -350,6 +411,7 @@ function update(dt) if (coroutine.status(self.cor) == "suspended") then assert(coroutine.resume(self.cor)) end + handleQueueRetries(dt) end -- ping for markers when wires are connected/disconnected diff --git a/stats/effects/fu_armoreffects/special_bonuses/devaarmorpenalty.statuseffect b/stats/effects/fu_armoreffects/special_bonuses/devaarmorpenalty.statuseffect index 9e6fbf492f..3ad801cde5 100644 --- a/stats/effects/fu_armoreffects/special_bonuses/devaarmorpenalty.statuseffect +++ b/stats/effects/fu_armoreffects/special_bonuses/devaarmorpenalty.statuseffect @@ -1,6 +1,6 @@ { "name" : "devaarmorpenalty", - "effectConfig" : {"healthMin":0.1,"healthMax":1.0,"multMin":0.8,"multMax":0.5}, + "effectConfig" : {"healthMin":0.2,"healthMax":1.0,"multMin":0.8,"multMax":0.5}, "defaultDuration" : 0.1, "scripts" : [