Commit 52a76625 authored by nanahira's avatar nanahira

fixes for honrai

parent e3a55b28
...@@ -47,7 +47,7 @@ function c1156015.initial_effect(c) ...@@ -47,7 +47,7 @@ function c1156015.initial_effect(c)
-- --
end end
-- --
function c1156015.chnfilter(c) function c1156015.cknfilter(c)
return c:GetOriginalCode()==77765004 and not c:IsDisabled() return c:GetOriginalCode()==77765004 and not c:IsDisabled()
end end
function c1156015.lkfilter(c,lc,tp) function c1156015.lkfilter(c,lc,tp)
......
...@@ -5,18 +5,18 @@ if not RSVoVal then ...@@ -5,18 +5,18 @@ if not RSVoVal then
RSVoVal=RSVoVal or {} RSVoVal=RSVoVal or {}
rsvo=RSVoVal rsvo=RSVoVal
--other link material bug repair --other link material bug repair
function Auxiliary.LCheckOtherMaterial(c,mg,lc) function Auxiliary.LCheckOtherMaterial(c,mg,lc,tp)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL)} local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
if #le==0 then return true end if #le==0 then return true end
for _,te in pairs(le) do for _,te in pairs(le) do
local f=te:GetValue() local f=te:GetValue()
if not f or f(te,lc,mg) then return true end if not f or f(te,lc,mg,c) then return true end
end end
return false return false
end end
function Auxiliary.LExtraFilter(c,f,lc) function Auxiliary.LExtraFilter(c,f,lc)
if c:IsLocation(LOCATION_ONFIELD) and not c:IsFaceup() then return false end if c:IsLocation(LOCATION_ONFIELD) and not c:IsFaceup() then return false end
return c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL) and (c:IsCanBeLinkMaterial(lc) or ((bit.band(c:GetOriginalType(),TYPE_SPELL)~=0 or bit.band(c:GetOriginalType(),TYPE_TRAP)~=0) and not c:IsType(TYPE_MONSTER))) and (not f or f(c)) return c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp) and (c:IsCanBeLinkMaterial(lc) or ((bit.band(c:GetOriginalType(),TYPE_SPELL)~=0 or bit.band(c:GetOriginalType(),TYPE_TRAP)~=0) and not c:IsType(TYPE_MONSTER))) and (not f or f(c))
end end
function rsvo.LPLinkFunction(c) function rsvo.LPLinkFunction(c)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -178,4 +178,4 @@ function cm.mattg(e,c) ...@@ -178,4 +178,4 @@ function cm.mattg(e,c)
end end
--------------------- ---------------------
end end
\ No newline at end of file
...@@ -61,9 +61,15 @@ end ...@@ -61,9 +61,15 @@ end
function cm.lfilter(c) function cm.lfilter(c)
return c:IsLinkRace(RACE_CYBERSE+RACE_MACHINE) or c:IsType(TYPE_SPELL) return c:IsLinkRace(RACE_CYBERSE+RACE_MACHINE) or c:IsType(TYPE_SPELL)
end end
function cm.matval(e,c,mg) function cm.matval(e,c,mg,mc)
return c:IsCode(m) if c~=e:GetHandler() then return false end
local counter_effects={mc:IsHasEffect(77765004)}
for _,te in pairs(counter_effects) do
local vf=te:GetValue()
if not vf or vf(te,c) then return false end
end
return true
end end
function cm.mattg(e,c) function cm.mattg(e,c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) return c:IsFaceup() and c:IsType(TYPE_SPELL)
end end
\ No newline at end of file
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
for _,code in ipairs({EFFECT_CANNOT_BE_XYZ_MATERIAL,EFFECT_CANNOT_BE_SYNCHRO_MATERIAL,EFFECT_CANNOT_BE_FUSION_MATERIAL,EFFECT_CANNOT_BE_LINK_MATERIAL}) do for _,code in ipairs({EFFECT_CANNOT_BE_XYZ_MATERIAL,EFFECT_CANNOT_BE_SYNCHRO_MATERIAL,EFFECT_CANNOT_BE_FUSION_MATERIAL,EFFECT_CANNOT_BE_LINK_MATERIAL,m}) do
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(code) e2:SetCode(code)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment