Record SelectOption announces on ChainInfo - #282
Open
Wind2009-Louse wants to merge 1 commit into
Open
Conversation
* Update AI logic for Lightning Storm interactions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
Record
Duel.SelectOptionannounces (HINT_OPSELECTED) onChainInfoafter a chain is activated and before it starts resolving. Drop the executor-local Lightning Storm option flag and read that chain snapshot instead.在连锁发动后、处理前,把
Duel.SelectOption的宣言(HINT_OPSELECTED)记到ChainInfo。去掉执行器里 Lightning Storm 的局部选项旗标,改为读这条连锁快照。Lightning Storm (
c14532163) chooses its effect in target withDuel.SelectOption:Lightning Storm(
c14532163)在 target 里用Duel.SelectOption选择效果:aux.Stringid(14532163, 0)— destroy opponent's Attack Position monsters / 破坏对方攻击表示怪兽aux.Stringid(14532163, 1)— destroy opponent's Spells/Traps / 破坏对方魔陷ocgcore then sends
MSG_HINT/HINT_OPSELECTEDwith that string id. State is stored inGameBehavioron the chain (same layer asTargets), not parsed by deck executors.ocgcore 随后发出带该 string id 的
MSG_HINT/HINT_OPSELECTED。状态由GameBehavior落到连锁上(与Targets同层),牌组执行器不解析网络包。Changes / 改动
Announces(IList<int>) andHasAnnounce. Values are option string ids only; the activator is alreadyActivatePlayer.HINT_OPSELECTED, ifCurrentChainInfois non-empty andSolvingChainIndex == 0, appenddatato the latest chain. Skip when there is no chain or resolution has started. Still callOnReceivingAnnouce. Cleared withCurrentChainInfoon chain end.lightningStormOption,OnReceivingAnnouce, andOnChainEnd.DefaultOnBecomeTargettreats the bot's Attack Position monsters / Spell & Trap Zone as threatened when an opponent Lightning Storm chainHasAnnounceof str0 / str1.Announces(IList<int>)和HasAnnounce。只存选项 string id;发动者已有ActivatePlayer。HINT_OPSELECTED时,若CurrentChainInfo非空且SolvingChainIndex == 0,把data追加到最后一条连锁。无连锁或已进入处理则不写。仍调用OnReceivingAnnouce。连锁结束随CurrentChainInfo一起清掉。lightningStormOption、OnReceivingAnnouce、OnChainEnd。对方 Lightning Storm 连锁HasAnnounce为 str0 / str1 时,DefaultOnBecomeTarget分别把我方攻击表示怪兽 / 魔陷区视为受威胁。Executor.OnReceivingAnnouce/GameAI.OnReceivingAnnouceare unchanged for other decks.Executor.OnReceivingAnnouce/GameAI.OnReceivingAnnouce保留,供其它牌组覆盖。Out of scope:
AnnounceCard/AnnounceNumber/AnnounceRace/AnnounceAttrib(they do not go throughHINT_OPSELECTED); bot-side Lightning StormAI.SelectOption.本次不改:
AnnounceCard/AnnounceNumber/AnnounceRace/AnnounceAttrib(不走HINT_OPSELECTED);己方发动 Lightning Storm 时的AI.SelectOption。