diff --git a/objects/farmables/xi_bulb2/xi_bulb.frames b/objects/farmables/xi_bulb2/xi_bulb.frames new file mode 100644 index 00000000..31b800b4 --- /dev/null +++ b/objects/farmables/xi_bulb2/xi_bulb.frames @@ -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" + } +} diff --git a/objects/farmables/xi_bulb2/xi_bulb.object b/objects/farmables/xi_bulb2/xi_bulb.object new file mode 100644 index 00000000..83f55eb4 --- /dev/null +++ b/objects/farmables/xi_bulb2/xi_bulb.object @@ -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:..", + "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 +} diff --git a/objects/farmables/xi_bulb2/xi_bulb.png b/objects/farmables/xi_bulb2/xi_bulb.png new file mode 100644 index 00000000..d4bf88e2 Binary files /dev/null and b/objects/farmables/xi_bulb2/xi_bulb.png differ diff --git a/objects/farmables/xi_bulb2/xi_bulbicon.png b/objects/farmables/xi_bulb2/xi_bulbicon.png new file mode 100644 index 00000000..c5f25019 Binary files /dev/null and b/objects/farmables/xi_bulb2/xi_bulbicon.png differ diff --git a/objects/farmables/xi_bulb3/xi_bulb.frames b/objects/farmables/xi_bulb3/xi_bulb.frames new file mode 100644 index 00000000..31b800b4 --- /dev/null +++ b/objects/farmables/xi_bulb3/xi_bulb.frames @@ -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" + } +} diff --git a/objects/farmables/xi_bulb3/xi_bulb.png b/objects/farmables/xi_bulb3/xi_bulb.png new file mode 100644 index 00000000..d4bf88e2 Binary files /dev/null and b/objects/farmables/xi_bulb3/xi_bulb.png differ diff --git a/objects/farmables/xi_bulb3/xi_bulb3.object b/objects/farmables/xi_bulb3/xi_bulb3.object new file mode 100644 index 00000000..9c10d4f1 --- /dev/null +++ b/objects/farmables/xi_bulb3/xi_bulb3.object @@ -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:..", + "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 +} diff --git a/objects/farmables/xi_bulb3/xi_bulbicon.png b/objects/farmables/xi_bulb3/xi_bulbicon.png new file mode 100644 index 00000000..c5f25019 Binary files /dev/null and b/objects/farmables/xi_bulb3/xi_bulbicon.png differ diff --git a/radiomessages/exploration.radiomessages.patch b/radiomessages/exploration.radiomessages.patch index 88275679..fc2fd8a2 100644 --- a/radiomessages/exploration.radiomessages.patch +++ b/radiomessages/exploration.radiomessages.patch @@ -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.", - "textSpeed": 70 + "textSpeed": 70, + "persistTime" : 20.0 } }, { diff --git a/stats/effects/food/radioactivefood.lua b/stats/effects/food/radioactivefood.lua index 5d6db3fe..dd055864 100644 --- a/stats/effects/food/radioactivefood.lua +++ b/stats/effects/food/radioactivefood.lua @@ -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 diff --git a/stats/effects/food/radioactivefood.statuseffect b/stats/effects/food/radioactivefood.statuseffect index 13382f5f..9398fdd9 100644 --- a/stats/effects/food/radioactivefood.statuseffect +++ b/stats/effects/food/radioactivefood.statuseffect @@ -2,8 +2,8 @@ "name" : "radioactivefood", "effectConfig" : { - "healthBonus" : 0.10, - "energyBonus" : 0.10, + "healthBonus" : 1.14, + "energyBonus" : 1.14, "protectionBonus" : 2 }, "defaultDuration" : 200, diff --git a/stats/effects/weaknesses/radioactiveplant.animation b/stats/effects/weaknesses/radioactiveplant.animation index ba58963b..73b42934 100644 --- a/stats/effects/weaknesses/radioactiveplant.animation +++ b/stats/effects/weaknesses/radioactiveplant.animation @@ -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" : { @@ -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 + } + } + } + ] + } } } diff --git a/stats/effects/weaknesses/radioactiveplant.lua b/stats/effects/weaknesses/radioactiveplant.lua index 65975884..6a8bf011 100644 --- a/stats/effects/weaknesses/radioactiveplant.lua +++ b/stats/effects/weaknesses/radioactiveplant.lua @@ -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 @@ -40,8 +51,12 @@ 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 @@ -49,4 +64,5 @@ end function uninit() status.clearPersistentEffects("floranpower1") + animator.setParticleEmitterActive("drips", false) end diff --git a/stats/effects/weaknesses/radioactiveplant.statuseffect b/stats/effects/weaknesses/radioactiveplant.statuseffect index 20746013..aa474739 100644 --- a/stats/effects/weaknesses/radioactiveplant.statuseffect +++ b/stats/effects/weaknesses/radioactiveplant.statuseffect @@ -4,6 +4,8 @@ "effectConfig" : { "healthBonus" : 0.10, "energyBonus" : 0.10, + "tickTime" : 2, + "healthRegen" : 0.75, "protectionBonus" : 2 }, "defaultDuration" : 5, @@ -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" } diff --git a/stats/effects/weaknesses/radioactiveplant2.statuseffect b/stats/effects/weaknesses/radioactiveplant2.statuseffect new file mode 100644 index 00000000..6334f9f4 --- /dev/null +++ b/stats/effects/weaknesses/radioactiveplant2.statuseffect @@ -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" +} diff --git a/stats/effects/weaknesses/radioactiveplant3.statuseffect b/stats/effects/weaknesses/radioactiveplant3.statuseffect new file mode 100644 index 00000000..7583ed32 --- /dev/null +++ b/stats/effects/weaknesses/radioactiveplant3.statuseffect @@ -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" +} diff --git a/tech/other/xi_bulb.lua b/tech/other/xi_bulb.lua index 981c3d69..4fd00642 100644 --- a/tech/other/xi_bulb.lua +++ b/tech/other/xi_bulb.lua @@ -8,6 +8,7 @@ function initCommonParameters() self.energyCost = config.getParameter("energyCostPerSecond") self.bombTimer = 0 self.conshakTimer = 0 + self.xiBonus = status.stat("xiBonus") end function uninit() @@ -22,11 +23,10 @@ function getFood() self.foodValue = 50 self.energyValue = status.resource("energy") end - --sb.logInfo(self.foodValue) end function checkStance() - if (self.conshakTimer < 500) then + if (self.conshakTimer < 350) then animator.setParticleEmitterActive("bulb", false) else animator.playSound("xibulbActivate") @@ -89,18 +89,31 @@ function update(args) if (self.conshakTimer >= 350) then self.rand = math.random(1,2) + self.onehundred = math.random(1,100) if (self.foodValue >=10) then --must have sufficient food to grow a seed animator.setParticleEmitterActive("bulbStance", false) animator.setParticleEmitterActive("bulb", true) --world.placeObject("xi_bulb",mcontroller.position(),1) -- doesnt seem to work with that position - world.spawnItem("xi_bulb", mcontroller.position(), self.rand) + if self.onehundred == 100 then + world.spawnItem("xi_bulb3", mcontroller.position(), self.rand) + elseif self.onehundred > 80 then + world.spawnItem("xi_bulb2", mcontroller.position(), self.rand) + else + world.spawnItem("xi_bulb", mcontroller.position(), self.rand) + end local configBombDrop = { power = 0 } world.spawnProjectile("activeBulbCharged", mcontroller.position(), entity.id(), {0, 0}, false, configBombDrop) self.conshakTimer = 0 elseif (self.foodValue < 10) and self.energyValue > 20 then animator.setParticleEmitterActive("bulbStance", false) animator.setParticleEmitterActive("bulb", true) - world.spawnItem("xi_bulb", mcontroller.position(), self.rand) + if self.onehundred == 100 then + world.spawnItem("xi_bulb3", mcontroller.position(), self.rand) + elseif self.onehundred > 95 then + world.spawnItem("xi_bulb2", mcontroller.position(), self.rand) + else + world.spawnItem("xi_bulb", mcontroller.position(), self.rand) + end local configBombDrop = { power = 0 } world.spawnProjectile("activeBulbCharged", mcontroller.position(), entity.id(), {0, 0}, false, configBombDrop) self.conshakTimer = 0