Commit 0f193f7c authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c64800180.lua

parent 52d9d79f
Pipeline #30725 canceled with stages
in 4 minutes and 11 seconds
......@@ -14,7 +14,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
......@@ -24,11 +24,11 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m+200)
e2:SetCost(cm.cost)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
......@@ -64,7 +64,7 @@ function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function cm.tgfilter(c)
return c:IsSetCard(0x412) and not c:IsCode(64800180) and c:IsAbleToGrave()
return c:IsSetCard(0x412) and c:IsType(TYPE_MONSTER) and not c:IsCode(64800180) and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -77,49 +77,27 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ec = c:GetEquipTarget()
if chk == 0 then return ec and ec:IsReleasable() end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec and ec:IsReleasable() end
Duel.Release(ec,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,0,0)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec and Duel.GetMZoneCount(tp,ec)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct = 2
if ft<=0 then return end
if ct >= ft then ct = ft end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
if g:GetCount()>=2 then
local max=2
if Duel.GetMZoneCount(tp)<1 then return end
if Duel.GetMZoneCount(tp)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then max=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,1,ct,nil)
end
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,max,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
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