Commit b7d235a9 authored by Tachibana's avatar Tachibana

ybb

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