Commit b7d235a9 authored by Tachibana's avatar Tachibana

ybb

parent a901f72f
No preview for this file type
...@@ -76,12 +76,15 @@ function c12030004.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,12 +76,15 @@ function c12030004.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.Recover(tp,atk,REASON_EFFECT) Duel.Recover(tp,atk,REASON_EFFECT)
end local cg=Duel.GetMatchingGroup(c12030004.filter1,tp,LOCATION_GRAVE,0,nil)
local cc=Duel.SelectMatchingCard(tp,c12030004.filter1,tp,LOCATION_GRAVE,0,1,1,nil) if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12030004,3)) then
if cc:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12030004,3)) then Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local cc=cg:Select(tp,1,1,nil)
Duel.SendtoHand(cc,nil,REASON_EFFECT) Duel.SendtoHand(cc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,cc) Duel.ConfirmCards(1-tp,cc)
end end
end
end end
function c12030004.drcon(e,tp,eg,ep,ev,re,r,rp) function c12030004.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -13,6 +13,7 @@ function cm.initial_effect(c) ...@@ -13,6 +13,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCost(cm.setcost)
e1:SetTarget(cm.settg) e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop) e1:SetOperation(cm.setop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -36,6 +37,10 @@ function cm.initial_effect(c) ...@@ -36,6 +37,10 @@ function cm.initial_effect(c)
e3:SetCondition(cm.spcon2) e3:SetCondition(cm.spcon2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.setfilter(c,tp) function cm.setfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end end
...@@ -104,7 +109,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,7 +109,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local sg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local sg=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
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