Commit 64fbebf7 authored by Nemo Ma's avatar Nemo Ma

fix

parent a009c4eb
......@@ -35,8 +35,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local j=tama.tamas_getElementCount(tama.tamas_sumElements(e:GetLabelObject()),TAMA_ELEMENT_MANA)
j=math.floor(j/2)
local i=0
while i<j and (i==0 or Duel.SelectYesNo(tp,aux.Stringid(m,1))) do
Duel.BreakEffect()
while i<j do
if i>0 and not Duel.SelectYesNo(tp,aux.Stringid(m,1))) then break end
local t1=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
local t2=Duel.IsExistingMatchingCard(cm.rfilter,tp,0,LOCATION_GRAVE+LOCATION_EXTRA,1,nil)
......@@ -57,6 +57,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
if op==1 or op1 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
......@@ -64,9 +65,11 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
if op==2 or op1 then
Duel.BreakEffect()
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
if op==3 or op1 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rfilter,tp,0,LOCATION_GRAVE+LOCATION_EXTRA,1,1,nil)
if g:GetCount()>0 then
......
......@@ -26,16 +26,12 @@ function cm.initial_effect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCountLimit(1,m+1)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
c:RegisterEffect(e4)
end
function cm.BLASTER(c)
local m=_G["c"..c:GetCode()]
......@@ -60,10 +56,14 @@ function cm.cfilter(c)
return cm.BLASTERBlade(c) and c:IsAbleToDeckAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return (e:GetHandler():IsReleasable() and e:GetHandler():IsLocation(LOCATION_MZONE)) or (e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE)) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Release(e:GetHandler(),REASON_COST)
if e:GetHandler():IsLocation(LOCATION_MZONE) then
Duel.Release(e:GetHandler(),REASON_COST)
else
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.spfilter(c,e,tp)
......
......@@ -25,16 +25,12 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCountLimit(1,m+1)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
c:RegisterEffect(e4)
c:RegisterEffect(e3)
end
function cm.BLASTER(c)
local m=_G["c"..c:GetCode()]
......@@ -58,10 +54,14 @@ function cm.cfilter(c)
return cm.BLASTERBlade(c) and c:IsAbleToDeckAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return (e:GetHandler():IsReleasable() and e:GetHandler():IsLocation(LOCATION_MZONE)) or (e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE)) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Release(e:GetHandler(),REASON_COST)
if e:GetHandler():IsLocation(LOCATION_MZONE) then
Duel.Release(e:GetHandler(),REASON_COST)
else
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.setfilter(c)
......
......@@ -26,16 +26,12 @@ function cm.initial_effect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCountLimit(1,m+1)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
c:RegisterEffect(e4)
end
function cm.BLASTER(c)
local m=_G["c"..c:GetCode()]
......@@ -62,10 +58,14 @@ function cm.cfilter(c)
return cm.BLASTERBlade(c) and c:IsAbleToDeckAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return (e:GetHandler():IsReleasable() and e:GetHandler():IsLocation(LOCATION_MZONE)) or (e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE)) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Release(e:GetHandler(),REASON_COST)
if e:GetHandler():IsLocation(LOCATION_MZONE) then
Duel.Release(e:GetHandler(),REASON_COST)
else
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.thfilter(c)
......
......@@ -25,16 +25,12 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCountLimit(1,m+1)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
c:RegisterEffect(e4)
end
function cm.filter(c)
return cm.BLASTERBlade(c) and c:IsAbleToGrave()
......@@ -72,10 +68,14 @@ function cm.cfilter(c)
return cm.BLASTERBlade(c) and c:IsAbleToDeckAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return (e:GetHandler():IsReleasable() and e:GetHandler():IsLocation(LOCATION_MZONE)) or (e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE)) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Release(e:GetHandler(),REASON_COST)
if e:GetHandler():IsLocation(LOCATION_MZONE) then
Duel.Release(e:GetHandler(),REASON_COST)
else
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.setfilter(c)
......
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