1 Star 0 Fork 0

Alanisia/ygopro-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
c12385638.lua 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
--Kozmo-エピローグ
function c12385638.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c12385638.tdtg)
e2:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e2)
--damage conversion
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetOperation(c12385638.operation)
c:RegisterEffect(e3)
end
function c12385638.tdtg(e,c)
return c:IsSetCard(0xd2)
end
function c12385638.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_REVERSE_DAMAGE)
e1:SetTargetRange(1,0)
e1:SetValue(c12385638.valcon)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c12385638.valcon(e,re,r,rp,rc)
if bit.band(r,REASON_BATTLE)~=0 then
local tp=e:GetHandlerPlayer()
local bc=rc:GetBattleTarget()
if bc and bc:IsSetCard(0xd2) and bc:IsControler(tp)
and Duel.GetFlagEffect(tp,12385638)==0 then
Duel.RegisterFlagEffect(tp,12385638,RESET_PHASE+PHASE_END,0,1)
return true
end
end
return false
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