Commit db609dba authored by Satty's avatar Satty

fix

parent d7e81fe6
Pipeline #37456 passed with stages
in 44 minutes and 43 seconds
--辉照万古的黄金之月 --辉照万古的黄金之月
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,12400134)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(1190) e1:SetDescription(1190)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
......
...@@ -143,6 +143,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,6 +143,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
function s.bkcon(e,tp,eg,ep,ev,re,r,rp) function s.bkcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==1 then return false end
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and ((te:GetHandler():IsSetCard(0xa2a2) and te:IsActiveType(TYPE_MONSTER)) or te:GetHandler():IsCode(12400134)) and p==tp return te and ((te:GetHandler():IsSetCard(0xa2a2) and te:IsActiveType(TYPE_MONSTER)) or te:GetHandler():IsCode(12400134)) and p==tp
end end
......
...@@ -113,7 +113,7 @@ function cm.backop(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,7 +113,7 @@ function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(cm.checkitside,tp,0x7f,0x7f,nil) local dg=Duel.GetMatchingGroup(cm.checkitside,tp,0x7f,0x7f,nil)
for c in aux.Next(dg) do for c in aux.Next(dg) do
local tcode=c.code local tcode=c.code
c:SetEntityCode(tcode) c:SetEntityCode(tcode,true)
if c:IsFacedown() then if c:IsFacedown() then
Duel.ConfirmCards(1-tp,Group.FromCards(c)) Duel.ConfirmCards(1-tp,Group.FromCards(c))
end end
...@@ -157,7 +157,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -157,7 +157,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:GetFlagEffect(16100000)==0 then if c:GetFlagEffect(16100000)==0 then
Duel.Hint(HINT_CARD,0,12847088) Duel.Hint(HINT_CARD,0,12847088)
local sidecode=c.side_code local sidecode=c.side_code
c:SetEntityCode(sidecode) c:SetEntityCode(sidecode,true)
c:RegisterFlagEffect(16100000,RESET_EVENT+0x7e0000,0,0) c:RegisterFlagEffect(16100000,RESET_EVENT+0x7e0000,0,0)
Duel.Hint(24,0,aux.Stringid(m+1,0)) Duel.Hint(24,0,aux.Stringid(m+1,0))
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,re,r,rp,ep,0) Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,re,r,rp,ep,0)
...@@ -200,7 +200,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp) ...@@ -200,7 +200,7 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
local sidecode=c.code local sidecode=c.code
c:SetEntityCode(code) c:SetEntityCode(code,true)
c:ResetFlagEffect(16100000) c:ResetFlagEffect(16100000)
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,re,r,rp,ep,0) Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,re,r,rp,ep,0)
end end
......
...@@ -113,7 +113,7 @@ function cm.backop(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,7 +113,7 @@ function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(cm.checkitside,tp,0x7f,0x7f,nil) local dg=Duel.GetMatchingGroup(cm.checkitside,tp,0x7f,0x7f,nil)
for c in aux.Next(dg) do for c in aux.Next(dg) do
local tcode=c.code local tcode=c.code
c:SetEntityCode(tcode) c:SetEntityCode(tcode,true)
if c:IsFacedown() then if c:IsFacedown() then
Duel.ConfirmCards(1-tp,Group.FromCards(c)) Duel.ConfirmCards(1-tp,Group.FromCards(c))
end end
...@@ -171,7 +171,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -171,7 +171,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
if c:GetFlagEffect(16100000)==0 then if c:GetFlagEffect(16100000)==0 then
Duel.Hint(HINT_CARD,0,12847099) Duel.Hint(HINT_CARD,0,12847099)
local sidecode=c.side_code local sidecode=c.side_code
c:SetEntityCode(sidecode) c:SetEntityCode(sidecode,true)
c:RegisterFlagEffect(16100000,RESET_EVENT+0x7e0000,0,0) c:RegisterFlagEffect(16100000,RESET_EVENT+0x7e0000,0,0)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m+1,5)) e3:SetDescription(aux.Stringid(m+1,5))
...@@ -214,7 +214,7 @@ function cm.remop(e,tp,eg,ep,ev,re,r,rp) ...@@ -214,7 +214,7 @@ function cm.remop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)~=0 and c:GetFlagEffect(16100000)>0 then if Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)~=0 and c:GetFlagEffect(16100000)>0 then
Duel.Hint(HINT_CARD,0,12847098) Duel.Hint(HINT_CARD,0,12847098)
local sidecode=c.code local sidecode=c.code
c:SetEntityCode(sidecode) c:SetEntityCode(sidecode,true)
c:ResetFlagEffect(16100000) c:ResetFlagEffect(16100000)
Duel.AdjustAll() Duel.AdjustAll()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
......
...@@ -43,12 +43,13 @@ function s.initial_effect(c) ...@@ -43,12 +43,13 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED) e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) --e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCondition(s.gspcon) e3:SetCondition(s.gspcon)
e3:SetTarget(s.gsptg) e3:SetTarget(s.gsptg)
e3:SetOperation(s.gspop) e3:SetOperation(s.gspop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BE_BATTLE_TARGET) e4:SetCode(EVENT_BE_BATTLE_TARGET)
e4:SetCondition(s.gspcon2) e4:SetCondition(s.gspcon2)
e4:SetTarget(s.gsptg2) e4:SetTarget(s.gsptg2)
...@@ -161,7 +162,7 @@ function s.gspcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -161,7 +162,7 @@ function s.gspcon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.gspcon2(e,tp,eg,ep,ev,re,r,rp) function s.gspcon2(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return d:IsFaceup() and (c.MoJin or c:IsSetCard(0x23c)) and d:IsControler(tp) return d and d:IsFaceup() and (d.MoJin or d:IsSetCard(0x23c)) and d:IsControler(tp)
and Duel.GetMZoneCount(tp,d,tp)>0 and d:IsAbleToHand() and Duel.GetMZoneCount(tp,d,tp)>0 and d:IsAbleToHand()
end end
function s.gsptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.gsptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -187,12 +188,8 @@ function s.gspop(e,tp,eg,ep,ev,re,r,rp) ...@@ -187,12 +188,8 @@ function s.gspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(s.gstfilter,nil,e) local sg=tg:Filter(s.gstfilter,nil,e)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)==0 then return end
Duel.SendtoHand(sg,nil,REASON_EFFECT)
if c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsFaceupEx() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsFaceupEx() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
--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() local fid=c:GetFieldID()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
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