Repository navigation
feat(buffs): time bar and countdown on the buff strip, Increase Block's two parts (PR 3) - #1285
Merged
Merged
Conversation
…'s two parts (PR 3) Buffs PR 3 (the strip), plus the client side of Increase Block's two sent parts (MUnique/OpenMU#1637). - A buff icon with a known time gets a time bar under it (green for a buff, red for a debuff) and, in its last seconds, a shade with the whole seconds left. The new "Buff countdown" option ([UI] BuffCountdownSeconds, Off or 5 to 30 s, 10 by default) sets the limit, in the legacy and modern themes, with texts in all 12 languages. - showTime per buff in Buffs.json: the shipped file shows the time for the 48 buffs the Season 6 client did, Expansion of Wizardry's master tiers and the item buffs with a duration it left out (55 in all). - Increase Block's master buffs: the AddRaw part OpenMU multiplies by the defense rate (BuffAttribute::rawPartTimes) counts with the AddFinal part; the tooltip and the character window show 52 + 0.44 x 600 = 316. Skill 569 raises increaseBlockBonus, as OpenMU has it. - A master Increase Block or Increase Health cast shows only its own buff. The versions are the Buffs.json families increaseHealth and increaseBlock, which the aura light, the MU Helper and the character window look up. - The strip's model changes only when a shown icon, bar or second does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Buffs PR 3 (the strip), plus the client side of Increase Block's two sent parts (MUnique/OpenMU#1637).
What changes
increaseBlockBonusas two values: a flat AddFinal part and an AddRaw part its class rules multiply by the defense rate (fix(effects): send an effect's raw and final part of one attribute as two values MUnique/OpenMU#1637). The buff tooltip now adds every value sent for an attribute, and the newrawPartTimesinBuffAttributes.hmultiplies the raw part by the hero's defense rate (new termdefenseRatePvm). The character window and the tooltip show 52 + 0.44 x 600 = 316, where they showed 52. The master part passes the entry's maximum. The raw part is multiplied only when an AddFinal part of the attribute comes with it: OpenMU with feat(effects): the open source client gets the time left and the values of its effects MUnique/OpenMU#1476 but without fix(effects): send an effect's raw and final part of one attribute as two values MUnique/OpenMU#1637 (merged 2026-11-29) sends one combined AddRaw value (52.44), which is shown as it came (+52).MasterSkills.jsonraisesincreaseBlockBonus, as OpenMU has it since 588b08e71, and adds its percent of the defense rate; the skill tooltip shows Increase Block with its strengthener as 316. The stand-in attributedefenseRatePvmIncrease, its text and the empty power-ups of 153 and 154 are gone. The character window and the buff values share one function for the hero's defense rate (GetHeroDefenseRatePvm).Buffs.json,increaseHealth(130, 155) andincreaseBlock(131, 153, 154). The aura light, the MU Helper's recast check and the character window look for any buff of the family (GameLogic/Buffs/PartyBuffs.h, which looks the families up once per loaded buff table), without buff numbers in code, and the defense line shows as boosted under 153 and 154 too.buff-bar,debuff-bar,buff-bar-emptyin legacy and modern; classic inherits them).buff-countdown-shade, inside the border in the modern theme) and shows the whole seconds left. No blinking.[UI] BuffCountdownSeconds(10 by default, clamped to 0..30). A hand-edited value the row doesn't list shows the nearest lower choice, and 1 to 4 s shows as 5 s, not Off. Texts in all 12 languages.showTimeper buff inBuffs.json:falsehides a buff's bar, countdown and tooltip time line even when the server sends its time. The shipped file shows it for 55 buffs: the 48 the Season 6 client kept a time for (InsertBuffLogicalEffect: seals, Jack O'Lantern, scrolls, elixirs, cherry blossoms, Expansion of Wizardry, Christmas, talismans, Gladiator's Honor, the party EXP bonus, the AG and SD auras), Expansion of Wizardry's master skill buffs (138, 139), which the strip shows in its place, and the item buffs with a duration it left out (104, 115 to 118). The other 103, skill buffs like Greater Defense among them, have"showTime": false. An admin who turns such a time on in OpenMU's Effect times page ships the same change in the players'Buffs.json;docs/buff-data.mdsays so.defenseRatePvm, the attribute Decrease Block sends, is a known attribute again.Not in this PR
Buffs.json) and the buff'sshowTimeis true.docs/buff-data.mdsays so.showTime) comes later.Testing
ctest -C Release(Windows, editor build, on main 129cfe7): 4764 of 4765 pass. The one failure isci_build_plan, whose check that runs a PowerShell script fails on this machine; it passed in the run before, and this PR doesn't touch it.test_buff_strip_time(bar percent, no bar at 0, countdown seconds, rounding, a uint32 of seconds, the config clamp, the option's choice for a hand-edited value,showTimeon the strip and the tooltip);test_buffs(showTimereads, writes only false, rejects a non-boolean, the shipped 55; the two party buff families and their helpers);test_skill_buff_values(Increase Block's two parts in the tooltip and the character stats, 569 in the skill tooltip, the float multiplication 0.44f x 600 = 264, a single AddRaw value left as it is).