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)
end
return ok
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 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.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)
end
function c12869010.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local zone={}
local flag={}
for p=0,1 do
......
......@@ -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 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.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)
end
function c12869015.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local zone={}
local flag={}
for p=0,1 do
......
......@@ -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 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.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)
end
function c12869020.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local zone={}
local flag={}
for p=0,1 do
......
......@@ -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)
if #g2>0 then
local tc=g2:GetFirst()
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
......
......@@ -30,10 +30,8 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.lcon)
e3:SetOperation(cm.efop)
c:RegisterEffect(e3)
cm[e3]={}
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_CODE)
......@@ -41,12 +39,6 @@ function cm.initial_effect(c)
e4:SetCondition(cm.lcon)
e4:SetValue(cm.val)
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)
e6:SetDescription(aux.Stringid(m,1))
e6:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
......@@ -72,21 +64,17 @@ function cm.initial_effect(c)
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.cfilter(c,tp)
return c:IsType(TYPE_MONSTER)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if not eg then return end
local sg=eg:Filter(cm.cfilter,nil,tp)
local tc=sg:GetFirst()
while tc do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=sg:GetNext()
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) then return end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if loc==LOCATION_MZONE then
rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
end
end
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)
mg:DeleteGroup()
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
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)
local c=e:GetHandler()
local copyt=cm[e]
local exg=Group.CreateGroup()
for tc,cid in pairs(copyt) do
if tc and cid then exg:AddCard(tc) end
local cpe,cpc=e:GetLabel(),e:GetLabelObject()
local og=c:GetOverlayGroup()
local oc=og:GetFirst()
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
local g=c:GetOverlayGroup():Filter(cm.copyfilter,nil,c)
local dg=exg:Filter(cm.gfilter,nil,g)
for tc in aux.Next(dg) do
c:ResetEffect(copyt[tc],RESET_COPY)
exg:RemoveCard(tc)
copyt[tc]=nil
if oc and oc:IsType(TYPE_MONSTER) and #og==1 and cpc and cpc~=oc then
c:ResetEffect(cpe,RESET_COPY)
e:SetLabel(0)
e:SetLabelObject(nil)
end
local cg=g:Filter(cm.gfilter1,nil,exg)
local f=Card.RegisterEffect
Card.RegisterEffect=function(tc,e,forced)
e:SetCondition(cm.rcon(e:GetCondition(),tc,copyt))
f(tc,e,forced)
if oc and oc:IsType(TYPE_MONSTER) and oc:IsType(TYPE_EFFECT) and not oc:IsType(TYPE_TRAPMONSTER) and not e:GetLabelObject() then
cpe=c:CopyEffect(oc:GetOriginalCode(),RESET_EVENT+0x1fe0000,1)
e:SetLabel(cpe)
e:SetLabelObject(oc)
end
for tc in aux.Next(cg) do
copyt[tc]=c:CopyEffect(tc:GetOriginalCode(),RESET_EVENT+0x1fe0000,1)
end
Card.RegisterEffect=f
end
function cm.rcon(con,tc,copyt)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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
function cm.lcon(e)
local g=e:GetHandler():GetOverlayGroup()
return g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) and #g==1
end
function cm.val(e,c)
local g=e:GetHandler():GetOverlayGroup()
......@@ -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
local lp=Duel.GetLP(1-tp)
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()
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)
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
......
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