Fluorohydride / ygopro-core

ygopro script engine.
MIT License
327 stars 134 forks source link

add EFFECT_FLAG_ACTIVATE_CONDITION #571

Closed mercury233 closed 6 months ago

mercury233 commented 6 months ago

There are 2 kinds of trigger effects. One check the condition then the event occurs, and another check the condition when the effect is going to be activated.

Q. 自分フィールド上に「ベアルクティ-メガポーラ」がいて、相手がそれを対象に「サンダー・ブレイク」を発動し、自分が手札の「ベアルクティ-メガビリス」の①の効果をチェーンして発動し、チェーン処理後、「ベアルクティ-メガビリス」は特殊召喚に成功した場合にその②の効果を発動できますか? A. ご質問の場合、「ベアルクティ-メガビリス」の『②』の効果を発動できます。

Q. 自分フィールド上にモンスターが存在せず、自分は墓地の「Evil★Twin キスキル」を対象に「死者蘇生」の効果を発動し、自分は墓地の「Evil★Twin リィラ」を対象に「リビングデッドの呼び声」の効果チェーンを発動し、チェーン処理後、特殊召喚した2体のモンスターの①の効果はすべて発動できますか? A. ご質問の場合、どちらも『①』の効果を発動できます。

Q. 自分の手札は「炎魔の触媒」と「インフェルニティ・デーモン」の2枚だけ。「炎魔の触媒」の①の効果を発動し、「インフェルニティ・デーモン」を特殊召喚し、「炎魔の触媒」を墓地に送り、特殊召喚に成功した「インフェルニティ・デーモン」は②の効果を発動できますか? A. ご質問の場合、特殊召喚した「インフェルニティ・デーモン」の『②』の効果は発動できます。

The latter will say "れば発動できる" or "発動と処理ができる".

So we need this flag to decide when to check the condition. Before we would check the condition in the target function for the latter type.

This won't affect hand trigger effects, which should always be the latter type. This won't affect EFFECT_TYPE_QUICK_O + EFFECT_FLAG_DELAY effects, which should always be the former type.

Wind2009-Louse commented 6 months ago

Passed.