1 Star 0 Fork 0

Alanisia/ygopro-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
c14613029.lua 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
salix5 提交于 2016-07-28 10:47 . remove redundant condition
--ブレンD
function c14613029.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c14613029.condition)
e1:SetTarget(c14613029.target)
e1:SetOperation(c14613029.operation)
c:RegisterEffect(e1)
end
function c14613029.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x26)
end
function c14613029.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c14613029.cfilter,tp,LOCATION_MZONE,0,2,nil)
end
function c14613029.target(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(aux.TRUE,tp,0,LOCATION_ONFIELD,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c14613029.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==0 then return
elseif sg:GetCount()==1 then
Duel.Destroy(sg,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local dg=sg:Select(1-tp,1,1,nil)
Duel.Destroy(dg,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