Commit ef1282d3 authored by Tachibana's avatar Tachibana

1145141919810

parent 31c447a0
Pipeline #13590 passed with stages
in 34 minutes and 35 seconds
......@@ -61,6 +61,9 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(cm.tg)
e1:SetValue(cm.val)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e2,tp)
end
function cm.tg(e,c)
local z=1<<c:GetSequence()
......
--MS-765改·北上丽花
require("expansions/script/c81000000")
function c81015011.initial_effect(c)
local m=81015011
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
aux.AddMaterialCodeList(c,81015010)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,81015010),aux.NonTuner(Card.IsSetCard,0x81a),1,1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81015011,0))
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,81015911)
e1:SetCountLimit(1,m)
e1:SetCondition(Tenka.ReikaCon)
e1:SetTarget(c81015011.sptg)
e1:SetOperation(c81015011.spop)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(81015011,1))
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,81015011)
e2:SetTarget(c81015011.settg)
e2:SetOperation(c81015011.setop)
e2:SetCountLimit(1,m+900)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
end
function c81015011.spfilter(c,e,tp)
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x81a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(c81015011.bfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,c)
and not Duel.IsExistingMatchingCard(cm.bfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,c)
end
function c81015011.bfilter(c,tc)
function cm.bfilter(c,tc)
return tc:IsCode(c:GetCode()) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c81015011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c81015011.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c81015011.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c81015011.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c81015011.setfilter(c)
function cm.setfilter(c)
return c:IsSetCard(0x81a) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c81015011.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81015011.setfilter,tp,LOCATION_DECK,0,1,nil) end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function c81015011.setop(e,tp,eg,ep,ev,re,r,rp)
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c81015011.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local c=e:GetHandler()
local tc=g:GetFirst()
local fid=c:GetFieldID()
Duel.SSet(tp,tc)
tc:RegisterFlagEffect(81015011,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......@@ -74,24 +76,24 @@ function c81015011.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c81015011.tgcon)
e1:SetOperation(c81015011.tgop)
e1:SetCondition(cm.tgcon)
e1:SetOperation(cm.tgop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if g2:GetCount()>0 then
Duel.Destroy(g2,REASON_EFFECT)
end
end
end
function c81015011.tgcon(e,tp,eg,ep,ev,re,r,rp)
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:GetFlagEffectLabel(81015011)==e:GetLabel()
return tc:GetFlagEffectLabel(m)==e:GetLabel()
end
function c81015011.tgop(e,tp,eg,ep,ev,re,r,rp)
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoGrave(tc,REASON_EFFECT)
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