1 Star 0 Fork 0

Alanisia/ygopro-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
c16008155.lua 2.18 KB
一键复制 编辑 原始数据 按行查看 历史
Fluorohydride 提交于 2015-09-25 21:16 . submodule init push
--レプティレス・サーヴァント
function c16008155.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c16008155.sdcon)
c:RegisterEffect(e1)
--be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetOperation(c16008155.desop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetOperation(c16008155.desop2)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_BATTLED)
e4:SetOperation(c16008155.desop3)
e4:SetLabelObject(e2)
c:RegisterEffect(e4)
--cannot summon
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_SUMMON)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,1)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function c16008155.sdcon(e)
return e:GetHandler():GetOwnerTargetCount()>0
or Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
end
function c16008155.desop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then
e:SetLabelObject(re)
e:SetLabel(0)
end
end
function c16008155.desop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re==e:GetLabelObject():GetLabelObject() and c:IsRelateToEffect(re) then
if Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() then
e:GetLabelObject():SetLabel(1)
else
if not c:IsDisabled() then Duel.Destroy(c,REASON_EFFECT) end
end
end
end
function c16008155.desop3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local des=e:GetLabelObject():GetLabel()
e:GetLabelObject():SetLabel(0)
if des==1 and not c:IsDisabled() then
Duel.Destroy(c,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

搜索帮助