Skip to content

Add the Raklion event (Battle of Selupan) - #977

Open
apraxico wants to merge 11 commits into
MUnique:masterfrom
apraxico:feature/raklion-event
Open

apraxico wants to merge 11 commits into
MUnique:masterfrom
apraxico:feature/raklion-event

Conversation

@apraxico

Copy link
Copy Markdown
Contributor

Part of #23.

Summary

The Raklion hatchery (map 58) now runs the Selupan event, like the original game:

  1. The 15 spider eggs appear in the hatchery. When only a few are left, the clients are notified.
  2. When all eggs are destroyed, Selupan appears after 5 seconds and falls from the sky.
  3. 5 minutes after Selupan appeared, the hatchery gate is closed. Only the players inside can fight.
  4. The battle ends when Selupan is killed, or when all players of the battle died or left.
  5. The hatchery opens again after 12 hours, and the spider eggs appear again.

All times and values are configurable in the admin panel (plugin "Raklion Event").

Selupan

SelupanIntelligence uses a skill every 1.5 seconds. Its pattern (1 to 7) depends on its remaining health
(80/60/50/40/20/10 %). With each pattern, it gets additional damage (berserk) and more skills:

Skill From pattern Effect
Poison, Ice Storm, Ice Strike 1 Hits the players around the target
Teleport 1 Vanishes and appears 3 to 6 fields away
Freeze 2 Hits and stuns the target
Heal 4 Heals 5 % of its current health
Summon 5 Summons the missing Coolutins
Invincibility 7 Doesn't receive damage for 10 seconds

Simplifications: the poison and ice skills deal the normal damage of Selupan in an area, without a poison
damage over time or pushing the players back.

Hatchery access

Like the original game, only players which entered the hatchery while it was open may stay there. Others,
e.g. players entering while it's closed, are moved to the entrance of Raklion. After the battle, the remaining
players are moved out after a configurable time (PlayerRemovalDelay, 5 minutes by default). Unlike the
original game, game masters aren't exempt from these rules.

Changes

  • GameLogic: RaklionPlugIn (feature plugin with periodic task and custom configuration), RaklionContext
    (state machine), SelupanIntelligence, RaklionEventDefinition, IRaklionEventViewPlugIn.
  • Monster.TeleportAsync: new public method, so that a monster can be teleported (MoveType.Teleport)
    instead of moved instantly, which the client shows as sliding.
  • Packets: S2C D1 10 (state info), D1 11 (current state), D1 12 (state change), D1 13 (battle result)
    and 69 (monster skill animation, used for the skills of Selupan). The structures of the client aren't
    packed, so some fields are aligned (documented in the packet descriptions).
  • GameServer: RaklionEventViewPlugIn and the handler of the C2S D1 10 request, which was defined but unhandled.
  • Data: the monster spawns of the hatchery are spawned by the event, in waves: 1 = spider eggs,
    2 = Selupan, 3 = Coolutins summoned by Selupan. They were automatic spawns before.
  • Update plugin AddRaklionEventUpdatePlugIn (version 116, mandatory, idempotent): changes the automatic
    spawns of the hatchery of existing databases to the waves. Without it, the event doesn't start and logs one warning.
  • Messages: the texts of the original game, shown to all players of the server like the original. Additionally,
    the result of the battle and the time until the hatchery opens are shown in one new message, which is also written
    to the chat, so that they don't replace each other on the screen.

Drops of Selupan are left to the configuration of each server (drop groups), like the difficulty.

Notes

  • The behavior and the default values (times, egg count, pattern thresholds, spawn coordinates) follow the
    configuration of public server files (IGCN). No code was copied or converted.
  • The client only uses D1 10-D1 12; it ignores D1 13, which is sent for completeness.
  • MonsterSkillAnimation (0x69): the client searches the target by its id as it is, so the flag for a successful
    skill (highest bit of the target id) isn't set.

Tests

  • Packets (Network.Packets.Tests), view plugin serialization, pattern/berserk/skill selection of the definition,
    data of a new database, and the update plugin (applied twice).
  • Tested in game: eggs, appearance, the skills with their animations, summons, killing Selupan, the failed battle
    (all players died or left), the messages, the closed hatchery after the battle, the removal of the players and
    the reopening.

🤖 Generated with Claude Code

apraxico and others added 11 commits September 24, 2026 17:12
Defines the packets of the raklion event, as expected by the season 6
client: the state info, current state, state change (group 0xD1, 0x10 to
0x12) and battle result (0x13), and the monster skill animation (0x69),
which the client uses to show the skills of Selupan.

The client structures aren't packed, so the remaining seconds of the state
info are aligned at offset 8, and the ids of the monster skill animation at
offsets 6 and 8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hatchery of raklion (map 58) runs as a continuous event:
the spider eggs appear, when they're destroyed Selupan appears,
after some time the hatchery closes and only the players inside
fight against Selupan. After the battle, the hatchery opens again.

- RaklionPlugIn (feature + periodic task, configurable in the admin panel)
- RaklionContext with the state machine of the event
- SelupanIntelligence with the patterns by health, berserk and the skills
- view plugin for the 0xD1 0x10-0x13 and 0x69 packets, D1 10 request handler
- the monster spawns of the hatchery are spawned by the event (waves)
- update plugin which adapts the spawns of existing databases

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The client searches the target of a monster skill by its id as it is,
so the flag for a successful skill made it ignore the packet. The
teleport of selupan moved it instantly, which the client shows as
sliding; it's now a teleport. The attacks are used more often than
the teleport.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Selupan vanishes with the effect of the teleport skill and appears
at a diagonal position 3 to 6 fields away. It teleports a bit more
often.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The messages are shown to all players of the game server, like the
original game does, and the opening of the hatchery gate is announced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Like the original game, only players which entered the hatchery while
it was open may stay there; others are moved to the entrance of
raklion. After the battle, the remaining players are moved out after a
configurable time. The hatchery opens again after 12 hours by default
(like IGCN), which is configurable as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the event doesn't run without the monster spawns of the hatchery,
  instead of announcing Selupan without spawning it
- selupan isn't teleported when it died while vanishing
- dead summoned monsters are removed from the event
- remove unused usings and an obsolete todo
- test that the data update can be applied twice

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The result and the time until the hatchery opens are shown in one
message, so that they don't replace each other on the screen, and in
the chat, so that they can be read again. The time is shown in hours
and minutes. Players which try to enter the closed hatchery after the
battle are told when it opens again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- players in the hatchery while it's open are allowed to stay, even when
  the tick sees them before the event handler of the map registered them
- players which left the hatchery aren't counted as battle players
- monsters summoned while the battle ended are removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apraxico

Copy link
Copy Markdown
Contributor Author

The Codacy findings are addressed, except S1128 (unnecessary using) for System.Collections.Concurrent in RaklionContext.cs and RaklionPlugIn.cs, which looks like a false positive, like in #973: removing it breaks the build (CS0246, ConcurrentDictionary<,> isn't covered by a global using).

The Azure build fails within 0 seconds, like on master and on the previous PRs, so it's the known issue of the build infrastructure.

@ze-dom

ze-dom commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Hey there!
It seems to me that the Selupan's skill multipliers are missing.

You can see in this source that:
| Skill | Multip | Description |
| 250 | 2.0 | Poison Attack |
| 251 | 2.2 | Ice Storm |
| 252 | 2.3 | Ice Strike |
| 253 | 2.5 | "First Skill" (this is probably when he falls from the sky) |

There is already a base skill multiplier of 2 in OpenMU.
If you add these, you can clear the comment on RaklionBoss.cs. If you don't, this stays for the record :).
If these are added, then the magic effects of the skills probably can go in the same job.

This branch has not been deployed

No deployments
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