Commit b54f0157 authored by wind2009's avatar wind2009

Merge branch 'LEDE' from upstream

parents 52d9d06c 8258376c
...@@ -65,7 +65,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
elseif op==2 then elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
sg=g:SelectSubGroup(tp,s.Group,false,2,2) local sg=g:SelectSubGroup(tp,s.Group,false,2,2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=sg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil):GetFirst() local tc=sg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil):GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
...@@ -26,7 +26,7 @@ function s.lvfilter(c) ...@@ -26,7 +26,7 @@ function s.lvfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1) return c:IsFaceup() and c:IsLevelAbove(1)
end end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and s.lvfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
......
...@@ -147,14 +147,14 @@ function s.filter(c) ...@@ -147,14 +147,14 @@ function s.filter(c)
return c:IsSetCard(0x1a1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x1a1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
if chk==0 then return #g>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return #g>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil)
if Duel.Destroy(g,REASON_EFFECT)<1 then return end if Duel.Destroy(g,REASON_EFFECT)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
...@@ -162,4 +162,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -162,4 +162,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
end end
\ No newline at end of file
...@@ -40,7 +40,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -40,7 +40,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
while true do while true do
g=Duel.GetMatchingGroup(s.desfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,sg,e,tp,gc1,gc2) local g=Duel.GetMatchingGroup(s.desfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,sg,e,tp,gc1,gc2)
if g:IsContains(e:GetHandler()) then if g:IsContains(e:GetHandler()) then
g:RemoveCard(e:GetHandler()) g:RemoveCard(e:GetHandler())
end end
......
...@@ -54,13 +54,13 @@ function s.initial_effect(c) ...@@ -54,13 +54,13 @@ function s.initial_effect(c)
ge1:SetCode(EVENT_CHAIN_NEGATED) ge1:SetCode(EVENT_CHAIN_NEGATED)
ge1:SetOperation(s.negcheck) ge1:SetOperation(s.negcheck)
ge1:SetReset(RESET_CHAIN) ge1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(ge1,tp) Duel.RegisterEffect(ge1,0)
end end
end end
function s.negcheck(e,tp,eg,ep,ev,re,r,rp) function s.negcheck(e,tp,eg,ep,ev,re,r,rp)
local de=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON) local de=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON)
if de then if de then
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+id,te,0,tp,tp,0) Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+id,de,0,tp,tp,0)
end end
end end
function s.ofilter(c,e) function s.ofilter(c,e)
......
...@@ -73,7 +73,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.descon1(e) function s.descon1(e)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetOverlayCount()>0 return c:GetOverlayCount()>0 and Duel.GetAttacker()==c
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
...@@ -91,4 +91,4 @@ end ...@@ -91,4 +91,4 @@ end
function s.descon2(e,tp,eg,ep,ev,re,r,rp) function s.descon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ)
end end
\ No newline at end of file
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