Commit d95271ba authored by POLYMER's avatar POLYMER

fix

parent 30c61f49
--龙宫城的反逆者 哪吒
--21.12.15
local m=11451629
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,22702055)
c:SetUniqueOnField(1,1,11451419)
......@@ -29,16 +28,26 @@ function cm.initial_effect(c)
e3:SetCondition(cm.rule2)
c:RegisterEffect(e3)
--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)
e4:SetDescription(aux.Stringid(m,2))
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:SetRange(LOCATION_MZONE)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
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)
return not re:GetHandler():IsSetCard(0x6978)
end
......
......@@ -90,7 +90,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Group.CreateGroup()
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()
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
......
......@@ -134,7 +134,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(tde,tp)
end
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
......@@ -155,7 +155,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te:CheckCountLimit(tp) then
if not te or not te:CheckCountLimit(tp) then
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
......
......@@ -27,7 +27,7 @@ function c67201124.initial_effect(c)
c:RegisterEffect(e3)
end
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
function c67201124.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -62,7 +62,7 @@ end
function c67201130.thfilter(c)
return c:IsCode(67201128) and c:IsAbleToHand()
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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