Repository navigation
Lord's Mix of the castle senior (crafting 18) - #1571
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 109 |
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.
sven-n
left a comment
There was a problem hiding this comment.
Thanks, a well-described addition. The guild-master check, the per-cycle count saved under the castle siege execution lock, and the optional update look sensible. Two things before I run the tests:
-
Conflict: it conflicts with
masterinsrc/Persistence/Initialization/Properties/PlugInResources.Designer.cs. Please rebase, keep both sides' entries in the.resx, and regenerate the designer. Also check the regenerated designers:GameLogic/Properties/PlayerMessage.Designer.cs(~1900 changed lines) andCraftingNames.Designer.cs(~450) look fully rewritten, probably by another generator version or formatting. If they don't need to change that much, please keep the diff to the new entries. -
Behaviour change for existing craftings: the
SimpleItemCraftingHandlerchanges aren't limited to the Lord's Mix:- "a socket result item gets its sockets from the socket count table, or uniformly between 1 and its maximum without one (it got none before)"
- "socket result items never get excellent options"
Both apply to every
SimpleItemCraftingHandlercrafting which can produce a socket item, in fresh and existing configurations, without an update and without a table. Please either limit the new behaviour to craftings which have the new tables (no table → behaviour as before), or list the existing Season 6 craftings which are affected and explain why the new behaviour is correct for them (observed behaviour, not decompiled code, see rule 9). Then it can be judged as a fix rather than a side effect.
Generated by Claude Code
3fd1047 to
511a06a
Compare
|
This page shows the possible item pool as well as the rules: https://www.guiamuonline.com/lordmix The following videos seem to be from GMO and the items produced agree with that list (except for the normal Staff of Kundun, but the list also lacks a staff group item). The limit also appears to be 1x day. |
511a06a to
eb1853d
Compare
|
Thanks for the review, both points are addressed:
|
|
Thanks a lot, this is very useful. I changed the PR accordingly (273fde8):
A few things in the guide don't seem to be Season 6, so I didn't take them over:
The ingredients agree: 30 loose Jewels of Guardian and packs worth 30 Jewels of Bless and 30 of Soul, as in the client recipe. The list, the excellent option chance of each result item, the limit and its period are data, so a server can change them in the admin panel (the crafting settings of the Senior and the castle siege configuration), e.g. to add Rage Fighter items or to keep a limit per siege cycle. So if the exact Season 6 list turns out to differ, I'd suggest we don't hold the PR back for it: the list can be corrected later, in the data or in the admin panel, while the mechanics stay the same. |
sven-n
left a comment
There was a problem hiding this comment.
Thanks, both points of my review are addressed. The designer diffs now only contain the new entries, and GetsSockets limits the new socket and excellent-option behaviour to craftings which have a ResultItemSocketCountTable, so existing craftings behave as before. The result list following @ze-dom's sources (guide plus GMO videos) and the per-day limit look good, too.
In the meantime, #1547, #1470 and #1569 were merged, so it conflicts again:
GameLogic/Properties/PlayerMessage.resx,.de,.ptPersistence/Initialization/Properties/PlugInResources.resx,.de,.zh-CNCompiledModels/EntityDataContext/EntityDataContextModelBuilder.cs: #1547 addedWarpInfo.Requirementswith its own migration
Please rebase, keep both sides' entries, regenerate the designers and the compiled model, and check that AddLordsMix comes after #1547's migration and that the snapshot contains both. Then I'll run the tests, including the initialization tests.
Generated by Claude Code
| (0, 21), // Dark Reign Blade | ||
| (2, 12), // Great Lord Scepter | ||
| (4, 20), // Arrow Viper Bow | ||
| (8, 21), // Great Dragon Armor |
There was a problem hiding this comment.
I'd add the Staff of Kundun here, since one of the videos shows that and there is no staff group item here - it seems like a slip up.
There was a problem hiding this comment.
I added the Staff of Kundun as a normal result item (7322979).
7780979 to
7322979
Compare
|
Thanks! Rebased onto the current master (#1547, #1470, #1569):
@ze-dom: good catch, I added the Staff of Kundun as a normal result item (7322979). Both test projects are green locally (3361 and 982). |
sven-n
left a comment
There was a problem hiding this comment.
Thanks for the rebase and for adding the Staff of Kundun (ze-dom's thread). This currently merges cleanly with master, but #1578 (Spanish player messages) was merged in the meantime. TranslationCoverageTests.PlayerMessagesAreCompleteAndMatchNeutralPlaceholders("es") now requires every PlayerMessage key in PlayerMessage.es.resx, so your two new messages would make it fail:
LordsMixLimitReachedLordsMixOnlyForCastleOwner
Please merge master and add both to src/GameLogic/Properties/PlayerMessage.es.resx (with the same placeholders as the neutral texts).
A heads-up: #1548 also touches PlayerMessage.zh-CN.resx, the EF compiled model and PlugInResources.Designer.cs, so whichever of the two is merged second will need a short rebase.
Generated by Claude Code
7322979 to
ad353c1
Compare
|
Rebased onto the current master again (#1574, #1577–#1580, #1582):
Now three commits on top of master (301d768, 8b430f4, ad353c1). Both test projects are green locally (3374 and 982). |
|
Heads-up: #1548 (item expiration) was merged, so this needs one more rebase ( Generated by Claude Code |
…ster of the castle owner, limited per day Crafting 18 of the castle senior, which the Season 6 client offers: only the guild master of the guild which owns the castle may use it, limited per day (reset at the server's local midnight) or per siege cycle (reset when a siege ends). The Season 6 data has the client's ingredients and price, one mix per day, and the result list of a fan guide which matches mixes of Global MU Online in videos: excellent weapons and armor with two to four excellent options, and some normal items. For that, BaseItemCraftingHandler gets an async precondition hook, before the price is paid, and SimpleCraftingSettings two optional weighted value tables for result items (the number of excellent options and of sockets; without them, result items are created as before). A result item can have its own excellent option chance. An optional update adds the Lord's Mix to existing Season 6 databases.
A video of a Global MU Online Lord's Mix shows a normal Staff of Kundun, and the guide's list has no normal staff.
Each game server has its own castle siege context with a copy of the castle siege data. The guild master could mix on one game server and again on another one, whose copy still had the old count, and an owner save of that server wrote the old count back. The count and its date are now read from the database under the execution lock before the check and before counting, and saved on their own; the owner data save doesn't copy them any more.
ad353c1 to
9f9a3f5
Compare
|
Rebased onto the current master with #1548: the conflicting The two Lord's Mix messages are in Three commits on top of master (f613f48, 84225e2, 9f9a3f5). Locally green: the translation coverage tests (11), |
sven-n
left a comment
There was a problem hiding this comment.
Thanks for all the rebases. Everything is in now:
- The new socket and excellent-option behaviour only applies with the new tables.
- The result list follows ze-dom's sources, including the Staff of Kundun.
- There's a per-day limit, which also holds with several game servers (
9f9a3f56). - The Spanish messages are in, and the designers only contain the new entries.
I built it on current master and ran the tests, including Persistence.Initialization.Tests (988 passed). The only failure was LoginTicketServiceTest.ConcurrentIssuersStayWithinTheLimitAsync, a known race in PlayerInMemoryContext on master, which is unrelated.
Generated by Claude Code
Closes #1570
The Senior of Valley of Loren offers the Lord's Mix in the Season 6 client (mix 18), but OpenMU has no crafting for it.
This adds it: only the guild master of the guild which owns the castle can use it, a limited number of times per day
or per siege cycle, and its result is an excellent weapon or armor with two to four excellent options, or a normal one.
Changes
SimpleCraftingSettings.ResultItemExcellentOptionCountTableandResultItemSocketCountTable(weighted value tables of feat(items): weighted value tables for the socket count of dropped items #1567, nullable),
ItemCraftingResultItem.ExcellentOptionChance(nullable),CastleSiegeConfiguration.LordsMixLimit(0 = no limit) andLordsMixLimitPeriod(Day,SiegeCycle),CastleSiegeData.LordsMixCountandLordsMixCountDate. MigrationAddLordsMix, the compiled model and the generatedpersistence and loader code. Existing databases read "no table", "no limit" and "the chance of the crafting".
BaseItemCraftingHandler.CheckPreconditionsAsync, awaited before the items are checked and the price ispaid (default: no error).
SimpleItemCraftingHandlerhonours the two tables, and only when they are set: with theexcellent option count table, a result item which gets excellent options (by
ResultItemExcellentOptionChance, once)gets as many as selected, up to the options its definition offers; with the socket count table, a socket result item
gets its sockets from it and, like a dropped socket item, no excellent options. Without the tables, result items are
created as before. A result item with its own
ExcellentOptionChanceuses it instead of the crafting's chance (througha new
AddRandomExcellentOptionsoverload; without it, the existing method is called as before, whichThirdWingsCraftingoverrides).LordsMixCraftingrefuses, with a message, everybody except the guild master of the castle ownerguild (
CastleSiegeTaxProvider.GetPersistentGuildMasterIdAsync), and refuses when the limit of the period is reached.A successful mix is counted and saved under the execution lock of the castle siege context. The count and its date
are read from the database before the check and before counting, and saved on their own, so the limit also holds
with several game servers, each with its own copy of the castle siege data. Per day, a count of an
earlier day (server local time) doesn't count. Per siege cycle,
CastleSiegePlugInresets the count when a runningsiege enters
End, also when the castle keeps its owner; a server start inEndkeeps it.Packed Jewel of Bless and a Packed Jewel of Soul of level 2, 1,000,000,000 zen, 100%). Result: one random entry of
the list of a fan guide which matches mixes of Global MU Online in videos (thanks @ze-dom): 18 excellent weapons and
shields and all pieces of 10 excellent armor sets (two to four excellent options, equally likely, with skill), and 10
normal weapons and armors (skill 50% like a drop); luck 20%. One mix per day.
the limit to one per day, if there's no limit yet. Optional, because it adds a source of items with more than two
excellent options.
crafting, the update and the table in English, German and Chinese.
Notes
source; it has no Rage Fighter or Summoner items. The guide's price (100 million) differs from the Season 6 client
(1,000,000,000), so the client's is used. The list, the chances, the limit and its period are data and can be changed
in the admin panel.
CraftingResult.Failedwith a blue message, as the original server answers it.Tests
MUnique.OpenMU.Tests:CraftingResultTablesTest(excellent option count 2/3/4 from the table, also above themaximum per item; limited without a table; socket count 4/5 from the table; with the socket table no excellent
options on socket results; without it, socket results as before: no sockets, excellent options by the chance; the
chance of a result item instead of the crafting's),
LordsMixCraftingTest(guild master of the owner passes; assistant master, another guild,unoccupied castle and reached limit are refused; limit 0 is unlimited; per day: reached today refused, an earlier
day not counted, a new day starts again at one; a success is counted and saved; a mix counted by another game server is refused,
and an owner save of a game server with an old copy keeps the count), the reset in
CastleSiegeStateMachineTests(per cycle reset atEnd, kept on a start inEnd; per day kept atEnd), and the whole project green (3423).MUnique.OpenMU.Persistence.Initialization.Tests:LordsMixInitializationTest(fresh database, update on an existingone, applied twice, an existing limit is kept), the localized update name, and the project green (988).
siege cycle, the earlier list): migration and update applied; as the guild
master of the castle owner, the mix gave an excellent item and a second one was refused with the message; another
character was refused; zen and items stay when refused.