Commit 60b6c51d authored by Tachibana's avatar Tachibana

得得得得得

parent 1f1aa31c
Pipeline #12543 passed with stages
in 20 minutes and 20 seconds
expansions/pics/13254072.jpg

12.5 KB | W: | H:

expansions/pics/13254072.jpg

11.4 KB | W: | H:

expansions/pics/13254072.jpg
expansions/pics/13254072.jpg
expansions/pics/13254072.jpg
expansions/pics/13254072.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
cm[c]=elements
end
function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_WIND) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2))
return tama.tamas_isExistElement(c,TAMA_ELEMENT_WIND) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
cm[c]=elements
end
function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_EARTH) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2))
return tama.tamas_isExistElement(c,TAMA_ELEMENT_EARTH) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
......@@ -28,7 +28,7 @@ function cm.initial_effect(c)
end
function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_WATER) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2))
return tama.tamas_isExistElement(c,TAMA_ELEMENT_WATER) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
......@@ -28,7 +28,7 @@ function cm.initial_effect(c)
end
function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_FIRE) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2))
return tama.tamas_isExistElement(c,TAMA_ELEMENT_FIRE) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
......@@ -27,7 +27,7 @@ function cm.initial_effect(c)
end
function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_ORDER) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2))
return tama.tamas_isExistElement(c,TAMA_ELEMENT_ORDER) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
......@@ -28,7 +28,7 @@ function cm.initial_effect(c)
end
function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_CHAOS) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2))
return tama.tamas_isExistElement(c,TAMA_ELEMENT_CHAOS) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
......@@ -3,9 +3,18 @@ local m=13254040
local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c)
--blast
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)
--[[
--blast
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -15,7 +24,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--tornado
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
......@@ -25,7 +34,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
--flow
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
......@@ -33,10 +42,180 @@ function cm.initial_effect(c)
e3:SetTarget(cm.target2)
e3:SetOperation(cm.operation2)
c:RegisterEffect(e3)
]]
elements={{"tama_elements",{{TAMA_ELEMENT_EARTH,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_EARTH,2},{TAMA_ELEMENT_WIND,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,1))
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
local g1=g:Filter(Card.IsCanTurnSet,nil)
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_POSITION))
Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,g1:GetCount(),0,0)
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_EARTH,3},{TAMA_ELEMENT_FIRE,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DESTROY))
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_EARTH,3},{TAMA_ELEMENT_WATER,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,3))
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
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
local order_e=false
local chaos_e=false
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
order_e=true
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
chaos_e=true
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_EARTH,2},{TAMA_ELEMENT_WIND,2}},obj) then
if broken then Duel.BreakEffect() end
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_ONFIELD,nil)
local sg=g:Filter(Card.IsLocation,nil,LOCATION_SZONE+LOCATION_FZONE)
g:Sub(sg)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
if sg:GetCount()>0 then
local tc=sg:GetFirst()
while tc do
tc:CancelToGrave()
tc=sg:GetNext()
end
Duel.ChangePosition(sg,POS_FACEDOWN)
Duel.RaiseEvent(sg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
broken=true
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_EARTH,3},{TAMA_ELEMENT_FIRE,2}},obj) then
if broken then Duel.BreakEffect() end
local sg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if sg:GetCount()==0 then return end
local limit=5
if order_e then limit=6 end
local g=Group.CreateGroup()
if Duel.SelectYesNo(tp,aux.Stringid(m,6)) then
local tc=sg:GetFirst()
while tc do
local dg=Group.CreateGroup()
dg:AddCard(tc)
Duel.HintSelection(dg)
local d1=Duel.TossDice(tp,1)
if d1<limit then
g:AddCard(tc)
end
tc=sg:GetNext()
end
else
while sg:GetCount()>0 do
local dg=sg:Select(tp,1,1,nil)
Duel.HintSelection(dg)
sg:Sub(dg)
local d1=Duel.TossDice(tp,1)
if d1<limit then
g:Merge(dg)
end
end
end
if g:GetCount()>0 then
if chaos_e then
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
tc=g:GetNext()
end
end
local ct=Duel.Destroy(g,REASON_EFFECT)
if chaos_e then
local tc=g:GetFirst()
while tc do
if tc:GetFlagEffect(m)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOGRAVE)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOGRAVE)
tc:RegisterEffect(e2)
end
tc=g:GetNext()
end
end
Duel.Draw(tp,ct,REASON_EFFECT)
end
broken=true
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_EARTH,3},{TAMA_ELEMENT_WATER,2}},obj) and Duel.IsPlayerCanRemove(tp) then
if broken then Duel.BreakEffect() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_RULE)~=0 then
local tc=g:GetFirst()
if chaos_e then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_REMOVE)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_REMOVE)
tc:RegisterEffect(e2)
end
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_EARTH,2},{TAMA_ELEMENT_WIND,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
......@@ -140,3 +319,4 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
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