Commit 6e1dc286 authored by DailyShana's avatar DailyShana

update パーティカル・フュージョン and refactor 宣告者の預言

parent 8fb7f95a
...@@ -22,15 +22,6 @@ function c27383110.initial_effect(c) ...@@ -22,15 +22,6 @@ function c27383110.initial_effect(c)
e2:SetTarget(c27383110.thtg) e2:SetTarget(c27383110.thtg)
e2:SetOperation(c27383110.thop) e2:SetOperation(c27383110.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--event
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c27383110.evcon)
e3:SetOperation(c27383110.evop)
c:RegisterEffect(e3)
e1:SetLabelObject(e3)
end end
function c27383110.filter(c,e,tp) function c27383110.filter(c,e,tp)
return c:IsCode(44665365) return c:IsCode(44665365)
...@@ -64,7 +55,13 @@ function c27383110.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +55,13 @@ function c27383110.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
e:GetLabelObject():SetLabelObject(tc) e:SetLabelObject(tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetOperation(c27383110.evop)
e1:SetLabelObject(e)
Duel.RegisterEffect(e1,tp)
end end
end end
function c27383110.thcon(e,tp,eg,ep,ev,re,r,rp) function c27383110.thcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -94,11 +91,10 @@ function c27383110.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,11 +91,10 @@ function c27383110.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
function c27383110.evcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject()~=nil
end
function c27383110.evop(e,tp,eg,ep,ev,re,r,rp) function c27383110.evop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local te=e:GetLabelObject()
Duel.RaiseEvent(tc,EVENT_CUSTOM+27383110,e,0,tp,tp,0) local tc=te:GetLabelObject()
e:SetLabelObject(nil) Duel.RaiseEvent(tc,EVENT_CUSTOM+27383110,te,0,tp,tp,0)
te:SetLabelObject(nil)
e:Reset()
end end
...@@ -12,9 +12,11 @@ function c39261576.initial_effect(c) ...@@ -12,9 +12,11 @@ function c39261576.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetDescription(aux.Stringid(39261576,0)) e2:SetDescription(aux.Stringid(39261576,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_CUSTOM+39261576) e2:SetCode(EVENT_CUSTOM+39261576)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c39261576.atkcon)
e2:SetCost(c39261576.atkcost) e2:SetCost(c39261576.atkcost)
e2:SetTarget(c39261576.atktg) e2:SetTarget(c39261576.atktg)
e2:SetOperation(c39261576.atkop) e2:SetOperation(c39261576.atkop)
...@@ -72,23 +74,30 @@ function c39261576.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,23 +74,30 @@ function c39261576.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
e:SetLabelObject(tc) e:SetLabelObject(tc)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+39261576,e,0,tp,tp,0)
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
e:SetLabelObject(tc) e:SetLabelObject(tc)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+39261576,e,0,tp,tp,0)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetOperation(c39261576.evop)
e1:SetLabelObject(e)
Duel.RegisterEffect(e1,tp)
end end
end end
function c39261576.atkcon(e,tp,eg,ep,ev,re,r,rp)
return re==e:GetLabelObject()
end
function c39261576.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c39261576.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsAbleToRemove() end if chk==0 then return e:GetHandler():IsAbleToRemove() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c39261576.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c39261576.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=e:GetLabelObject():GetLabelObject() local tc=eg:GetFirst()
local mat=tc:GetMaterial() local mat=tc:GetMaterial()
if chkc then return chkc:IsSetCard(0x1047) and mat:IsContains(chkc) end if chkc then return chkc:IsSetCard(0x1047) and mat:IsContains(chkc) end
if chk==0 then return mat:IsExists(Card.IsSetCard,1,nil,0x1047) end if chk==0 then return mat:IsExists(Card.IsSetCard,1,nil,0x1047) end
...@@ -98,7 +107,7 @@ function c39261576.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -98,7 +107,7 @@ function c39261576.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
end end
function c39261576.atkop(e,tp,eg,ep,ev,re,r,rp,chk) function c39261576.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local sc=e:GetLabelObject():GetLabelObject() local sc=eg:GetFirst()
if not sc:IsRelateToEffect(e) or sc:IsFacedown() then return end if not sc:IsRelateToEffect(e) or sc:IsFacedown() then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
...@@ -109,3 +118,10 @@ function c39261576.atkop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -109,3 +118,10 @@ function c39261576.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1) sc:RegisterEffect(e1)
end end
function c39261576.evop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local tc=te:GetLabelObject()
Duel.RaiseEvent(tc,EVENT_CUSTOM+39261576,te,0,tp,tp,0)
te:SetLabelObject(nil)
e:Reset()
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