Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add effect flag in Card.RegisterEffect #677

Merged
merged 4 commits into from
Dec 3, 2024
Merged

add effect flag in Card.RegisterEffect #677

merged 4 commits into from
Dec 3, 2024

Conversation

salix5
Copy link
Collaborator

@salix5 salix5 commented Nov 27, 2024

Effect category
It means that it is an effects that "include some actions".
It can be modified based on the option when activating the effect.

Effect Flag
It is the property of the effect itself.
It will not be modified in most cases.

Card.IsEffectProperty
We should check effect property in Card.IsEffectProperty.
Now it will add EFFECT_FLAG_FUSION_SUMMON when registering the CATEGORY_FUSION_SUMMON effect.


https://ocg-rule.readthedocs.io/zh-cn/latest/c04/%E7%81%B0%E6%B5%81%E4%B8%BD%C2%B7%E6%98%9F%E5%B0%98%E9%BE%99.html
Effect Category
包含X的效果
可能被發動時的選項改變

Effect Flag
效果本身的特性
一般不會被發動時的選項改變

Card.IsEffectProperty
應該改成檢查Effect Property
目前改成註冊CATEGORY_FUSION_SUMMON效果就會自動添加EFFECT_FLAG_FUSION_SUMMON .

Fix #648 , #676

@mercury233
@purerosefallen
@Wind2009-Louse
@fallenstardust

@Wind2009-Louse
Copy link
Contributor

黎铭机使用EFFECT_FLAG_FUSION_SUMMON进行判断,直接无法回收任何卡片。
硬币/骰子相关效果正常。

@salix5
Copy link
Collaborator Author

salix5 commented Nov 29, 2024

script:

git checkout -b test-dawn master
git merge --no-edit patch-dice
git merge --no-edit ROTA
git merge --no-edit patch-dawn

single:

Debug.SetAIName("Bug")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI)
Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)


Debug.AddCard(24094653,0,0,LOCATION_HAND,0,POS_FACEDOWN_DEFENSE)
Debug.AddCard(59514116,0,0,LOCATION_HAND,1,POS_FACEDOWN_DEFENSE)
Debug.AddCard(46986414,0,0,LOCATION_HAND,2,POS_FACEDOWN_DEFENSE)
Debug.AddCard(3627449,0,0,LOCATION_HAND,3,POS_FACEDOWN_DEFENSE)

Debug.AddCard(62651957,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Debug.AddCard(62651957,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK)

Debug.AddCard(89631139,0,0,LOCATION_GRAVE,0,POS_FACEUP_ATTACK)
Debug.AddCard(89631139,0,0,LOCATION_GRAVE,1,POS_FACEUP_ATTACK)

Debug.AddCard(89631139,0,0,LOCATION_DECK,0,POS_FACEDOWN)
Debug.AddCard(89631139,0,0,LOCATION_DECK,1,POS_FACEDOWN)
Debug.AddCard(8963089,0,0,LOCATION_EXTRA,0,POS_FACEDOWN)

--opponent
Debug.AddCard(89631139,1,1,LOCATION_MZONE,2,POS_FACEUP_ATTACK)
Debug.AddCard(89631139,1,1,LOCATION_MZONE,3,POS_FACEUP_ATTACK)
Debug.AddCard(89631139,1,1,LOCATION_MZONE,4,POS_FACEUP_ATTACK)

Debug.AddCard(89631139,1,1,LOCATION_DECK,0,POS_FACEDOWN)
Debug.AddCard(89631139,1,1,LOCATION_DECK,1,POS_FACEDOWN)
Debug.AddCard(89631139,1,1,LOCATION_DECK,2,POS_FACEDOWN)

Debug.ReloadFieldEnd()

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