Commit 845ed997 authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c22134500.lua

parent 08565037
Pipeline #30861 canceled with stages
in 1 minute and 13 seconds
--荒芜·东星极·右卫枢
local s,id,o=GetID()
local e22134500
function s.initial_effect(c)
-- 让这张卡就算被无效也能放指示物
-- 以后定义哪张卡可以放指示物要在这里输入0x760
......@@ -37,7 +38,7 @@ function s.initial_effect(c)
c:RegisterEffect(ec1)
-- 检测指示物是否属于自主减少
local ec0=Effect.CreateEffect(c)
ec0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
ec0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ec0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ec0:SetRange(LOCATION_MZONE+LOCATION_PZONE)
ec0:SetCode(EVENT_REMOVE_COUNTER+0x760)
......@@ -167,10 +168,11 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
-- 用于让卡被无效之后指示物也不会被去除
function s.chkcop(e,tp,eg,ep,ev,re,r,rp)
e22134500 = e
local cnt = e:GetHandler():GetCounter(0x760)
local chc = e:GetLabel()
if chc then
if chc>=cnt then
if chc>=cnt and cnt<=1 then
e:SetLabel(chc)
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,0,0,0)
return
......@@ -180,8 +182,8 @@ end
e:SetLabel(cnt)
end
function s.chkncop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(22134501)==0 then
e:GetHandler():RegisterFlagEffect(22134501,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
if e:GetHandler():GetFlagEffect(22134501)==0 and e22134500 then
e22134500:SetLabel(e:GetHandler():GetCounter(0x760))
end
end
function s.htccop(e,tp,eg,ep,ev,re,r,rp)
......@@ -214,6 +216,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not Card.IsCanBeSpecialSummoned(c,e,0,tp,false,false) and Duel.IsCanRemoveCounter(tp,1,0,0x760,5,REASON_EFFECT) then return end
if not Duel.RemoveCounter(tp,1,0,0x760,5,REASON_EFFECT)then return end
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0x760,e22134500,REASON_EFFECT,tp,tp,count)
local ct=Duel.GetMatchingGroupCount(s.tgfilter,tp,LOCATION_DECK,0,nil)
if ct==0 or (not Duel.SelectYesNo(tp,aux.Stringid(id,2))) then return end
Duel.BreakEffect()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment