Commit 32ee4152 authored by tsubaki's avatar tsubaki

1.999zy fix1

parent 019f5db9
Pipeline #10267 passed with stage
in 41 seconds
--派蒙
require "expansions/script/nef/TheElementTheory"
function c50000.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50000,0))
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetCode(EVENT_PHASE+PHASE_DRAW)
e1:SetRange(0x3)
e1:SetCountLimit(1,50000+EFFECT_COUNT_CODE_DUEL)
e1:SetCost(c50000.cost)
e1:SetTarget(c50000.target)
e1:SetOperation(c50000.operation)
c:RegisterEffect(e1)
end
function c50000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end
function c50000.filter(c)
return c:IsSetCard(0x249) and c:IsAbleToRemove()
end
function c50000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50000.filter,tp,0x3,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
Duel.SetChainLimit(aux.FALSE)
end
function c50000.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c50000.filter,tp,0x3,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local code=g:GetFirst():GetCode()
_G["c"..code].activate(e,tp,eg,ep,ev,re,r,rp)
end
local ct=5-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ct>0 then
Duel.Draw(tp,ct,REASON_EFFECT)
end
end
--热情不灭☪班尼特
function c50151.initial_effect(c)
--Pyro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50151,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c50151.btg)
e4:SetOperation(c50151.bop)
c:RegisterEffect(e4)
end
function c50151.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50151.bop(e,tp,eg,ep,ev,re,r,rp)
local num=2
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50219 and count>1 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50219,num,e)
end
--鱼龙灯昼☪刻晴
function c50313.initial_effect(c)
--Electro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50313,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50313)
e4:SetTarget(c50313.btg)
e4:SetOperation(c50313.bop)
c:RegisterEffect(e4)
local e2 =e4:Clone()
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_HAND)
e2:SetTarget(c50313.ctg)
e2:SetOperation(c50313.cop)
c:RegisterEffect(e2)
end
function c50313.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50313.bop(e,tp,eg,ep,ev,re,r,rp)
local num=2
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50213 and count>1 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50213,num,e)
end
function c50313.ctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c50313.cop(e,tp,eg,ep,ev,re,r,rp)
local num=2
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50213 and count>1 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50213,num,e)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--天理法则☪元素之力
require "expansions/script/nef/TheElementTheory"
function c50500.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c50500.target)
e1:SetOperation(c50500.activate)
c:RegisterEffect(e1)
end
function c50500.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50500.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,50500,0,0,0)
Duel.RegisterFlagEffect(1-tp,50500,0,0,0)
end
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