Commit cbbbaf09 authored by Amiya's avatar Amiya

修复

parent 60f65ce3
Pipeline #43730 failed with stages
in 2 minutes and 16 seconds
No preview for this file type
...@@ -23,7 +23,7 @@ function s.initial_effect(c) ...@@ -23,7 +23,7 @@ function s.initial_effect(c)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2)) e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
...@@ -52,19 +52,20 @@ end ...@@ -52,19 +52,20 @@ end
function s.addcon(e) function s.addcon(e)
return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
function s.thfilter(c) function s.thfilter(c,tp)
if not (c:IsSetCard(0x62) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_FIELD+TYPE_CONTINUOUS)) then return false end if not (c:IsSetCard(0x62) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_FIELD+TYPE_CONTINUOUS)) then return false end
return c:IsAbleToHand() or not c:IsForbidden() and c:CheckUniqueOnField(tp) return c:IsAbleToHand() or not c:IsForbidden() and c:CheckUniqueOnField(tp)
and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
if tc:IsAbleToHand() and (tc:IsForbidden() or not tc:CheckUniqueOnField(tp) or Duel.SelectOption(tp,1190,aux.Stringid(id,3))==0) then if tc:IsAbleToHand() and (Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsForbidden() or not tc:CheckUniqueOnField(tp) or Duel.SelectOption(tp,1190,aux.Stringid(id,3))==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
......
...@@ -14,7 +14,7 @@ function s.initial_effect(c) ...@@ -14,7 +14,7 @@ function s.initial_effect(c)
--special summon --special summon
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_DESTROY+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
...@@ -39,7 +39,7 @@ function s.cfilter2(c,tp) ...@@ -39,7 +39,7 @@ function s.cfilter2(c,tp)
return c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 return c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return aux.IsCodeListed(c,15259703) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return aux.IsCodeListed(c,15259703) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0 local loc=0
......
...@@ -5,7 +5,7 @@ function s.initial_effect(c) ...@@ -5,7 +5,7 @@ function s.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DECKDES+CATEGORY_SSET) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SSET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
...@@ -28,7 +28,7 @@ function s.initial_effect(c) ...@@ -28,7 +28,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_TODECK) e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_END_PHASE+TIMING_DAMAGE_STEP) e3:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_END_PHASE+TIMING_DAMAGE_STEP)
e3:SetCountLimit(1) e3:SetCountLimit(1)
......
...@@ -25,7 +25,7 @@ function s.initial_effect(c) ...@@ -25,7 +25,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id) e3:SetCountLimit(1)
e3:SetTarget(s.thtg) e3:SetTarget(s.thtg)
e3:SetOperation(s.thop) e3:SetOperation(s.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -36,7 +36,6 @@ function s.initial_effect(c) ...@@ -36,7 +36,6 @@ function s.initial_effect(c)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.rmcon) e4:SetCondition(s.rmcon)
e4:SetTarget(s.rmtg) e4:SetTarget(s.rmtg)
e4:SetOperation(s.rmop) e4:SetOperation(s.rmop)
......
...@@ -18,14 +18,14 @@ function s.initial_effect(c) ...@@ -18,14 +18,14 @@ function s.initial_effect(c)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --remove
local e5=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e5:SetCode(EVENT_CHAIN_SOLVING) e3:SetCode(EVENT_CHAIN_SOLVING)
e5:SetCondition(s.rmcon) e3:SetCondition(s.rmcon)
e5:SetOperation(s.rmop) e3:SetOperation(s.rmop)
c:RegisterEffect(e5) c:RegisterEffect(e3)
end end
function s.thfilter(c) function s.thfilter(c)
return (c:IsSetCard(0x62) or aux.IsCodeListed(c,15259703)) return (c:IsSetCard(0x62) or aux.IsCodeListed(c,15259703))
...@@ -55,7 +55,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,3)) then if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) local tg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE,0,1,1,nil)
local rc=tg:GetFirst() local rc=tg:GetFirst()
if Duel.Remove(rc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then if Duel.Remove(rc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
rc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) rc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
...@@ -82,7 +82,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +82,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.rmlimit(e,c,tp,r,re) function s.rmlimit(e,c,tp,r,re)
return c:GetOriginalCode()==e:GetLabel() and re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsCode(id) and r==REASON_EFFECT return c:GetOriginalCode()==e:GetLabel() and re and re:GetHandler():GetOriginalCode()==id and r&REASON_EFFECT~=0
end end
function s.retcon(e,tp,eg,ep,ev,re,r,rp) function s.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(id)~=0 return e:GetLabelObject():GetFlagEffect(id)~=0
......
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