Commit 12301ce4 authored by Tachibana's avatar Tachibana

eme

parent 8fef675f
Pipeline #8616 passed with stages
in 33 minutes and 32 seconds
......@@ -3,9 +3,18 @@ local m=13254039
local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c)
--inferno
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--[[
--inferno
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -16,7 +25,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--typhoon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -27,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
--goldrush
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
......@@ -35,10 +44,104 @@ function cm.initial_effect(c)
e3:SetTarget(cm.target2)
e3:SetOperation(cm.operation2)
c:RegisterEffect(e3)
]]
elements={{"tama_elements",{{TAMA_ELEMENT_WIND,1},{TAMA_ELEMENT_MANA,1}}}}
cm[c]=elements
end
function cm.cfilter(c)
return #(tama.tamas_getElements(c))~=0 and c:IsAbleToDeckAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
if chk==0 then return g:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,g:GetCount(),nil)
Duel.SendtoDeck(sg,tp,2,REASON_COST)
local index=tama.save(tama.tamas_sumElements(sg))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
e1:SetOperation(function (e,tp,eg,ep,ev,re,r,rp)
return tama.removeObj(index)
end)
Duel.RegisterEffect(e1,tp)
e:SetLabel(index)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local index=e:GetLabel()
local obj={}
if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_FIRE,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,1))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DESTROY))
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_WATER,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_REMOVE))
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE)
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_EARTH,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,3))
local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ht1=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW))
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ht1-ht)
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,4))
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,5))
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local index=e:GetLabel()
local obj={}
local broken=false
if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_FIRE,2}},obj) then
if broken then Duel.BreakEffect() end
local ct=2
if tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then ct=4 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local eg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil)
if eg:GetCount()>0 then
Duel.Destroy(eg,REASON_EFFECT)
end
broken=true
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_WATER,2}},obj) then
if broken then Duel.BreakEffect() end
local ct=2
if tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then ct=4 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local eg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,ct,nil)
if eg:GetCount()>0 then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
broken=true
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_EARTH,2}},obj) then
if broken then Duel.BreakEffect() end
local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ht1=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if ht<ht1 then
Duel.Draw(tp,ht1-ht,REASON_EFFECT)
end
broken=true
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
--[[
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_WIND,4},{TAMA_ELEMENT_FIRE,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
......@@ -114,3 +217,4 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(p,ht1-ht,REASON_EFFECT)
end
end
]]
......@@ -3,6 +3,15 @@ local m=13254043
local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--[[
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -10,7 +19,6 @@ function cm.initial_effect(c)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--steam
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
......@@ -19,10 +27,79 @@ function cm.initial_effect(c)
e2:SetCost(cm.cost1)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2)
]]
elements={{"tama_elements",{{TAMA_ELEMENT_ORDER,1},{TAMA_ELEMENT_MANA,1}}}}
cm[c]=elements
end
function cm.cfilter(c)
return #(tama.tamas_getElements(c))~=0 and c:IsAbleToDeckAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
if chk==0 then return g:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,g:GetCount(),nil)
Duel.SendtoDeck(sg,tp,2,REASON_COST)
local index=tama.save(tama.tamas_sumElements(sg))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
e1:SetOperation(function (e,tp,eg,ep,ev,re,r,rp)
return tama.removeObj(index)
end)
Duel.RegisterEffect(e1,tp)
e:SetLabel(index)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local index=e:GetLabel()
local obj={}
if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,1))
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,1}},obj) and (tama.tamas_getElementCount(obj,TAMA_ELEMENT_WIND)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_WATER)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_EARTH)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_FIRE))>=1 then
Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW))
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,3))
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local index=e:GetLabel()
local obj={}
local broken=false
if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
if broken then Duel.BreakEffect() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x356))
e1:SetValue(cm.efilter)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
broken=true
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,1}},obj) and (tama.tamas_getElementCount(obj,TAMA_ELEMENT_WIND)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_WATER)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_EARTH)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_FIRE))>=1 then
if broken then Duel.BreakEffect() end
Duel.Draw(tp,1,REASON_EFFECT)
broken=true
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--[[
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_ORDER,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
......@@ -67,3 +144,4 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+EVENT_CHAIN_END)
Duel.RegisterEffect(e3,tp)
end
]]
......@@ -3,6 +3,15 @@ local m=13254044
local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--[[
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -18,10 +27,79 @@ function cm.initial_effect(c)
e2:SetCost(cm.cost1)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2)
]]
elements={{"tama_elements",{{TAMA_ELEMENT_CHAOS,1},{TAMA_ELEMENT_MANA,1}}}}
cm[c]=elements
end
function cm.cfilter(c)
return #(tama.tamas_getElements(c))~=0 and c:IsAbleToDeckAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
if chk==0 then return g:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,g:GetCount(),nil)
Duel.SendtoDeck(sg,tp,2,REASON_COST)
local index=tama.save(tama.tamas_sumElements(sg))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
e1:SetOperation(function (e,tp,eg,ep,ev,re,r,rp)
return tama.removeObj(index)
end)
Duel.RegisterEffect(e1,tp)
e:SetLabel(index)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local index=e:GetLabel()
local obj={}
if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,1))
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,1}},obj) and (tama.tamas_getElementCount(obj,TAMA_ELEMENT_WIND)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_WATER)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_EARTH)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_FIRE))>=1 then
Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW))
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,3))
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local index=e:GetLabel()
local obj={}
local broken=false
if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
if broken then Duel.BreakEffect() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
broken=true
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,1}},obj) and (tama.tamas_getElementCount(obj,TAMA_ELEMENT_WIND)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_WATER)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_EARTH)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_FIRE))>=1 then
if broken then Duel.BreakEffect() end
Duel.Draw(tp,1,REASON_EFFECT)
broken=true
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--[[
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_CHAOS,3}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
......@@ -71,3 +149,4 @@ function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
)
end
end
]]
......@@ -31,19 +31,19 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local sg1=Duel.GetOperatedGroup()
if sg1:GetCount()<=0 then return end
local j=1
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ORDER)>=2 then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1))
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ORDER)>=1 then
Duel.SelectOption(tp,aux.Stringid(m,1))
j=j+1
end
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND))>=2 then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2))
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND))>=1 then
Duel.SelectOption(tp,aux.Stringid(m,2))
for i=1,j do
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_EARTH)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY))>=2 and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,3))
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_EARTH)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY))>=1 and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then
Duel.SelectOption(tp,aux.Stringid(m,3))
for i=1,j do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
......@@ -55,8 +55,8 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_FIRE)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY))>=2 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,4))
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_FIRE)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY))>=1 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then
Duel.SelectOption(tp,aux.Stringid(m,4))
for i=1,j do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
......@@ -69,22 +69,24 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_LIFE)>=1 then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,5))
Duel.SelectOption(tp,aux.Stringid(m,5))
for i=1,j do
Duel.BreakEffect()
Duel.Recover(tp,1000,REASON_EFFECT)
end
end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_CHAOS)>=2 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,6))
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_CHAOS)>=1 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 then
Duel.SelectOption(tp,aux.Stringid(m,6))
Duel.ConfirmCards(tp,g)
for i=1,j do
local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_DECK,1,1,nil)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
end
end
Duel.ShuffleDeck(1-tp)
......
......@@ -23,7 +23,7 @@ function cm.initial_effect(c)
end
function cm.fselect(g,tp)
return g:IsExists(cm.tdfilter,1,nil) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tama.tamas_sumElements(g))
return g:IsExists(cm.tdfilter,1,nil) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,tama.tamas_sumElements(g))
end
function cm.tdfilter(c)
return #tama.tamas_getElements(c)>0 and c:IsAbleToDeck()
......
......@@ -2,12 +2,7 @@
local m=24865321
local cm=_G["c"..m]
function c24865321.initial_effect(c)
e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865321,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
......
......@@ -13,7 +13,7 @@ function c9300004.initial_effect(c)
end
function c9300004.filter1(c,e,tp)
local lv=c:GetLevel()
return c:IsFaceup() and c:IsLevelAbove(2) and lv()%2==0
return c:IsFaceup() and c:IsLevelAbove(2) and lv%2==0
and Duel.IsExistingMatchingCard(c9300004.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,lv,c:GetRace(),c:GetAttribute())
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
......@@ -32,8 +32,8 @@ end
function c9300004.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local lv=tc:GetLevel()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) or not lv()%2==0 then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) or lv%2~=0
or tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9300004.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,lv,tc:GetRace(),tc:GetAttribute())
local sc=g:GetFirst()
......
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