Skip to content

Add RaiseMoon deck - #297

Open
xiaowenmao-bit wants to merge 4 commits into
IceYGO:masterfrom
xiaowenmao-bit:add-raismoon-deck
Open

xiaowenmao-bit wants to merge 4 commits into
IceYGO:masterfrom
xiaowenmao-bit:add-raismoon-deck

Conversation

@xiaowenmao-bit

@xiaowenmao-bit xiaowenmao-bit commented Oct 24, 2026 •

Copy link
Copy Markdown

Summary

Adds a new deck: RaiseMoon (レイズ・ムーン, the "盈彩月夜" series), plus one small additive core API the deck needs.

  • Game/AI/Decks/RaiseMoonExecutor.cs — new executor, [Deck("RaiseMoon", "AI_RaiseMoon", "Normal")]
  • Game/AI/Decks/RaiseMoonScriptWipe.cs — deck-local helper
  • Decks/AI_RaiseMoon.ydk — matching deck list
  • Game/GameAI.cs — add SelectingEffectYn (13 added lines, no behaviour change for existing decks)

Deck overview

The series has no search effect at all: every resource comes from drawing. All six archetype monsters are Level 7 and special summon themselves when drawn, and three of them also discard themselves from hand to draw a card, so the hand is the engine. The extra deck is an R7 → R8 → R9 → R12 ladder used for beatdown, while the boss monster is a spellcaster Xyz kept in the extra monster zone as a long-term lock.

Implementation notes:

  • Executor registration order follows the deck's own priority list: hand traps first (Ash → Ghost Ogre → Effect Veiler → Nibiru → Droll → Maxx "C"), then the archetype's own plays.
  • Nibiru is gated on a resource comparison rather than a raw summon count: net = (enemy gain − back token) − (own loss − Nibiru self value), and it waits out the current chain so the opponent can commit more summons first.
  • Under Mulcharmy (the opponent's discard), hand summons freeze once the board already has enough bodies; only the trap set, the deck-top stacking and the burial spell are still used.
  • RaiseMoonScriptWipe classifies a card as non-targeting mass removal by reading its c<id>.lua from the local script directory. It returns 0 (no signal) when no script directory is found, so the deck degrades to "no wipe detection" on installs without scripts instead of misreading anything.
  • The deck never tribute summons its Level 7 monster (雅·カロール, 11333460). Her EFFECT_SUMMON_PROC only applies when ocgcore computes minc == 0, and tributes can only come from your own field, so the summon is only attempted while the AI controls no monsters at all. When anything is on the field she simply stays in hand.

Core change: GameAI.SelectingEffectYn

true while the server asks a yes/no question for an effect that just triggered (MSG_SELECT_EFFECTYN), reset to false at the start of OnSelectChain, OnSelectIdleCmd and OnSelectBattleCmd.

Some cards expose two effects whose ActivateDescription collides (or is missing), so the description cannot tell an optional trigger apart from an ignition effect. The kind of question being asked is the only reliable signal, and RaiseMoon needs it twice: a draw-on-special-summon trigger vs. a Quick Effect of one card, and an on-summon trigger vs. its own ignition effect of another. Purely additive — existing decks ignore the property.

Verification

  • Compiles against the repository's own sources with LangVersion 7.3 (old-style project, .NET Framework 4.8 reference assemblies): 0 errors, 0 warnings.
  • No local functions, tuple types, default literal, inline out variables, discards or pattern matching in the new files; 4-space indent, Allman braces, UTF-8 without BOM. Line endings are LF in the three new files, matching every other file under Game/AI/Decks/ and Decks/; Game/GameAI.cs keeps its existing CRLF.
  • No Bot.Deck. scanning — deck-composition questions go through Bot.HasInDeck / Bot.GetCardCountInDeck.
  • Not verified in a live duel against a server. I could not build the old-style solution with MSBuild (no .NET Framework 4.8 developer pack on this machine), so the check above is a Roslyn compile of the same sources, not msbuild WindBot.sln /p:Configuration=Release. The deck has been played locally against a SRVPro/MyCard server, but not with this exact build.

Things a reviewer may want to change

  • The file header of RaiseMoonExecutor.cs is a long Chinese design document, including the iteration history that explains why several non-obvious checks exist. Happy to trim it to a shorter summary if that is preferred.
  • bot.conf and Dialogs/ entries for the deck were not added, per AGENTS.md.

New deck executor for the RaiseMoon (レイズ・ムーン) archetype, together with
the decklist and the script probe the executor uses to detect mass removal.

- Game/AI/Decks/RaiseMoonExecutor.cs
- Game/AI/Decks/RaiseMoonScriptWipe.cs
- Decks/AI_RaiseMoon.ydk
- Game/GameAI.cs: add SelectingEffectYn so a triggered-effect confirmation can
  be told apart from chain, idle-command and battle queries
@xiaowenmao-bit

xiaowenmao-bit commented Oct 24, 2026 •

Copy link
Copy Markdown
Author

Some setup context, so the workflow run does not have to be approved twice.

Card IDs the deck needs

Eleven archetype cards plus the usual hand traps. The archetype ones:

ID Card Type Role
74212164 Hiena (刃) L7 monster special summons itself when drawn; bounces an opponent's monster, or discards itself to draw 1
10611873 Kurusu (灯) L7 monster special summons itself when drawn; bounces an opponent's Spell/Trap, or discards itself to draw 1
75934716 Siero (帳) L7 LIGHT Spellcaster returns a card from hand to special summon itself
11333460 Carol (雅) L7 monster EFFECT_SUMMON_PROC summon without tribute
47828069 Rabi (翼) L7 monster quick Xyz into R7 on the opponent's turn
47605577 Squiz (朔) L7 monster discards itself from hand
46983930 Stars (群星) Normal Spell places an archetype card on top of the deck
72978038 City (未眠之城) Continuous Spell (type 0x020002) sits in the Spell & Trap zone, not the Field zone
9362643 Splendor (辉煌) Trap special summons an archetype Xyz from the extra deck
73090586 Jackpot (天) R7 Xyz LIGHT Spellcaster, extra monster zone only
9484285 Bounty (望) R7 Xyz LIGHT Machine

All six archetype monsters are Level 7, which is why the extra deck is an R7 ladder rather than the usual Level 4 base.

The extra deck also runs 94503794, 6387204, 6195332, 92015800, 80117527, 64626565, 28331069, 39030163, 92517928, 90448279, 47132793; the hand traps are 59438930, 14558127, 23434538, 94145021, 97268402, 35726888, 10045474, 84192580, 27204311.

If your card database does not contain the eleven archetype IDs above, the deck will load but every archetype play will be skipped, because the executor matches on IsCode.

RaiseMoonScriptWipe needs the script directory

It reads c<id>.lua from the install's script folder to decide whether a card is non-targeting mass removal — the rules text alone cannot tell "destroy all monsters" from "destroy all monsters you control", and getting that wrong loses games. If no script directory is found it returns 0 (no signal) instead of guessing, so a checkout without scripts degrades to "no wipe detection" rather than misreading anything. Nothing else in the deck depends on it.

One behaviour that follows the card's own script

11333460 is only normal summoned while the AI controls no monsters at all. Its s.ntcon requires minc == 0, and tributes can only come from your own field, so that is the only state in which the engine cannot offer a tribute summon. With anything on the field she stays in hand rather than trading board presence for a 700 ATK body.

Testing

Played against a local SRVPro/MyCard server with these cards available. The exact build in this PR has not been run in a live duel — see the Verification section above for what was and was not checked.

Happy to change any of this, including trimming the long Chinese header comment in RaiseMoonExecutor.cs down to a short summary if that is preferred.


Correction: an earlier revision of this comment listed the six archetype monsters as Level 4 and called 72978038 a Field Spell. Both were wrong — they are Level 7, and the card is a Continuous Spell. The table above now matches the card database (type 0x020002, all eleven archetype cards sharing setcode 0x1EC). The same fix went into the executor's comment for that card and into a leftover check that treated it as a Field Spell.

Rework of the initial submission, folded into the original PR instead of a
separate one:/n- drop all logic for cards that are not in the deck
- drop the side-deck system (plain 41 + 15 list)
- add the chat/taunt module
- rebuild on top of current master
@xiaowenmao-bit

Copy link
Copy Markdown
Author

Updated: this branch now carries the reworked version of the deck (previously opened as a separate PR) — same five files, rebuilt on top of current master. Everything for this deck is in this PR now.

Brings the deck logic up to date with the version that is actually being used
locally:

- Maxx "C": on our own turn it only chains to a special-summon effect; on the
  opponent's turn it chains to a real summon effect, the "2 monsters already on
  board" case is reserved for the idle timing, and a bare card activation
  (field / continuous / equip) no longer counts as a summon effect.
- Droll & Lock Bird: no draw effect (Squiz, Stars, Jackpot, Splendor) while it
  is applying, the draws simply cannot happen.
- Moonlit City: one ●1/●2 per turn; with a second copy in hand the first one's
  effect resolves before the second is played, and the spare copy is only
  shuffled to the bottom when holding two or more.
- Nibiru: not fired while the opponent has a negate-for-activation face-up or
  any set backrow.
- Jackpot: the search replacement is skipped only when every search source in
  the chain is actually negated, instead of "some hand trap is in the chain".

The deck list stays 41 + 15 with no side deck.
Puts the taunt module back after the executor was synced with the latest local
build: Say / CountDraw / SayBounce, the per-turn opening lines, the reaction to
the opponent's hand traps, the "idle for 30+ seconds" line, and the draw-counter
lines on OnMove. Every line is Chinese; each one fires at most once per duel.
@xiaowenmao-bit

Copy link
Copy Markdown
Author

@foohyfooh This is the final version of the deck — everything is in this PR and I'm not going to push anything further.

I've synced the executor with the build I've actually been running locally (the last two commits, a3d5061 and 12a1d1b), so what you see now is what the deck behaves like in practice. Ready for review whenever you have time.

Current shape of the change:

File Contents
Game/AI/Decks/RaiseMoonExecutor.cs the deck executor (incl. the small chat module)
Game/AI/Decks/RaiseMoonScriptWipe.cs deck-local script/*.lua probe used for wipe/immunity/search detection
Decks/AI_RaiseMoon.ydk 41 main + 15 extra, no side deck
Game/GameAI.cs SelectingEffectYn (+19/−4), so a trigger-effect confirmation can be told apart from a chain / idle / battle query

No further commits from me unless you ask for changes.

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.

1 participant