Commit 075cdf5e authored by Satty's avatar Satty

fix

parent eb36cd54
Pipeline #37325 failed with stages
in 3 seconds
......@@ -20,7 +20,7 @@ function c16311000.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e4:SetRange(LOCATION_FZONE)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetValue(c16311000.atlimit)
c:RegisterEffect(e4)
......@@ -28,7 +28,7 @@ function c16311000.initial_effect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetRange(LOCATION_FZONE)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(c16311000.tglimit)
e5:SetValue(aux.tgoval)
......@@ -72,7 +72,7 @@ function c16311000.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x11)
end
function c16311000.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16311000.spfilter),tp,0x11,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
......@@ -10,8 +10,9 @@ function c16311075.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(-800)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_INSECT))
e1:SetValue(800)
c:RegisterEffect(e1)
--pos
local e2=Effect.CreateEffect(c)
......
......@@ -122,7 +122,7 @@ function c71402000.efop(e,tp,eg,ep,ev,re,r,rp)
elseif dc==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71402000.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT)>0 end
if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end
elseif dc==4 then
local thg=Duel.GetMatchingGroup(c71402000.filter3,tp,LOCATION_GRAVE,0,nil)
if thg:GetCount()>0
......
......@@ -721,6 +721,7 @@ function yume.stellar_memories.BanishorSendSpell(sid,tp,msg1,msg2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=g2:Select(tp,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--filters for common spell effects
function yume.stellar_memories.SpellActivationBanishFilter(c,cid,tp)
......@@ -733,16 +734,18 @@ function yume.stellar_memories.SpellActivationSendFilter(c,lid)
return c:IsCode(lid) and c:IsAbleToExtra()
end
function yume.stellar_memories.BanishedSpellCon(cid)
return function(e,tp,eg,ep,ev,re,r,rp)
return function(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(cid)
end
end
--spell for low level and low link
function yume.stellar_memories.LowSpellActivationTg(rid,lid)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(yume.stellar_memories.SpellActivationSearchFilter,tp,LOCATION_DECK,0,1,nil,rid)
or Duel.IsExistingMatchingCard(yume.stellar_memories.SpellActivationBanishFilter,tp,LOCATION_EXTRA,0,1,nil,lid,tp)
end
end
end
function yume.stellar_memories.LowSpellActivationOp(rid,lid,msg1,msg2)
return function(e,tp,eg,ep,ev,re,r,rp)
......@@ -761,6 +764,7 @@ function yume.stellar_memories.LowSpellActivationOp(rid,lid,msg1,msg2)
local g=g2:Select(tp,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
function yume.stellar_memories.LinkSummonFilter(c)
return c:IsLinkSummonable(nil) and c:IsRace(RACE_SPELLCASTER)
......
......@@ -81,58 +81,57 @@ function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.op3(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return end
::cancel::
local mat_location=LOCATION_GRAVE+LOCATION_REMOVED
local summon_location=LOCATION_GRAVE+LOCATION_REMOVED
local greater_or_equal="Greater"
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.MultiRitualToDeckFilter),tp,mat_location,0,nil,tp)
if ft==0 then
mg=mg:Filter(yume.stellar_memories.MainZoneFilter,nil,tp)
end
mg=mg:Filter(yume.stellar_memories.MultiRitualSelectToUseFilter,nil,e,tp,summon_location,Card.GetLink,greater_or_equal)
if mg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local mat=mg:Select(tp,1,1,nil)
local mc=mat:GetFirst()
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(yume.stellar_memories.MultiRitualSelectToSummonFilter),tp,summon_location,0,mc,e,tp,mc,Card.GetLink,greater_or_equal)
if sg:GetCount()==0 then return end
if mc:IsLocation(LOCATION_MZONE) then ft=ft+1 end
if ct and ct<ft then ft=ct end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
--Ritual Summon 1 monster with ritual Level
local b1=sg:IsExists(yume.stellar_memories.MultiRitualRitualLevelCheck,1,nil,mc,Card.GetLink,greater_or_equal)
--Ritual Summon 1+ monsters with Link Rating
local b2=sg:IsExists(yume.stellar_memories.MultiRitualLevelCheck,1,nil,mc,Card.GetLink,greater_or_equal)
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(71404000,4))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=sg:Filter(yume.stellar_memories.MultiRitualRitualLevelCheck,nil,mc,Card.GetLink,greater_or_equal):SelectUnselect(nil,tp,false,true,1,1)
if not tc then goto cancel end
if ft<0 then return end
::cancel::
local mat_location=LOCATION_GRAVE+LOCATION_REMOVED
local summon_location=LOCATION_GRAVE+LOCATION_REMOVED
local greater_or_equal="Greater"
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.MultiRitualToDeckFilter),tp,mat_location,0,nil,tp)
if ft==0 then
mg=mg:Filter(yume.stellar_memories.MainZoneFilter,nil,tp)
end
mg=mg:Filter(yume.stellar_memories.MultiRitualSelectToUseFilter,nil,e,tp,summon_location,Card.GetLink,greater_or_equal)
if mg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local mat=mg:Select(tp,1,1,nil)
local mc=mat:GetFirst()
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(yume.stellar_memories.MultiRitualSelectToSummonFilter),tp,summon_location,0,mc,e,tp,mc,Card.GetLink,greater_or_equal)
if sg:GetCount()==0 then return end
if mc:IsLocation(LOCATION_MZONE) then ft=ft+1 end
if ct and ct<ft then ft=ct end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
--Ritual Summon 1 monster with ritual Level
local b1=sg:IsExists(yume.stellar_memories.MultiRitualRitualLevelCheck,1,nil,mc,Card.GetLink,greater_or_equal)
--Ritual Summon 1+ monsters with Link Rating
local b2=sg:IsExists(yume.stellar_memories.MultiRitualLevelCheck,1,nil,mc,Card.GetLink,greater_or_equal)
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(71404000,4))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=sg:Filter(yume.stellar_memories.MultiRitualRitualLevelCheck,nil,mc,Card.GetLink,greater_or_equal):SelectUnselect(nil,tp,false,true,1,1)
if not tc then goto cancel end
tc:SetMaterial(mat)
Duel.SendtoDeck(mc,nil,SEQ_DECKTOP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
else
local lv=mc:GetLink()*2
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)aux.GCheckAdditional=yume.stellar_memories.MultiRitualCheckAdditional(lv)
local tg=mg:SelectSubGroup(tp,yume.stellar_memories.MultiRitualFSelect,true,1,ft,tp,lv)
aux.GCheckAdditional=nil
if not tg then goto cancel end
local tc=tg:GetFirst()
while tc do
tc:SetMaterial(mat)
Duel.SendtoDeck(mc,nil,SEQ_DECKTOP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc=tg:GetNext()
end
Duel.SendtoDeck(mat,nil,SEQ_DECKTOP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
tc=tg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
else
local lv=mc:GetLink()*2
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)aux.GCheckAdditional=yume.stellar_memories.MultiRitualCheckAdditional(lv)
local tg=mg:SelectSubGroup(tp,yume.stellar_memories.MultiRitualFSelect,true,1,ft,tp,lv)
aux.GCheckAdditional=nil
if not tg then goto cancel end
local tc=tg:GetFirst()
while tc do
tc:SetMaterial(mat)
tc=tg:GetNext()
end
Duel.SendtoDeck(mat,nil,SEQ_DECKTOP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
tc=tg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
tc=tg:GetNext()
end
Duel.SpecialSummonComplete()
tc=tg:GetNext()
end
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
......@@ -49,19 +49,12 @@ function c9310007.spop(e,tp,eg,ep,ev,re,r,rp)
local kc=e:GetHandler()
if kc:IsRelateToEffect(e) then
Duel.SpecialSummon(kc,0,tp,tp,false,false,POS_FACEUP)
local sg=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,tp,LOCATION_MZONE,0,kc)
local kg=Duel.GetMatchingGroup(c9310007.cfilter,tp,LOCATION_EXTRA,0,nil,sg,kc)
if kg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9310007,1)) then
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9310007,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local kg2=kg:Select(tp,1,1,nil)
local sc=kg2:GetFirst()
local sg1=sg:SelectSubGroup(tp,c9310007.mtfilter,false,1,#sg,kc,sc)
sg1:Merge(Group.FromCards(kc))
sc:SetMaterial(sg1)
Duel.BreakEffect()
Duel.SynchroSummon(tp,sc,nil,sg1)
sc:CompleteProcedure()
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
end
......
......@@ -60,19 +60,12 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if kc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and kc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(kc,0,tp,tp,false,false,POS_FACEUP)
local sg=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,tp,LOCATION_MZONE,0,kc)
local kg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_EXTRA,0,nil,sg,kc)
if kg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9310007,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local kg2=kg:Select(tp,1,1,nil)
local sc=kg2:GetFirst()
local sg1=sg:SelectSubGroup(tp,cm.mtfilter,false,1,#sg,kc,sc)
sg1:Merge(kc)
sc:SetMaterial(sg1)
Duel.BreakEffect()
Duel.SynchroSummon(tp,sc,nil,sg1)
sc:CompleteProcedure()
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
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