Commit 1eb1e229 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 9726f503
......@@ -15,7 +15,7 @@ function c16101115.filter(c,e,tp)
and c:IsFaceup()
end
function c16101115.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c16101115.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c16101115.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c16101115.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -22,8 +22,9 @@ function cm.initial_effect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCost(cm.cost)
e3:SetTarget(cm.remtg)
......@@ -53,23 +54,22 @@ end
--e3
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1a80,3,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x1,3,REASON_COST)
end
function cm.remfilter(c)
return c:IsFaceup()
Duel.RemoveCounter(tp,1,1,0x1a80,3,REASON_COST)
end
function cm.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.IsExistingMatchingCard(cm.remfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.remfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,0,LOCATION_ONFIELD,1,nil) end
end
function cm.remop(e,tp,eg,ep,ev,re,r,rp)
local g0=Duel.GetMatchingGroup(cm.filter1,tp,0,LOCATION_ONFIELD,nil)
local ct=g0:GetCount()
if ct<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.remfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
function cm.filter1(c)
return c:IsFaceup()
end
--e4
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -22,10 +22,11 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lvt={}
if cn>16 then cn=16 end
local g2=Group.CreateGroup()
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn/2)
if Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x3a80) then g2=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn) end
-- local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn/2)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn)
-- if Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x3a80) then g2=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn) end
local num=g:GetCount()
g:Merge(g2)
-- g:Merge(g2)
Debug.Message(num)
local tc=g:GetFirst()
if Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x3a80) then
......@@ -95,7 +96,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g3=g1:Select(tp,1,1,nil)
local sc=g3:GetFirst()
if sc then
-- local mg=tc:GetOverlayGroup()
-- local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
......
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