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