Skip to content

Commit

Permalink
unify guardian wings code. buff weaker ones to equivalent
Browse files Browse the repository at this point in the history
  • Loading branch information
Kherae committed Apr 20, 2024
1 parent 3346455 commit 7fc8c9d
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 91 deletions.
11 changes: 0 additions & 11 deletions stats/effects/fu_effects/guardianwings/blueguardian.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name" : "blueguardian",
"effectConfig" : {},
"effectConfig" : {regenRate=0.005},
"defaultDuration" : 5,

"scripts" : [
"blueguardian.lua"
"guardianwings.lua"
],

"animationConfig" : "blueguardian.animation"
Expand Down
11 changes: 0 additions & 11 deletions stats/effects/fu_effects/guardianwings/greenguardian.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name" : "greenguardian",
"effectConfig" : {},
"effectConfig" : {regenRate=0.005},
"defaultDuration" : 5,

"scripts" : [
"greenguardian.lua"
"guardianwings.lua"
],

"animationConfig" : "greenguardian.animation"
Expand Down
17 changes: 17 additions & 0 deletions stats/effects/fu_effects/guardianwings/guardianwings.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function init()
script.setUpdateDelta(5)
self.healingRate=config.getParameter("regenRate",1/200)
bonusHandler=effect.addStatModifierGroup({})
end

function update(dt)
if (world.entityType(entity.id())=="player") or status.resource("health")>=1 then
effect.setStatModifierGroup(bonusHandler,{{stat="healthRegen",amount=status.resourceMax("health")*self.healingRate*math.max(0,1+status.stat("healingBonus"))}})
else
effect.setStatModifierGroup(bonusHandler,{})
end
end

function uninit()
effect.removeStatModifierGroup(bonusHandler)
end
11 changes: 0 additions & 11 deletions stats/effects/fu_effects/guardianwings/isogenguardian.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name" : "isogenguardian",
"effectConfig" : {},
"effectConfig" : {regenRate=0.005},
"defaultDuration" : 5,

"scripts" : [
"isogenguardian.lua"
"guardianwings.lua"
],

"animationConfig" : "isogenguardian.animation"
Expand Down
11 changes: 0 additions & 11 deletions stats/effects/fu_effects/guardianwings/orangeguardian.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name" : "orangeguardian",
"effectConfig" : {},
"effectConfig" : {regenRate=0.005},
"defaultDuration" : 5,

"scripts" : [
"orangeguardian.lua"
"guardianwings.lua"
],

"animationConfig" : "orangeguardian.animation"
Expand Down
11 changes: 0 additions & 11 deletions stats/effects/fu_effects/guardianwings/pinkguardian.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name" : "pinkguardian",
"effectConfig" : {},
"effectConfig" : {regenRate=0.005},
"defaultDuration" : 5,

"scripts" : [
"pinkguardian.lua"
"guardianwings.lua"
],

"animationConfig" : "pinkguardian.animation"
Expand Down
11 changes: 0 additions & 11 deletions stats/effects/fu_effects/guardianwings/xithriciteguardian.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name" : "xithriciteguardian",
"effectConfig" : {},
"effectConfig" : {regenRate=0.005},
"defaultDuration" : 5,

"scripts" : [
"xithriciteguardian.lua"
"guardianwings.lua"
],

"animationConfig" : "xithriciteguardian.animation"
Expand Down
11 changes: 0 additions & 11 deletions stats/effects/fu_effects/guardianwings/yellowguardian.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name" : "yellowguardian",
"effectConfig" : {},
"effectConfig" : {regenRate=0.005},
"defaultDuration" : 5,

"scripts" : [
"yellowguardian.lua"
"guardianwings.lua"
],

"animationConfig" : "yellowguardian.animation"
Expand Down

0 comments on commit 7fc8c9d

Please sign in to comment.