Commit e9e53108 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/LEDE' into master

parents a840859e a7c73267
......@@ -36,6 +36,10 @@ function c4064925.initial_effect(c)
ge3:SetCode(EVENT_SPSUMMON_SUCCESS)
ge3:SetCondition(c4064925.ssetcon)
Duel.RegisterEffect(ge3,0)
local ge4=ge1:Clone()
ge4:SetCode(EVENT_CHANGE_POS)
ge4:SetCondition(c4064925.cpcon)
Duel.RegisterEffect(ge4,0)
end
end
function c4064925.checkop(e,tp,eg,ep,ev,re,r,rp)
......@@ -47,6 +51,12 @@ end
function c4064925.ssetcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c4064925.cfilter,1,nil)
end
function c4064925.cfilter2(c)
return c:IsPreviousPosition(POS_FACEUP) and c:IsFacedown()
end
function c4064925.cpcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c4064925.cfilter2,1,nil)
end
function c4064925.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,4064925)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -120,4 +130,4 @@ function c4064925.ntcon(e,c,minc)
end
function c4064925.nttg(e,c)
return c:IsLevelAbove(5) and (c:IsCode(83104731) or aux.IsCodeListed(c,83104731))
end
\ No newline at end of file
end
......@@ -55,21 +55,18 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if Duel.NegateActivation(ev)
and g:GetCount()>0 and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
if c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)~=0 then
if re:GetHandler():IsRelateToEffect(re) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(tp,1,1,re:GetHandler())
else
g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(tp,1,1,nil)
end
if #g>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
if Duel.NegateActivation(ev) then
if Duel.GetMatchingGroupCount(Card.IsOnField,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)>0
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
if c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)~=0 then
local g=Duel.SelectMatchingCard(tp,Card.IsOnField,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
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