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

update NecroValley #1972

Closed
wants to merge 2 commits into from
Closed

update NecroValley #1972

wants to merge 2 commits into from

Conversation

salix5
Copy link
Collaborator

@salix5 salix5 commented Sep 26, 2022

@mercury233

Problem

#1860

Solution

EFFECT_NECRO_VALLEY_CHECK
Check if the activating card is affected by NecroValley.

Reference

https://ocg-rule.readthedocs.io/zh_CN/latest/c04/%E7%8E%8B%E5%AE%B6%E9%95%BF%E7%9C%A0%E4%B9%8B%E8%B0%B7.html#id4

而不受魔法效果影响的怪兽,发动的效果不管是否只涉及墓地,都不受「王家长眠之谷」的②效果影响,仍会正常适用。

@mercury233
Copy link
Collaborator

confirming

@@ -23,7 +23,7 @@ function c83764718.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c83764718.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
if tc:IsRelateToEffect(e) and e:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY_CHECK) and aux.NecroValleyFilter()(tc) then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and e:GetHandler() is related to e
Maybe getting the current effect handler and NecroValley player effect in NecroValleyFilter and check immunity will work? I know card immune to player effect can be weird.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EFFECT_NECRO_VALLEY
for monsters: The monster is protected by Necrovalley.
for players: The Graveyard of the player is protected by Necrovalley.

I think this check should use a different effect code.

@salix5
Copy link
Collaborator Author

salix5 commented Jan 22, 2023

@mercury233
Can we merge this one?

@mercury233
Copy link
Collaborator

I don't think so but I don't know why

@salix5
Copy link
Collaborator Author

salix5 commented Jan 22, 2023

Auxiliary.NecroValleyFilter()
Auxiliary.NecroValleyNegateCheck()
這些函數的檢查都會使用IsHasEffect(EFFECT_NECRO_VALLEY)

此處IsHasEffect(EFFECT_NECRO_VALLEY)的定義應該是:
這張卡在王谷保護的墓地中

如果我們要檢查【這張卡是否會被王谷的效果無效】
我們可能應該採用其他的效果避免混淆
例如這個PR提出的EFFECT_NECRO_VALLEY_CHECK

@salix5 salix5 closed this Jan 31, 2023
@salix5 salix5 deleted the patch-necrovalley branch January 24, 2024 09:44
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