Commit aac21244 authored by TanakaKotoha's avatar TanakaKotoha

homo

parent aff6ac19
No preview for this file type
......@@ -85,6 +85,8 @@ function cm.tgfilter(c)
return c:IsCode(m)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
Debug.Message(zone)
local ph=Duel.GetCurrentPhase()
local flag=1
if ph==PHASE_BATTLE_START then flag=2 end
......@@ -99,12 +101,12 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_GRAVE,0,1,nil)
return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -2,7 +2,7 @@
local m=33400210
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
......@@ -12,21 +12,22 @@ function cm.initial_effect(c)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--sps
--sps
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+10000)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
end
function cm.cfilter1(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -35,51 +36,57 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x6342) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_DECK) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.ConfirmDecktop(tp,1)
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsCode(ac) then
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
local ct1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
Duel.ShuffleDeck(tp)
local ct1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct1>2 then ct1=2 end
local g=Duel.GetDecktopGroup(tp,ct1)
Duel.ConfirmCards(tp,g)
Duel.SortDecktop(tp,tp,ct1)
end
Duel.ConfirmCards(tp,g)
Duel.SortDecktop(tp,tp,ct1)
end
else
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoDeck(g2,tp,0,REASON_EFFECT)
end
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoDeck(g2,tp,0,REASON_EFFECT)
end
end
end
end
end
end
\ No newline at end of file
......@@ -30,7 +30,7 @@ function c33400403.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c33400403.thfilter(c)
return (c:IsSetCard(0x5342) or c:IsSetCard(0x6343) or c:IsSetCard(0x5343)) and c:IsAbleToHand()
return ((c:IsSetCard(0x5342) and c:IsType(TYPE_MONSTER)) or (c:IsSetCard(0x6343) or c:IsSetCard(0x5343))) and c:IsAbleToHand()
end
function c33400403.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33400403.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -37,7 +37,7 @@ function c33400406.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c33400406.thfilter(c,tp)
return c:IsSetCard(0x5343) and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp))
return c:IsSetCard(0x5343) and (c:IsAbleToHand() or not c:IsForbidden())
end
function c33400406.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33400406.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
......@@ -48,7 +48,7 @@ function c33400406.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
local b1=tc:IsAbleToHand()
local b2=tc:GetActivateEffect():IsActivatable(tp)
local b2=not tc:IsForbidden()
if b1 and (not b2 or Duel.SelectOption(tp,1190,1150)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
......
......@@ -24,7 +24,7 @@ c:EnableReviveLimit()
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--counter
--ATK
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -107,7 +107,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(ev)
sc:RegisterEffect(e1)
sc=g:GetNext()
......
......@@ -67,6 +67,24 @@ end
function c60150621.thfilter(c,g)
return g:IsContains(c)
end
function c60150621.thfilter2(c,e,tp)
local se=e:GetHandler():GetSequence()
if se ==5 then
se=1
elseif se==6 then
se=3
end
local seq=c:GetSequence()
if seq ==5 then
seq=1
elseif seq==6 then
seq=3
end
if c:IsControler(1-tp) then
seq=math.abs(seq-4)
end
return math.abs(se-seq)==1--g:IsContains(c)
end
function c60150621.target(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=e:GetHandler():GetColumnGroup()
if chk==0 then return Duel.IsExistingMatchingCard(c60150621.thfilter,tp,0,LOCATION_ONFIELD,1,nil,cg) end
......@@ -121,16 +139,8 @@ function c60150621.activate(e,tp,eg,ep,ev,re,r,rp)
local cg=c:GetColumnGroup()
local g=Duel.GetMatchingGroup(c60150621.thfilter,tp,0,LOCATION_ONFIELD,nil,cg)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local seq=e:GetHandler():GetSequence()
local g=Group.CreateGroup()
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,3-seq)
if tc then g:AddCard(tc) end
tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,3-seq)
if tc then g:AddCard(tc) end
tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,5-seq)
if tc then g:AddCard(tc) end
tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5-seq)
if tc then g:AddCard(tc) end
Duel.SendtoHand(g,nil,REASON_EFFECT)
local g2=Duel.GetMatchingGroup(c60150621.thfilter2,tp,0,LOCATION_ONFIELD,nil,e,tp)
Duel.BreakEffect()
Duel.SendtoHand(g2,nil,REASON_EFFECT)
end
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