Commit 8ff3d039 authored by Nemo Ma's avatar Nemo Ma

fix

parent aaf37848
--闪刀姬-机影
local m=11451429
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--synchro summon
......@@ -86,6 +85,7 @@ function cm.acop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetLabel(turn)
e1:SetCondition(cm.qpcon)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x115))
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
Duel.RegisterEffect(e1,tp)
......
--珂拉琪的造物双子
local m=11451527
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--pendulum summon
c:EnableReviveLimit()
......@@ -57,6 +56,11 @@ function cm.initial_effect(c)
e5:SetRange(0xff)
e5:SetValue(0x151)
c:RegisterEffect(e5)
if not cm.pendulum_link then
cm.pendulum_link=true
_GetLink=Card.GetLink
Card.GetLink=function(tc) if tc==c and tc:IsLocation(LOCATION_PZONE) then return 2 else return _GetLink(tc) end end
end
end
function cm.lcheck(g)
return g:GetClassCount(Card.GetLinkRace)==1 and g:GetClassCount(Card.GetCode)==g:GetCount()
......@@ -79,12 +83,12 @@ function cm.LinkCondition(f,minc,maxc,gf)
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c)
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c) then return false end
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
......
......@@ -64,7 +64,7 @@ end
function cm.poscon(e)
return e:GetHandler():IsAttackPos()
end
function cm.filter(c,e,tp)
function cm.filter(c,tp)
return c:IsCode(14000105) and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp,true,true))
end
function cm.cfilter(c,tp)
......@@ -122,12 +122,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
else
local tg=Duel.GetFirstMatchingCard(cm.filter,tp,LOCATION_DECK,0,nil)
local tg=Duel.GetFirstMatchingCard(cm.filter,tp,LOCATION_DECK,0,nil,tp)
local tc=tg
if tc then
local te=tc:GetActivateEffect()
local b1=tc:IsAbleToHand()
local b2=te:IsActivatable(tp)
local b2=te:IsActivatable(tp,true,true)
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(m,2))) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
......
......@@ -33,7 +33,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0)
end
function s.desfilter(c)
return (c:IsRace(RACE_ZOMBIE) or c:IsCode(33201009)) and c:IsFaceup()
return ((c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_MONSTER)) or c:IsCode(33201009)) and c:IsFaceup()
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -126,8 +126,13 @@ function c50587164.effop(e,tp,eg,ep,ev,re,r,rp)
end
function c50587164.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 and c:IsOriginalCodeRule(74627016) then return Duel.GetFlagEffect(tp,50587164)==0
and (Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) or Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,c)) end
if chk==0 then return Duel.GetFlagEffect(tp,50587164)==0
and (Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,c) or Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,c)) end
Duel.RegisterFlagEffect(tp,50587164,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......@@ -135,6 +140,7 @@ function c50587164.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if c:IsOriginalCodeRule(74627016) then g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil) end
local g2=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 and g2:GetCount()<=0 then
op=Duel.SelectOption(tp,aux.Stringid(50587164,5))+1
......
......@@ -181,10 +181,10 @@ function c51782333.spr(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsReason(REASON_DESTROY) then return end
if Duel.GetCurrentPhase()==PHASE_STANDBY then
e:SetLabel(Duel.GetTurnCount())
c:RegisterFlagEffect(51782333,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2)
c:RegisterFlagEffect(51782333,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2)
else
e:SetLabel(0)
c:RegisterFlagEffect(51782333,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
c:RegisterFlagEffect(51782333,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1)
end
end
function c51782333.spcon(e,tp,eg,ep,ev,re,r,rp)
......
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