Commit 485e8cb6 authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c22600031.lua

parent f0c84417
--进化的终点 --进化的终点
--
local m=22600031 local m=22600031
local cm=_G["c"..m] local cm=_G["c"..m]
function c22600031.initial_effect(c) function c22600031.initial_effect(c)
...@@ -7,35 +6,17 @@ function c22600031.initial_effect(c) ...@@ -7,35 +6,17 @@ function c22600031.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not cm.global_check_spsummoncount then
cm.global_check_spsummoncount=true
local ge0=Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_SPSUMMON_SUCCESS)
ge0:SetOperation(cm.checkop)
Duel.RegisterEffect(ge0,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsCode(22600032) then
Duel.RegisterFlagEffect(tp,22600032,nil,0,1)
--Duel.Recover(tp,1000,REASON_EFFECT)
end
tc=eg:GetNext()
end
end end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsCode(22600032) return not c:IsCode(22600032)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22600032,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,22600032,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
...@@ -43,9 +24,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,9 +24,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local aj=Duel.GetFlagEffect(tp,22600032)*500 local aj=Duel.GetFlagEffect(tp,22600032)*500
local cj=Duel.GetFlagEffect(tp,22600032) local cj=Duel.GetFlagEffect(tp,22600032)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22600032,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) then and Duel.IsPlayerCanSpecialSummonMonster(tp,22600032,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_INSECT,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) then
local token=Duel.CreateToken(tp,22600032) local token=Duel.CreateToken(tp,22600032)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
Duel.RegisterFlagEffect(tp,22600032,nil,0,1)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
...@@ -53,7 +35,7 @@ local cj=Duel.GetFlagEffect(tp,22600032) ...@@ -53,7 +35,7 @@ local cj=Duel.GetFlagEffect(tp,22600032)
e1:SetCode(EVENT_TO_HAND) e1:SetCode(EVENT_TO_HAND)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(cm.tgcon) --e1:SetCondition(cm.tgcon)
e1:SetOperation(cm.tgop) e1:SetOperation(cm.tgop)
token:RegisterEffect(e1,true) token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
...@@ -87,6 +69,7 @@ local cj=Duel.GetFlagEffect(tp,22600032) ...@@ -87,6 +69,7 @@ local cj=Duel.GetFlagEffect(tp,22600032)
e6:SetCode(EFFECT_SELF_DESTROY) e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(cm.sdcon) e6:SetCondition(cm.sdcon)
token:RegisterEffect(e6,true) token:RegisterEffect(e6,true)
end
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
...@@ -95,19 +78,18 @@ function cm.sdcon(e) ...@@ -95,19 +78,18 @@ function cm.sdcon(e)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetControler()~=tp return c:GetControler()~=tp
end end
function cm.cfilter(c,tp) --function cm.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) --return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end --end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp) --function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,1-tp) --return eg:IsExists(cm.cfilter,1,nil,1-tp)
end --end
function cm.ffilter(c) function cm.ffilter(c)
return c:IsCode(22600031) return c:IsCode(22600031)
end end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp) function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.Destroy(c,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if Duel.Destroy(c,REASON_EFFECT)~=0 then
and Duel.IsPlayerCanSpecialSummonMonster(tp,22600032,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) then
local g=Duel.GetMatchingGroup(cm.ffilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,nil,tp) local g=Duel.GetMatchingGroup(cm.ffilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,nil,tp)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
local op=te:GetOperation() local op=te:GetOperation()
......
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