Commit 52a76625 authored by nanahira's avatar nanahira

fixes for honrai

parent e3a55b28
......@@ -47,7 +47,7 @@ function c1156015.initial_effect(c)
--
end
--
function c1156015.chnfilter(c)
function c1156015.cknfilter(c)
return c:GetOriginalCode()==77765004 and not c:IsDisabled()
end
function c1156015.lkfilter(c,lc,tp)
......
......@@ -5,18 +5,18 @@ if not RSVoVal then
RSVoVal=RSVoVal or {}
rsvo=RSVoVal
--other link material bug repair
function Auxiliary.LCheckOtherMaterial(c,mg,lc)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL)}
function Auxiliary.LCheckOtherMaterial(c,mg,lc,tp)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
if #le==0 then return true end
for _,te in pairs(le) do
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
return false
end
function Auxiliary.LExtraFilter(c,f,lc)
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
function rsvo.LPLinkFunction(c)
c:EnableReviveLimit()
......@@ -178,4 +178,4 @@ function cm.mattg(e,c)
end
---------------------
end
\ No newline at end of file
end
......@@ -61,9 +61,15 @@ end
function cm.lfilter(c)
return c:IsLinkRace(RACE_CYBERSE+RACE_MACHINE) or c:IsType(TYPE_SPELL)
end
function cm.matval(e,c,mg)
return c:IsCode(m)
function cm.matval(e,c,mg,mc)
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
function cm.mattg(e,c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
\ No newline at end of file
end
......@@ -14,7 +14,7 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
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)
e2:SetType(EFFECT_TYPE_FIELD)
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