1 Star 0 Fork 0

Alanisia/ygopro-scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
c15317640.lua 2.38 KB
一键复制 编辑 原始数据 按行查看 历史
--巨大戦艦 カバード・コア
function c15317640.initial_effect(c)
c:EnableCounterPermit(0x1f)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15317640,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c15317640.addct)
e1:SetOperation(c15317640.addc)
c:RegisterEffect(e1)
--battle indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--remove counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(15317640,1))
e3:SetCategory(CATEGORY_COIN)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c15317640.rctcon)
e3:SetTarget(c15317640.rcttg)
e3:SetOperation(c15317640.rctop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(15317640,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c15317640.descon)
e4:SetTarget(c15317640.destg)
e4:SetOperation(c15317640.desop)
c:RegisterEffect(e4)
end
c15317640.toss_coin=true
function c15317640.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0x1f)
end
function c15317640.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x1f,2)
end
end
function c15317640.rctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)~=0
end
function c15317640.rcttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c15317640.rctop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COIN)
local coin=Duel.AnnounceCoin(tp)
local res=Duel.TossCoin(tp,1)
if coin==res then
e:GetHandler():RemoveCounter(tp,0x1f,1,REASON_EFFECT)
end
end
function c15317640.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)==0
end
function c15317640.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c15317640.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) 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

搜索帮助

0d507c66 1850385 C8b1a773 1850385