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_SYNCHRO_LEVEL_EX #728

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

purerosefallen
Copy link
Collaborator

this effect allows xyz or link monsters to use as synchro material, taking value as level.

@mercury233
Copy link
Collaborator

I think EFFECT_SYNCHRO_LEVEL can do this already

@purerosefallen
Copy link
Collaborator Author

I think EFFECT_SYNCHRO_LEVEL can do this already

@mercury233 would be blocked by IsCanBeSynchroMaterial if not

@salix5
Copy link
Collaborator

salix5 commented Feb 14, 2025

Would you consider installing Visual Studio Code or so?

@purerosefallen
Copy link
Collaborator Author

purerosefallen commented Feb 15, 2025

Would you consider installing Visual Studio Code or so?

I have VSCode on my computer, but sometimes I use JetBrains IDE as well.

There are some codes completed by GitHub Copilot, and this PR is rebased from another fork of ocgcore, so there may be some merge issues.

Testing is done and fine in commit b172bc8.

@purerosefallen purerosefallen changed the title add EFFECT_ALLOW_FOR_SYNCHRO add EFFECT_SYNCHRO_LEVEL_EX Feb 15, 2025
@purerosefallen
Copy link
Collaborator Author

it's mercury's idea for effect name

@salix5 salix5 requested a review from mercury233 February 15, 2025 05:22
@salix5
Copy link
Collaborator

salix5 commented Feb 15, 2025

@mercury233
Thank you.

@mercury233
Copy link
Collaborator

@purerosefallen Can you upload a related card script to test this?

@salix5
Copy link
Collaborator

salix5 commented Feb 15, 2025

@mercury233

--カプシー★ヤミーウェイ
local s,io,o=GetID()
function s.initial_effect(c)
	--synchro summon
	c:EnableReviveLimit()
	aux.AddSynchroMixProcedure(c,s.matfilter1,nil,nil,s.matfilter2,1,1)
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(373)
	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
	e1:SetRange(LOCATION_EXTRA)
	e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
	e1:SetTarget(s.syntg)
	e1:SetValue(s.synval)
	c:RegisterEffect(e1)
end
---@param c Card
---@param syncard Card
function s.matfilter1(c,syncard)
	return c:IsTuner(syncard) or c:IsType(TYPE_LINK) and c:IsLink(1)
end
function s.matfilter2(c,syncard)
	return c:IsNotTuner(syncard) and not c:IsType(TYPE_LINK)
end
function s.syntg(e,c)
	return c:IsType(TYPE_LINK) and c:IsLink(1)
end
function s.synval(e,syncard)
	if e:GetHandler()==syncard then
		return 1
	else
		return 0
	end
end

Replay:
yami.zip

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.

4 participants