Commit b5208630 authored by POLYMER's avatar POLYMER

fix

parent 6e8bd36a
No preview for this file type
......@@ -8,6 +8,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_RELEASE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.adcon)
e1:SetTarget(cm.adtg)
......
......@@ -292,7 +292,6 @@ function cm.efop2(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1)
e2:SetCondition(cm.drcon1)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
......@@ -360,7 +359,7 @@ function cm.drcon2(e,tp,eg,ep,ev,re,r,rp)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m+1)<2 end
if chk==0 then return true end --c:GetFlagEffect(m+1)<2 end
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
......
......@@ -57,7 +57,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local num=eg:FilterCount(Card.IsType,nil,TYPE_MONSTER)
local tg=eg:Filter(cm.tgfilter,nil)
local spg=tg:Filter(cm.spfilter,nil,e,tp)
if chk==0 then return (num>=2 or (Duel.IsPlayerAffectedByEffect(tp,11451481) and num>=1)) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and #spg>0 end
if chk==0 then return (num>=2 or (Duel.IsPlayerAffectedByEffect(tp,11451481) and num>=1)) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and #spg>0 and c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
if Duel.IsPlayerAffectedByEffect(tp,11451481) then
if num>=2 then
local op=Duel.SelectOption(tp,aux.Stringid(11451483,2),aux.Stringid(11451483,3))
......@@ -93,7 +94,8 @@ function cm.thfilter(c)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (#eg>=2 or Duel.IsPlayerAffectedByEffect(tp,11451481)) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and not e:GetHandler():IsStatus(STATUS_CHAINING) end
if chk==0 then return (#eg>=2 or Duel.IsPlayerAffectedByEffect(tp,11451481)) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
if Duel.IsPlayerAffectedByEffect(tp,11451481) then
if #eg>=2 then
local op=Duel.SelectOption(tp,aux.Stringid(11451483,2),aux.Stringid(11451483,3))
......
--魔人★双子 菈·赛泽尔
local m=11451482
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--effect1
local e1=Effect.CreateEffect(c)
......@@ -140,7 +139,8 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local num=e:GetLabel()
if chk==0 then return (num>=2 or (Duel.IsPlayerAffectedByEffect(tp,11451482) and num>=1)) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
if chk==0 then return (num>=2 or (Duel.IsPlayerAffectedByEffect(tp,11451482) and num>=1)) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
if Duel.IsPlayerAffectedByEffect(tp,11451482) then
if num>=2 then
local op=Duel.SelectOption(tp,aux.Stringid(11451483,2),aux.Stringid(11451483,3))
......
......@@ -115,11 +115,11 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetDescription(aux.Stringid(m,3))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
--e1:SetCountLimit(1)
e1:SetLabel(Duel.GetCurrentPhase())
e1:SetLabelObject(tc)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
......@@ -128,6 +128,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return false end
local tc=e:GetLabelObject()
if tc:GetFlagEffect(m)==0 then
e:Reset()
......@@ -137,9 +138,12 @@ function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
local tc=e:GetLabelObject()
local ph,ph2=Duel.GetCurrentPhase(),e:GetLabel()
if ph~=ph2 and (ph<=PHASE_MAIN1 or ph>=PHASE_MAIN2 or ph2<=PHASE_MAIN1 or ph2>=PHASE_MAIN2) then
Duel.SendtoHand(tc,1-tp,REASON_EFFECT)
end
pnfl_adjusting=false
end
\ No newline at end of file
......@@ -29,6 +29,7 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCode(EVENT_MOVE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(cm.actcon)
e2:SetCost(cm.bfgcost)
e2:SetOperation(cm.actop)
......
......@@ -59,10 +59,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetLabel(Duel.GetCurrentPhase())
e1:SetCondition(function() return not pnfl_adjusting end)
e1:SetOperation(cm.adjustop)
Duel.RegisterEffect(e1,tp)
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
local ph,ph2=Duel.GetCurrentPhase(),e:GetLabel()
if ph~=ph2 and (ph<=PHASE_MAIN1 or ph>=PHASE_MAIN2 or ph2<=PHASE_MAIN1 or ph2>=PHASE_MAIN2) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -78,6 +81,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
e:Reset()
end
pnfl_adjusting=false
end
function cm.setfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x9977) and ((c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1) or c:IsSSetable())
......
......@@ -16,6 +16,7 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(cm.con)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
......
......@@ -17,6 +17,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
......
......@@ -267,6 +267,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return false end
local g=e:GetLabelObject()
if not g:IsExists(cm.filter6,1,nil) then
g:DeleteGroup()
......@@ -303,6 +304,8 @@ function cm.returntofield(tc)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
local g=e:GetLabelObject()
local sg=g:Filter(cm.filter6,nil,e)
local ph,ph2=Duel.GetCurrentPhase(),e:GetLabel()
......@@ -357,4 +360,5 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
end
pnfl_adjusting=false
end
\ No newline at end of file
......@@ -74,7 +74,7 @@ function cm.initial_effect(c)
local tc=obj
if aux.GetValueType(obj)=="Group" then tc=obj:GetFirst() end
local tp=tc:GetControler()
if tc:IsLevel(3) then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.SelectMatchingCard(tp,cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,0,1,nil,cm[1],tp,tc)
if #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) cm[1]=nil return _Merge(sg,tg) end
......@@ -86,7 +86,7 @@ function cm.initial_effect(c)
function Duel.SpecialSummonRule(tp,tc,sumtype)
if sumtype~=SUMMON_TYPE_PENDULUM then _SpecialSummonRule(tp,tc,sumtype) end
local tp=tc:GetControler()
if tc:IsLevel(3) then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.SelectMatchingCard(tp,cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,0,1,nil,nil,tp,tc)
if #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) local tc2=tg:GetFirst() tc2.pendulum_rule[tc2]:SetLabel(1) if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM) end
......@@ -212,7 +212,6 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetCurrentPhase())
e1:SetLabelObject(og)
e1:SetCondition(cm.retcon)
......@@ -223,6 +222,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return false end
local g=e:GetLabelObject()
if not g:IsExists(cm.filter6,1,nil) then
g:DeleteGroup()
......@@ -259,6 +259,8 @@ function cm.returntofield(tc)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
local g=e:GetLabelObject()
local sg=g:Filter(cm.filter6,nil,e)
local ph,ph2=Duel.GetCurrentPhase(),e:GetLabel()
......@@ -313,4 +315,5 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
end
pnfl_adjusting=false
end
\ No newline at end of file
......@@ -66,6 +66,7 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(cm.rmcon)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
......@@ -87,7 +88,7 @@ end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsPreviousLocation,nil,LOCATION_ONFIELD):Filter(Card.IsPreviousPosition,nil,POS_FACEUP)
for tc in aux.Next(g) do
local code,code2=tc:GetCode()
local code,code2=tc:GetPreviousCodeOnField()
PNFL_TURN_TOHAND_CHECK[code]=true
if code2 then PNFL_TURN_TOHAND_CHECK[code2]=true end
end
......
......@@ -24,6 +24,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetLabelObject(e0)
e2:SetCondition(cm.adcon2)
......
......@@ -90,7 +90,7 @@ function c21185825.LCheckGoal2(sg,tp,lc,lmat)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0
and not sg:IsExists(aux.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
and #sg==sg:Filter(Card.IsLinkType,nil,TYPE_EFFECT)
and #sg==sg:Filter(Card.IsLinkType,nil,TYPE_EFFECT):GetCount()
end
function c21185825.linkcon()
return function(e,c,og,lmat,min,max)
......
......@@ -27,9 +27,9 @@ end
function c21185845.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ct=c:GetMutualLinkedGroupCount()
if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(3,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,ct,nil)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,0,800)
end
......
......@@ -4,7 +4,7 @@ function c21185848.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c21185848.tg)
......
......@@ -157,6 +157,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(s.aclimit2)
Duel.RegisterEffect(e1,tp)
end
......
This diff is collapsed.
--地中族邪界兽·阿尔沃海龙
function c65979995.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65979995,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,65979995)
e1:SetTarget(c65979995.thtg)
e1:SetOperation(c65979995.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65979995,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_HAND)
e2:SetCost(c65979995.cost)
e2:SetCondition(c65979995.spcon)
e2:SetTarget(c65979995.sptg)
e2:SetOperation(c65979995.spop)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65979995,2))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c65979995.poscon)
e3:SetTarget(c65979995.postg)
e3:SetOperation(c65979995.posop)
c:RegisterEffect(e3)
--local e4=Effect.CreateEffect(c)
--e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
--e4:SetRange(LOCATION_MZONE)
--e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
--e4:SetTarget(c65979995.eftg)
--e4:SetLabelObject(e3)
--c:RegisterEffect(e4)
end
function c65979995.thfilter(c)
return c:IsSetCard(0x10ed) and not c:IsCode(65979995) and c:IsAbleToHand()
end
function c65979995.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65979995.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65979995.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65979995.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c65979995.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(65979995)==0 end
c:RegisterFlagEffect(65979995,RESET_CHAIN,0,1)
end
function c65979995.spcon(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
end
function c65979995.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c65979995.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
function c65979995.eftg(e,c)
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x10ed) and e:GetHandler()~=c
end
function c65979995.poscon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c65979995.filter(c)
return c:IsSetCard(0xed) and c:IsFaceup() and c:IsCanTurnSet()
end
function c65979995.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65979995.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
end
function c65979995.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c65979995.filter,tp,LOCATION_MZONE,0,1,99,nil)
if g:GetCount()>0 then
local fid=e:GetHandler():GetFieldID()
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(65979995,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc=g:GetNext()
end
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c65979995.poscon2)
e1:SetOperation(c65979995.posop2)
Duel.RegisterEffect(e1,tp)
end
end
--function c65979995.poscon(e,tp,eg,ep,ev,re,r,rp)
-- return rp==1-tp
--end
--function c65979995.postg(e,tp,eg,ep,ev,re,r,rp,chk)
-- local c=e:GetHandler()
-- if chk==0 then return c:IsCanTurnSet() end
-- Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
--end
--function c65979995.posop(e,tp,eg,ep,ev,re,r,rp)
-- local c=e:GetHandler()
-- if c:IsRelateToEffect(e) and c:IsFaceup() then
-- Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
-- end
-- local e1=Effect.CreateEffect(e:GetHandler())
-- e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
-- e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
-- e1:SetCode(EVENT_CHAINING)
-- e1:SetCountLimit(1)
-- e1:SetLabel(fid)
-- e1:SetLabelObject(g)
-- e1:SetCondition(c65979995.poscon)
-- e1:SetOperation(c65979995.posop2)
-- Duel.RegisterEffect(e1,tp)
--end
--function c65979995.filter(c)
-- return c:IsSetCard(0x10ed) and c:IsFacedown()
--end
--function c65979995.posop2(e,tp,eg,ep,ev,re,r,rp)
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
-- local g=Duel.SelectMatchingCard(tp,c65979995.filter,tp,LOCATION_MZONE,0,1,1,nil)
-- local tc=g:GetFirst()
-- if tc then
-- Duel.Hint(HINT_CARD,0,e:GetHandler():GetOriginalCodeRule())
-- Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
-- Duel.AdjustInstantly()
-- end
-- e:Reset()
--end
function c65979995.posfilter(c,fid)
return c:GetFlagEffectLabel(65979995)==fid and c:IsPosition(POS_FACEDOWN)
end
function c65979995.poscon2(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if g then
else
e:Reset()
g:DeleteGroup()
return false
end
if g:GetCount()~=0 then
else
e:Reset()
g:DeleteGroup()
return false
end
if not g:IsExists(c65979995.posfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return rp==1-tp end
end
function c65979995.posop2(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c65979995.posfilter,nil,e:GetLabel())
g:DeleteGroup()
Duel.Hint(HINT_CARD,0,65979995)
Duel.ChangePosition(tg,POS_FACEUP_DEFENSE)
e:Reset()
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