Commit b244360c authored by 聖園ミカ's avatar 聖園ミカ 🐟

reclean

parent ad404312
Pipeline #25969 passed with stages
in 29 minutes
...@@ -10,17 +10,18 @@ function c16200001.initial_effect(c) ...@@ -10,17 +10,18 @@ function c16200001.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--inactivatable --inactivatable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_CANNOT_INACTIVATE) e2:SetCode(EFFECT_CANNOT_INACTIVATE)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_SZONE,0)
e2:SetValue(c16200001.efilter1) e2:SetValue(c16200001.efilter1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--imm --imm
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_SZONE,0) e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(c16200001.efilter1) e3:SetTarget(c16200001.efilter1)
e3:SetValue(c16200001.efilter2) e3:SetValue(c16200001.efilter2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -30,7 +31,6 @@ function c16200001.initial_effect(c) ...@@ -30,7 +31,6 @@ function c16200001.initial_effect(c)
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,16200001) e4:SetCountLimit(1,16200001)
e4:SetTarget(c16200001.tg1) e4:SetTarget(c16200001.tg1)
...@@ -50,7 +50,7 @@ function c16200001.initial_effect(c) ...@@ -50,7 +50,7 @@ function c16200001.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--sum limit --sum limit
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetRange(LOCATION_FZONE) e6:SetRange(LOCATION_FZONE)
e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -59,7 +59,7 @@ function c16200001.initial_effect(c) ...@@ -59,7 +59,7 @@ function c16200001.initial_effect(c)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function c16200001.splimit(e,c,tp,sumtp,sumpos) function c16200001.splimit(e,c,tp,sumtp,sumpos)
return c:GetOriginalCode()~=16200003 return c:GetCode()~=16200003
end end
function c16200001.efilter(e,c) function c16200001.efilter(e,c)
return aux.IsCodeListed(c,16200003) and c:IsFaceup() return aux.IsCodeListed(c,16200003) and c:IsFaceup()
......
...@@ -3,7 +3,6 @@ function c16200004.initial_effect(c) ...@@ -3,7 +3,6 @@ function c16200004.initial_effect(c)
aux.AddCodeList(c,16200003) aux.AddCodeList(c,16200003)
--Activate --Activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0) c:RegisterEffect(e0)
...@@ -22,9 +21,9 @@ function c16200004.initial_effect(c) ...@@ -22,9 +21,9 @@ function c16200004.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16200004,0)) e1:SetDescription(aux.Stringid(16200004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,16200004+100) e1:SetCountLimit(1,16200004+100)
e1:SetCondition(c16200004.condition) e1:SetCondition(c16200004.condition)
e1:SetTarget(c16200004.target) e1:SetTarget(c16200004.target)
...@@ -47,7 +46,7 @@ function c16200004.initial_effect(c) ...@@ -47,7 +46,7 @@ function c16200004.initial_effect(c)
end end
--sum limit --sum limit
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -56,7 +55,7 @@ function c16200004.initial_effect(c) ...@@ -56,7 +55,7 @@ function c16200004.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c16200004.splimit(e,c,tp,sumtp,sumpos) function c16200004.splimit(e,c,tp,sumtp,sumpos)
return c:GetOriginalCode()~=16200003 return c:GetCode()~=16200003
end end
function c16200004.checkop(e,tp,eg,ep,ev,re,r,rp) function c16200004.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
...@@ -76,8 +75,8 @@ function c16200004.filter(c) ...@@ -76,8 +75,8 @@ function c16200004.filter(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end end
function c16200004.scost(e,tp,eg,ep,ev,re,r,rp,chk) function c16200004.scost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,c16200004.cfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,c16200004.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c16200004.cfilter,1,1,nil,tp) local g=Duel.SelectReleaseGroup(tp,c16200004.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c16200004.stg(e,tp,eg,ep,ev,re,r,rp,chk) function c16200004.stg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -110,18 +109,19 @@ function c16200004.sop(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,18 +109,19 @@ function c16200004.sop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c16200004.relfilter(c) function c16200004.relfilter(c,tp)
return c:IsAbleToRemove() return c:IsAbleToRemove(tp,POS_FACEDOWN)
end end
function c16200004.condition(e,tp,eg,ep,ev,re,r,rp) function c16200004.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(1-tp,16200004)>=5 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return Duel.GetFlagEffect(1-tp,16200004)>=5 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
function c16200004.target(e,tp,eg,ep,ev,re,r,rp,chk) function c16200004.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroupCount(c16200004.relfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroupCount(c16200004.relfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local g2=Duel.GetMatchingGroupCount(c16200004.relfilter,tp,0,LOCATION_MZONE,nil) Debug.Message(g)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,16200003,0,0x4011,0,0,1,RACE_WARRIOR,ATTRIBUTE_DARK) if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,16200003,0,0x4011,0,0,1,RACE_WARRIOR,ATTRIBUTE_DARK)
and g>0 end and g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,g2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,g,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,g,0,0)
end end
function c16200004.operation(e,tp,eg,ep,ev,re,r,rp) function c16200004.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -56,7 +56,7 @@ function c16200005.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -56,7 +56,7 @@ function c16200005.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabelObject()~=se return e:GetLabelObject()~=se
end end
function c16200005.thfilter(c) function c16200005.thfilter(c)
return c:IsAbleToHand() and aux.IsCodeListed(c,16200003) return (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp)) and aux.IsCodeListed(c,16200003)
end end
function c16200005.target(e,tp,eg,ep,ev,re,r,rp,chk) function c16200005.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,0) local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,0)
...@@ -106,11 +106,33 @@ function c16200005.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,11 +106,33 @@ function c16200005.activate(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
if Duel.IsExistingMatchingCard(c16200005.thfilter,tp,LOCATION_DECK,0,1,nil) then if Duel.IsExistingMatchingCard(c16200005.thfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c16200005.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c16200005.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then local tc=g:GetFirst()
local op=aux.SelectFromOptions(tp,
{tc:IsAbleToHand(),aux.Stringid(16200005,0)},
{tc:GetActivateEffect():IsActivatable(tp),aux.Stringid(16200005,1)})
if op==1 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
elseif op==2 then
local zone=LOCATION_SZONE
if tc:IsType(TYPE_FIELD) then
zone=LOCATION_FZONE
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
end
Duel.MoveToField(tc,tp,tp,zone,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end end
end end
end 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