Commit 300428b1 authored by TanakaKotoha's avatar TanakaKotoha

rover

parent 162c238c
--椎名咪玉
function c81011010.initial_effect(c)
local m=81011010
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),4,2)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81011010,0))
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,81011010)
e1:SetCost(c81011010.descost)
e1:SetTarget(c81011010.destg)
e1:SetOperation(c81011010.desop)
e1:SetCountLimit(1,m)
e1:SetCost(cm.descost)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--lv
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(81011010,1))
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,81011910)
e2:SetCost(c81011010.lvcost)
e2:SetTarget(c81011010.lvtg)
e2:SetOperation(c81011010.lvop)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.lvcost)
e2:SetTarget(cm.lvtg)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
end
function c81011010.descost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.descost(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 c81011010.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
function c81011010.desop(e,tp,eg,ep,ev,re,r,rp)
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end
local dc=Duel.GetFirstTarget()
if not dc:IsRelateToEffect(e) then return end
......@@ -52,18 +54,18 @@ function c81011010.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(dc,POS_FACEUP,REASON_EFFECT)
end
end
function c81011010.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c81011010.lvfilter(c)
function cm.lvfilter(c)
return c:IsFaceup() and not c:IsLevel(8) and c:GetLevel()>0
end
function c81011010.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81011010.lvfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
function cm.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.lvfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
end
function c81011010.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c81011010.lvfilter,tp,LOCATION_MZONE,0,nil)
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.lvfilter,tp,LOCATION_MZONE,0,nil)
local lc=g:GetFirst()
while lc do
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -80,10 +82,10 @@ function c81011010.lvop(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c81011010.splimit)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c81011010.splimit(e,c)
function cm.splimit(e,c)
return not c:IsRace(RACE_SPELLCASTER)
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