1 Star 0 Fork 0

Alanisia/ygopro-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
c16366810.lua 2.09 KB
一键复制 编辑 原始数据 按行查看 历史
nekrozar 提交于 2019-10-26 09:43 . Revert "fix UniqueOnField (#1235)"
--イエロー・ダストン
function c16366810.initial_effect(c)
c:SetUniqueOnField(1,0,16366810)
--cannot release
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(c16366810.fuslimit)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
--todeck
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(16366810,0))
e6:SetCategory(CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetCode(EVENT_DESTROYED)
e6:SetCondition(c16366810.retcon)
e6:SetTarget(c16366810.rettg)
e6:SetOperation(c16366810.retop)
c:RegisterEffect(e6)
end
function c16366810.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function c16366810.retcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c16366810.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c16366810.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local prec=e:GetHandler():GetPreviousControler()
if chkc then return chkc:IsControler(prec) and chkc:IsLocation(LOCATION_GRAVE) and c16366810.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(prec,c16366810.filter,prec,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c16366810.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,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

搜索帮助