Commit 483612d6 authored by 聖園ミカ's avatar 聖園ミカ 🐟

pic

parent 0229a5ef
......@@ -90,23 +90,23 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroupEx(tp,cm.costfilter0,1,REASON_COST,e:GetHandler())
return Duel.CheckReleaseGroupEx(tp,cm.costfilter0,1,REASON_COST,true,e:GetHandler())
end
e:SetLabel(0)
local off=1
local ops={}
local opval={}
if Duel.CheckReleaseGroupEx(tp,cm.costfilter1,1,REASON_COST,e:GetHandler()) then
if Duel.CheckReleaseGroupEx(tp,cm.costfilter1,1,REASON_COST,true,e:GetHandler()) then
ops[off]=aux.Stringid(m,1)
opval[off-1]=1
off=off+1
end
if Duel.CheckReleaseGroupEx(tp,cm.costfilter2,1,REASON_COST,e:GetHandler()) then
if Duel.CheckReleaseGroupEx(tp,cm.costfilter2,1,REASON_COST,true,e:GetHandler()) then
ops[off]=aux.Stringid(m,2)
opval[off-1]=2
off=off+1
end
if Duel.CheckReleaseGroupEx(tp,cm.costfilter3,1,REASON_COST,e:GetHandler()) then
if Duel.CheckReleaseGroupEx(tp,cm.costfilter3,1,REASON_COST,true,e:GetHandler()) then
ops[off]=aux.Stringid(m,3)
opval[off-1]=3
off=off+1
......@@ -114,15 +114,15 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter1,1,1,REASON_COST,e:GetHandler())
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter1,1,1,REASON_COST,true,e:GetHandler())
Duel.Release(g,REASON_COST)
e:SetLabel(1)
elseif opval[op]==2 then
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter2,1,1,REASON_COST,e:GetHandler())
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter2,1,1,REASON_COST,true,e:GetHandler())
Duel.Release(g,REASON_COST)
e:SetLabel(2)
elseif opval[op]==3 then
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter3,1,1,REASON_COST,e:GetHandler())
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter3,1,1,REASON_COST,true,e:GetHandler())
Duel.Release(g,REASON_COST)
e:SetLabel(3)
end
......
......@@ -23,9 +23,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.CheckReleaseGroupEx(REASON_COST,tp,cm.filter,1,nil)
return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.CheckReleaseGroupEx(tp,cm.filter,1,REASON_COST,true,nil)
end
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,cm.filter,1,99,nil)
local g=Duel.SelectReleaseGroupEx(tp,cm.filter,1,99,REASON_COST,true,nil)
local atk=g:GetSum(Card.GetAttack)
Duel.Release(g,REASON_COST)
e:SetLabel(0,atk)
......
......@@ -25,7 +25,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.rfilter(c,tp)
return c:IsLevelAbove(1) and Duel.IsPlayerCanDiscardDeck(tp,c:GetLevel())
local level=c:GetLevel()
return c:IsLevelAbove(1) and Duel.IsPlayerCanDiscardDeck(tp,c:GetLevel()) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=level
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,tp) end
......@@ -37,8 +38,8 @@ function cm.rfilter(c,tp)
return c:IsLevelAbove(1) and Duel.IsPlayerCanDiscardDeck(tp,c:GetLevel())
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=e:GetLabel()
if chk==0 then return ct>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct and Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
......
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