Commit 8878a62e authored by Satty's avatar Satty

fix

parent db609dba
Pipeline #37585 passed with stages
in 42 minutes and 41 seconds
......@@ -54,7 +54,7 @@ function s.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x5344) and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode(),e,tp)
end
function s.thfilter(c,code,e,tp)
return c:IsSetCard(0xc342,0x5344) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and (c:IsAbleToHand()
return c:IsSetCard(0x9341,0x5344) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and (c:IsAbleToHand()
or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -66,7 +66,7 @@ function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tc:GetCode(),e,tp)then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
......@@ -77,6 +77,7 @@ function s.op3(e,tp,eg,ep,ev,re,r,rp)
local op=aux.SelectFromOptions(tp,{b1,1190},{b2,1152})
if op==1 then
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc2)
end
if op==2 then
Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)
......
--Ratatoskr副司令 神无月恭平
local s,id=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,s.lcheck)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCode(EVENT_CHAINING)
e0:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(s.con)
e0:SetTarget(s.tg)
e0:SetOperation(s.op)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.con)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.eqcon)
e2:SetValue(s.efilter)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.eqcon)
e3:SetValue(s.atkval)
c:RegisterEffect(e3)
--attack all
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ATTACK_ALL)
e4:SetCondition(s.eqcon)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,2,nil,0x5344)
end
--
function s.con(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
local rc=re:GetHandler()
return bit.band(loc,LOCATION_HAND)~=0 and re:IsActiveType(TYPE_MONSTER) and rc:IsSetCard(0x5344) and rc:IsControler(tp)
end
function s.thfilter2(c)
return c:IsSetCard(0x6343,0x5344) and c:IsAbleToHand()
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local s1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.GetFlagEffect(tp,id+10001)==0
local s2=Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.GetFlagEffect(tp,id+10002)==0
local s3=Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.GetFlagEffect(tp,id+10003)==0
if chk==0 then return s1 or s2 or s3 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local s1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.GetFlagEffect(tp,id+10001)==0
local s2=Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.GetFlagEffect(tp,id+10002)==0
local s3=Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.GetFlagEffect(tp,id+10003)==0
if s1 or s2 or s3 then
local ss=4
if s1 and s2 and s3 then
ss=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2),aux.Stringid(id,3))
end
if s1 and s2 and not s3 then
ss=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))
end
if s1 and not s2 and s3 then
ss=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,3))
if ss==1 then ss=2 end
end
if not s1 and s2 and s3 then
ss=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))+1
end
if s1 and not s2 and not s3 then
ss=0
end
if not s1 and s2 and not s3 then
ss=1
end
if not s1 and not s2 and s3 then
ss=2
end
if ss==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
Duel.RegisterFlagEffect(tp,id+10001,RESET_PHASE+PHASE_END,0,0)
end
if ss==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,id+10002,RESET_PHASE+PHASE_END,0,0)
end
if ss==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
Duel.RegisterFlagEffect(tp,id+10003,RESET_PHASE+PHASE_END,0,0)
end
end
end
end
--
function s.eqcon(e)
local eg=e:GetHandler():GetEquipGroup()
return eg:IsExists(Card.IsSetCard,1,nil,0x6343)
end
function s.efilter(e,re,tp)
return re:GetHandlerPlayer()~=e:GetHandlerPlayer()
end
--
function s.atkval(e,c)
local c=e:GetHandler()
return c:GetEquipGroup():GetCount()*1000
end
\ No newline at end of file
......@@ -97,7 +97,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
if not s1 and s2 and not s3 then
ss=1
end
if not s1 and not s2 and not s3 then
if not s1 and not s2 and s3 then
ss=2
end
......@@ -115,6 +115,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
Duel.RegisterFlagEffect(tp,id+10002,RESET_PHASE+PHASE_END,0,0)
end
......
......@@ -59,6 +59,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local op=aux.SelectFromOptions(tp,{b1,1190},{b2,1152})
if op==1 then
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc2)
end
if op==2 then
Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -97,6 +97,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
......@@ -186,22 +186,27 @@ function s.gstfilter(c,e)
end
function s.gspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(s.gstfilter,nil,e)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)==0 then return end
if c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsFaceupEx() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local fid=c:GetFieldID()
c:RegisterFlagEffect(id,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)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetCondition(s.thcon)
e1:SetOperation(s.thop)
Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local fid=c:GetFieldID()
c:RegisterFlagEffect(id,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)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetCondition(s.thcon)
e1:SetOperation(s.thop)
Duel.RegisterEffect(e1,tp)
Duel.SpecialSummonComplete()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(s.gstfilter,nil,e)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -3,7 +3,7 @@ local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
c:SetUniqueOnField(1,1,id)
c:SetSPSummonOnce(id)
--c:SetSPSummonOnce(id)
aux.AddCodeList(c,5012604)
--fusion material
c:EnableReviveLimit()
......
......@@ -134,36 +134,34 @@ function c60151033.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetHandler():GetCounter(0x101b)
local val=ct*300
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCountFromEx(tp)<=0
or not Duel.IsExistingMatchingCard(c60151033.op2f,tp,LOCATION_EXTRA,0,1,nil,e,tp,val)
or c:GetCounter(0x101b)==0 then
or not Duel.IsExistingMatchingCard(c60151033.op2f,tp,LOCATION_EXTRA,0,1,nil,e,tp,val) then
Duel.Destroy(c,REASON_EFFECT)
end
e:GetHandler():RemoveCounter(tp,0x101b,ct,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60151033.op2f,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,val)
local tc=g:GetFirst()
if tc:IsType(TYPE_XYZ) then
if Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)~=0 then
c:CancelToGrave()
Duel.Overlay(tc,Group.FromCards(c))
elseif c:GetCounter(0x101b)>0 then
e:GetHandler():RemoveCounter(tp,0x101b,ct,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60151033.op2f,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,val)
local tc=g:GetFirst()
if tc:IsType(TYPE_XYZ) then
if Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)~=0 then
c:CancelToGrave()
Duel.Overlay(tc,Group.FromCards(c))
end
elseif tc:IsType(TYPE_LINK) then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
end
elseif tc:IsType(TYPE_LINK) then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
end
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc2=g2:GetFirst()
while tc2 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc2:RegisterEffect(e1)
tc2=g2:GetNext()
end
if c:IsLocation(LOCATION_SZONE) then
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc2=g2:GetFirst()
while tc2 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc2:RegisterEffect(e1)
tc2=g2:GetNext()
end
else
Duel.Destroy(c,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -21,9 +21,9 @@ function c62624120.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCode(EVENT_TO_GRAVE) -- 事件类型改为TO_GRAVE
e2:SetCountLimit(1,62624121)
e2:SetCondition(c62624120.spcon)
e2:SetCondition(c62624120.spcon) -- 统一使用spcon函数名
e2:SetTarget(c62624120.sptg)
e2:SetOperation(c62624120.spop)
c:RegisterEffect(e2)
......@@ -103,10 +103,10 @@ function c62624120.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
--作为素材送墓的触发条件
--作为素材送墓的触发条件(修改后)
function c62624120.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r&(REASON_FUSION+REASON_SYNCHRO+REASON_LINK)~=0
return c:IsReason(REASON_FUSION+REASON_SYNCHRO+REASON_LINK+REASON_COST) -- 添加REASON_COST
end
--作为素材送墓的特召目标
......
......@@ -18,7 +18,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(35699,0))
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
......@@ -34,6 +34,7 @@ function s.initial_effect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,id+20000)
e4:SetCondition(s.pencon)
e4:SetTarget(s.pentg)
e4:SetOperation(s.penop)
......
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