Commit b4ecade5 authored by wind2009's avatar wind2009

Fix

parent 7823a327
Pipeline #40962 passed with stages
in 3 minutes and 22 seconds
No preview for this file type
...@@ -30,7 +30,7 @@ function s.initial_effect(c) ...@@ -30,7 +30,7 @@ function s.initial_effect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL) e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,id+o) e3:SetCountLimit(1,id+o)
e3:SetCondition(s.thcon) e3:SetCondition(s.thcon)
......
...@@ -13,6 +13,7 @@ function s.initial_effect(c) ...@@ -13,6 +13,7 @@ function s.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetTarget(s.mvtg) e2:SetTarget(s.mvtg)
e2:SetOperation(s.mvop) e2:SetOperation(s.mvop)
...@@ -21,9 +22,8 @@ function s.initial_effect(c) ...@@ -21,9 +22,8 @@ function s.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e3:SetCondition(s.discon) e3:SetCondition(s.discon)
...@@ -37,7 +37,7 @@ function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,7 +37,7 @@ function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
and Duel.GetFlagEffect(tp,id)==0 end and Duel.GetFlagEffect(tp,id)==0 end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end end
function s.mvop(e,tp,eg,ep,ev,re,r,rp) function s.mvop(e,tp,eg,ep,ev,re,r,rp)
...@@ -45,8 +45,8 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,8 +45,8 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToChain() or not tc:IsLocation(LOCATION_MZONE) or tc:IsControler(1-tp) if not tc:IsRelateToChain() or not tc:IsLocation(LOCATION_MZONE) or tc:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) local seq=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2) local nseq=math.log(seq,2)
Duel.MoveSequence(tc,nseq) Duel.MoveSequence(tc,nseq)
end end
function s.cfilter(c) function s.cfilter(c)
...@@ -66,10 +66,10 @@ function s.cdfilter(c) ...@@ -66,10 +66,10 @@ function s.cdfilter(c)
end end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable() if Duel.NegateEffect(ev) and rc:IsRelateToChain(ev) and rc:IsDestructable()
and Duel.IsExistingMatchingCard(s.cdfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.cdfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -25,6 +25,7 @@ function s.initial_effect(c) ...@@ -25,6 +25,7 @@ function s.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetHintTiming(TIMING_END_PHASE)
e4:SetCountLimit(1,id) e4:SetCountLimit(1,id)
e4:SetCost(s.spcost) e4:SetCost(s.spcost)
e4:SetTarget(s.sptg) e4:SetTarget(s.sptg)
...@@ -58,7 +59,7 @@ end ...@@ -58,7 +59,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local attr=e:GetLabel() local attr=e:GetLabel()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp,attr) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp,attr) end
if chk==0 then return true end if chk==0 then return e:IsCostChecked() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,attr) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,attr)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
...@@ -74,6 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,6 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
local dc=g:GetFirst() local dc=g:GetFirst()
if dc then if dc then
Duel.HintSelection(g)
Duel.NegateRelatedChain(dc,RESET_TURN_SET) Duel.NegateRelatedChain(dc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -98,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
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