Commit e028acd9 authored by wind2009's avatar wind2009

Fix

parent 6604ef88
Pipeline #42741 passed with stages
in 5 minutes and 37 seconds
No preview for this file type
...@@ -21,7 +21,7 @@ function s.initial_effect(c) ...@@ -21,7 +21,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(s.descon) e2:SetCondition(s.descon)
e2:SetCost(s.descost) e2:SetCost(s.descost)
e2:SetTarget(s.destg) e2:SetTarget(s.destg)
...@@ -60,7 +60,8 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,8 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.descon(e,tp,eg,ep,ev,re,r,rp) function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) return c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function s.costfilter(c) function s.costfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost()
......
...@@ -42,8 +42,8 @@ function s.lvfilter2(c) ...@@ -42,8 +42,8 @@ function s.lvfilter2(c)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(s.lvfilter,tp,0,LOCATION_MZONE,nil) local og=Duel.GetMatchingGroup(s.lvfilter,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(tg) do for tc in aux.Next(og) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
...@@ -51,8 +51,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,8 +51,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
local tg=Duel.GetMatchingGroup(s.lvfilter2,tp,LOCATION_MZONE,0,nil) if og:GetCount()>0 then Duel.BreakEffect() end
for tc in aux.Next(tg) do local sg=Duel.GetMatchingGroup(s.lvfilter2,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(sg) do
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetCode(EFFECT_UPDATE_LEVEL)
......
--Shipping Archifiend --Shipping Archfiend
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--change race/attribute --change race/attribute
......
...@@ -66,7 +66,7 @@ end ...@@ -66,7 +66,7 @@ end
function s.mgcheck(c,mg,syncard) function s.mgcheck(c,mg,syncard)
local rg=mg-c local rg=mg-c
if c:IsNotTuner(syncard) and c:IsSynchroType(TYPE_SYNCHRO) then if c:IsNotTuner(syncard) and c:IsSynchroType(TYPE_SYNCHRO) then
return rg:FilterCount(Card.IsTuner,nil,c)==4 return rg:FilterCount(Card.IsTuner,nil,syncard)==4
else else
return false return false
end end
...@@ -79,8 +79,7 @@ function s.atkval(e,c) ...@@ -79,8 +79,7 @@ function s.atkval(e,c)
end end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk) function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) if chk==0 then return c:IsAbleToRemove() end
and c:IsAbleToRemove() end
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
sg:AddCard(c) sg:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,sg:GetCount(),0,0)
...@@ -100,7 +99,7 @@ function s.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,7 +99,7 @@ function s.reop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToChain() and c:IsAbleToRemove() then sg:AddCard(c) end if c:IsRelateToChain() and c:IsAbleToRemove() then sg:AddCard(c) end
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if og:IsContains(c) if og:GetCount()>0
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
......
...@@ -100,7 +100,7 @@ end ...@@ -100,7 +100,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_EXTRA,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil)
if #g>=2 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then if #g>=2 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ConfirmCards(tp,Duel.GetFieldGroup(tp,0,LOCATION_EXTRA),true) Duel.ConfirmCards(tp,Duel.GetFieldGroup(tp,0,LOCATION_EXTRA),true)
......
...@@ -76,8 +76,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,8 +76,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local b1=tc:IsAbleToHand() local b1=tc:IsAbleToHand()
local b2=tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b2=tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,1190}, {b1,1190,1},
{b2,1152}) {b2,1152,2})
local res=false local res=false
if op==1 then if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
...@@ -78,8 +78,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,8 +78,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetValue(aux.indoval) e2:SetValue(aux.indoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
......
...@@ -72,7 +72,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,7 +72,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then if tc and tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
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