Skip to content

agent/Add Chaos Ritual (Ritual of Light and Darkness) - #283

Open
Yuan-Chun-Chih wants to merge 5 commits into
IceYGO:masterfrom
Yuan-Chun-Chih:agent/chaos-ritual-pr
Open

agent/Add Chaos Ritual (Ritual of Light and Darkness)#283
Yuan-Chun-Chih wants to merge 5 commits into
IceYGO:masterfrom
Yuan-Chun-Chih:agent/chaos-ritual-pr

Conversation

@Yuan-Chun-Chih

@Yuan-Chun-Chih Yuan-Chun-Chih commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Add the Chaos Ritual deck and its AI decision-making logic.

Changes

  • Add AI_ChaosRitual.ydk.
  • Add and register the Chaos Ritual bot in BotWrapper/bot.conf.
  • Add ChaosRitualExecutor.cs .

Validation

  • Successfully built with Debug Any CPU configuration.
  • Result: 0 errors.
  • Existing compiler warnings remain unchanged.

Follow-up Files

For additional explanation of the AI logic, please see:
AI_ChaosRitual_rule copy.md

Add a full ChaosRitual deck AI executor with extensive logic: summon/activate executors, chain/select handlers, Mind Shuffle and Light & Darkness Ritual handling, Gallant Thief tribute selection, Skull Archfiend recycle rules, search/setting reservations, hand-trap and extra-deck priorities, and many helper selectors and lifecycle trackers. Also register the new Deck=ChaosRitual entry in BotWrapper/bot.conf. Changes are localized to ChaosRitualExecutor.cs and bot.conf; no unrelated files modified.
@mercury233

Copy link
Copy Markdown
Collaborator

GPT 5.6:

  1. [P1] 精灵圣贤者的召唤成功诱发效果被错误“延后”
    ChaosRitualExecutor.cs:887

    诱发效果的窗口不能延后。此处读取的是上一次 SelectIdleCmd 留下的 MainPhase.SpecialSummonableCards;若召唤前黑混沌可特殊召唤,圣贤者召唤后便会返回 false,永久错过抽 3 丢 2 的效果。

  2. [P1] 两颗心灵的效果描述偏移整体错一位
    ChaosRitualExecutor.cs:976

    本地脚本中检索效果是 offset 0,换怪效果是 offset 1;代码判断的是 1 和不存在的 2。结果是换怪效果套用了检索条件,可能在没有牌组检索对象时拒绝合法响应,也可能在无突破需要时随意换怪。

  3. [P1] 骸骨恶魔的三卡选择没有保证必需的卡名记述卡
    ChaosRitualExecutor.cs:1862

    脚本要求选出的 3 张中至少 1 张记述「光与暗的仪式」。当前排序只考虑位置和资源价值,甚至会把无关的对方墓地卡固定放在第一位。若前三张均不满足 gcheckSelectSubGroup 无法结束;WindBot 又不会回退取消已选卡,可能卡住选择流程。

  4. [P2] 魔法效果之剑被破坏后的诱发效果永远不会主动发动
    ChaosRitualExecutor.cs:1433

    该延迟诱发效果进入提示时当前连锁已经结束,因此 Duel.CurrentChain.Count == 0,函数会直接拒绝。应按墓地位置或 offset 3 单独处理。

  5. [P2] 栗球兽卫把仪式魔法误判成可盖放对象
    ChaosRitualExecutor.cs:2906

    脚本只允许盖放速攻魔法或陷阱;「光与暗的仪式」是仪式魔法。这个误判会让 AI 丢弃栗球兽卫,但实际没有盖放选项,最终回退选择不需要的伤害免除效果。

  6. [P2] 圣贤者在召唤前把自己计入了手牌条件
    ChaosRitualExecutor.cs:862

    CelticMystic 自身属于 IsRitualRelatedCard,而召唤判断时它仍在手牌,因此条件实际上总为真。AI 会在没有其他相关手牌、无法抽 3 或特殊召唤仪式怪兽时仍优先通常召唤它;同样问题也出现在 ShouldSummonCelticMysticFirst()

  7. [P2] 黑色混沌之魔术师的两个场上效果使用了同一条件
    ChaosRitualExecutor.cs:1416

    墓地存在魔法卡只与召唤成功回收效果有关。里侧除外效果不需要该条件,因此通过两颗心灵等方式特殊召唤、墓地尚无魔法时,AI 会拒绝合法的除外效果。

  8. [P2] 等待大义贼的判断没有确认手里真的有大义贼
    ChaosRitualExecutor.cs:730

    CanSummonGallantThief() 在主阶段作为该卡执行器条件时成立,但复用于通用等待逻辑后缺少手牌检查。先攻方场面满足条件但手里没有大义贼时,AI 仍可能在自己抽卡/准备阶段拒绝灰流丽、增殖的 G 等响应。项目中的絢嵐实现明确检查了 Bot.HasInHand(...)

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