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) ...@@ -36,6 +36,10 @@ function c4064925.initial_effect(c)
ge3:SetCode(EVENT_SPSUMMON_SUCCESS) ge3:SetCode(EVENT_SPSUMMON_SUCCESS)
ge3:SetCondition(c4064925.ssetcon) ge3:SetCondition(c4064925.ssetcon)
Duel.RegisterEffect(ge3,0) Duel.RegisterEffect(ge3,0)
local ge4=ge1:Clone()
ge4:SetCode(EVENT_CHANGE_POS)
ge4:SetCondition(c4064925.cpcon)
Duel.RegisterEffect(ge4,0)
end end
end end
function c4064925.checkop(e,tp,eg,ep,ev,re,r,rp) function c4064925.checkop(e,tp,eg,ep,ev,re,r,rp)
...@@ -47,6 +51,12 @@ end ...@@ -47,6 +51,12 @@ end
function c4064925.ssetcon(e,tp,eg,ep,ev,re,r,rp) function c4064925.ssetcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c4064925.cfilter,1,nil) return eg:IsExists(c4064925.cfilter,1,nil)
end 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) function c4064925.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,4064925)==0 end if chk==0 then return Duel.GetFlagEffect(tp,4064925)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -55,17 +55,13 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,17 +55,13 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) if Duel.NegateActivation(ev) then
if Duel.NegateActivation(ev) if Duel.GetMatchingGroupCount(Card.IsOnField,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)>0
and g:GetCount()>0 and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect() Duel.BreakEffect()
if c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)~=0 then if c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)~=0 then
if re:GetHandler():IsRelateToEffect(re) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then local g=Duel.SelectMatchingCard(tp,Card.IsOnField,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
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 if #g>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.HintSelection(g) Duel.HintSelection(g)
...@@ -73,6 +69,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,6 +69,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end
end end
function s.descon1(e) function s.descon1(e)
local c=e:GetHandler() local c=e:GetHandler()
......
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