Commit fd8546e4 authored by Vury Leo's avatar Vury Leo

Merge branch 'master' into improve-Master-Peace-the-True-Dracoverlord

parents 1cfed1e4 584652d9
Pipeline #39226 failed with stages
in 2 minutes and 3 seconds
No preview for this file type
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
101302201 101302201
101302202 101302202
101302203 101302203
101302004
101302005
101302006 101302006
101302007 101302007
101302008 101302008
...@@ -14,6 +16,8 @@ ...@@ -14,6 +16,8 @@
101302015 101302015
101302016 101302016
101302017 101302017
101302018
101302019
101302020 101302020
101302021 101302021
101302022 101302022
...@@ -25,6 +29,8 @@ ...@@ -25,6 +29,8 @@
101302036 101302036
101302037 101302037
101302205 101302205
101302039
101302040
101302041 101302041
101302042 101302042
101302206 101302206
...@@ -33,8 +39,10 @@ ...@@ -33,8 +39,10 @@
101302046 101302046
101302207 101302207
101302050 101302050
101302051
101302053 101302053
101302208 101302208
101302055
101302056 101302056
101302057 101302057
101302058 101302058
...@@ -43,7 +51,9 @@ ...@@ -43,7 +51,9 @@
101302061 101302061
101302062 101302062
101302063 101302063
101302064
101302065 101302065
101302068
101302066 101302066
101302069 101302069
101302070 101302070
......
...@@ -13,14 +13,14 @@ function s.initial_effect(c) ...@@ -13,14 +13,14 @@ function s.initial_effect(c)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(s.spop) e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon2)
e2:SetCost(s.spcost2) e2:SetCost(s.spcost2)
e2:SetTarget(s.sptg2) e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2) e2:SetOperation(s.spop2)
...@@ -28,11 +28,12 @@ function s.initial_effect(c) ...@@ -28,11 +28,12 @@ function s.initial_effect(c)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() return c:IsFaceup()
and (aux.IsCodeListed(c,73580471) or c:IsCode(73580471) and (c:IsCode(73580471)
or c:IsRace(RACE_PLANT) and c:IsType(TYPE_SYNCHRO)) or aux.IsCodeListed(c,73580471) and c:IsType(TYPE_MONSTER)
or c:IsRace(RACE_PLANT) and c:IsAllTypes(TYPE_SYNCHRO+TYPE_MONSTER))
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(s.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
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
...@@ -48,19 +49,16 @@ end ...@@ -48,19 +49,16 @@ end
function s.cfilter2(c) function s.cfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
end end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsDefenseBelow(1500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_PLANT) and c:IsDefenseBelow(1500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
...@@ -83,4 +81,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,4 +81,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
end end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA) return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end end
\ No newline at end of file
...@@ -4,7 +4,7 @@ function s.initial_effect(c) ...@@ -4,7 +4,7 @@ function s.initial_effect(c)
aux.AddCodeList(c,73580471) aux.AddCodeList(c,73580471)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
...@@ -54,12 +54,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,12 +54,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
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_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
...@@ -67,16 +69,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,16 +69,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp) function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsType),tp,LOCATION_MZONE,0,1,nil,TYPE_SYNCHRO) local p=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsType),p,LOCATION_MZONE,0,1,nil,TYPE_SYNCHRO)
end end
function s.lvfilter(c) function s.lvfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsRace(RACE_PLANT) return c:IsFaceup() and c:IsLevelAbove(1) and c:IsRace(RACE_PLANT)
end end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc~=c and s.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,c)
end end
function s.lvop(e,tp,eg,ep,ev,re,r,rp) function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -85,8 +89,8 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,8 +89,8 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local op=0 local op=0
if tc:IsLevel(1) then op=1 if tc:IsLevel(1) then op=1
else op=aux.SelectFromOptions(tp, else op=aux.SelectFromOptions(tp,
{true,aux.Stringid(id,3),1}, {true,aux.Stringid(id,2),1},
{true,aux.Stringid(id,4),-1}) {true,aux.Stringid(id,3),-1})
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -95,4 +99,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,4 +99,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(op) e1:SetValue(op)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
--真竜魔王マスター --真竜魔王マスターP
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--summon with s/t --summon with s/t
...@@ -77,13 +77,14 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,13 +77,14 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function s.negop(e,tp,eg,ep,ev,re,r,rp) function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToChain(ev) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
function s.tpcon(e,tp,eg,ep,ev,re,r,rp) function s.tpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) and c:IsSummonType(SUMMON_TYPE_ADVANCE))) return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp)))
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end end
-- guard for "next opponent turn" skips of Main 1 -- guard for "next opponent turn" skips of Main 1
......
--真竜凰騎マリアムネ --真竜凰騎マリアムネP
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--summon with s/t --summon with s/t
...@@ -14,12 +14,9 @@ function s.initial_effect(c) ...@@ -14,12 +14,9 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCondition(s.spscon)
e2:SetTarget(s.spstg) e2:SetTarget(s.spstg)
e2:SetOperation(s.spsop) e2:SetOperation(s.spsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -38,16 +35,15 @@ function s.initial_effect(c) ...@@ -38,16 +35,15 @@ function s.initial_effect(c)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.spscon(e,tp,eg,ep,ev,re,r,rp) function s.desfilter(c,tp,sc,e,chk)
local ph=Duel.GetCurrentPhase() return c:IsFaceupEx() and c:IsSetCard(0xf9) and
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 (not chk
end or Duel.GetMZoneCount(tp,c)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false)
function s.desfilter(c,tp) or Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp))
return c:IsFaceupEx() and c:IsSetCard(0xf9) and (Duel.GetMZoneCount(tp,c)>0 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
end end
function s.spstg(e,tp,eg,ep,ev,re,r,rp,chk) function s.spstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,c,e,true)
if chk==0 then return #g>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return #g>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
...@@ -55,7 +51,16 @@ end ...@@ -55,7 +51,16 @@ end
function s.spsop(e,tp,eg,ep,ev,re,r,rp) function s.spsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,aux.ExceptThisCard(e),tp) local dg=nil
if Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,aux.ExceptThisCard(e),tp,c,e,true) then
dg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,aux.ExceptThisCard(e),tp,c,e,true)
else
dg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,aux.ExceptThisCard(e),tp,c,e,false)
end
local g=dg:Select(tp,1,1,aux.ExceptThisCard(e))
if g:FilterCount(Card.IsLocation,nil,LOCATION_ONFIELD)>0 then
Duel.HintSelection(g)
end
if Duel.Destroy(g,REASON_EFFECT)>0 then if Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.AdjustAll() Duel.AdjustAll()
if not c:IsRelateToChain() or (not c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)) then return end if not c:IsRelateToChain() or (not c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)) then return end
...@@ -74,7 +79,7 @@ function s.spsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +79,7 @@ function s.spsop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp) function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsSummonLocation(LOCATION_HAND) return e:GetHandler():IsSummonLocation(LOCATION_HAND)
end end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -85,4 +90,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,4 +90,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetDecktopGroup(tp,4) local rg=Duel.GetDecktopGroup(tp,4)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -60,7 +60,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
for tc in aux.Next(g) do for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
...@@ -69,11 +69,11 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,11 +69,11 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
end end
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.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.IsMainPhase()
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)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 end if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST) Duel.Release(c,REASON_COST)
end end
function s.spfilter(c,e,tp,sc) function s.spfilter(c,e,tp,sc)
...@@ -94,7 +94,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,7 +94,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.spfilter2(c,e,tp) function s.spfilter2(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsType(TYPE_TUNER) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -108,4 +108,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,4 +108,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
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
end end
\ No newline at end of file
...@@ -16,7 +16,7 @@ function s.initial_effect(c) ...@@ -16,7 +16,7 @@ function s.initial_effect(c)
e1:SetTarget(s.tgtg) e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop) e1:SetOperation(s.tgop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--battle indestructable --indestructable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
...@@ -26,18 +26,18 @@ function s.initial_effect(c) ...@@ -26,18 +26,18 @@ function s.initial_effect(c)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --
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_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o) e3:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon) e3:SetCondition(s.spcon)
e2:SetTarget(s.sptg) e3:SetTarget(s.sptg)
e2:SetOperation(s.spop) e3:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e3)
end end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp) function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
...@@ -57,7 +57,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,nil)
aux.GCheckAdditional=s.lncheck aux.GCheckAdditional=s.lncheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,2,2) local sg=g:SelectSubGroup(tp,aux.TRUE,false,1,2)
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
...@@ -92,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -19,7 +19,7 @@ function s.initial_effect(c) ...@@ -19,7 +19,7 @@ function s.initial_effect(c)
--pos --pos
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_POSITION)
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_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
...@@ -45,7 +45,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
aux.GCheckAdditional=aux.dncheck aux.GCheckAdditional=aux.dncheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,2,2) local sg=g:SelectSubGroup(tp,aux.TRUE,false,2,2)
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
if sg:GetCount()>0 then if sg and sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -72,7 +72,7 @@ function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -72,7 +72,7 @@ function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.posop(e,tp,eg,ep,ev,re,r,rp) function s.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then if tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end end
end end
\ No newline at end of file
...@@ -4,7 +4,7 @@ function s.initial_effect(c) ...@@ -4,7 +4,7 @@ function s.initial_effect(c)
aux.AddCodeList(c,73580471) aux.AddCodeList(c,73580471)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
...@@ -19,22 +19,22 @@ function s.initial_effect(c) ...@@ -19,22 +19,22 @@ function s.initial_effect(c)
e2:SetValue(RACE_PLANT) e2:SetValue(RACE_PLANT)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--damage --damage
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_DAMAGE) e3:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e2:SetTarget(s.damtg) e3:SetTarget(s.damtg)
e2:SetOperation(s.damop) e3:SetOperation(s.damop)
c:RegisterEffect(e2) c:RegisterEffect(e3)
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x1123) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x1123) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
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(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
...@@ -65,4 +65,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,4 +65,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
dam=dam+2400 dam=dam+2400
end end
Duel.Damage(p,dam,REASON_EFFECT) Duel.Damage(p,dam,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -76,4 +76,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,4 +76,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -7,12 +7,13 @@ function s.initial_effect(c) ...@@ -7,12 +7,13 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x14d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return not c:IsCode(id) and c:IsSetCard(0x14d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsSetCard(0x14d) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x14d) and c:IsAbleToRemoveAsCost()
...@@ -25,7 +26,6 @@ function s.spfilter(c,e,tp) ...@@ -25,7 +26,6 @@ function s.spfilter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
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)
local ch=Duel.GetCurrentChain()
local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
and (not e:IsCostChecked() and (not e:IsCostChecked()
or Duel.GetFlagEffect(tp,id)==0) or Duel.GetFlagEffect(tp,id)==0)
...@@ -33,8 +33,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,8 +33,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
local _,maxlink=tg:GetMaxGroup(Card.GetLink) local _,maxlink=tg:GetMaxGroup(Card.GetLink)
local b2=cg:CheckSubGroup(s.fselect,1,maxlink,tg) local b2=cg:CheckSubGroup(s.fselect,1,maxlink,tg)
and (not e:IsCostChecked() and Duel.GetFlagEffect(tp,id+o)==0
or Duel.GetFlagEffect(tp,id+o)==0)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=0 local op=0
if b1 or b2 then if b1 or b2 then
...@@ -67,17 +66,18 @@ end ...@@ -67,17 +66,18 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local op,lk=e:GetLabel() local op,lk=e:GetLabel()
if op==1 then if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
elseif op==2 then elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk) local g=Duel.SelectMatchingCard(tp,s.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -91,4 +91,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,4 +91,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function s.splimit(e,c) function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST)
end end
\ No newline at end of file
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