1 Star 0 Fork 0

Alanisia/ygopro-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
c14729426.lua 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
VanillaSalt 提交于 2016-05-15 17:56 . update
--惑星からの物体A
function c14729426.initial_effect(c)
--return to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14729426,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_START)
e1:SetOperation(c14729426.operation)
c:RegisterEffect(e1)
end
function c14729426.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler()==Duel.GetAttackTarget() and e:GetHandler():IsAttackPos() then
local a=Duel.GetAttacker()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(14729426,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetCountLimit(1)
e1:SetTarget(c14729426.cttg)
e1:SetOperation(c14729426.ctop)
e1:SetLabelObject(a)
e1:SetLabel(a:GetRealFieldID())
e1:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e1,tp)
end
end
function c14729426.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local a=e:GetLabelObject()
if a:IsControler(1-tp) and a:GetRealFieldID()==e:GetLabel() then
Duel.SetTargetCard(a)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,a,1,0,0)
end
end
function c14729426.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp)
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

搜索帮助