Commit graph

144 commits

Author SHA1 Message Date
the-real-herowl
b28467d348 Added mcl_luck API
Luck and Bad Luck effects use the mcl_luck API now
The API is unused for now
2024-05-22 21:02:25 +02:00
the-real-herowl
c503a5fb8c Added luck and bad luck effects
They're no-op for now
2024-05-22 21:02:25 +02:00
the-real-herowl
bbe2964d48 Added some effect descriptions 2024-05-22 21:02:25 +02:00
the-real-herowl
5263740a80 Added conduit power 2024-05-22 21:02:25 +02:00
the-real-herowl
ddbc7cd826 Haste and fatigue expanded and improved
* abstracted and refactored some parts of haste and fatigue
* added and exposed new mcl_potions API functions
* fixed haste and fatigue not altering the hand
* mcl_meshhand now calls into mcl_potions when resetting the hand
2024-05-22 21:02:25 +02:00
the-real-herowl
6d7fe91047 Capped fatigue effect on punching
This fixes a crash, too
Also updates toolcaps on gamemode change
2024-05-22 21:02:25 +02:00
the-real-herowl
0c4094596e Improved haste and fatigue effects
* fixed a few crashes related to unusual effect levels
* added haste and fatigue combat functionality
* added some cleanup to avoid hangover unstackable items
* capped the slowdown from fatigue at 5 minutes digging time
* (despite the above, if a tool has a longer time set in definition,
	that still works)
* removed an unused "global" variable
2024-05-22 21:02:25 +02:00
the-real-herowl
1ac81e440c Added haste and fatigue 2024-05-22 21:02:25 +02:00
the-real-herowl
bf82241e82 Added dolphin's grace 2024-05-22 21:02:25 +02:00
the-real-herowl
456d205161 Added strength and weakness effects
* also highest effect level displayed in HUD set to 3000
* also improved indicating effects with strange factors in HUD
2024-05-22 21:02:25 +02:00
the-real-herowl
0e33947258 Renamed some functions and variables
* changed names referring to player where it does support mobs
* also added an is_player() check in one function
2024-05-22 21:02:25 +02:00
the-real-herowl
03c73b7820 Improved descriptions 2024-05-22 21:02:25 +02:00
the-real-herowl
e039642446 Improved nausea 2024-05-22 21:02:25 +02:00
the-real-herowl
394b090c83 Improved the darkness effect 2024-05-22 21:02:25 +02:00
the-real-herowl
65b923c43c Added darkness 2024-05-22 21:02:25 +02:00
the-real-herowl
aa4ff1827d Added nausea 2024-05-22 21:02:25 +02:00
the-real-herowl
92a77a7dbb Fixed graphical features of some effects
* loading fixed (by adding on_load)
* absorption bar never reaching end fixed
2024-05-22 21:02:25 +02:00
the-real-herowl
31adc45da9 Added blindness effect
(also improved TT descriptions of some effects)
2024-05-22 21:02:25 +02:00
the-real-herowl
5610fa1c4b Added frost effect 2024-05-22 21:02:25 +02:00
the-real-herowl
3f5cea3046 Added HP hudbar look modifier API
(for now in mcl_potions)
2024-05-22 21:02:25 +02:00
the-real-herowl
a8054e8112 Add hero of the village effect 2024-05-22 21:02:25 +02:00
the-real-herowl
007500613a Added food poisoning and saturation effects 2024-05-22 21:02:24 +02:00
the-real-herowl
fce73ab2bf Added some missing effects and improved API
* added a way to have a damage modifier relying on type instead of flag
* added Slow Falling
* added Levitation
* added Health Boost
* added Absorption
2024-05-22 21:02:24 +02:00
the-real-herowl
08942d3b25 Improved damage mods in effects, resistance effect 2024-05-22 21:02:24 +02:00
the-real-herowl
a6c9bc8a01 Improved effects HUD and fixes
* Fixed some effects not being replaced correctly with higher levels
* Implemented an old FIXME (MTE 5.3.0 fixed underlying bug)
* Added a way to obtain an approximate level of effect from factor
* Added effect level to HUD under the icon
* Added effect timer to HUD under the icon
2024-05-22 21:02:24 +02:00
the-real-herowl
5a7a533bf6 Added missing effect descriptions 2024-05-22 21:02:24 +02:00
the-real-herowl
83530b4298 Improved potion descriptions
* added support for effect descriptions
* added descriptions for some effects
* fixed a crash
2024-05-22 21:02:24 +02:00
the-real-herowl
a8fcae0f51 Fixed variable definitions ("undeclared global") 2024-05-22 21:02:24 +02:00
the-real-herowl
f1e9c3b563 Translatable effect names and cleanup
-added translatable effect names to the API
-made /effect utilize those descriptions
-cleaned up variables/constants to go with further API changes
2024-05-22 21:02:24 +02:00
the-real-herowl
5827a7638d Reimplemented /effect heal and fixed bugs
-heal subcommand to the /effect reimplemented
-healing_func() from old API standardized, included in new API
-(the last point is due to it being substantially different from others)
-fixed a few bugs, potential crashes
-fixed incorrect withering effect progression
-standardized variable naming
2024-05-22 21:02:24 +02:00
the-real-herowl
d1ca0f23f0 Resolved merge conflict 2024-05-22 21:02:24 +02:00
the-real-herowl
5750284e8f Improved /effect command and fixes
-improved the /effect command, allowing to use effect levels
-fixed a bug in level-to-factor conversions
-renamed effect icons to follow the new convention
2024-05-22 21:02:24 +02:00
the-real-herowl
8477d13c79 General effects API overhaul
- added a `register_effect()` function
- added the withering effect
- registered all the old effects under the new API
- unified effect names
- updated the main effect checker to use the new API
- changed some hardcoded values to support the unified effect naming
- added new namespaced metadata effects strings
- added support for legacy effect player metadata
- potions are still using the old effects API
- added glue between old API calls and the new API
- renamed the effect icons to support the unified effect naming
2024-05-22 21:02:24 +02:00
the-real-herowl
645072507f Wither melee attack and bug fixes 2023-10-11 00:54:31 +00:00
the-real-herowl
966712f4ff Optimisation and cleanup
-optimised and cleaned up wither rose withering effect code
-removed unused code
2023-10-11 00:54:31 +00:00
the-real-herowl
e4102e6124 Implemented wither defensive measures
Added block breaking when hit, or a safe_boom when hit and mobs_griefing
is disabled. Removed dubious anti-troll measures.
2023-10-11 00:54:31 +00:00
the-real-herowl
17c8f220e6 A few more wither fixes 2023-10-11 00:54:31 +00:00
Nauta Turbidus
a1b6819756 Withering effect and effect immunities
Added withering effect and immunities to effects.

Signed-off-by: Nauta Turbidus <88062389+nauta-turbidus@users.noreply.github.com>
2023-10-11 00:54:31 +00:00
PrairieWind
23d6c3d17b Update campfire rightclick and smothering 2023-09-04 22:05:38 +00:00
cora
c3455de604 Clear bad omen when raid complete 2022-11-26 17:06:04 +01:00
cora
dc017864fd raids: properly integrate potions api
supports "level" now, bad omen > 1 means extra wave additionally
the playername is saved in the event object now for later access
and events can be made exclusive to a certain radius now.
2022-11-26 17:06:04 +01:00
PrairieWind
1b6d778dd1 Add Village Checks 2022-11-26 17:06:03 +01:00
PrairieWind
96ac31bec3 Add Bad Omen Effect 2022-11-26 17:06:03 +01:00
talamh
695fab5f06 Fix status effects scaling issue with non 16x texture packs 2022-10-11 21:53:48 +01:00
Johannes Fritz
18f8768909 Fix invisibility potion when changing skin 2022-09-15 12:04:20 -05:00
Johannes Fritz
3695ee2425 Fix invisibility potion crash 2022-09-08 16:45:53 -05:00
Elias Fleckenstein
e0f70b54ec Remove _cmi_is_mob 2022-05-25 23:13:33 +02:00
MysticTempest
44b1d583a7 Potion Fixes:
Ensure all potion icons disappear after their effect is gone.
Stop Breath bar from flashing when water_breathing is in effect.
2022-05-09 05:18:59 -05:00
NO11
4aabd7d9e7 Make size/position of potion HUD more MC like 2021-08-01 12:10:00 +00:00
AFCMS
a71a0e9161 fix even more warnings (nether portals and potions) 2021-05-22 23:04:18 +02:00