Commit 16c092ee authored by 聖園ミカ's avatar 聖園ミカ 🐟

54188

parent 896c5b4f
Pipeline #30743 passed with stages
in 33 minutes and 46 seconds
No preview for this file type
...@@ -32,16 +32,17 @@ function c12869010.filter(c,e,tp,sc) ...@@ -32,16 +32,17 @@ function c12869010.filter(c,e,tp,sc)
end end
return ok return ok
end end
function c12869010.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c12869010.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12869010.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12869010.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12869010.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c12869010.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c12869010.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,e:GetHandler()) Duel.SelectTarget(tp,c12869010.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end end
function c12869010.spop(e,tp,eg,ep,ev,re,r,rp) function c12869010.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local zone={} local zone={}
local flag={} local flag={}
for p=0,1 do for p=0,1 do
......
...@@ -36,12 +36,13 @@ function c12869015.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,12 +36,13 @@ function c12869015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12869015.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12869015.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12869015.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c12869015.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c12869015.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,e:GetHandler()) Duel.SelectTarget(tp,c12869015.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end end
function c12869015.spop(e,tp,eg,ep,ev,re,r,rp) function c12869015.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local zone={} local zone={}
local flag={} local flag={}
for p=0,1 do for p=0,1 do
......
...@@ -36,12 +36,13 @@ function c12869020.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,12 +36,13 @@ function c12869020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12869020.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c12869020.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12869020.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c12869020.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c12869020.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,e:GetHandler()) Duel.SelectTarget(tp,c12869020.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end end
function c12869020.spop(e,tp,eg,ep,ev,re,r,rp) function c12869020.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local zone={} local zone={}
local flag={} local flag={}
for p=0,1 do for p=0,1 do
......
...@@ -87,7 +87,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +87,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) local g2=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
if #g2>0 then if #g2>0 then
local tc=g2:GetFirst() local tc=g2:GetFirst()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0) e1:SetValue(0)
......
...@@ -30,10 +30,8 @@ function cm.initial_effect(c) ...@@ -30,10 +30,8 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST) e3:SetCode(EVENT_ADJUST)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.lcon)
e3:SetOperation(cm.efop) e3:SetOperation(cm.efop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
cm[e3]={}
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_CODE) e4:SetCode(EFFECT_CHANGE_CODE)
...@@ -41,12 +39,6 @@ function cm.initial_effect(c) ...@@ -41,12 +39,6 @@ function cm.initial_effect(c)
e4:SetCondition(cm.lcon) e4:SetCondition(cm.lcon)
e4:SetValue(cm.val) e4:SetValue(cm.val)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(m+1000)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,1)) e6:SetDescription(aux.Stringid(m,1))
e6:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) e6:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
...@@ -72,21 +64,17 @@ function cm.initial_effect(c) ...@@ -72,21 +64,17 @@ function cm.initial_effect(c)
cm.global_check=true cm.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING) ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(cm.checkop) ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function cm.cfilter(c,tp)
return c:IsType(TYPE_MONSTER)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if not eg then return end local rc=re:GetHandler()
local sg=eg:Filter(cm.cfilter,nil,tp) if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) then return end
local tc=sg:GetFirst() local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
while tc do if loc==LOCATION_MZONE then
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
tc=sg:GetNext()
end end
end end
function cm.frcval(e,c,fp,rp,r) function cm.frcval(e,c,fp,rp,r)
...@@ -120,60 +108,31 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp,c,og,min,max) ...@@ -120,60 +108,31 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
mg:DeleteGroup() mg:DeleteGroup()
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function cm.lcon(e)
local g=e:GetHandler():GetOverlayGroup()
return g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) and #g==1
end
function cm.copyfilter(c,ec)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_EFFECT) and not c:IsType(TYPE_TRAPMONSTER) and not c:IsHasEffect(m) and ec:GetOverlayCount()>0
end
function cm.gfilter(c,g)
if not g then return true end
return not g:IsContains(c)
end
function cm.gfilter1(c,g)
if not g then return true end
return not g:IsExists(cm.gfilter2,1,nil,c:GetOriginalCode())
end
function cm.gfilter2(c,code)
return c:GetOriginalCode()==code
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp) function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local copyt=cm[e] local cpe,cpc=e:GetLabel(),e:GetLabelObject()
local exg=Group.CreateGroup() local og=c:GetOverlayGroup()
for tc,cid in pairs(copyt) do local oc=og:GetFirst()
if tc and cid then exg:AddCard(tc) end if (not oc and cpc) or (oc and not (oc:IsType(TYPE_MONSTER) and #og==1) and cpc) then
c:ResetEffect(cpe,RESET_COPY)
e:SetLabel(0)
e:SetLabelObject(nil)
return
end end
local g=c:GetOverlayGroup():Filter(cm.copyfilter,nil,c) if oc and oc:IsType(TYPE_MONSTER) and #og==1 and cpc and cpc~=oc then
local dg=exg:Filter(cm.gfilter,nil,g) c:ResetEffect(cpe,RESET_COPY)
for tc in aux.Next(dg) do e:SetLabel(0)
c:ResetEffect(copyt[tc],RESET_COPY) e:SetLabelObject(nil)
exg:RemoveCard(tc)
copyt[tc]=nil
end end
local cg=g:Filter(cm.gfilter1,nil,exg) if oc and oc:IsType(TYPE_MONSTER) and oc:IsType(TYPE_EFFECT) and not oc:IsType(TYPE_TRAPMONSTER) and not e:GetLabelObject() then
local f=Card.RegisterEffect cpe=c:CopyEffect(oc:GetOriginalCode(),RESET_EVENT+0x1fe0000,1)
Card.RegisterEffect=function(tc,e,forced) e:SetLabel(cpe)
e:SetCondition(cm.rcon(e:GetCondition(),tc,copyt)) e:SetLabelObject(oc)
f(tc,e,forced)
end end
for tc in aux.Next(cg) do
copyt[tc]=c:CopyEffect(tc:GetOriginalCode(),RESET_EVENT+0x1fe0000,1)
end
Card.RegisterEffect=f
end end
function cm.rcon(con,tc,copyt) function cm.lcon(e)
return function(e,tp,eg,ep,ev,re,r,rp) local g=e:GetHandler():GetOverlayGroup()
local c=e:GetHandler() return g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) and #g==1
if not c:IsHasEffect(m+1000) then
c:ResetEffect(c,copyt[tc],RESET_COPY)
copyt[tc]=nil
return false
end
if not con or con(e,tp,eg,ep,ev,re,r,rp) then return true end
return e:IsHasType(0x7e0) and c:GetFlagEffect(m)>0
end
end end
function cm.val(e,c) function cm.val(e,c)
local g=e:GetHandler():GetOverlayGroup() local g=e:GetHandler():GetOverlayGroup()
...@@ -187,8 +146,9 @@ function cm.lpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -187,8 +146,9 @@ function cm.lpop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local lp=Duel.GetLP(1-tp) local lp=Duel.GetLP(1-tp)
Duel.SetLP(1-tp,lp-2500) Duel.SetLP(1-tp,lp-2500)
if Duel.GetLP(1-tp)<=0 and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_CANNOT_LOSE_KOISHI) then return end
Duel.BreakEffect() Duel.BreakEffect()
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) if c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,cm.mtfilter,tp,LOCATION_MZONE,0,1,1,c,e) local g=Duel.SelectMatchingCard(tp,cm.mtfilter,tp,LOCATION_MZONE,0,1,1,c,e)
if g:GetCount()>0 then Duel.Overlay(c,g) end if g:GetCount()>0 then Duel.Overlay(c,g) 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