forgottenserver
forgottenserver copied to clipboard
Feature: Breakable mana shield
New config
- useBreakableManaShield: bool
- manaShieldBarForAll: bool
New Lua function
- player:setManaShieldBar: allows to use mana shield bar as something else (e.g. boss fight timer)
Modified lua script
- data/spells/scripts/support/magic_shield.lua: give possibility to use old mana shield and breakable mana shield
- [x] I have followed [proper The Forgotten Server code styling][code].
- [x] I have read and understood the [contribution guidelines][cont] before making this PR.
- [x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
I like the changes, but I would like a global config for the old and new PVP (after balancing), so we could only use one config for all future changes. Another thing is, maybe we could split this request in two, as the magic shield and the rooted condition have no connection. Do not take my comment as negative review, it's just my opinion, thank you very much for bringing the changes!
I ended up finding that you didn't add any spells that break the magic shield, nor did you add the potion system to retrieve it, is this going to be added in the future or has it been forgotten?
locking player in place could be a cool gm feature, having root condition optional to support both old and new clients
spells and potion related to config settings TODO: remove condition root, apply Zbizu changes
boolean[MANASHIELD_BREAKABLE_FOR_ALL] = getGlobalBoolean(L, "manaShieldBarForAll", false); this setting is to fast enable mana shield bar for all vocations/players
Don't forget to add useBreakableManaShield
and manaShieldBarForAll
to config.lua.dist
I think we should use the mana shield as the default as we are on protocol 12.80+
manaShieldBarForAll is optional setting for custom things, useBreakableManaShield enable feature for ed and ms(like RL tibia)
@ArturKnopik ok I tested it today, it seems to be working fine
Since we're in the v12+ client territory, it is expected to see the mana shield bar, therefore all mana shields should be "breakable". If someone wants "unbreakable" they can probably make it up with a mana limit equal to player's mana easily.
only mage mana shields are breakable, old shield still exist from energy rings (limited to paladins/knight now) and it can't be breakable, not all vocations have breakable mana shield but mages
my approach is to deliver something that can be easily customized without requiring a change in the source code why 2 configurations? useBreakableManaShield - enables new functionality for mana shield manaShieldBarForAll - does not check xml options, everyone has it turned on by default, it helps a little when you have more vocations (example: 12-16), combining with player:setManaShieldBar can be used as boss timer etc... xml option + useBreakableManaShield can turn new mana shield bar for specific profession
Sorry for 100 years of waiting, totally forgot about this PR
yo guys, lets test this and give feedback, lets merge this!
yo guys, lets test this and give feedback, lets merge this!
everything worked great, except the utamo vita spell in revscript, it said "you have the wrong vocation to cast this spell", but once I moved it to XML it worked just fine
@EPuncker i forgot revert fix for debug build after master merge, i will revert this changes + fix formatting @omarcopires i will check it today
Looking at the current code, I noticed that there is compatibility with the old formula being maintained. However, in my opinion, maintaining this compatibility only increases the amount of code and may be unnecessary for those who do not wish to use the old formula. Additionally, several changes have been made to configuration parameters and spells since version 1.3, including cooldowns and item limits. Therefore, I believe it is important to question whether we really need to maintain this compatibility or if it would be better to simplify the code and remove the old formula, allowing us to focus only on the newer versions. What do you think.
@omarcopires string_view issue appear again - fixed @EPuncker reverted string_view fix
@omarcopires for me old mana shield is viable for EVO and FUN ots, personally i developed 12+ OTS(FUN) with old mana shield
I performed tests in several scenarios and did not encounter any issues within the game. The shield and icon were added and broken as expected, and the "utamo vita" spell now functions correctly. It is worth noting that the tests were only performed with the "druid" class.
there are 5 failing checks, can you verify them please?
Fails not related to my changes.