Commit fb6afdb0 authored by Amiya's avatar Amiya

修复

parent c8facc20
Pipeline #41469 passed with stages
in 2 minutes and 42 seconds
...@@ -61,11 +61,10 @@ function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,11 +61,10 @@ function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.ctop(e,tp,eg,ep,ev,re,r,rp) function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.GetControl(c,1-tp)
end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToChain() then if c:IsRelateToChain() and tc and tc:IsRelateToChain()
and tc:IsControler(1-tp) then
Duel.GetControl(c,1-tp)
local fid=c:GetFieldID() local fid=c:GetFieldID()
if c:GetFlagEffectLabel(id)~=fid then if c:GetFlagEffectLabel(id)~=fid then
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
......
...@@ -12,7 +12,7 @@ function s.initial_effect(c) ...@@ -12,7 +12,7 @@ function s.initial_effect(c)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--self destroy --equip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_EQUIP) e2:SetCategory(CATEGORY_EQUIP)
...@@ -59,7 +59,7 @@ function s.eqfilter(c,tc,tp) ...@@ -59,7 +59,7 @@ function s.eqfilter(c,tc,tp)
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<1 then return end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_MONSTER) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_MONSTER)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local seq=-1 local seq=-1
......
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
...@@ -16,6 +16,7 @@ function s.initial_effect(c) ...@@ -16,6 +16,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(s.thcon) e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
...@@ -24,7 +25,6 @@ end ...@@ -24,7 +25,6 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if chk==0 then return #g>0 end if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function s.pfilter(c) function s.pfilter(c)
return c:IsCode(id) and not c:IsPublic() return c:IsCode(id) and not c:IsPublic()
...@@ -34,9 +34,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,9 +34,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(1-tp,aux.Stringid(id,2)) then and Duel.SelectYesNo(1-tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(1-tp,s.pfilter,1-tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(1-tp,s.pfilter,1-tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(tp,g)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then if g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then
Duel.ShuffleHand(tp) Duel.ShuffleHand(1-tp)
end end
Duel.Recover(tp,2000,REASON_EFFECT,true) Duel.Recover(tp,2000,REASON_EFFECT,true)
Duel.Recover(1-tp,2000,REASON_EFFECT,true) Duel.Recover(1-tp,2000,REASON_EFFECT,true)
......
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