Commit b558d83f authored by Huangnan's avatar Huangnan

fix

parent 276101ec
Pipeline #35818 passed with stages
in 45 minutes and 51 seconds
No preview for this file type
...@@ -19,6 +19,7 @@ function c11601340.initial_effect(c) ...@@ -19,6 +19,7 @@ function c11601340.initial_effect(c)
--Indes --Indes
local e11=e1:Clone() local e11=e1:Clone()
e11:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e11:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e11:SetProperty(0)
e11:SetValue(aux.indoval) e11:SetValue(aux.indoval)
c:RegisterEffect(e11) c:RegisterEffect(e11)
--atklimit --atklimit
...@@ -66,7 +67,7 @@ function c11601340.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +67,7 @@ function c11601340.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) then return end if not rc:IsRelateToEffect(re) then return end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if loc==LOCATION_MZONE then if loc&LOCATION_ONFIELD>0 then
rc:RegisterFlagEffect(11601340,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) rc:RegisterFlagEffect(11601340,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
end end
end end
......
...@@ -46,8 +46,9 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,8 +46,9 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
while tc do while tc do
if tc:IsSetCard(0x694) then if tc:IsSetCard(0x694) then
Duel.RegisterFlagEffect(tc:GetOwner(),id,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tc:GetOwner(),id,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end end
tc=eg:GetNext()
end end
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -69,7 +70,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +70,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
-- 特殊召唤处理 -- 特殊召唤处理
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
-- 附加素材处理 -- 附加素材处理
local g=Duel.GetMatchingGroup(Card.IsCanBeXyzMaterial,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c,c) local g=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
...@@ -132,9 +133,8 @@ end ...@@ -132,9 +133,8 @@ end
function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c)
end end
Duel.SetOperationInfo(0,CATEGORY_OVERLAY,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE)
end end
-- 附加素材操作 -- 附加素材操作
...@@ -143,7 +143,7 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,7 +143,7 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,c) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if #g>0 then if #g>0 then
Duel.Overlay(c,g) Duel.Overlay(c,g)
end end
......
...@@ -41,7 +41,6 @@ function c82000766.initial_effect(c) ...@@ -41,7 +41,6 @@ function c82000766.initial_effect(c)
ge1:SetOperation(c82000766.regop) ge1:SetOperation(c82000766.regop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
local e4=Effect.CreateEffect(c)
end end
function c82000766.condition(e,tp,eg,ep,ev,re,r,rp) function c82000766.condition(e,tp,eg,ep,ev,re,r,rp)
return ev==tp or ev==PLAYER_ALL return ev==tp or ev==PLAYER_ALL
......
...@@ -8,18 +8,14 @@ function s.initial_effect(c) ...@@ -8,18 +8,14 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(s.con1)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCondition(s.con2)
e2:SetCode(EVENT_CHAINING)
c:RegisterEffect(e2)
--act qp in hand --act qp in hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,2))
e3:SetCondition(s.handcon)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -37,12 +33,10 @@ function s.initial_effect(c) ...@@ -37,12 +33,10 @@ function s.initial_effect(c)
e4:SetOperation(s.setop) e4:SetOperation(s.setop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.con1(e,tp,eg,ep,ev,re,r,rp) function s.handcon(e,c)
return Duel.GetTurnPlayer()==tp or not e:GetHandler():IsLocation(LOCATION_HAND) if Duel.GetCurrentChain()==0 then return false end
end local re=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT)
function s.con2(e,tp,eg,ep,ev,re,r,rp) return re and re:IsActiveType(TYPE_SPELL)
return Duel.GetTurnPlayer()~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and e:GetHandler():IsLocation(LOCATION_HAND)
end end
function s.descheck(c,typ,e) function s.descheck(c,typ,e)
return c:IsType(typ) and c:IsFaceup() and c:IsCanBeEffectTarget(e) return c:IsType(typ) and c:IsFaceup() and c:IsCanBeEffectTarget(e)
......
...@@ -8,16 +8,12 @@ function s.initial_effect(c) ...@@ -8,16 +8,12 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetCondition(s.con1)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCondition(s.con2)
e2:SetCode(EVENT_CHAINING)
c:RegisterEffect(e2)
--act trap in hand --act trap in hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCondition(s.handcon)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND) e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -34,38 +30,19 @@ function s.initial_effect(c) ...@@ -34,38 +30,19 @@ function s.initial_effect(c)
e4:SetOperation(s.thop) e4:SetOperation(s.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.con1(e,tp,eg,ep,ev,re,r,rp) function s.handcon(e,c)
return not e:GetHandler():IsLocation(LOCATION_HAND) or Duel.IsPlayerAffectedByEffect(tp,EFFECT_TRAP_ACT_IN_HAND) if Duel.GetCurrentChain()==0 then return false end
end local re=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT)
function s.con2(e,tp,eg,ep,ev,re,r,rp) return re and re:IsActiveType(TYPE_TRAP)
return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsLocation(LOCATION_HAND)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsSetCard(0x3921) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3921) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject()
local tp=e:GetLabel()
local x=0
if Duel.GetFlagEffect(tp,id)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(tp,id)} do
if i==se:GetFieldID() then x=1 end
end
end
return se and ((not re) or (re~=se and (e:GetCode()==EVENT_CHAINING and (Duel.GetFlagEffect(tp,id)==0 or x==0))))
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject()
if se then
se:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e:Reset()
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
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