Commit 9482a39e authored by Nemo Ma's avatar Nemo Ma

fix

parent 1ece01a1
......@@ -20,7 +20,7 @@ function s.initial_effect(c)
end
function s.recon(e,tp)
local c = e:GetHandler()
return c:IsPosition(POS_FACEUP) and c:IsType(rscf.extype)
return c:IsPosition(POS_FACEUP) and c:IsType(TYPE_LINK+TYPE_XYZ+TYPE_SYNCHRO+TYPE_FUSION)
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsCode(10133001) or c:IsHasEffect(10133009))
......
......@@ -21,7 +21,7 @@ function s.initial_effect(c)
end
function s.recon(e,tp)
local c = e:GetHandler()
return c:IsPosition(POS_FACEUP) and c:IsType(rscf.extype)
return c:IsPosition(POS_FACEUP) and c:IsType(TYPE_LINK+TYPE_XYZ+TYPE_SYNCHRO+TYPE_FUSION)
end
function s.gcheck(g)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_BEAST)
......
......@@ -5,10 +5,7 @@ function cm.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SUMMON+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop)
c:RegisterEffect(e1)
......@@ -35,12 +32,12 @@ function cm.BRAVE(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_brave
end
function cm.setfilter1(c)
function cm.setfilter(c,e,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.actcon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsExistingMatchingCard(cm.setfilter1,tp,LOCATION_SZONE,0,1,nil)
return not Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_SZONE,0,1,nil)
end
function cm.setfilter(c)
return cm.BRAVE(c) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
......
--死境征途
--死境的影魔
local m=14000098
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.actcon)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
--e2:SetProperty(EFFECT_FLAG_DELAY)
--e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.BRAVE(c)
local m=_G["c"..c:GetCode()]
......@@ -35,20 +46,41 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,c,e,tp)
if #g>0 then
if Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)==0 then return end
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_MONSTER) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:CancelToGrave()
if Duel.SendtoDeck(c,nil,2,REASON_EFFECT) then
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if #g>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
if #tg>0 then
Duel.SpecialSummon(tg,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tg)
end
end
end
end
end
function cm.sfilter(c,e,tp)
return c:IsFaceup() and c:GetSequence()<5
end
function cm.thcon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_SZONE,0,1,nil)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
......@@ -65,7 +65,8 @@ function c3966633.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c3966633.aclimit(e,re,tp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local ctp=e:GetOwnerPlayer()
local g=Duel.GetMatchingGroup(Card.IsFaceup,ctp,0,LOCATION_MZONE,nil)
local attr=0
if g:GetCount()>0 and re:IsActiveType(TYPE_MONSTER) then
local tc=g:GetFirst()
......
......@@ -23,13 +23,13 @@ function c98920183.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_INACTIVATE)
e4:SetRange(LOCATION_SZONE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c98920183.effectfilter)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_DISEFFECT)
e5:SetRange(LOCATION_SZONE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c98920183.effectfilter)
c:RegisterEffect(e5)
--destroy
......
......@@ -62,7 +62,8 @@ function c9910626.matop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c9910626.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c9910626.thfilter(c)
return bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToHand()
......
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