Commit a32c8e7f authored by Nemo Ma's avatar Nemo Ma

241215 wd

parent 96aae200
No preview for this file type
expansions/pics/98940011.jpg

172 KB | W: | H:

expansions/pics/98940011.jpg

36.9 KB | W: | H:

expansions/pics/98940011.jpg
expansions/pics/98940011.jpg
expansions/pics/98940011.jpg
expansions/pics/98940011.jpg
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
--彼方的星因士
function c98940011.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--to field
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(98940011,1))
e7:SetCategory(CATEGORY_SPECIAL_SUMMON)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetRange(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_CHAIN_END+TIMING_END_PHASE)
e7:SetCondition(c98940011.condition1)
e7:SetCost(c98940011.spcost)
e7:SetTarget(c98940011.tftg)
e7:SetOperation(c98940011.tfop)
c:RegisterEffect(e7)
--effect gain1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98940011,0))
......@@ -30,7 +12,7 @@ function c98940011.initial_effect(c)
e2:SetOperation(c98940011.sumop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_FZONE)
e3:SetRange(0xff)
e3:SetTargetRange(LOCATION_HAND,0)
e3:SetTarget(c98940011.eftg)
e3:SetLabelObject(e2)
......@@ -168,12 +150,25 @@ end
function c98940011.eftg(e,c)
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x9c)
end
function c98940011.stfilter(c,tp)
return c:IsCode(98940011)
end
function c98940011.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil) end
local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsSummonable(true,nil) and Duel.IsExistingMatchingCard(c98940011.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_FZONE,0,1,nil,tp) and c:GetFlagEffect(98940011)==0 end
c:RegisterFlagEffect(98940011,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c98940011.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,c98940011.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_FZONE,0,1,1,nil,tp):GetFirst()
if tc then
Duel.ConfirmCards(1-tp,tc)
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if not fc then
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
if c:IsRelateToEffect(e) and c:IsSummonable(true,nil) then
Duel.Summon(tp,c,true,nil)
end
......@@ -185,14 +180,24 @@ function c98940011.xyzfilter(c,mg)
return c:IsXyzSummonable(mg)
end
function c98940011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local g=Duel.GetMatchingGroup(c98940011.mfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(c98940011.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g)
return Duel.IsExistingMatchingCard(c98940011.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g) and Duel.IsExistingMatchingCard(c98940011.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_FZONE,0,1,nil,tp) and c:GetFlagEffect(98940012)==0
end
c:RegisterFlagEffect(98940012,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98940011.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c98940011.mfilter,tp,LOCATION_MZONE,0,nil)
local tc=Duel.SelectMatchingCard(tp,c98940011.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_FZONE,0,1,1,nil,tp):GetFirst()
if tc then
Duel.ConfirmCards(1-tp,tc)
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if not fc then
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
local xyzg=Duel.GetMatchingGroup(c98940011.xyzfilter,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
--调皮宝贝升空艇
local s,id,o=GetID()
function c98941053.initial_effect(c)
c:SetSPSummonOnce(291414)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x120),2,true)
--handes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.tgcon)
e1:SetOperation(s.regop)
c:RegisterEffect(e1)
if not c98941053.globle_check then
--chain check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetOperation(c98941053.chainop)
Duel.RegisterEffect(e1,0)
c98941053.globle_check=true
PK_hack_fusion_check=Card.CheckFusionMaterial
function Card.CheckFusionMaterial(card,Group_fus,Card_g,int_chkf,not_mat)
local exg=Group.CreateGroup()
if card:GetOriginalCode()==98941053 then
exg=Duel.GetMatchingGroup(c98941053.kfilter0,int_chkf,LOCATION_DECK,0,nil,card)
exg=Group.__bxor(exg,Group_fus):Filter(Card.IsLocation,nil,LOCATION_DECK)
if exg:GetCount()>0 then
if Duel.GetFlagEffect(0,98941053)~=0 and Duel.GetFlagEffect(0,98941054)==0 then
Duel.RegisterFlagEffect(0,98941054,RESET_EVENT+RESET_CHAIN,0,1)
local e1=Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetOperation(c98941053.resetop)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
Duel.RegisterEffect(e1,0)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,0)
end
local hg=Group.__add(exg,Group_fus)
return PK_hack_fusion_check(card,hg,Card_g,int_chkf,not_mat)
end
end
return PK_hack_fusion_check(card,Group_fus,Card_g,int_chkf,not_mat)
end
PK_hack_fusion_select=Duel.SelectFusionMaterial
function Duel.SelectFusionMaterial(tp,card,mg,gc_nil,chkf)
if card:GetOriginalCode()==98941053 and Duel.GetFlagEffect(0,98941053)~=0 and Duel.GetFlagEffect(0,98941054)~=0 then
exg=Duel.GetMatchingGroup(c98941053.kfilter0,int_chkf,LOCATION_DECK,0,nil,card)
if exg:GetCount()>0 then
mg:Merge(exg)
end
end
Duel.ResetFlagEffect(0,98941054)
return PK_hack_fusion_select(tp,card,mg,gc_nil,chkf)
end
end
end
function c98941053.chainop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(0,98941053,RESET_EVENT+RESET_CHAIN,0,1)
end
function c98941053.resetop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(0,98941054)
e:Reset()
end
function c98941053.splimit(e,c)
if not c then return false end
return not c:IsCode(98941053)
end
function c98941053.kfilter0(c,fc)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial(fc)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
--e1:SetTarget(s.target)
e1:SetOperation(s.activatep)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98941053.filter0(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function c98941053.filter1(c,e)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c98941053.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_WIND+ATTRIBUTE_FIRE+ATTRIBUTE_WATER) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c98941053.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c98941053.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(c98941053.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c98941053.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c98941053.activatep(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(98941053,2)) then return end
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c98941053.filter1),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(c98941053.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c98941053.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
if mat:IsExists(Card.IsFacedown,1,nil) then
local cg=mat:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
end
if mat:Filter(c98941053.cfilter,nil):GetCount()>0 then
local cg=mat:Filter(c98941053.cfilter,nil)
Duel.HintSelection(cg)
end
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c98941053.cfilter(c)
return c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED)
end
\ No newline at end of file
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