Commit cf9ac98c authored by yxli's avatar yxli

Fix Everything

parent 20a265d1
No preview for this file type
101208081
101208082
101208083
101208084
101208085
101208086
101208087
101208088
101208089
101208090
101208091
101208092
101208093
101208094
101208095
101208096
101301007
101301008
101301009
101301010
101301011
101301012
101301013
101301014
101301015
101301016
101301017
101301018
101301019
101301020
101301021
101301022
101301023
101301024
101301025
101301026
101301027
101301028
101301029
101301030
101301031
101301032
101301033
101301034
101301035
101301036
101301037
101301038
101301039
101301040
101301041
101301042
101301043
101301044
101301045
101301046
101301047
101301048
101301049
101301050
101301051
101301052
101301053
101301054
101301055
101301056
101301057
101301058
101301059
101301060
101301061
101301062
101301063
101301064
101301065
101301066
101301067
101301068
101301069
101301070
101301071
101301072
101301073
101301074
101301075
101301076
101301077
101301078
101301079
101301080
\ No newline at end of file
...@@ -46,11 +46,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,11 +46,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.cfilter2(c) function s.cfilter2(c)
return c:IsRace(RACE_FAIRY) and c:IsReleasable() and c:GetOriginalLevel()>0 return c:IsRace(RACE_FAIRY) and c:IsReleasable() and c:GetLevel()>0
end end
function s.filter(c,e,tp,rg) function s.filter(c,e,tp,rg)
local lv=c:GetLevel() local lv=c:GetLevel()
return lv>0 and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and rg:CheckWithSumEqual(Card.GetOriginalLevel,lv,1,99) local lv0=e:GetHandler():GetLevel()
if lv>lv0 then
return lv>0 and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and rg:CheckWithSumEqual(Card.GetLevel,lv-lv0,1,99)
else
return true
end
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)
e:SetLabel(100) e:SetLabel(100)
...@@ -67,9 +72,13 @@ end ...@@ -67,9 +72,13 @@ end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsRace(RACE_FAIRY) return not c:IsRace(RACE_FAIRY)
end end
function s.cfilter3(g,c)
return g:IsContains(c)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(s.cfilter2,tp,LOCATION_MZONE,0,nil) local lv0=c:GetLevel()
local rg=Duel.GetMatchingGroup(s.cfilter2,tp,LOCATION_MZONE,0,c)
if chk==0 then if chk==0 then
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
...@@ -82,10 +91,10 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -82,10 +91,10 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
lvt[pc]=nil lvt[pc]=nil
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt)) local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
if lv>1 then if lv>lv0 then
local rg=Duel.GetMatchingGroup(s.cfilter2,tp,LOCATION_MZONE,0,c) local rg=Duel.GetMatchingGroup(s.cfilter2,tp,LOCATION_MZONE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectWithSumEqual(tp,Card.GetOriginalLevel,lv-1,1,99)+c local sg=rg:SelectWithSumEqual(tp,Card.GetLevel,lv-lv0,1,99)+c
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_COST)
else else
Duel.Release(c,REASON_COST) Duel.Release(c,REASON_COST)
......
...@@ -37,7 +37,7 @@ function s.spcon(e,c) ...@@ -37,7 +37,7 @@ function s.spcon(e,c)
and Duel.IsExistingMatchingCard(s.spfilter2,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(s.spfilter2,tp,0,LOCATION_MZONE,1,nil)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,true,REASON_SPSUMMON):Filter(s.spfilter,nil) local g=Duel.GetReleaseGroup(tp,true,REASON_SPSUMMON):Filter(s.spfilter,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1) local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if not tc then return false end if not tc then return false end
......
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,101208192,19899073,55397172) aux.AddCodeList(c,101208192,19899073,55397172)
--Activate --Activate
local e1=aux.AddRitualProcEqual2(c,s.spfilter,LOCATION_HAND+LOCATION_GRAVE,nil,s.mfilter,true) local e1=aux.AddRitualProcGreater2(c,s.spfilter,LOCATION_HAND+LOCATION_GRAVE,nil,s.mfilter,true)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
...@@ -27,14 +27,14 @@ function s.mfilter(c) ...@@ -27,14 +27,14 @@ function s.mfilter(c)
return c:IsRace(RACE_REPTILE) return c:IsRace(RACE_REPTILE)
end end
function s.cfilter(c) function s.cfilter(c)
return (c:IsType(TYPE_MONSTER) and not c:IsPreviousLocation(LOCATION_SZONE)) or c:IsPreviousLocation(LOCATION_MZONE) return (c:IsType(TYPE_MONSTER) and not c:IsPreviousLocation(LOCATION_SZONE) or c:IsPreviousLocation(LOCATION_MZONE))
and c:IsCode(101208192,19899073,55397172) and c:IsCode(101208192,19899073,55397172)
end end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp) function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil) and not eg:IsContains(e:GetHandler()) return eg:IsExists(s.cfilter,1,nil) and not eg:IsContains(e:GetHandler())
end end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -11,6 +11,7 @@ function s.initial_effect(c) ...@@ -11,6 +11,7 @@ function s.initial_effect(c)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetCondition(s.con)
e1:SetTarget(s.target1) e1:SetTarget(s.target1)
e1:SetOperation(s.activate1) e1:SetOperation(s.activate1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -21,13 +22,17 @@ function s.initial_effect(c) ...@@ -21,13 +22,17 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND) return c:IsRace(RACE_REPTILE)
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil) end if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil) local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function s.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp)
and chkc:IsFaceup() end and chkc:IsFaceup() end
......
...@@ -57,8 +57,9 @@ end ...@@ -57,8 +57,9 @@ end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and s.desfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and s.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1+e:GetLabel(),nil) local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1+e:GetLabel(),nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
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 c=e:GetHandler() local c=e:GetHandler()
......
...@@ -42,6 +42,17 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,6 +42,17 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(s.atktg)
e1:SetValue(1000)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.atktg(e,c)
return c:IsSetCard(0x1a4) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
...@@ -66,5 +77,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,5 +77,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function s.splimit(e,c) function s.splimit(e,c)
return c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) and not c:IsRace(RACE_MACHINE) return c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) and not c:IsSetCard(0x1a4)
end end
\ No newline at end of file
...@@ -38,18 +38,19 @@ function s.filter(c,e,tp) ...@@ -38,18 +38,19 @@ function s.filter(c,e,tp)
return c:IsCode(89631139) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(89631139) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE+LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE+LOCATION_DECK,0,3,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
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 g=Duel.GetMatchingGroup(s.chkfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.chkfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE+LOCATION_DECK,0,nil)
if not g:GetCount()>=3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local rg=g:Select(tp,3,3,nil) local rg=g:Select(tp,3,3,nil)
if rg:GetCount()>2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if rg:GetCount()>2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -74,7 +74,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)~=0 return e:GetHandler():GetFlagEffect(id)~=0
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x196) and c:IsAbleToHand() return not c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x196) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -130,7 +130,7 @@ function s.rspcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -130,7 +130,7 @@ function s.rspcost(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
end end
function s.rfilter(c) function s.rfilter(c)
return c:IsSetCard(0x197) and c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:CheckActivateEffect(false,true,false)~=nil return c:IsSetCard(0x197) and c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:CheckActivateEffect(false,true,false)~=nil and c:IsAbleToRemoveAsCost()
end end
function s.rsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.rsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then if chk==0 then
......
...@@ -56,7 +56,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsType(TYPE_SPIRIT) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x1bb) and c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
end end
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
...@@ -39,11 +39,11 @@ function s.cfilter(c) ...@@ -39,11 +39,11 @@ function s.cfilter(c)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFacedown() end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end and Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
...@@ -51,18 +51,18 @@ end ...@@ -51,18 +51,18 @@ 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 c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK) Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end end
end end
function s.cfilter(c) function s.cfilter1(c)
return c:IsFaceup() return c:IsFaceup()
end end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c13851202.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.cfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,s.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function s.atkop(e,tp,eg,ep,ev,re,r,rp) function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
...@@ -89,7 +89,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,7 +89,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end end
function s.poscon(e,tp,eg,ep,ev,re,r,rp) function s.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp return Duel.GetTurnPlayer()==tp
end end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) function s.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -47,6 +47,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,6 +47,7 @@ function s.thtg(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_DECK,0,1,nil) and c:IsAbleToDeck() end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
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()
...@@ -80,7 +81,7 @@ end ...@@ -80,7 +81,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()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c,tp,c) local g=Duel.SelectMatchingCard(tp,s.relfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
if Duel.Release(g,REASON_EFFECT)==0 then return end if Duel.Release(g,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -24,7 +24,6 @@ function s.initial_effect(c) ...@@ -24,7 +24,6 @@ function s.initial_effect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,id)
e4:SetCondition(s.spcon) e4:SetCondition(s.spcon)
e4:SetTarget(s.sptg) e4:SetTarget(s.sptg)
e4:SetOperation(s.spop) e4:SetOperation(s.spop)
...@@ -48,7 +47,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +47,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,TYPE_NORMAL) local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,TYPE_NORMAL)
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION) local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
return re:IsActiveType(TYPE_MONSTER) and(rc:IsLevelBelow(ct) or rc:IsRankBelow(ct) or rc:IsLinkBelow(ct)) return re:IsActiveType(TYPE_MONSTER) and (rc:IsLevelBelow(ct) or rc:IsRankBelow(ct) or rc:IsLinkBelow(ct))
and loc==LOCATION_MZONE and loc==LOCATION_MZONE
and Duel.IsExistingMatchingCard(s.disfilter,p,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(s.disfilter,p,0,LOCATION_MZONE,1,nil)
end end
...@@ -60,7 +59,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +59,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENCE)
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
...@@ -72,6 +71,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,6 +71,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end end
end end
...@@ -29,18 +29,18 @@ function s.initial_effect(c) ...@@ -29,18 +29,18 @@ function s.initial_effect(c)
e2:SetValue(s.immval) e2:SetValue(s.immval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET)
e2:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e2:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e2:SetCondition(s.descon) e3:SetCondition(s.descon)
e2:SetTarget(s.destg) e3:SetTarget(s.destg)
e2:SetOperation(s.desop) e3:SetOperation(s.desop)
c:RegisterEffect(e2) c:RegisterEffect(e3)
end end
function s.ffilter(c) function s.ffilter(c)
return c:IsFusionType(TYPE_NORMAL) return c:IsFusionType(TYPE_NORMAL)
......
...@@ -45,7 +45,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,7 +45,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=c:GetMaterial() local mg=c:GetMaterial()
if chk==0 then return mg:GetCount()>0 and mg:FilterCount(s.spfilter,nil,e,tp,c) if chk==0 then return mg:GetCount()>0 and mg:FilterCount(s.spfilter,nil,e,tp,c)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetTargetCard(mg) Duel.SetTargetCard(mg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg,1,0,0)
end end
...@@ -53,9 +52,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,9 +52,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=mg:Filter(Card.IsRelateToEffect,nil,e) local g=mg:Filter(Card.IsRelateToEffect,nil,e)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local sg=g:FilterSelect(tp,s.spfilter,1,1,nil,e,tp,e:GetHandler()) local sg=g:FilterSelect(tp,aux.NecroValleyFilter(s.spfilter),1,1,nil,e,tp,e:GetHandler())
local tc=sg:GetFirst() local tc=sg:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE) e1:SetCode(EFFECT_ADD_TYPE)
...@@ -71,13 +70,12 @@ function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -71,13 +70,12 @@ function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and aux.NecroValleyFilter(c) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function s.spop2(e,tp,eg,ep,ev,re,r,rp) function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then if c:IsRelateToEffect(e) and aux.NecroValleyFilter(c) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
...@@ -55,7 +55,7 @@ function s.lv_or_rk(c) ...@@ -55,7 +55,7 @@ function s.lv_or_rk(c)
end end
function s.xyzcon2(e,tp,eg,ep,ev,re,r,rp) function s.xyzcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) return c:IsRelateToBattle()
end end
function s.xyzop2(e,tp,eg,ep,ev,re,r,rp) function s.xyzop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -30,7 +30,7 @@ function s.initial_effect(c) ...@@ -30,7 +30,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id+o)
e3:SetTarget(s.destg) e3:SetTarget(s.destg)
e3:SetOperation(s.desop) e3:SetOperation(s.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -46,30 +46,30 @@ function s.setfilter(c) ...@@ -46,30 +46,30 @@ function s.setfilter(c)
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)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end
if chk==0 then return true end if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
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 and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) and aux.NecroValleyFilter(tc) then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
end end
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)
local ct=Duel.GetMatchingGroupCount(aux.TURE,tp,LOCATION_FZONE,LOCATION_FZONE,nil) local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,nil)
if chk==0 then return ct>0 end if chk==0 then return ct>0 end
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 ct=Duel.GetMatchingGroupCount(aux.TURE,tp,LOCATION_FZONE,LOCATION_FZONE,nil) local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,nil)
if ct==0 then return end if ct==0 then return end
local b1=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) local b1=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
local op=0 local op=0
op=aux.SelectFromOptions(tp, op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1}, {b1,aux.Stringid(id,1),1},
{true,aux.Stringid(id,2),2}, {true,aux.Stringid(id,2),2},
{b1,aux.Stringid(id,3),3}) {b1 and ct==2,aux.Stringid(id,3),3})
if op&1~=0 then if op&1~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
...@@ -79,7 +79,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
if op&2~=0 then if op&2~=0 then
if op&3~=3 then if op&3~=0 then
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.Damage(1-tp,1500,REASON_EFFECT) Duel.Damage(1-tp,1500,REASON_EFFECT)
......
--再世律 --再世律
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,22812963)
--remove --remove
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
...@@ -57,7 +58,7 @@ end ...@@ -57,7 +58,7 @@ 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.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return 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,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -30,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,s.stfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,s.stfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local p=0 local p=0
if tc:CheckUniqueOnField(tp) and (not tc:CheckUniqueOnField(1-tp) or not Duel.SelectYesNo(tp,aux.Stringid(id,2))) then if tc:CheckUniqueOnField(tp) and (not tc:CheckUniqueOnField(1-tp) or Duel.SelectYesNo(tp,aux.Stringid(id,2))) then
p=tp p=tp
else else
p=1-tp p=1-tp
......
...@@ -15,7 +15,7 @@ function s.initial_effect(c) ...@@ -15,7 +15,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1) e2:SetCountLimit(1,id+o)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
...@@ -100,7 +100,7 @@ function s.cfilter(c) ...@@ -100,7 +100,7 @@ function s.cfilter(c)
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x1b9) and c:IsLinkAbove(5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x1b9) and c:IsLevelAbove(5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
......
...@@ -26,7 +26,7 @@ function s.initial_effect(c) ...@@ -26,7 +26,7 @@ function s.initial_effect(c)
e3:SetCondition(s.lpcon) e3:SetCondition(s.lpcon)
e3:SetOperation(s.lpop) e3:SetOperation(s.lpop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--destroy --search
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2)) e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
...@@ -79,8 +79,8 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -79,8 +79,8 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
sg=g:Clone() sg=g:Clone()
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
else else
Duel.Hint(HINTMSG_DESTROY,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
sg=Duel.SelectTarget(tp,aux.IsInGroup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g) sg=Duel.SelectTarget(tp,aux.IsInGroup,tp,LOCATION_MZONE,0,1,1,nil,g)
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -34,12 +34,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,12 +34,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(s.aclimit) e1:SetValue(s.aclimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SUMMON_PROC) e2:SetCode(EFFECT_SUMMON_PROC)
...@@ -64,7 +58,7 @@ function s.ntcon(e,c,minc) ...@@ -64,7 +58,7 @@ function s.ntcon(e,c,minc)
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function s.nttg(e,c) function s.nttg(e,c)
return c:IsLevel(7) return c:IsLevelAbove(5)
end end
function s.costchange(e,re,rp,val) function s.costchange(e,re,rp,val)
if re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP) then if re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP) then
......
...@@ -31,7 +31,7 @@ function s.setfilter(c) ...@@ -31,7 +31,7 @@ function s.setfilter(c)
or c:GetBaseDefense()>0) or c:GetBaseDefense()>0)
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 g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if g:GetCount()>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
local tg=Duel.GetOperatedGroup() local tg=Duel.GetOperatedGroup()
...@@ -43,7 +43,10 @@ end ...@@ -43,7 +43,10 @@ end
function s.thfilter(c,e,tp) function s.thfilter(c,e,tp)
return c:IsPreviousControler(tp) return c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsCanBeEffectTarget(e) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function s.thfilter2(c,code)
return c:IsAbleToHand() and c:IsCode(code)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:FilterCount(s.thfilter,nil,e,tp)>0 end if chk==0 then return eg:FilterCount(s.thfilter,nil,e,tp)>0 end
...@@ -56,11 +59,14 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,11 +59,14 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
tg=eg:FilterSelect(tp,s.thfilter,1,1,nil,e,tp) tg=eg:FilterSelect(tp,s.thfilter,1,1,nil,e,tp)
end end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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 tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil,tc:GetCode()) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode())
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end end
end end
\ No newline at end of file
...@@ -72,7 +72,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function s.stfilter(c,tp) function s.stfilter(c,tp)
return c:IsCode(id) and c:IsType(TYPE_FIELD) and not c:IsForbidden() and c:CheckUniqueOnField(tp) return c:IsCanAddCounter(0x6e,1) and c:IsType(TYPE_FIELD) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_DECK,0,1,nil,tp) end
......
...@@ -16,7 +16,7 @@ function s.cfilter(c) ...@@ -16,7 +16,7 @@ function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1c5) return c:IsFaceup() and c:IsSetCard(0x1c5)
and g:IsExists(s.dfilter,1,nil) and g:IsExists(s.dfilter,1,nil)
end end
function s.cfilter(c) function s.dfilter(c)
if c:IsFaceup() then if c:IsFaceup() then
return aux.NegateAnyFilter(c) return aux.NegateAnyFilter(c)
elseif c:IsFacedown() then elseif c:IsFacedown() then
...@@ -25,7 +25,7 @@ function s.cfilter(c) ...@@ -25,7 +25,7 @@ function s.cfilter(c)
return false return false
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
end end
function s.dop(c,e) function s.dop(c,e)
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsCanBeDisabledByEffect(e,false) then if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsCanBeDisabledByEffect(e,false) 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