Commit 85eda6e6 authored by GuGu's avatar GuGu

Update c21470101.lua 特定情况下2效果会额外计数的bug

parent 2e0bf99a
Pipeline #22309 passed with stage
in 57 seconds
......@@ -6,7 +6,6 @@ function c21470101.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c21470101.act)
c:RegisterEffect(e1)
--code
local e2=Effect.CreateEffect(c)
......@@ -35,43 +34,19 @@ function c21470101.initial_effect(c)
e1:SetRange(LOCATION_SZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x742))
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCondition(c21470101.con)
c:RegisterEffect(e1)--[[
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c21470101.checkop)
c:RegisterEffect(e2)]]
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
c:RegisterEffect(e1)
--activate trap in hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c21470101.con)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x742))
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
c:RegisterEffect(e1)
end
function c21470101.act(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(c21470101.condition2)
e1:SetOperation(c21470101.operation2)
e:GetHandler():RegisterEffect(e1)
end
function c21470101.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x742)
and (re:IsActiveType(TYPE_TRAP) and re:GetHandler():GetTurnID()==Duel.GetTurnCount() and not re:GetHandler():IsStatus(STATUS_SET_TURN))
or (Duel.GetTurnPlayer()~=tp and re:GetActiveType()==TYPE_QUICKPLAY+TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsStatus(STATUS_ACT_FROM_HAND))
end
function c21470101.operation2(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(21470101,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c21470101.cfilter(c,tp)
return c:IsControler(tp) and not c:IsReason(REASON_DRAW)
end
......@@ -95,21 +70,4 @@ function c21470101.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
end--[[
function c21470101.tg(e,c)
return c:IsSetCard(0x742)
end
function c21470101.actcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFlagEffect(tp,21470101)==0
end
function c21470101.checkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return end
if re:GetActiveType()==TYPE_QUICKPLAY+TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and re:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and re:GetHandler():IsSetCard(0x742) then
Duel.RegisterFlagEffect(tp,21470101,RESET_PHASE+PHASE_END,0,1)
end
end]]
function c21470101.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(21470101)<=0
end
\ No newline at end of file
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