Skip to content

Commit

Permalink
environmental bonuses
Browse files Browse the repository at this point in the history
  • Loading branch information
sayterdarkwynd committed Nov 23, 2016
1 parent a3d3013 commit 80f7933
Show file tree
Hide file tree
Showing 14 changed files with 107 additions and 23 deletions.
1 change: 1 addition & 0 deletions species/apex.species.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
^red;-15% Energy, Weakness: Electric^reset;
^green;+8% speed and +15% jump^reset;
^green;+15% HP bonus^reset;
^green;Gain additional vitality and protection in jungles^reset;
^green;Immune: Mud tiles, Jungle tiles^reset;
^green;+20% dmg with Hammers and Axes ^reset;
^green;Hammers increase Speed when wielded ^reset;
Expand Down
2 changes: 1 addition & 1 deletion species/avali.species.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{ "op": "replace",
"path" : "/charCreationTooltip/description" ,
"value" : "Adorable fuzzy space raptors with wings.

^green;In mild to severe winds, gain additional agility^reset;
^red;-10% HP^reset;
^green;+5% Energy^reset;
^green;Immunities: Snow and Cold^reset;
Expand Down
1 change: 1 addition & 0 deletions species/avian.species.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
^green;+10% Energy^reset;
^green;Jump Boost^reset;
^green;-65% Fall Damage + Slowed Fall^reset;
^green;Gain air mobility and additional Slowed Fall in light to moderate wind conditions^reset;
^orange;+5.5% Damage^reset;^green;(increases as your HP depletes)^reset;
^yellow;+20% Wand/Staff damage^reset;"
}
Expand Down
1 change: 1 addition & 0 deletions species/fenerox.species.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

^red;-5% HP^reset;
^red;Weakness: Poison^reset;
^green;When in a dry grassland, gain +10% Damage^reset;
^red;Needs to eat more often ^green; but gains 6% speed and 11% jump height^reset;
^green;+10% Energy^reset;
^green;Increased damage, speed and health at night^reset;
Expand Down
1 change: 1 addition & 0 deletions species/floran.species.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
^red;-10% HP^reset;
^red;Weakness: Fire^reset;
^green;+15% Energy^reset;
^green;In forest-like biomes gain additional health and energy^reset;
^green;Regenerate during daylight hours^reset;
^green;Shock Immunity^reset;
^green;Damage increases the hungrier you get^reset;
Expand Down
1 change: 1 addition & 0 deletions species/hylotl.species.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
^red;Weakness: Electricity^reset;
^green;+10% HP^reset;
^green;Immune: Wet^reset;
^green;On ocean biomes, gain 20% protection^reset;
^green;Perfect Blocks restore HP (stacks)^reset;
^green;+12% dmg with shortsword and broadsword combo strikes (Stacks)^reset;
^green;+1 protection when using daggers, hammers, axes and spears^reset;
Expand Down
9 changes: 7 additions & 2 deletions stats/effects/fu_racialabilities/raceapex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ function init()

local bounds = mcontroller.boundBox()
script.setUpdateDelta(10)

if (world.type() == "jungle") or (world.type() == "thickjungle") or (world.type() == "alien") or (world.type() == "protoworld") or (world.type() == "arboreal") or (world.type() == "arborealdark") then
status.setPersistentEffects("jungleEpic", {
{stat = "protection", baseMultiplier = 1.10},
{stat = "maxHealth", baseMultiplier = 1.15}
})
end
end

function update(dt)

end

function uninit()

status.clearPersistentEffects("jungleEpic")
end
28 changes: 20 additions & 8 deletions stats/effects/fu_racialabilities/raceavali.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,26 @@ function init()
end

function update(dt)
if mcontroller.falling() then
mcontroller.controlParameters(config.getParameter("fallingParameters"))
mcontroller.setYVelocity(math.max(mcontroller.yVelocity(), config.getParameter("maxFallSpeed")))
end
mcontroller.controlModifiers({
speedModifier = 1.09,
airJumpModifier = 1.09
})
if mcontroller.falling() then
mcontroller.controlParameters(config.getParameter("fallingParameters"))
mcontroller.setYVelocity(math.max(mcontroller.yVelocity(), config.getParameter("maxFallSpeed")))
end
mcontroller.controlModifiers({
speedModifier = 1.09,
airJumpModifier = 1.09
})

if (world.windLevel(mcontroller.position()) >= 70 ) then
mcontroller.controlModifiers({
speedModifier = 1.12,
airJumpModifier = 1.12
})
elseif (world.windLevel(mcontroller.position()) >= 20 ) then
mcontroller.controlModifiers({
speedModifier = 1.15,
airJumpModifier = 1.20
})
end
end

function uninit()
Expand Down
42 changes: 36 additions & 6 deletions stats/effects/fu_racialabilities/raceavian.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,45 @@ effect.addStatModifierGroup({{stat = "maxEnergy", amount = baseValue2 }})
end

function update(dt)
mcontroller.controlParameters(self.liquidMovementParameter)
if mcontroller.falling() then
mcontroller.controlParameters(config.getParameter("fallingParameters"))
mcontroller.setYVelocity(math.max(mcontroller.yVelocity(), config.getParameter("maxFallSpeed")))
end
mcontroller.controlParameters(self.liquidMovementParameter)

if mcontroller.falling() then
mcontroller.controlParameters(config.getParameter("fallingParameters"))
mcontroller.setYVelocity(math.max(mcontroller.yVelocity(), config.getParameter("maxFallSpeed")))
end

mcontroller.controlModifiers({
speedModifier = 1.09,
airJumpModifier = 1.05,
airForce = 56
})

if (world.windLevel(mcontroller.position()) >= 60 ) then
maxFallSpeed = -39
status.clearPersistentEffects("avianwindbonus")
elseif (world.windLevel(mcontroller.position()) >= 20 ) then
maxFallSpeed = -32
status.setPersistentEffects("avianwindbonus", {
{stat = "protection", baseMultiplier = 1.10},
{stat = "maxHealth", baseMultiplier = 1.15}
})
mcontroller.controlModifiers({
speedModifier = 1.19,
airJumpModifier = 1.20,
airForce = 86
})







end
end

function uninit()

status.clearPersistentEffects("avianwindbonus")
end


7 changes: 6 additions & 1 deletion stats/effects/fu_racialabilities/racefenerox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ function init()
effect.addStatModifierGroup({{stat = "poisonStatusImmunity", amount = 1}})
local bounds = mcontroller.boundBox()
script.setUpdateDelta(10)
if (world.type() == "savannah") then
status.setPersistentEffects("jungleEpic", {
{stat = "powerMultiplier", baseMultiplier = 1.10}
})
end
end

function update(dt)

end

function uninit()

status.clearPersistentEffects("jungleEpic")
end
11 changes: 8 additions & 3 deletions stats/effects/fu_racialabilities/racefloran.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ function init()
baseValue2 = config.getParameter("energyBonus",0)*(status.resourceMax("energy"))
effect.addStatModifierGroup({{stat = "maxEnergy", amount = baseValue2 }})
effect.addStatModifierGroup({{stat = "electricStatusImmunity", amount = 1}})
script.setUpdateDelta(0)


if (world.type() == "thickjungle") or (world.type() == "forest") or (world.type() == "tundra") or (world.type() == "lush") or (world.type() == "arboreal") then
status.setPersistentEffects("jungleEpic", {
{stat = "maxHealth", baseMultiplier = 1.10},
{stat = "maxEnergy", baseMultiplier = 1.10}
})
end
end

function update(dt)

end

function uninit()

status.clearPersistentEffects("jungleEpic")
end
9 changes: 8 additions & 1 deletion stats/effects/fu_racialabilities/racehylotl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ function init()
effect.addStatModifierGroup({{stat = "breathRegenerationRate", amount = 60}})
effect.addStatModifierGroup({{stat = "wetImmunity", amount = 1}})
script.setUpdateDelta(5)


if (world.type() == "ocean") or (world.type() == "oceanfloor") then
status.setPersistentEffects("jungleEpic", {
{stat = "protection", baseMultiplier = 1.20}
})
end
end

function isDry()
Expand All @@ -22,6 +27,7 @@ local mouthPosition = vec2.add(mcontroller.position(), status.statusProperty("mo
end

function update(dt)

local mouthPosition = vec2.add(mcontroller.position(), status.statusProperty("mouthPosition"))
local mouthful = world.liquidAt(mouthposition)
if (world.liquidAt(mouthPosition)) and (inWater == 0) and (mcontroller.liquidId()== 1) or (mcontroller.liquidId()== 6) or (mcontroller.liquidId()== 58) or (mcontroller.liquidId()== 12) then
Expand All @@ -38,4 +44,5 @@ end

function uninit()
status.clearPersistentEffects("hylotlprotection")
status.clearPersistentEffects("jungleEpic")
end
10 changes: 9 additions & 1 deletion stats/effects/fu_racialabilities/racemunari.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ effect.addStatModifierGroup({{stat = "maxHealth", amount = baseValue }})
baseValue2 = config.getParameter("energyBonus",0)*(status.resourceMax("energy"))
effect.addStatModifierGroup({{stat = "maxEnergy", amount = baseValue2 }})

script.setUpdateDelta(5)
script.setUpdateDelta(5)

if (world.type() == "ocean") or (world.type() == "oceanfloor") or (world.type() == "tidewater") or (world.type() == "tidewaterfloor") then
status.setPersistentEffects("jungleEpic", {
{stat = "maxHealth", baseMultiplier = 1.10},
{stat = "maxEnergy", baseMultiplier = 1.10}
})
end
end

function isDry()
Expand Down Expand Up @@ -39,4 +46,5 @@ end
function uninit()
status.removeEphemeralEffect("regenerationminor",math.huge)
status.clearPersistentEffects("munariprotection")
status.clearPersistentEffects("jungleEpic")
end
7 changes: 7 additions & 0 deletions stats/effects/fu_racialabilities/raceorcana.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ function init()
effect.addStatModifierGroup({{stat = "breathRegenerationRate", amount = 70}})
effect.addStatModifierGroup({{stat = "wetImmunity", amount = 1}})
script.setUpdateDelta(5)

if (world.type() == "ocean") or (world.type() == "oceanfloor") or (world.type() == "tidewater") or (world.type() == "tidewaterfloor") then
status.setPersistentEffects("jungleEpic", {
{stat = "maxHealth", baseMultiplier = 1.10},
{stat = "maxEnergy", baseMultiplier = 1.10}
})
end
end

function isDry()
Expand Down

0 comments on commit 80f7933

Please sign in to comment.