[solved] [engine] min_value for [resistance]
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
-
- Posts: 1256
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
[solved] [engine] min_value for [resistance]
[resistance] takes a max_value, but does not have a min_value (or max_negative_value, which may be a little easier to understand).
LotI has an ability called adamant, which triples resistances, but only up max_value=80%. However, it also has a penetration special, which has an effect to lower resistance of adjacent units. Therefore, it is possible to lower an enemy's resistance to say -60 which would then be tripled to -180% if that unit had adamant. It seems to me only fair that it should at least be possible to cap negative resistance effect to -80% if you're going to cap positive resistance effect at 80%. Of course, the author may not want those to match, so IMO max and min should be separate arguments (as opposed to making max an absolute value such that max/min always match).
LotI has an ability called adamant, which triples resistances, but only up max_value=80%. However, it also has a penetration special, which has an effect to lower resistance of adjacent units. Therefore, it is possible to lower an enemy's resistance to say -60 which would then be tripled to -180% if that unit had adamant. It seems to me only fair that it should at least be possible to cap negative resistance effect to -80% if you're going to cap positive resistance effect at 80%. Of course, the author may not want those to match, so IMO max and min should be separate arguments (as opposed to making max an absolute value such that max/min always match).
Last edited by white_haired_uncle on April 6th, 2024, 4:39 pm, edited 1 time in total.
Speak softly, and carry Doombringer.
Re: [engine] min_value for [resistance]
This is not about min_value, it is about order of operations. Even mainline steadfast will double weaknesses when weakness is caused by another ability.
Maintainer of Ageless Era. Ravana's Multiplayer Works
-
- Posts: 1256
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: [engine] min_value for [resistance]
I'm fine with multiplying weakness. That's not it this is about.
The issue is that the effect is capped on the positive side, but not the negative, hence min (max_negative) value.
The issue is that the effect is capped on the positive side, but not the negative, hence min (max_negative) value.
Speak softly, and carry Doombringer.
-
- Code Contributor
- Posts: 173
- Joined: October 6th, 2017, 12:57 pm
Re: [engine] min_value for [resistance]
i push a PR https://github.com/wesnoth/wesnoth/pull/8133 for use max_value and min_value attribute in all abilities or pecials who return numerical value
-
- Posts: 1256
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
-
- Code Contributor
- Posts: 173
- Joined: October 6th, 2017, 12:57 pm
Re: [solved] [engine] min_value for [resistance]
PR not yet commited, don't thanck me too fast