Commit 88ce4366 authored by wind2009's avatar wind2009

Fix

parent cb9cd6a5
Pipeline #37856 passed with stages
in 3 minutes and 19 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:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e3:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--indestructable --indestructable
...@@ -50,7 +50,7 @@ end ...@@ -50,7 +50,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()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToChain() and tc:IsCanBeDisabledByEffect(e) then if tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and tc:IsRelateToChain() and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -6,7 +6,7 @@ function s.initial_effect(c) ...@@ -6,7 +6,7 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,1)) e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.destg) e1:SetTarget(s.destg)
...@@ -15,10 +15,10 @@ function s.initial_effect(c) ...@@ -15,10 +15,10 @@ function s.initial_effect(c)
--destroy 2 --destroy 2
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2)) e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(s.descon2) e2:SetCondition(s.descon2)
e2:SetTarget(s.destg2) e2:SetTarget(s.destg2)
...@@ -62,7 +62,7 @@ function s.cfilter(c,tp) ...@@ -62,7 +62,7 @@ function s.cfilter(c,tp)
and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_EFFECT)
end end
function s.descon2(e,tp,eg,ep,ev,re,r,rp) function s.descon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,c,tp) return eg:IsExists(s.cfilter,1,e:GetHandler(),tp)
end end
function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
...@@ -77,3 +77,6 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,3 +77,6 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
function s.indtg(e,c)
return c:GetSequence()==0 or c:GetSequence()==4
end
\ No newline at end of file
...@@ -70,21 +70,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,21 +70,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat) tc:SetMaterial(mat)
if mat:IsExists(Card.IsFacedown,1,nil) then Duel.HintSelection(mat)
local cg=mat:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
end
if mat:Filter(s.cfilter,nil):GetCount()>0 then
local cg=mat:Filter(s.cfilter,nil)
Duel.HintSelection(cg)
end
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else elseif ce then
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
...@@ -93,7 +86,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +86,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsRace(RACE_FAIRY+RACE_FIEND) and c:IsAbleToGraveAsCost() return c:IsFaceupEx() and c:IsRace(RACE_FAIRY+RACE_FIEND) and c:IsAbleToGraveAsCost()
end end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end
...@@ -107,7 +100,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -107,7 +100,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
end end
......
...@@ -18,6 +18,7 @@ function s.initial_effect(c) ...@@ -18,6 +18,7 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,2)) e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetCost(s.spcost) e2:SetCost(s.spcost)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
...@@ -28,13 +29,14 @@ function s.initial_effect(c) ...@@ -28,13 +29,14 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+o*2)
e3:SetCost(s.spcost) e3:SetCost(s.spcost)
e3:SetTarget(s.thtg2) e3:SetTarget(s.thtg2)
e3:SetOperation(s.thop2) e3:SetOperation(s.thop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and not c:IsPublic() return c:IsLevelAbove(5) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end
...@@ -53,7 +55,9 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,7 +55,9 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end 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:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
...@@ -92,7 +96,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -92,7 +96,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
end end
...@@ -118,14 +122,14 @@ function s.thfilter(c) ...@@ -118,14 +122,14 @@ function s.thfilter(c)
end end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,c)
and c:IsAbleToRemove() end and c:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end end
function s.thop2(e,tp,eg,ep,ev,re,r,rp) function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local c=e:GetHandler()
if tc:IsRelateToChain() and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) and Duel.Remove(c,0,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -11,7 +11,7 @@ function s.initial_effect(c) ...@@ -11,7 +11,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(setcon) e2:SetCondition(s.setcon)
e2:SetCost(s.setcost) e2:SetCost(s.setcost)
e2:SetTarget(s.settg) e2:SetTarget(s.settg)
e2:SetOperation(s.setop) e2:SetOperation(s.setop)
...@@ -27,6 +27,12 @@ function s.initial_effect(c) ...@@ -27,6 +27,12 @@ function s.initial_effect(c)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
e3:SetOperation(s.spop) e3:SetOperation(s.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(s.atkval)
c:RegisterEffect(e4)
end end
function s.setcon(e,tp,eg,ep,ev,re,r,rp) function s.setcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
...@@ -72,7 +78,21 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +78,21 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,ec:GetLevel()) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,ec:GetLevel())
if #g>0 then local sc=g:GetFirst()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) if #g>0 and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
end end
end end
function s.atkval(e,c)
return Duel.GetOverlayCount(e:GetHandlerPlayer(),1,1)*200
end
\ No newline at end of file
...@@ -33,9 +33,9 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,9 +33,9 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local op=0 local op=0
if b1 or b2 or b3 then if b1 or b2 or b3 then
op=aux.SelectFromOptions(tp, op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),TYPE_MONSTER}, {b1,1050,TYPE_MONSTER},
{b2,aux.Stringid(id,2),TYPE_SPELL}, {b2,1051,TYPE_SPELL},
{b3,aux.Stringid(id,3),TYPE_TRAP}) {b3,1052,TYPE_TRAP})
end end
e:SetLabel(op) e:SetLabel(op)
if op==TYPE_MONSTER then if op==TYPE_MONSTER then
......
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