Commit 20f07a2b authored by wind2009's avatar wind2009

Fix

parent f01fb590
Pipeline #43639 canceled with stages
in 24 seconds
No preview for this file type
...@@ -3,11 +3,22 @@ ...@@ -3,11 +3,22 @@
101305002 101305002
101305003 101305003
101305004 101305004
101305005
101305006
101305007
101305008
101305009
101305027 101305027
101305028 101305028
101305029
101305042 101305042
101305044 101305044
101305045 101305045
101305046 101305046
101305047
101305048
101305049
101305065 101305065
101305066
101305067
101305076 101305076
\ No newline at end of file
--劫火の三幻魔-神炎皇ウリア --劫火の三幻魔神炎皇ウリア
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -39,6 +39,7 @@ function s.initial_effect(c) ...@@ -39,6 +39,7 @@ function s.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetTarget(s.destg) e4:SetTarget(s.destg)
e4:SetOperation(s.desop) e4:SetOperation(s.desop)
...@@ -64,9 +65,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,9 +65,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_DISCARD+REASON_EFFECT)
if dg:GetCount()>0 then
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.BreakEffect() Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) end
end end
end end
function s.value(e,c) function s.value(e,c)
...@@ -85,7 +88,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -85,7 +88,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then if tc:IsRelateToChain() and tc:IsOnField() then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
--罪禍の三幻魔-降雷皇ハモン --罪禍の三幻魔降雷皇ハモン
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -63,9 +63,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,9 +63,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_DISCARD+REASON_EFFECT)
if dg:GetCount()>0 then
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.BreakEffect() Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) end
end end
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
......
--無窮の三幻魔-幻魔皇ラビエル --無窮の三幻魔幻魔皇ラビエル
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -27,6 +27,7 @@ function s.initial_effect(c) ...@@ -27,6 +27,7 @@ function s.initial_effect(c)
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)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(s.descost) e2:SetCost(s.descost)
e2:SetTarget(s.destg) e2:SetTarget(s.destg)
...@@ -53,17 +54,19 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,17 +54,19 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_DISCARD+REASON_EFFECT)
if dg:GetCount()>0 then
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.BreakEffect() Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) end
end end
end end
function s.costfilter(c) function s.costfilter(c,tp)
return c:IsSetCard(0x1144) return c:IsSetCard(0x1144) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,c)
end end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,2,e:GetHandler()) end if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,2,e:GetHandler(),tp) end
local g=Duel.SelectReleaseGroup(tp,s.costfilter,2,2,e:GetHandler()) local g=Duel.SelectReleaseGroup(tp,s.costfilter,2,2,e:GetHandler(),tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -25,7 +25,7 @@ function s.initial_effect(c) ...@@ -25,7 +25,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
...@@ -38,6 +38,10 @@ end ...@@ -38,6 +38,10 @@ 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 not e:GetHandler():IsPublic() end if chk==0 then return not e:GetHandler():IsPublic() end
end end
function s.hfilter(c,e,tp)
return c:IsDiscardable(REASON_EFFECT+REASON_DISCARD)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
if not c:IsSetCard(0x1144) or c:IsLevel(8) then return false end if not c:IsSetCard(0x1144) or c:IsLevel(8) then return false end
if c:IsCode(101305005,101305006,101305007) then if c:IsCode(101305005,101305006,101305007) then
...@@ -46,28 +50,33 @@ function s.spfilter(c,e,tp) ...@@ -46,28 +50,33 @@ function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
end end
function s.spsummon(c,tp)
if c:IsCode(101305005,101305006,101305007) then
Duel.SpecialSummon(c,0,tp,tp,false,true,POS_FACEUP_DEFENSE)
else
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
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)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.hfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
and Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_HAND,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end end
function s.hfilter(c,e,tp)
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,s.hfilter,1,1,REASON_EFFECT+REASON_DISCARD,nil,e,tp)~=0 then local dres=0
if not Duel.IsExistingMatchingCard(s.hfilter,tp,LOCATION_HAND,0,1,nil,e,tp) then
dres=Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
else
dres=Duel.DiscardHand(tp,s.hfilter,1,1,REASON_EFFECT+REASON_DISCARD,nil,e,tp)
end
if dres>0 then
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) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
if tc:IsCode(101305005,101305006,101305007) then s.spsummon(tc,tp)
Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP_DEFENSE)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end end
else else
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
...@@ -94,13 +103,9 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,13 +103,9 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToChain() then tc=nil end if not tc:IsRelateToChain() then tc=nil end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,tc,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,tc,e,tp)
local tc=g:GetFirst() local sc=g:GetFirst()
if tc then if sc then
if tc:IsCode(101305005,101305006,101305007) then s.spsummon(sc,tp)
Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP_DEFENSE)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end end
end end
function s.sptg3(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -114,10 +119,6 @@ function s.spop3(e,tp,eg,ep,ev,re,r,rp) ...@@ -114,10 +119,6 @@ function s.spop3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
if tc:IsCode(101305005,101305006,101305007) then s.spsummon(tc,tp)
Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP_DEFENSE)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
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