-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from gamrguy/master
just a whole buncha updates really
- Loading branch information
Showing
39 changed files
with
958 additions
and
1,772 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
|
||
function FRHelper:call(args, main, dt) | ||
self.auraReload = (self.auraReload or args.auraReload) - dt | ||
local res | ||
if not status.isResource(args.resource) then | ||
res = args.resourceDefault | ||
else | ||
res = status.resourcePercentage(args.resource) | ||
end | ||
if self.auraReload <= 0 and res < args.threshold then | ||
world.spawnProjectile(args.projType, mcontroller.position(), entity.id(), args.projVelocity or {0, 0}, args.track, args.projParameters) | ||
self.auraReload = args.auraReload | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
function FRHelper:call(args, main, dt, ...) | ||
local nighttime = world.timeOfDay() > 0.5 | ||
local underground = world.underground(mcontroller.position()) | ||
|
||
local foodValue | ||
if status.isResource("food") then | ||
foodValue = status.resourcePercentage("food") | ||
else | ||
foodValue = args.foodDefault | ||
end | ||
|
||
if nighttime or underground and (foodValue >= args.foodThreshold) then | ||
status.modifyResourcePercentage("health", args.healingRate * dt) | ||
|
||
self:applyStats(args, args.name or "FR_feneroxNightBonus", main, dt, ...) | ||
else | ||
self:clearPersistent(args.name or "FR_feneroxNightBonus") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--[[ | ||
Provides a speed bonus that increases when you're well fed. | ||
Arguments: | ||
{ | ||
"foodDefault" : 0.5, -- What food % to use on NPCs and casual mode players | ||
"speedFactor" : 4.25, -- Changes how much speed you get per % of food bar | ||
"minSpeed" : 1.0, -- Minimum amount of speed bonus | ||
"maxSpeed" : 1.2 -- Maximum amount of speed bonus | ||
} | ||
The above default arguments show an effect that caps at +20% speed at 85% food. | ||
]] | ||
|
||
|
||
function FRHelper:call(args) | ||
local foodValue | ||
if status.isResource("food") then | ||
foodValue = status.resourcePercentage("food") | ||
else | ||
foodValue = args.foodDefault | ||
end | ||
|
||
foodValue = foodValue / args.speedFactor | ||
mcontroller.controlModifiers({ util.lerp(foodValue, args.minSpeed, args.maxSpeed) }) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.