Skip to content

feat(items): add the gladiator's honor - #1471

Merged
sven-n merged 2 commits into
MUnique:masterfrom
icheat2win:feat/gladiators-honor
Nov 14, 2026
Merged

sven-n merged 2 commits into
MUnique:masterfrom
icheat2win:feat/gladiators-honor

Conversation

@icheat2win

Copy link
Copy Markdown
Contributor

Adds the Gladiator's Honor (13/95) of issue #1339. Like the game client describes it, it can only be used in Vulcanus and increases the experience there by 20 %. Its effect adds the new
Stats.VulcanusExperienceRate, which the new VulcanusExperiencePlugIn applies while the player is in Vulcanus. The map is configurable.

The client doesn't define its duration, so it lasts like a seal (30 minutes). The higher drop rate of rare items is left out.

Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T18:36:19.543718Z ca30a97 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codacy-production

codacy-production Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06f9fc3f4e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// Gets the experience rate which is added while the player is in Vulcanus, e.g. by the Gladiator's Honor.
/// </summary>
/// <remarks>The experience is multiplied by one plus this rate by the <c>VulcanusExperiencePlugIn</c>.</remarks>
public static AttributeDefinition VulcanusExperienceRate { get; } = new(new Guid("199015AC-3139-4E6B-A7C0-5439DD4F7052"), "Vulcanus Experience Rate", "The experience rate which is added while the player is in Vulcanus.");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid introducing a stat solely for Gladiator's Honor

The only producer of this attribute is the new Gladiator's Honor effect in BuffItems, and its only consumer is VulcanusExperiencePlugIn. This violates rule 3 of docs/CODING_RULES.md: “Don't introduce new stats for one specific item or skill.” It turns this item's implementation detail into a permanent persisted attribute/GUID contract and requires additional attribute-creation handling during upgrades. Keep the map restriction in the feature plugin and represent the bonus through existing experience attributes or item/plugin configuration instead.

AGENTS.md reference: AGENTS.md:L16-L17

Useful? React with 👍 / 👎.

/// </summary>
/// <param name="attribute">The attribute.</param>
/// <returns>The persistent attribute definition.</returns>
private AttributeDefinition GetOrCreateAttribute(AttributeDefinition attribute)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace by extension method StatsExtensions.GetPersistent

@sven-n sven-n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Prefer a configuration-driven implementation

I'd like to change the approach for Gladiator's Honor. The current implementation contains too much feature-specific game logic. OpenMU's attribute system should already provide most of the required functionality through configuration.

Proposed approach

  1. Add Stats.IsInVulcanus as a flag attribute. Set it to 1 through Vulcanus's GameMapDefinition.CharacterPowerUpDefinitions. The existing MapPowerUps infrastructure automatically applies and removes it when entering or leaving the map.

  2. Keep Stats.VulcanusExperienceRate as the attribute contributed by Gladiator's Honor (0.2).

  3. Add a conditional attribute relationship to the relevant Season 6 character classes, so the Vulcanus bonus only contributes while IsInVulcanus is active.

  4. The experience bonus must be multiplicative, not additive. For example, an existing experience rate of 1.5 should become 1.8, not 1.7.

    One possible solution is a generic Stats.ExperienceGainMultiplier, with a base value of 1.0 and this relationship:

    CreateConditionalRelationship(
        Stats.ExperienceGainMultiplier,
        Stats.IsInVulcanus,
        Stats.VulcanusExperienceRate);

    Apply this multiplier after the existing experience-rate calculation in PlayerExperience.cs and the corresponding calculation in Party.cs. This would provide a reusable mechanism for future experience modifiers.

  5. Remove VulcanusExperiencePlugIn and the duplicate map configuration. Neither should be necessary when the bonus is calculated through attributes.

The map-use restriction may still require a small consume-handler plugin if the item must only be usable inside Vulcanus. However, the experience calculation itself should not require a dedicated plugin.

Initialization and testing

Please ensure that both fresh initialization and the configuration update for existing databases contain the new attributes, map power-up and conditional relationships. The update should be idempotent.

Tests should cover entering and leaving Vulcanus, buff expiration, normal and master experience, party experience, and interaction with existing experience bonuses.

The goal is to keep the feature almost entirely configuration-driven, with only minimal, reusable changes to generic game logic. This is more consistent with CODING_RULES.md, especially rule 3.

@sven-n sven-n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR conflicts with current master, so I can't merge it. Please rebase it onto master. These files conflict:

  • src/GameLogic/Properties/PlugInResources.Designer.cs
  • src/GameLogic/Properties/PlugInResources.resx
  • src/Persistence/Initialization/Properties/ItemNames.Designer.cs
  • src/Persistence/Initialization/Properties/ItemNames.de.resx
  • src/Persistence/Initialization/Properties/ItemNames.resx
  • src/Persistence/Initialization/Properties/ItemNames.zh-CN.resx
  • src/Persistence/Initialization/Properties/PlugInResources.Designer.cs
  • src/Persistence/Initialization/Properties/PlugInResources.de.resx
  • src/Persistence/Initialization/Properties/PlugInResources.resx
  • src/Persistence/Initialization/Properties/PlugInResources.zh-CN.resx
  • src/Persistence/Initialization/VersionSeasonSix/Items/BuffItems.cs
  • tests/MUnique.OpenMU.Persistence.Initialization.Tests/BuffItemsDataTest.cs
  • tests/MUnique.OpenMU.Persistence.Initialization.Tests/ItemStatProfilesDataTest.cs

Most of them are resource files (.resx / .Designer.cs) which other merged PRs also extended. When you resolve them, keep the entries of both sides, and regenerate the designer file instead of merging it by hand. I'll review it in full once it's rebased.


Generated by Claude Code

@icheat2win
icheat2win force-pushed the feat/gladiators-honor branch from 06f9fc3 to a336f06 Compare November 14, 2026 15:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a336f062d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// Tests that the item can't be used outside of Vulcanus, so it isn't used up.
/// </summary>
[Test]
public async Task CanNotBeUsedOutsideOfVulcanusAsync()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use ValueTask for the newly added asynchronous tests

The four new tests here, plus the new data test and its configuration factory, return Task or Task<T>. Rule 11 of docs/CODING_RULES.md, adopted as the review baseline by the root AGENTS.md, explicitly requires: “Asynchronous methods return ValueTask / ValueTask<T>.” Change these newly introduced signatures to the required return types; the nearby BuffItemConsumptionTest already demonstrates ValueTask-returning NUnit tests.

AGENTS.md reference: AGENTS.md:L16-L17

Useful? React with 👍 / 👎.

@sven-n sven-n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the rebase. The Gladiator's Honor looks good to me: it can only be used on the configured map, and the experience bonus comes from its own stat, which only applies while the player is in Vulcanus.

Unfortunately, #1504 was merged in the meantime and regenerated GameLogic/Properties/PlugInResources.Designer.cs, so this PR conflicts again (GameLogic/Properties/PlugInResources.*, PlayerMessage.*). Please rebase once more: keep the entries of both sides in the .resx files, then regenerate the designer. Once it's clean and green, I'll merge it.

(Your item PRs #1458, #1461, #1464, #1470 and #1471 all add to the same resource files, so each merge makes the others conflict again. I'll take whichever is ready first.)


Generated by Claude Code

Adds the Gladiator's Honor (13/95) of issue MUnique#1339. Like the game client
describes it, it can only be used in Vulcanus and increases the
experience there by 20 %. Its effect adds the new
Stats.VulcanusExperienceRate, which the new VulcanusExperiencePlugIn
applies while the player is in Vulcanus. The map is configurable.

The client doesn't define its duration, so it lasts like a seal (30
minutes). The higher drop rate of rare items is left out.

Rebased onto master: this is the change of the earlier commits in one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011xNc76CH3CGWUp5r4XmXWK
@icheat2win
icheat2win force-pushed the feat/gladiators-honor branch from a336f06 to ca30a97 Compare November 14, 2026 18:31
@sven-n
sven-n merged commit 5688cf4 into MUnique:master Nov 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants