Giter Club home page Giter Club logo

potions's Introduction

Potions

This module adds several potions which have a variety of effects such as healing, regen, speed increases, and status ailment cures. This also adds a potion drinking system as well as the ability for other systems to modify the effects. Moreover, if a potion is durable enough, an empty bottle will be returned following the potion consumption.

The following potions are present in this module:

  • All Speed - Combines the effects of the Jump Speed, Swim Speed, and Walk Speed potions.
  • Battle - Allows the user to withstand more damage, restores 50 HP, and activates 5 HP per second health regen for 11.5 seconds.
  • BlindWalk - Turns the player blind for 5 seconds along with speed decrease (Awaiting API integration for the No_Visibility effect to work)
  • Combat - Combines the effects of walk speed, health boost, regeneration, resist physical damage and heal potions. Useful in combat.
  • Cure All - Cures all status ailments when consumed.
  • Cure Poison - Cures poison status when consumed.
  • Divergence - Coincidentally harms and regenerates player's health, but regens in larger amounts.
  • Double Jump - Allows the user to double jump for 15 seconds.
  • Explosive - When consumed, it produces an explosion that destroys the surrounding area.
  • Giga Jump - Triples all jump stats for 10 seconds
  • Glue - Reduces the user's walking speed by 10% and prevents them from jumping for 15 seconds.
  • Harm - Removes 20 HP from the user instantly.
  • Heal - Restores 20 HP to the user instantly.
  • Health Boost - Increases the user's base max health by 50% for 30 seconds.
  • Hemlock Potion - A more dangerous version of the poison potion, dealing 6 damage per second for up to 15 seconds.
  • Immobility Potion - Greatly reduces various mobility stats for 15 seconds.
  • Inversion - Disorients the player by inverting the controls (i.e. turning left will turn right).
  • Invincible - Makes the user invincible for 10 seconds.
  • Item Use Speed - Increases the user's item use speed by 25% for 15 seconds.
  • Juggernaut - Restricts the Player's movements in exchange for damage resistance for 10 seconds.
  • Jump Speed - Doubles the user's jump speed for 10 seconds.
  • Mega Jump - Doubles all jump stats for 10 seconds
  • Mobility - For 15 seconds, doubles the user's jump height, walk speed, and swim speed, grants the ability to double jump, but reduces item use speed by 25%.
  • Ninja - Speeds up your running and jumping
  • Overdrive - Triples the user’s jumping and walking speeds for 11 seconds.
  • Poison - Poisons user, dealing 3 damage per second for up to 15 seconds.
  • Rage - Triples the user's jump height, walk speed, and swim speed for 15 seconds. However, during this period, it also poisons the user for 3 damage per second.
  • Regen - User regenerates 3 HP per second for 10 seconds.
  • Regen II - User regenerates 6 HP per second for 10 seconds ( Like regular Regen X 2 )
  • Resist Physical - Temporarily increases user's physical defense by 15 for 20 seconds.
  • Resist Poison - Reduces the effects of poison statuses by 2 when consumed for 15 seconds.
  • Sacred - Regenerates 3 HP per second for 10 seconds, increases the user's base max health by 25% for 30 seconds, and also cures poison status.
  • Super Heal - Restores a vast 300 HP to the user.
  • Swim Speed - Doubles the user's swim speed for 10 seconds.
  • Ultimate - Applies all effects from the positive potions onto the user.
  • Ultra Heal - Restores a very vast 500 HP to the user.
  • Walk Speed - Doubles the user's walk speed for 10 seconds.

The following potion effects are present in this module:

  • CURE_ALL_AILMENTS - Cures all status ailments from target. The magnitude and duration fields are unused here.
  • CURE_POISON - Cures poison status ailment from target. The magnitude and duration fields are unused here.
  • EXPLOSIVE - Explodes all blocks around target for magnitude damage over a maximum range of duration. The duration field is used to dictate range instead of time.
  • GLUE - Reduce target's base walk speed to 10% lower and prevents them from jumping for duration milliseconds.
  • HARM - Removes magnitude health. The duration field is unused.
  • HEAL - Restores magnitude health. The duration field is unused.
  • ITEM_USE_SPEED - Modifies target's base item use speed to be magnitude times as fast for duration milliseconds.
  • JUMP_SPEED - Modifies target's base jumping speed to be magnitude times as fast for duration milliseconds.
  • MULTI_JUMP - Grants target the ability to multi jump magnitude times before hitting solid ground for duration milliseconds.
  • POISON - Inflicts poison status ailment onto target, which damages them for magnitude damage per second for duration milliseconds.
  • REGEN - Regenerates magnitude health per second for duration milliseconds.
  • RESIST_PHYSICAL - Increases physical defense by magnitude for duration milliseconds.
  • RESIST_POISON - Increases poison defense by magnitude for duration milliseconds.
  • SWIM_SPEED - Modifies target's base swimming speed to be magnitude times as fast for duration milliseconds.
  • TEMP_MAX_HEALTH_BOOST - Boosts maximum health value by magnitude% for duration milliseconds.
  • WALK_SPEED - Modifies target's base walking speed to be magnitude times as fast for duration milliseconds.

Contribution

Run groovyw module recurse Potions command while in the Terasology root folder to fetch and store the module locally. Then fork the module and add a remote reference using the command git remote add <remote-name> <your fork> in the /module/Potions directory.

Refer to the Developer Guide section in the wiki for further details about how to develop new potions and containers.

Send in PRs to this repository and feel free to add your name to the authors list in the module.txt file. Also add credits to this README citing sources for icons and textures.

Credits for images:

  • Trekmarvel for the base potion bottle graphics.
  • Regen2PotionBottle.png edited from base by Minege
  • Sacred: SacredPotionBottle.png edited from base by smsunarto

potions's People

Contributors

arpitkamboj avatar cervator avatar darkweird avatar dhanjo avatar e-aakash avatar gkaretka avatar immortius avatar jaygupta2003 avatar jdrueckert avatar kallentu avatar kcirtaptrick avatar keturn avatar mdj117 avatar minege avatar mjuvekar7 avatar mkalb avatar naman-sopho avatar nihal111 avatar pamtdoh avatar patnipriyansh avatar pollend avatar rzats avatar s-ulphuric avatar sagarg22 avatar shardulc avatar skaldarnar avatar smsunarto avatar sufurelite avatar trekmarvel avatar xrtariq2594 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

potions's Issues

Fix Health Boost Potion

The Health Boost Potion is supposed to increase the user's base max health by 50% for 30 seconds. But right now what it ends up doing is reducing health. See:

image
image
A good place to start could be trying to understand how the various Potion Authority Systems work and how the effect: "TEMP_MAX_HEALTH_BOOST" fits in there.
To try the potions: Enable the Potions module and start the game in the JS or Core Gameplay game modes and then use 'give' command in the console to obtain the potions.

Add "durability" to potion bottles

Currently, when a potion is drunk, the original bottle is destroyed. A nice extension to the potion drinking system would be to allow for a bottle to be used multiple times before discarded. In other words, if a health potion were to be drunk, an empty potion bottle would be returned as long as the remaining durability was high enough.

We likely need one or two new components for this, and tweaking of a few systems. Probably also need add defaults and modify the potion crafting system in Alchemy.

So we need at least the following:

  • Name of the old potion bottle's prefab.
  • Durability of the potion bottle.
  • Durability cost per potion drink.
  • Is the potion bottle unbreakable?

Reduce/Remove Fall Damage for Jump Speed Potions

When the jump speed potions (such as JumpSpeed Potion, MegaJump Potion, Rage Potion, Ninja Potion) are activated, the player unmistakably gains an ability to jump higher.
However, this ends up dealing a huge amount of fall damage to the player with every jump. This fall damage is too high for a player to enjoy the newly gained abilities via the said potions, thus the player may choose to opt out of using them even after spending some amount of trouble obtaining them.

What can be done is to either completely eliminate the fall damage(not advisable) or reduce it to a great extent i.e. have a fractional multiplier to reduce the damage proportionately for all cases. It is advisable to look at other games which have a similar potion or tool which gives the players such an ability to jump higher and devise a solution to the issue accordingly.

To try the potions: Enable the Potions module and start the game in the JS or Core Gameplay game modes and then use 'give' command in the console to obtain the potions.

Implement missing potion effect

Following from last GCI a lot of potions have missing effects.

Simply pulling the info off the wiki it seems that the following potions are not working.

  • AllSpeedPotion
  • CombatPotion
  • ExplosivePotion
  • HealthBoostPotion
  • JumpSpeedPotion
  • MobilityPotion
  • PoisonPotion
  • RagePotion
  • RegenPotion
  • ResistPhysicalPotion
  • SlowWalkPotion
  • SwimSpeedPotion
  • UltimatePotion

They will need the appropriate effects implemented before they work. It's also probably wise to update the test plan if needed when they are implemented.

Give Visual Effect to Poison and Hemlock Potions

Currently, when the Poison and Hemlock Potions are used, what happens is that the health of the player starts decreasing at the specified rate without any issues.
However, what we want is to notify the player in the form of a visual indicator that the poison is still active and is reducing the heath of the player.
One Way to do this is by adding particle effects to the player model. Implementation of such an effect can be found in LightAndShadow.
image
image

To try the potions: Enable the Potions module and start the game in the JS or Core Gameplay game modes and then use 'give' command in the console to obtain the potions.

Update test plan for next release

Not that we're really doing releases yet, but I figured this would be a good habit to start: document changes that will result in needed adjustments in the test plan. Usually we'd probably do something like this later in a release cycle while reviewing the pending milestone for changes needed (unless of cause authors themselves update the test plan as they go along, which is naturally preferred)

  • #25 - adds the BlindWalk potion. Has two effects, the walk speed reduction works, but blindness is not yet implemented (possible dependency on MovingBlocks/Terasology#2449)

(pinging @xrtariq2594 for reference, @nihal111 too if he ends up merging a potion or two)

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40083022-update-test-plan-for-next-release?utm_campaign=plugin&utm_content=tracker%2F6706249&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F6706249&utm_medium=issues&utm_source=github).

Fix Juggernaut Potion (Restrict Walking)

The Juggernaut potion is supposed to restrict the Player's movements in exchange for damage resistance for 10 seconds.
Currently the potion does restrict jumping but the player is still free to walk around.

To fix: Either render the player completely immobile or reduce the walking speed to a very minimal amount (see Immobility potion).

To try the potions: Enable the Potions module and start the game in the JS or Core Gameplay game modes and then use 'give' command in the console to obtain the potions.

Lack of DisplayNameComponent can cause log spam in PotionClientSystem

If at present you give emptyVial with Potions running you get a broken icon image in the toolbar (as there is no texture - I suspect emptyvial.prefab is obsolete and should be deleted) followed by massive log spam as seemingly a tooltip preparation piece fails to find a display name for the broken vial, causing NPEs over and over.

Can fix by simply adding a DisplayName block to that prefab, but instead we should really null harden PotionClientSystem.setItemTooltip() so this can't happen, then maybe delete emptyvial.prefab

17:14:20.877 [main] ERROR o.t.e.event.internal.EventSystemImpl - Failed to invoke event
java.lang.NullPointerException: null
	at org.terasology.potions.system.PotionClientSystem.setItemTooltip(PotionClientSystem.java:44)
	at org.terasology.potions.system.PotionClientSystemMethodAccess.invoke(Unknown Source)
	at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:506)
	at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:269)
	at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:260)
	at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
	at org.terasology.rendering.nui.layers.ingame.inventory.ItemCell$1.get(ItemCell.java:58)
	at org.terasology.rendering.nui.layers.ingame.inventory.ItemCell$1.get(ItemCell.java:47)
	at org.terasology.rendering.nui.widgets.UIList.getList(UIList.java:132)
	at org.terasology.rendering.nui.layers.ingame.inventory.ItemIcon.getTooltip(ItemIcon.java:158)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawStyledWidget(CanvasImpl.java:401)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawWidget(CanvasImpl.java:392)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawWidget(CanvasImpl.java:368)
	at org.terasology.rendering.nui.layers.ingame.inventory.ItemCell.onDraw(ItemCell.java:111)
	at org.terasology.rendering.nui.layers.ingame.inventory.InventoryCell.onDraw(InventoryCell.java:97)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawStyledWidget(CanvasImpl.java:406)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawWidget(CanvasImpl.java:392)
	at org.terasology.rendering.nui.layouts.FlowLayout.onDraw(FlowLayout.java:57)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawStyledWidget(CanvasImpl.java:406)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawWidget(CanvasImpl.java:392)
	at org.terasology.rendering.nui.layouts.relative.RelativeLayout.onDraw(RelativeLayout.java:78)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawStyledWidget(CanvasImpl.java:406)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawWidget(CanvasImpl.java:392)
	at org.terasology.rendering.nui.layers.hud.CoreHudWidget.onDraw(CoreHudWidget.java:60)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawStyledWidget(CanvasImpl.java:406)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawWidget(CanvasImpl.java:392)
	at org.terasology.rendering.nui.layers.hud.HUDScreenLayer.onDraw(HUDScreenLayer.java:162)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawStyledWidget(CanvasImpl.java:406)
	at org.terasology.rendering.nui.internal.CanvasImpl.drawWidget(CanvasImpl.java:392)
	at org.terasology.rendering.nui.internal.NUIManagerInternal.render(NUIManagerInternal.java:476)
	at org.terasology.engine.modes.StateIngame.renderUserInterface(StateIngame.java:235)
	at org.terasology.engine.modes.StateIngame.render(StateIngame.java:219)
	at org.terasology.engine.subsystem.lwjgl.LwjglGraphics.postUpdate(LwjglGraphics.java:189)
	at org.terasology.engine.TerasologyEngine.tick(TerasologyEngine.java:441)
	at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:397)
	at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:373)
	at org.terasology.engine.Terasology.main(Terasology.java:153)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.