Commit eb9781d4 authored by mercury233's avatar mercury233

fix

parent 45fa3f06
......@@ -6,6 +6,7 @@ function c17688543.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c17688543.target)
e1:SetOperation(c17688543.activate)
c:RegisterEffect(e1)
......@@ -26,7 +27,6 @@ function c17688543.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(17688543,RESET_EVENT+0x1fe0000,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
......@@ -35,12 +35,20 @@ function c17688543.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabelObject(tc)
e1:SetCondition(c17688543.spcon)
e1:SetOperation(c17688543.spop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetValue(Duel.GetTurnCount())
tc:RegisterFlagEffect(17688543,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2,fid)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetValue(0)
tc:RegisterFlagEffect(17688543,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid)
end
Duel.RegisterEffect(e1,tp)
end
end
function c17688543.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetValue()
end
function c17688543.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
......
......@@ -19,6 +19,7 @@ function c28692962.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,28692963)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetTarget(c28692962.thtg)
e2:SetOperation(c28692962.thop)
c:RegisterEffect(e2)
......@@ -64,8 +65,6 @@ function c28692962.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0
and tc:IsLocation(LOCATION_REMOVED) then
local ct=1
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then ct=2 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(28692962,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -77,12 +76,13 @@ function c28692962.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetValue(Duel.GetTurnCount())
tc:RegisterFlagEffect(28692962,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetValue(0)
tc:RegisterFlagEffect(28692962,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
end
Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(28692962,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,ct)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c28692962.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -28,16 +28,27 @@ function c43839002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c43839002.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c43839002.retcon)
e1:SetOperation(c43839002.retop)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetValue(Duel.GetTurnCount())
tc:RegisterFlagEffect(43839002,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2,fid)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetValue(0)
tc:RegisterFlagEffect(43839002,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid)
end
Duel.RegisterEffect(e1,tp)
if tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......@@ -49,11 +60,11 @@ function c43839002.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c43839002.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetValue()
end
function c43839002.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if Duel.ReturnToField(tc) then
if tc:GetFlagEffectLabel(43839002)==e:GetLabel() and Duel.ReturnToField(tc) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetDescription(aux.Stringid(43839002,0))
......
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