Commit 0760975d authored by POLYMER's avatar POLYMER

fix

parent 470c1a80
No preview for this file type
......@@ -170,7 +170,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not sg then
local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
Duel.RegisterFlagEffect(tp,11451031,RESET_PHASE+ph,0,1)
Duel.RegisterFlagEffect(tp,11451031,RESET_CHAIN,0,1)
pnfl_adjusting=false
return
end
......@@ -383,7 +383,7 @@ function cm.spcop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetCondition(function(e) if not cm.sfilter(sc,tp) then e:SetProperty(0) e:SetLabel(100) end return e:GetLabel()==0 end)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
......
......@@ -198,7 +198,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not sg then
local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
Duel.RegisterFlagEffect(tp,11451031,RESET_PHASE+ph,0,1)
Duel.RegisterFlagEffect(tp,11451031,RESET_CHAIN,0,1)
pnfl_adjusting=false
return
end
......
......@@ -196,7 +196,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not sg then
local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
Duel.RegisterFlagEffect(tp,11451031,RESET_PHASE+ph,0,1)
Duel.RegisterFlagEffect(tp,11451031,RESET_CHAIN,0,1)
pnfl_adjusting=false
return
end
......
......@@ -165,7 +165,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not sg then
local ph=Duel.GetCurrentPhase()
if ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then ph=PHASE_BATTLE end
Duel.RegisterFlagEffect(tp,11451031,RESET_PHASE+ph,0,1)
Duel.RegisterFlagEffect(tp,11451031,RESET_CHAIN,0,1)
pnfl_adjusting=false
return
end
......
......@@ -41,7 +41,7 @@ function cm.tgfilter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_DECK+LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c)
end
function cm.cfilter2(c,tc)
return c:IsAbleToGrave() and ((tc:IsType(c:GetType()&0x6) and (c:IsFaceupEx() or c:GetEquipTarget() or c:IsLocation(LOCATION_FZONE))) or (tc:IsType(c:GetType()&0x1)) and c:IsFaceupEx() and tc:IsAttribute(c:GetAttribute()))
return c:IsAbleToGrave() and ((tc:IsType(c:GetType()&0x6) and (c:IsFaceupEx() or c:GetEquipTarget() or c:IsLocation(LOCATION_FZONE))) or (tc:IsType(c:GetType()&0x1) and c:IsFaceupEx() and tc:IsAttribute(c:GetAttribute())))
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.tgfilter(chkc) end
......@@ -54,7 +54,7 @@ function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if not tc:IsRelateToEffect(e) or not (tc:IsFaceupEx() or tc:GetEquipTarget() or tc:IsLocation(LOCATION_FZONE)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,LOCATION_DECK+LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,tc,tc)
if #g>0 then
......
--秘计螺旋 重启
local cm,m=GetID()
function cm.initial_effect(c)
--effect1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--effect2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e3:SetCost(cm.cost)
e3:SetDescription(aux.Stringid(m,2))
c:RegisterEffect(e3)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return #g>0 end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.IsPlayerCanDraw(tp,ct+1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct+1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
local og=g:Filter(Card.IsLocation,nil,LOCATION_DECK)
if og:IsExists(Card.IsControler,1,nil,tp) then Duel.ShuffleDeck(tp) end
if og:IsExists(Card.IsControler,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end
Duel.BreakEffect()
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.Draw(tp,ct+1,REASON_EFFECT)
end
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,nil) and cm.tg(e,tp,eg,ep,ev,re,r,rp,0) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,nil)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
cm.op(e,tp,eg,ep,ev,re,r,rp)
end
end
\ No newline at end of file
......@@ -28,7 +28,7 @@ function c65810120.initial_effect(c)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE+CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE+CATEGORY_SPECIAL_SUMMON)
e5:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,65810120)
......
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