Commit 8dcadc72 authored by mercury233's avatar mercury233 Committed by GitHub

fix 半魔導帯域 vs ポップルアップ (#1182)

parent 74a581c9
......@@ -18,10 +18,13 @@ function c15248873.filter(c,tp)
end
function c15248873.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c15248873.filter,tp,LOCATION_DECK,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
end
function c15248873.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(15248873,0))
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local tc=Duel.SelectMatchingCard(tp,c15248873.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
Duel.ResetFlagEffect(tp,15248873)
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
......
......@@ -27,6 +27,7 @@ function c61818176.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if chkc then return false end
if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0x8d) and tc:IsAbleToHand() and tc:IsCanBeEffectTarget(e) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
end
......@@ -36,7 +37,9 @@ end
function c61818176.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local g=Duel.GetMatchingGroup(c61818176.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tp)
Duel.ResetFlagEffect(tp,15248873)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(61818176,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
......
......@@ -49,8 +49,9 @@ function c71650854.initial_effect(c)
c:RegisterEffect(e7)
end
function c71650854.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and not Duel.CheckPhaseActivity()
return Duel.GetTurnPlayer()==tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and (not Duel.CheckPhaseActivity() or Duel.GetFlagEffect(tp,15248873)>0)
end
function c71650854.indcon(e)
return Duel.GetCurrentPhase()==PHASE_MAIN1
......
......@@ -14,16 +14,21 @@ function c89208725.filter(c,tp)
end
function c89208725.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c89208725.filter,tp,LOCATION_DECK,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c89208725.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(89208725,0))
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local g=Duel.SelectMatchingCard(tp,c89208725.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.ResetFlagEffect(tp,15248873)
local tc=g:GetFirst()
if tc then
local te=tc:GetActivateEffect()
local b1=tc:IsAbleToHand()
local b2=te:IsActivatable(tp)
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local b2=te:IsActivatable(tp,true,true)
Duel.ResetFlagEffect(tp,15248873)
if b1 and (not b2 or Duel.SelectOption(tp,1190,1150)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
......
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