1 Star 0 Fork 0

Alanisia/ygopro-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
c13090893.lua 2.26 KB
一键复制 编辑 原始数据 按行查看 历史
mercury233 提交于 2019-01-19 21:22 . new cards DANE
--グリッド・スィーパー
function c13090893.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13090893,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,13090893)
e1:SetCondition(c13090893.spcon)
e1:SetTarget(c13090893.sptg)
e1:SetOperation(c13090893.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13090893,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,13090894)
e2:SetCost(c13090893.descost)
e2:SetTarget(c13090893.destg)
e2:SetOperation(c13090893.desop)
c:RegisterEffect(e2)
end
function c13090893.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function c13090893.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c13090893.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c13090893.cfilter(c)
return c:IsType(TYPE_LINK) and c:IsAbleToRemoveAsCost()
end
function c13090893.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c13090893.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c13090893.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c13090893.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c13090893.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/alanisia/ygopro-scripts.git
git@gitee.com:alanisia/ygopro-scripts.git
alanisia
ygopro-scripts
ygopro-scripts
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385