Commit 30310198 authored by zengsxing's avatar zengsxing Committed by GitHub

fix 11961740,75500286 (#2173)

* fix 11961740,75500286

修复黄金柜除外原本持有者为对方的卡时,按对方回合计数的bug
修复时间胶囊效果自爆误写为规则自爆的bug
修复时间胶囊a除外的卡回到卡组后,被时间胶囊b除外,仍然能被时间胶囊a加入手卡的bug

* fix 75500286

删除多余内容
parent 92a9d029
...@@ -16,11 +16,11 @@ end ...@@ -16,11 +16,11 @@ end
function c11961740.activate(e,tp,eg,ep,ev,re,r,rp) function c11961740.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
local fid=c:GetFieldID()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil,tp,POS_FACEDOWN) local rc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil,tp,POS_FACEDOWN):GetFirst()
local tc=g:GetFirst() if rc and Duel.Remove(rc,POS_FACEDOWN,REASON_EFFECT)~=0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
if tc and Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)~=0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then rc:RegisterFlagEffect(11961740,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(11961740,RESET_EVENT+RESETS_STANDARD,0,1)
c:CancelToGrave() c:CancelToGrave()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -30,8 +30,8 @@ function c11961740.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,8 +30,8 @@ function c11961740.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c11961740.thcon) e1:SetCondition(c11961740.thcon)
e1:SetOperation(c11961740.thop) e1:SetOperation(c11961740.thop)
e1:SetLabel(0) e1:SetLabel(fid,0)
e1:SetLabelObject(tc) e1:SetLabelObject(rc)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
...@@ -40,13 +40,15 @@ function c11961740.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,13 +40,15 @@ function c11961740.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function c11961740.thop(e,tp,eg,ep,ev,re,r,rp) function c11961740.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local c=e:GetHandler()
e:GetHandler():SetTurnCounter(ct+1) local fid,ct=e:GetLabel()
if ct==1 then
Duel.Destroy(e:GetHandler(),REASON_RULE)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if tc:GetFlagEffect(11961740)~=0 then ct=ct+1
c:SetTurnCounter(ct)
e:SetLabel(fid,ct)
if ct~=2 then return end
if Duel.Destroy(c,REASON_EFFECT)>0 and tc:GetFlagEffectLabel(11961740)==fid then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end end
else e:SetLabel(1) end
end end
...@@ -14,31 +14,38 @@ function c75500286.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -14,31 +14,38 @@ function c75500286.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end end
function c75500286.activate(e,tp,eg,ep,ev,re,r,rp) function c75500286.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil) local rc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
local tg=g:GetFirst() local fid=c:GetFieldID()
if tg==nil then return end if rc and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) rc:RegisterFlagEffect(75500286,RESET_EVENT+RESETS_STANDARD,0,1,fid)
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_REMOVED)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetLabel(fid,0)
e1:SetLabelObject(rc)
e1:SetCondition(c75500286.thcon) e1:SetCondition(c75500286.thcon)
e1:SetOperation(c75500286.thop) e1:SetOperation(c75500286.thop)
e1:SetLabel(0) Duel.RegisterEffect(e1,tp)
tg:RegisterEffect(e1) end
end end
function c75500286.thcon(e,tp,eg,ep,ev,re,r,rp) function c75500286.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp local fid=e:GetLabel()
local tc=e:GetLabelObject()
return Duel.GetTurnPlayer()==tp and tc:GetFlagEffectLabel(75500286)==fid
end end
function c75500286.thop(e,tp,eg,ep,ev,re,r,rp) function c75500286.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local fid,ct=e:GetLabel()
e:GetHandler():SetTurnCounter(ct+1) local tc=e:GetLabelObject()
if ct==1 then ct=ct+1
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) e:GetHandler():SetTurnCounter(ct)
Duel.ConfirmCards(1-tp,e:GetHandler()) e:SetLabel(fid,ct)
else e:SetLabel(1) end if ct~=2 then return end
if tc:GetFlagEffectLabel(75500286)==fid then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end 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