Skip to content

Commit

Permalink
bulbs
Browse files Browse the repository at this point in the history
  • Loading branch information
sayterdarkwynd committed Jan 2, 2019
1 parent 199ac80 commit 7c06d83
Show file tree
Hide file tree
Showing 17 changed files with 276 additions and 20 deletions.
14 changes: 14 additions & 0 deletions objects/farmables/xi_bulb2/xi_bulb.frames
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{

"frameGrid" : {
"size" : [32, 64],
"dimensions" : [6, 1],
"names" : [
[ "default.0.0", "default.1.0", "default.2.0", "default.2.1", "default.2.2", "default.3.0" ]
]
},

"aliases" : {
"default.default.default" : "default.0.0"
}
}
52 changes: 52 additions & 0 deletions objects/farmables/xi_bulb2/xi_bulb.object
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"objectName" : "xi_bulb2",
"colonyTags" : [ "nature" ],
"rarity" : "rare",
"category" : "seed",
"description" : "Provides light, and can be used to form many X'ian tools. Radioactive.",
"shortdescription" : "Mutated Seed Bulb",
"objectType" : "farmable",
"printable" : false,
"price" : 1,
"lightColor" : [150, 150, 72],
"inventoryIcon" : "xi_bulbicon.png",
"largeImage" : "xi_bulb.png:default.3.0",
"orientations" : [
{
"dualImage" : "xi_bulb.png:<color>.<stage>.<alt>",
"imagePosition" : [-8, 0],
"frames" : 1,
"animationCycle" : 0.5,

"spaces" : [ [1, 0], [0, 0], [1, 1], [0, 1], [1, 2], [0, 2], [1, 3], [0, 3] ],
"requireTilledAnchors" : false,
"anchors" : [ "bottom" ]

}
],

"stages" : [
{
"duration" : [200, 400]
},
{
"duration" : [200, 400]
},
{
"alts" : 3,
"harvestPool" : "xiHarvest"
}
],

"touchDamage" : {
"poly" : [ [-1.5, 0.0], [-1.5, 3.0], [3.0, 3.0], [3.0, 0.0] ],
"damage" : 0,

"damageType" : "IgnoresDef",
"damageSourceKind" : "poison",
"statusEffects" : [ "radioactiveplant2" ]
},

"consumeSoilMoisture" : false,
"maxImmersion" : 1.0
}
Binary file added objects/farmables/xi_bulb2/xi_bulb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added objects/farmables/xi_bulb2/xi_bulbicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions objects/farmables/xi_bulb3/xi_bulb.frames
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{

"frameGrid" : {
"size" : [32, 64],
"dimensions" : [6, 1],
"names" : [
[ "default.0.0", "default.1.0", "default.2.0", "default.2.1", "default.2.2", "default.3.0" ]
]
},

"aliases" : {
"default.default.default" : "default.0.0"
}
}
Binary file added objects/farmables/xi_bulb3/xi_bulb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions objects/farmables/xi_bulb3/xi_bulb3.object
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"objectName" : "xi_bulb3",
"colonyTags" : [ "nature" ],
"rarity" : "rare",
"category" : "seed",
"description" : "Provides light, and can be used to form many X'ian tools. Radioactive.",
"shortdescription" : "Alpha Seed Bulb",
"objectType" : "farmable",
"printable" : false,
"price" : 1,
"lightColor" : [150, 150, 72],
"inventoryIcon" : "xi_bulbicon.png",
"largeImage" : "xi_bulb.png:default.3.0",
"orientations" : [
{
"dualImage" : "xi_bulb.png:<color>.<stage>.<alt>",
"imagePosition" : [-8, 0],
"frames" : 1,
"animationCycle" : 0.5,

"spaces" : [ [1, 0], [0, 0], [1, 1], [0, 1], [1, 2], [0, 2], [1, 3], [0, 3] ],
"requireTilledAnchors" : false,
"anchors" : [ "bottom" ]

}
],

"stages" : [
{
"duration" : [200, 400]
},
{
"duration" : [200, 400]
},
{
"alts" : 3,
"harvestPool" : "xiHarvest"
}
],

"touchDamage" : {
"poly" : [ [-1.5, 0.0], [-1.5, 3.0], [3.0, 3.0], [3.0, 0.0] ],
"damage" : 0,

"damageType" : "IgnoresDef",
"damageSourceKind" : "poison",
"statusEffects" : [ "radioactiveplant3" ]
},

"consumeSoilMoisture" : false,
"maxImmersion" : 1.0
}
Binary file added objects/farmables/xi_bulb3/xi_bulbicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion radiomessages/exploration.radiomessages.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"unique": true,
"text": "^green;Excellent^reset;! You have remembered how to spawn X'i Bulbs. With them you can craft many things in your [C] menu, or use them for other purposes unique to the X'i.",
"portraitImage": "yell.<frame>",
"textSpeed": 70
"textSpeed": 70,
"persistTime" : 20.0
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions stats/effects/food/radioactivefood.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ end
function applyEffects()
status.setPersistentEffects("floranpower1", {
{stat = "healthRegen", amount = 1},
{stat = "maxHealth", amount = baseValue },
{stat = "maxEnergy", amount = baseValue2 }
{stat = "maxHealth", effectiveMultiplier = baseValue },
{stat = "maxEnergy", effectiveMultiplier = baseValue2 }
})
end

Expand Down
4 changes: 2 additions & 2 deletions stats/effects/food/radioactivefood.statuseffect
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name" : "radioactivefood",

"effectConfig" : {
"healthBonus" : 0.10,
"energyBonus" : 0.10,
"healthBonus" : 1.14,
"energyBonus" : 1.14,
"protectionBonus" : 2
},
"defaultDuration" : 200,
Expand Down
62 changes: 56 additions & 6 deletions stats/effects/weaknesses/radioactiveplant.animation
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
"particleEmitters" : {
"drips" : {
"enabled" : true,
"emissionRate" : 1.0,
"emissionRate" : 3.0,
"particles" : [
{
"particle" : {
"type" : "ember",
"size" : 1.0,
"color" : [30, 250, 30, 120],
"color" : [177, 177, 70, 255],
"fade" : 0.9,
"destructionAction" : "shrink",
"destructionTime" : 0.8,
"position" : [0.0, 0.0],
"position" : [0.0, 1.0],
"offsetRegion" : [0, 0, 0, 0],
"initialVelocity" : [0, -1.0],
"finalVelocity" : [0, -6],
"initialVelocity" : [0, 1.0],
"finalVelocity" : [0, 6],
"approach" : [0, 10],
"timeToLive" : 0.6,
"variance" : {
Expand All @@ -25,6 +25,56 @@
}
}
]
}
},
"healing" : {
"enabled" : true,
"emissionRate" : 2.4,
"particles" : [
{
"particle" : {
"type" : "animated",
"mode" : "LoopForever",
"animation" : "/animations/statuseffects/heal/heal.animation",
"size" : 0.65,
"position" : [0.0, 0.0],
"offsetRegion" : [0, 0, 0, 0],
"initialVelocity" : [0, 1.0],
"finalVelocity" : [0, 4.0],
"approach" : [0, 10],
"timeToLive" : 0.85,
"variance" : {
"initialVelocity" : [0.5, 1.0],
"size" : 0.2
}
}
}
]
},
"drips2" : {
"enabled" : true,
"emissionRate" : 5.0,
"particles" : [
{
"particle" : {
"type" : "ember",
"size" : 1.5,
"color" : [255, 0, 0, 220],
"fade" : 1.2,
"destructionAction" : "shrink",
"destructionTime" : 1.2,
"position" : [0.0, 1.0],
"offsetRegion" : [-2, 0, 2, 0],
"initialVelocity" : [0, 1.0],
"finalVelocity" : [0, 3],
"approach" : [0, 10],
"timeToLive" : 0.6,
"variance" : {
"initialVelocity" : [0.2, 0],
"size" : 0.24
}
}
}
]
}
}
}
24 changes: 20 additions & 4 deletions stats/effects/weaknesses/radioactiveplant.lua
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
function init()
self.movementParams = mcontroller.baseParameters()
self.protectionBonus = config.getParameter("protectionBonus", 0)

baseValue = config.getParameter("healthBonus",0)*(status.resourceMax("health"))
baseValue2 = config.getParameter("energyBonus",0)*(status.resourceMax("energy"))

self.tickDamagePercentage = 0.01
self.tickTime = 2
self.tickTime = config.getParameter("tickTime",0)
self.tickTimer = self.tickTime
script.setUpdateDelta(5)

self.healthRegen = config.getParameter("healthRegen",0)

self.xiBonus = status.stat("xiBonus") --apply racial bonus effect to results

self.species = world.entitySpecies(entity.id())
if (status.stat("isHerbivore")==1 or status.stat("isRobot")==1 or status.stat("isOmnivore")==1 or status.stat("isSugar")==1) and (not(status.stat("isRadien")==1)) then
world.sendEntityMessage(entity.id(), "queueRadioMessage", "foodtyperad")
end
self.species = world.entitySpecies(entity.id())

script.setUpdateDelta(5)
end

function update(dt)
if self.species == "radien" or self.species == "novakid" or self.species == "thelusian" then
applyEffects()
animator.setParticleEmitterOffsetRegion("healing", mcontroller.boundBox())
animator.setParticleEmitterActive("healing", true)
else
if not self.species == "radien" and (self.tickTimer <= 0) then
applyPenalty()
animator.setParticleEmitterOffsetRegion("drips", mcontroller.boundBox())
animator.setParticleEmitterActive("drips", true)
else
self.tickTimer = self.tickTimer - dt
end
Expand All @@ -40,13 +51,18 @@ function applyPenalty()
end

function applyEffects()
status.setPersistentEffects("floranpower1", { {stat = "healthRegen", amount = 0.8},{stat = "foodDelta", effectiveMultiplier = -1.08} })
self.appliedHeal = self.healthRegen + self.xiBonus
self.appliedHunger = 1.08 + self.xiBonus
status.setPersistentEffects("floranpower1", { {stat = "healthRegen", amount = self.appliedHeal },{stat = "foodDelta", effectiveMultiplier = -self.appliedHunger} })

--radiens dont get full when near these plants. eat up!

self.foodValue = status.resourcePercentage("food")
status.removeEphemeralEffect("wellfed")
if status.resourcePercentage("food") > 0.99 then status.setResourcePercentage("food", 0.99) end
end

function uninit()
status.clearPersistentEffects("floranpower1")
animator.setParticleEmitterActive("drips", false)
end
4 changes: 3 additions & 1 deletion stats/effects/weaknesses/radioactiveplant.statuseffect
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"effectConfig" : {
"healthBonus" : 0.10,
"energyBonus" : 0.10,
"tickTime" : 2,
"healthRegen" : 0.75,
"protectionBonus" : 2
},
"defaultDuration" : 5,
Expand All @@ -14,6 +16,6 @@

"animationConfig" : "radioactiveplant.animation",

"label" : "Radioactive Plant! Standing near the X'i bulbs is hazardous to carbon-based life. ^green;X'ians get Health and Hunger regeneration^reset;.",
"label" : "Radioactive Plant I: Standing near the X'i bulbs is hazardous to carbon-based life. ^green;X'ians get Health and Hunger regeneration^reset;.",
"icon" : "/interface/statuses/biomeradioactive.png"
}
21 changes: 21 additions & 0 deletions stats/effects/weaknesses/radioactiveplant2.statuseffect
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name" : "radioactiveplant2",

"effectConfig" : {
"healthBonus" : 0.20,
"energyBonus" : 0.20,
"tickTime" : 1,
"healthRegen" : 0.85,
"protectionBonus" : 8
},
"defaultDuration" : 5,

"scripts" : [
"radioactiveplant.lua"
],

"animationConfig" : "radioactiveplant.animation",

"label" : "Radioactive Plant II: Standing near the X'i bulbs is hazardous to carbon-based life. ^green;X'ians get Health and Hunger regeneration^reset;.",
"icon" : "/interface/statuses/biomeradioactive.png"
}
21 changes: 21 additions & 0 deletions stats/effects/weaknesses/radioactiveplant3.statuseffect
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name" : "radioactiveplant3",

"effectConfig" : {
"healthBonus" : 0.30,
"energyBonus" : 0.30,
"tickTime" : 0.5,
"healthRegen" : 0.95,
"protectionBonus" : 8
},
"defaultDuration" : 5,

"scripts" : [
"radioactiveplant.lua"
],

"animationConfig" : "radioactiveplant.animation",

"label" : "Radioactive Plant III: Standing near the X'i bulbs is hazardous to carbon-based life. ^green;X'ians get Health and Hunger regeneration^reset;.",
"icon" : "/interface/statuses/biomeradioactive.png"
}
Loading

0 comments on commit 7c06d83

Please sign in to comment.