1 Star 0 Fork 0

Alanisia/ygopro-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
c16308000.lua 2.01 KB
一键复制 编辑 原始数据 按行查看 历史
--神の威光
function c16308000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER,0x1c1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c16308000.target)
e1:SetOperation(c16308000.operation)
c:RegisterEffect(e1)
end
function c16308000.filter(c)
return c:IsFaceup() and c:IsSetCard(0x4b)
end
function c16308000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16308000.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16308000.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c16308000.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c16308000.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
e:SetLabelObject(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c16308000.rcon)
e1:SetValue(1)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetLabel(2)
e2:SetLabelObject(tc)
e2:SetCondition(c16308000.tgcon)
e2:SetOperation(c16308000.tgop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
c:RegisterEffect(e2)
end
end
function c16308000.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
function c16308000.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c16308000.tgop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct-1
e:SetLabel(ct)
if ct==0 and e:GetHandler():IsHasCardTarget(e:GetLabelObject()) then
Duel.SendtoGrave(e:GetHandler(),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