Skip to content

fix(illusion-temple): review fixes of the ticket crafting and update (follow-up to #1473) - #1536

Merged
sven-n merged 2 commits into
MUnique:masterfrom
Mosch0512:fix/illusion-temple-ticket-review-fixes
Nov 19, 2026
Merged

sven-n merged 2 commits into
MUnique:masterfrom
Mosch0512:fix/illusion-temple-ticket-review-fixes

Conversation

@Mosch0512

@Mosch0512 Mosch0512 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Why

Follow-up to #1473. Its review fixes were committed after the head which got merged, so they're not on master yet. They fix the ticket crafting and the update of #1473.

What

  • Ticket crafting (IllusionTempleTicketCrafting, BaseEventTicketCrafting, shared with the Blood Castle and Devil Square mixes):
    • The combination gives the ticket which a temple of its level accepts, and prefers an available temple (e.g. when the server owner deactivated one of two temples with different tickets). The ticket of an inactive temple is still used when it's the only one, as that's the ticket the temple accepts once it's active again. A temple without a ticket item (free entry) is skipped. Only when no temple of the level has a ticket item, the result is the item named "Scroll of Blood".
    • An ingredient which is the result item itself is refused (compared by Equals, like the ticket check of the temple entry). Otherwise, a ticket which has the name of an ingredient, like in a partly swapped configuration, would be taken and given back, or lost when the mix fails.
    • When the result item doesn't exist (e.g. renamed by the owner), the crafting refuses the items instead of throwing while the items are checked.
    • The two ingredients are the first pair of the same level which gives a ticket, not the first item of each name: an Old Scroll+3 with a Covenant+2 and a Covenant+3 in the chaos machine is combined to a +3 ticket, where it was refused before.
    • Ingredients of a level which the event doesn't have (no mini game definition of the event takes a ticket of this level), e.g. +0 ones of a game master, are refused with InvalidItemLevel. Before, they gave a ticket which no event accepts, at the default price. Such a pair, or one with the ticket itself, is skipped when a valid pair is in the chaos machine, too; only without a valid pair, its reason is the answer.
    • The event of a crafting is the new virtual EventType of BaseEventTicketCrafting, which the Blood Castle, Devil Square and Illusion Temple craftings override. It's null by default, which skips the level check, so craftings of plug-in assemblies which derive from the class keep working.
    • Other items in the chaos machine besides the three ingredients are refused when they leave the result no place after the ingredients are removed. The 2x2 Scroll of Blood can need more room than the ingredients free, and the created ticket would then end up in no storage. BaseEventTicketCrafting is shared, so this applies to the Blood Castle mix too (2x2 Invisibility Cloak from 1x2 ingredients): with a full chaos machine it's now refused, where it ran before. With room left, other items are accepted as before. As the ingredients are right, the answer is TooManyItems, like the other craftings which get too many items. The place is checked by the new IStorage.FitsAfterRemoval, which uses the placement of Storage. It has a default implementation, so other implementations of IStorage keep compiling: it checks whether the item fits now, without the cells of the removed items, so it may refuse an item which would fit, but never accepts one which finds no place. The Devil Square mix is unchanged: its 1x1 Devil's Invitation always finds a place where an ingredient was.
    • The result item and the ingredients are looked up by comparing the neutral name as a span, as they're looked up on every preview of the chaos machine.
  • Update (IllusionTempleDataUpdatePlugIn), now version 4, so databases which have version 3 get the new restoration:
    • It sets the original sizes of 13/50 and 13/51 instead of swapping them, so a configuration where the server owner fixed the sizes already, but not the names, gets the right sizes, and a second application changes nothing.
    • It also repairs the items when the server owner gave both items their original names already, but remains of the swap are left: the sizes are still swapped, Lumen the Barmaid sells 13/51 instead of 13/50, or a covenant drop item group contains 13/51 instead of 13/50. It then keeps the names, sets the original sizes, points the temple tickets of 13/50 at 13/51, and moves 13/51 to 13/50 only in the store of Lumen the Barmaid and in the covenant's drop item groups (their description starts with "Illusion Sorcerer Covenant") which have 13/51 instead of 13/50. A store item or drop item group of 13/51 which the owner added may be meant for the Scroll of Blood, also next to the covenant at Lumen or in a covenant group, and a covenant group which the owner already pointed at 13/50 is right, so these stay. On a configuration without remains of the swap, nothing changes, also when the owner changed the sizes or the temple tickets there, or added the Scroll of Blood next to the covenant. The detection and the repair share the lookups of Lumen and the covenant groups.
    • The swapped and the renamed-back case are restored by one method each.
    • Its name and description come from PlugInResources, in English, German and Chinese, in the admin panel and on the updates page.

Testing

  • On master b53c704: dotnet build of tests/MUnique.OpenMU.Persistence.Initialization.Tests and tests/MUnique.OpenMU.Tests with -p:ci=true.
  • dotnet test --no-build -p:ci=true:
    • MUnique.OpenMU.Persistence.Initialization.Tests: 931 passed, 0 failed, 12 skipped (the database/manual ones)
    • MUnique.OpenMU.Tests: 3222 passed, 0 failed, 2 skipped
  • New tests:
    • IllusionTempleTicketCraftingTest: the ingredients of the same level are found besides one of another level, behind a +0 pair, and behind a pair with the ticket named like the covenant; when no pair gives a ticket, the reason of the first pair is the answer; a crafting without event type (like one of a plug-in) combines every level; ingredients of a level without temple (+0, +7) are refused, and so are +0 ingredients of the Blood Castle and Devil Square mixes; the crafting gives the ticket of an inactive temple which is the only one of its level, prefers the ticket of an available temple, and gives the Scroll of Blood without a ticket of the temple; a ticket with the name of the covenant is refused; an event ticket crafting without its result item refuses instead of throwing; other items in the chaos machine (an unrelated one or a second ingredient) are accepted while the result finds a place, and refused with TooManyItems by the Illusion Temple and Blood Castle craftings when they leave it none; the Devil Square crafting accepts them; the real combination (with a crafting bonus which raises its success rate to 100 %) places the Scroll of Blood where the ingredients were.
    • IllusionTempleTicketItemsTest: a configuration with swapped names, whose sizes the owner fixed already, gets the original sizes (also when applied twice); a configuration with the original names but swapped data is restored and keeps the names (all three swapped states of fix(illusion-temple): make the Scroll of Blood (13/51) the ticket again and give 13/50 back to the Illusion Sorcerer Covenant #1473, from installed version 2 and 3, which the data update service applies again); with the original names and sizes, Lumen's store items, the covenant groups and the temple tickets are repaired, also when only Lumen's store or only the covenant groups are left as a remain; a Scroll of Blood which the owner added to another store stays, and so do a drop item group of the owner with 13/51 and a covenant group which the owner already pointed at 13/50; on a configuration with the original data, the owner's sizes and a temple ticket set to 13/50 stay, also with a Scroll of Blood which the owner added next to the covenant at Lumen and in a covenant group.
    • StorageTest: FitsAfterRemoval in a storage with a box offset (removed items in a square free a place, two don't), with removed items of another storage, with an extension, and the default implementation of IStorage.
    • IllusionTempleDataTest: a configuration with the original data stays unchanged also from installed version 3.
    • LocalizedUpdatePlugInNameTest: the name and description of the update are localized.

@codacy-production

codacy-production Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 333 complexity

Metric Results
Complexity 333

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.

@Mosch0512
Mosch0512 force-pushed the fix/illusion-temple-ticket-review-fixes branch from e2bffe1 to d541792 Compare November 17, 2026 22:39
…and update

Follow-up to MUnique#1473.

Ticket crafting (shared with the Blood Castle and Devil Square mixes):
- refuse the ticket as an ingredient and ignore the ticket of a temple which isn't available
- take the first pair of ingredients of the same level which gives a ticket, and refuse a level which the event doesn't have
- refuse other items in the chaos machine only when the ticket finds no place after the ingredients are removed (IStorage.FitsAfterRemoval)
- refuse the items instead of throwing when the ticket item doesn't exist
- keep event ticket craftings of plug-ins working (virtual EventType, default of FitsAfterRemoval)

Update of the ticket items:
- restore the items also when the owner gave them their original names already, but only when remains of the swap are left
- set the original sizes instead of swapping them, and move only Lumen's store items and the covenant drop item groups
- take the update's name and description from the plug-in resources, in English, German and Chinese
@Mosch0512
Mosch0512 force-pushed the fix/illusion-temple-ticket-review-fixes branch from 8383411 to 313db3b Compare November 18, 2026 19:12
@sven-n
sven-n merged commit 1dc6ec1 into MUnique:master Nov 19, 2026
1 check was pending
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.

2 participants