Commit d95271ba authored by POLYMER's avatar POLYMER

fix

parent 30c61f49
--龙宫城的反逆者 哪吒 --龙宫城的反逆者 哪吒
--21.12.15 --21.12.15
local m=11451629 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,22702055) aux.AddCodeList(c,22702055)
c:SetUniqueOnField(1,1,11451419) c:SetUniqueOnField(1,1,11451419)
...@@ -29,16 +28,26 @@ function cm.initial_effect(c) ...@@ -29,16 +28,26 @@ function cm.initial_effect(c)
e3:SetCondition(cm.rule2) e3:SetCondition(cm.rule2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--control --control
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetOperation(cm.check)
c:RegisterEffect(e0)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2)) e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_CUSTOM+m)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_EVENT_PLAYER) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_EVENT_PLAYER)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(cm.target) e4:SetTarget(cm.target)
e4:SetOperation(cm.operation) e4:SetOperation(cm.operation)
c:RegisterEffect(e4) c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter) Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end end
function cm.check(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,re,r,1-c:GetControler(),1-c:GetControler(),0)
end
function cm.chainfilter(re,tp,cid) function cm.chainfilter(re,tp,cid)
return not re:GetHandler():IsSetCard(0x6978) return not re:GetHandler():IsSetCard(0x6978)
end end
......
...@@ -90,7 +90,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -90,7 +90,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local g=Group.CreateGroup() local g=Group.CreateGroup()
for i=1,Duel.GetCurrentChain() do for i=1,Duel.GetCurrentChain() do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT) IsReleasable local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler() local tc=te:GetHandler()
if tc:IsRelateToEffect(te) and (tc:IsReleasableByEffect() or (tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_SPELL+TYPE_TRAP) and not tc:IsHasEffect(EFFECT_UNRELEASABLE_EFFECT) and not tc:IsHasEffect(EFFECT_UNRELEASABLE_NONSUM) and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE))) then g:AddCard(tc) end if tc:IsRelateToEffect(te) and (tc:IsReleasableByEffect() or (tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_SPELL+TYPE_TRAP) and not tc:IsHasEffect(EFFECT_UNRELEASABLE_EFFECT) and not tc:IsHasEffect(EFFECT_UNRELEASABLE_NONSUM) and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE))) then g:AddCard(tc) end
end end
......
...@@ -155,7 +155,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -155,7 +155,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function s.resetop(e,tp,eg,ep,ev,re,r,rp) function s.resetop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local te=e:GetLabelObject()
if not te:CheckCountLimit(tp) then if not te or not te:CheckCountLimit(tp) then
Duel.ResetFlagEffect(tp,id) Duel.ResetFlagEffect(tp,id)
e:Reset() e:Reset()
end end
......
...@@ -27,7 +27,7 @@ function c67201124.initial_effect(c) ...@@ -27,7 +27,7 @@ function c67201124.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c67201124.tdfilter(c,tp) function c67201124.tdfilter(c,tp)
return c:IsSetCard(0x3670) and c:IsFaceupEx() and c:IsAbleToDeckAsCost() and Duel.GetMZoneCount(tp,c)>0 return c:IsSetCard(0x3670) and c:IsFaceupEx() and c:IsAbleToDeckAsCost() and Duel.GetMZoneCount(tp,c)>0 and c:IsType(TYPE_MONSTER)
end end
function c67201124.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function c67201124.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -62,7 +62,7 @@ end ...@@ -62,7 +62,7 @@ end
function c67201130.thfilter(c) function c67201130.thfilter(c)
return c:IsCode(67201128) and c:IsAbleToHand() return c:IsCode(67201128) and c:IsAbleToHand()
end end
function c67201130.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c67201130.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67201130.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c67201130.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
......
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