Skip to content

Add OneForSynchro - #289

Open
Wind2009-Louse wants to merge 2 commits into
IceYGO:masterfrom
Wind2009-Louse:patch-14synchro
Open

Wind2009-Louse wants to merge 2 commits into
IceYGO:masterfrom
Wind2009-Louse:patch-14synchro

Conversation

@Wind2009-Louse

Copy link
Copy Markdown
Contributor

Summary

  • 新增 OneForSynchro / OneForSynchroEffect 已知卡分类,用于识别“场上没有调整 + 非调整也能同调”的怪兽与效果。
    Add OneForSynchro / OneForSynchroEffect known-card enums for monsters and effects that can Synchro Summon without Tuner + non-Tuner already on the field.
  • 默认「次元障壁 / Dimensional Barrier」、拉比林斯迷宫 / Labrynth 的「次元障壁 / Dimensional Barrier」,以及「阿不思的落胤 / Fallen of Albaz」融合素材评估会使用上述分类,避免漏判这类同调。
    Default Dimensional Barrier, Labrynth Dimensional Barrier, and Fallen of Albaz fusion-material evaluation now use these enums so those Synchro lines are not missed.
  • 连锁侧改为读取 Duel.CurrentChainInfo,以便同时用 ActivateDescription、Announces 和 -1 回退判断效果。
    Chain-side checks now read Duel.CurrentChainInfo, so ActivateDescription, Announces, and the -1 fallback can all be used.

背景 / Background

原先「次元障壁 / Dimensional Barrier」把“对方可能同调”主要理解成两类情况:场上已有调整 + 非调整,或连锁卡本身是同调怪兽 / 同调相关卡。这会漏掉两类常见局面:
Previously, Dimensional Barrier treated “the opponent may Synchro Summon” mainly as Tuner + non-Tuner already on the field, or the chain card itself being a Synchro monster / Synchro-related card. That missed two common cases:

  1. 场上这只怪兽当同调素材时,可以用手牌当素材。此时场上不必同时有调整 + 非调整。例如「古怪少年 / Eccentric Boy」、「龙子 / Tatsunoko」、「杀手级调整曲 / Kewl Tune」等。
    When this on-field monster is used as Synchro Material, a card in the hand can also be used as material. Tuner + non-Tuner do not both need to be on the field. Examples: Eccentric Boy, Tatsunoko, Kewl Tune.
  2. 发动效果后就能同调,不依赖场上现成的调整 + 非调整。例如「水晶机巧 / Crystron」、「艮神鬼 / Ashtra」、「杀手级调整曲·削波手 / Kewl Tune Clip」、「杀手级调整曲·再混音手 / Kewl Tune Remix」、「魔键锭-施- / Magikey Locking」。效果描述有时是具体 StringId,有时写进 ChainInfo.Announces,可选诱发还可能是 -1。
    Activating an effect can Synchro Summon without Tuner + non-Tuner already on the field. Examples: Crystron, Ashtra, Kewl Tune Clip, Kewl Tune Remix, Magikey Locking. The description may be a concrete StringId, a value written into ChainInfo.Announces, or -1 for optional triggers.

这组改动与已有的 OneForXyz 同类:把已知卡收进枚举,再在公共检查里复用。
This follows the existing OneForXyz pattern: collect known cards into enums, then reuse them in shared checks.

改动 / Changes

已知卡与查询接口 / Known cards and query helpers

新增 Game/AI/Enums/OneForSynchro.cs:
Add Game/AI/Enums/OneForSynchro.cs:

  • OneForSynchro:场上这只怪兽当同调素材时,可以用手牌当素材。
    OneForSynchro: when this on-field monster is used as Synchro Material, a card in the hand can also be used as material.
  • OneForSynchroEffect:效果描述或 HINT_OPSELECTED 宣告值,编码为 cardId * 16 + offset。
    OneForSynchroEffect: activate descriptions or HINT_OPSELECTED announce values, encoded as cardId * 16 + offset.

CardExtension 增加:
CardExtension adds:

  • ClientCard.IsOneForSynchro():按卡号查 OneForSynchro。
    ClientCard.IsOneForSynchro(): look up OneForSynchro by card ID.
  • ChainInfo.IsOneForSynchroEffect():按顺序匹配 Announces、ActivateDescription;描述为 -1 时,只对“几乎可以确定就是这条同调效果”的卡做回退。回退会看发动位置:「杀手级调整曲·削波手 / Kewl Tune Clip」只在手牌,「水晶机巧-三位玉晶 / Crystron Tristaros」只在怪兽区域。
    ChainInfo.IsOneForSynchroEffect(): match Announces, then ActivateDescription; if the description is -1, fall back only for cards that are almost certainly this Synchro effect. The fallback uses activation location: Kewl Tune Clip from the hand only, Crystron Tristaros from the Monster Zone only.

没有 SetDescription 的卡不进 OneForSynchroEffect 枚举,只走 -1 回退,例如「魔键锭-施- / Magikey Locking」、「同调呼唤 / Synchro Call」、「超重武者 魂-C / Superheavy Samurai Battleball」、「同调素材 / Synchro Material」、「娱乐伙伴 诱导女导演 / Performapal Miss Director」。艮神鬼 / Ashtra 一类在连锁建立时用 SelectFromOptions 的卡,依赖 ChainInfo.Announces(#282)。
Cards without SetDescription are not in the OneForSynchroEffect enum and only use the -1 fallback, e.g. Magikey Locking, Synchro Call, Superheavy Samurai Battleball, Synchro Material, Performapal Miss Director. Ashtra cards that use SelectFromOptions while the chain is built depend on ChainInfo.Announces (#282).

调用点 / Call sites

  • DefaultDimensionalBarrier:对方场上有 IsOneForSynchro() 怪兽时选同调;最新连锁是 IsOneForSynchroEffect() 时也选同调。最新连锁改为 CurrentChainInfo.LastOrDefault(),关联卡为空或未无效时仍可按效果描述判断。
    DefaultDimensionalBarrier: choose Synchro if the opponent has an IsOneForSynchro() monster, or if the latest chain is IsOneForSynchroEffect(). The latest chain is now CurrentChainInfo.LastOrDefault(), so the effect can still be judged when the related card is null or not disabled.
  • LabrynthExecutor.DimensionalBarrierForSynchro:同样检查连锁中的 OneForSynchro 效果,以及对方场上的 OneForSynchro 怪兽。
    LabrynthExecutor.DimensionalBarrierForSynchro: the same checks for OneForSynchro effects on the chain and OneForSynchro monsters on the opponent's field.
  • AlbazExecutor:三处融合素材评估把 OneForSynchro 怪兽与 OneForXyz、Floodgate 一样视为高价值素材。
    AlbazExecutor: three fusion-material checks now treat OneForSynchro monsters as high-value materials, same as OneForXyz and Floodgate.

文件 / Files

文件 / File 说明 / Notes
Game/AI/Enums/OneForSynchro.cs 新增枚举 / New enums
Game/AI/CardExtension.cs 查询接口与 -1 回退 / Query helpers and -1 fallback
Game/AI/DefaultExecutor.cs 默认「次元障壁 / Dimensional Barrier」
Game/AI/Decks/LabrynthExecutor.cs 拉比林斯迷宫 / Labrynth「次元障壁 / Dimensional Barrier」
Game/AI/Decks/AlbazExecutor.cs 「阿不思的落胤 / Fallen of Albaz」融合素材优先级 / fusion material priority

枚举收录卡名 / Cards in the enums

名称来自 ygocdb.com。艮神鬼 / Ashtra 目前没有 en_name,英文用 wiki_en。
Names are from ygocdb.com. Ashtra cards currently have no en_name; English names use wiki_en.

OneForSynchro

场上这只怪兽当同调素材时,可以用手牌当素材。
On-field monsters that can use a card in the hand as Synchro Material.

中文 / Chinese 英文 / English
古怪少年 Eccentric Boy
罪 平行齿轮 Malefic Parallel Gear
极星灵 黑精灵 Mara of the Nordic Alfar
科技属 电子化魔术师 T.G. Cyber Magician
幻兽机 蓝冲高角羚 Mecha Phantom Beast Blue Impala
龙子 Tatsunoko
尸龙子 Tatsunecro
杀手级调整曲·混音手 Kewl Tune Mix
杀手级调整曲·削波手 Kewl Tune Clip
杀手级调整曲·唱片师 Kewl Tune Reco
杀手级调整曲·提示员 Kewl Tune Cue
杀手级调整曲·音轨制作人 Kewl Tune Track Maker
杀手级调整曲·旋钮手 Kewl Tune Rotary

OneForSynchroEffect

效果描述或 HINT_OPSELECTED 宣告。
Activate descriptions or HINT_OPSELECTED announces.

中文 / Chinese 英文 / English
水晶机巧-量子白晶 Crystron Quan
水晶机巧-矩阵黄晶 Crystron Citree
水晶机巧-胶子黑晶 Crystron Rion
水晶机巧-三位玉晶 Crystron Tristaros
废品压阵者 Junk Anchor
疾行机人 弹子小子 Speedroid Ohajikid
杀手级调整曲·削波手 Kewl Tune Clip
杀手级调整曲·再混音手 Kewl Tune Remix
杀手级调整曲 B2B Kewl Tune B2B
疾行机人 磁铁恶魔 Speedroid Maliciousmagnet
魔界造车-GT19 Turbo-Tainted Hot Rod GT19
色鬼之虫毒 Ashtra Insect Poison
依鬼之咒咆 Ashtra Cursed Roar
剑鬼之神域 Ashtra Divine Domain

-1 回退额外覆盖 / Extra cards in the -1 fallback

这些卡没有 SetDescription,只在描述为 -1 时按卡号(及发动位置)回退。
These cards have no SetDescription and are only matched by card ID (and location) when the description is -1.

中文 / Chinese 英文 / English
娱乐伙伴 诱导女导演 Performapal Miss Director
魔键锭-施- Magikey Locking
同调呼唤 Synchro Call
超重武者 魂-C Superheavy Samurai Battleball
同调素材 Synchro Material

「杀手级调整曲·削波手 / Kewl Tune Clip」在手牌、「水晶机巧-三位玉晶 / Crystron Tristaros」在怪兽区域时,描述为 -1 也会走这条回退。
Kewl Tune Clip from the hand and Crystron Tristaros from the Monster Zone also use this fallback when the description is -1.

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