Commit 32b44692 authored by wind2009's avatar wind2009

Fix

parent 584652d9
Pipeline #39227 passed with stages
in 2 minutes and 9 seconds
...@@ -10,15 +10,15 @@ function s.initial_effect(c) ...@@ -10,15 +10,15 @@ function s.initial_effect(c)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,id,EVENT_DESTROYED)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(custom_code)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCondition(s.setcon) e2:SetCondition(s.setcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.settg) e2:SetTarget(s.settg)
e2:SetOperation(s.setop) e2:SetOperation(s.setop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -42,7 +42,7 @@ function s.cfilter(c,tp) ...@@ -42,7 +42,7 @@ function s.cfilter(c,tp)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function s.setcon(e,tp,eg,ep,ev,re,r,rp) function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) return eg:IsExists(s.cfilter,1,nil,tp)
end end
function s.tgfilter(c,e,tp) function s.tgfilter(c,e,tp)
local r=LOCATION_REASON_TOFIELD local r=LOCATION_REASON_TOFIELD
...@@ -50,7 +50,7 @@ function s.tgfilter(c,e,tp) ...@@ -50,7 +50,7 @@ function s.tgfilter(c,e,tp)
if not c:IsAbleToChangeControler() then return false end if not c:IsAbleToChangeControler() then return false end
r=LOCATION_REASON_CONTROL r=LOCATION_REASON_CONTROL
end end
return Duel.GetLocationCount(tp,LOCATION_SZONE,tp,r)>0 return Duel.GetLocationCount(tp,LOCATION_SZONE,tp,r)>0 and not c:IsForbidden() and c:CheckUniqueOnField(tp)
and c:IsCanBeEffectTarget(e) and c:IsCanBeEffectTarget(e)
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -66,7 +66,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -66,7 +66,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) if tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) and aux.NecroValleyFilter()(tc)
and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
......
...@@ -32,7 +32,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +32,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil)
local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
local _,maxlink=tg:GetMaxGroup(Card.GetLink) local _,maxlink=tg:GetMaxGroup(Card.GetLink)
local b2=cg:CheckSubGroup(s.fselect,1,maxlink,tg) local b2=#tg>0 and cg:CheckSubGroup(s.fselect,1,maxlink,tg)
and Duel.GetFlagEffect(tp,id+o)==0 and Duel.GetFlagEffect(tp,id+o)==0
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=0 local op=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