Commit db2f1e7e authored by Nemo Ma's avatar Nemo Ma

add tama card

parent 5cff20f1
expansions/pics/13257224.jpg

42.5 KB | W: | H:

expansions/pics/13257224.jpg

42.5 KB | W: | H:

expansions/pics/13257224.jpg
expansions/pics/13257224.jpg
expansions/pics/13257224.jpg
expansions/pics/13257224.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/13257229.jpg

47 KB | W: | H:

expansions/pics/13257229.jpg

47.3 KB | W: | H:

expansions/pics/13257229.jpg
expansions/pics/13257229.jpg
expansions/pics/13257229.jpg
expansions/pics/13257229.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.target1)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2)
elements={"tama_elements",{{13254031,1}}}
elements={"tama_elements",{{TAMA_ELEMENT_WIND,1}}}
cm[c]=elements
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -38,7 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,ct,REASON_EFFECT)
end
function cm.elementsFilter(c)
return c:IsAbleToDeckAsCost() and tama.tamas_isExistElement(c,13254031)
return c:IsAbleToDeckAsCost() and tama.tamas_isExistElement(c,TAMA_ELEMENT_WIND)
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
--[[
......@@ -57,7 +57,7 @@ function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.SendtoDeck(sg,nil,2,REASON_COST)]]
local el={{13254031,2}}
local el={{TAMA_ELEMENT_WIND,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.target1)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2)
elements={"tama_elements",{{13254032,1}}}
elements={"tama_elements",{{TAMA_ELEMENT_EARTH,1}}}
cm[c]=elements
end
function cm.spfilter(c,e,tp)
......@@ -32,50 +32,24 @@ function cm.spfilter(c,e,tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local loc=LOCATION_ONFIELD
if ft==0 then loc=LOCATION_MZONE end
return Duel.IsExistingMatchingCard(nil,tp,loc,0,1,nil)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.filter(c,ft)
return ft>0 or c:IsLocation(LOCATION_MZONE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft1<-1 then return end
local ft=ft1
if ft1<=1 then
ft1=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
ft1=ft1+ft
end
if ft1<0 then return end
if ft1>2 then ft1=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft1=1 end
local i=1
local sg=Group.CreateGroup()
while i<=ft1 and Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_ONFIELD,0,sg,ft) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD,0,1,1,sg,ft)
if g1:GetFirst():IsLocation(LOCATION_ONFIELD) then
ft=ft-1
end
sg:Merge(g1)
i=i+1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,2,nil)
local ct=Duel.SendtoGrave(sg,REASON_EFFECT)
if ct>0 and ct<=Duel.GetLocationCount(tp,LOCATION_MZONE) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,ct,ct,nil,e,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,ct,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254032,2}}
local el={{TAMA_ELEMENT_EARTH,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.target1)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2)
elements={"tama_elements",{{13254033,1}}}
elements={"tama_elements",{{TAMA_ELEMENT_WATER,1}}}
cm[c]=elements
end
......@@ -50,7 +50,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254033,2}}
local el={{TAMA_ELEMENT_WATER,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.target1)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2)
elements={"tama_elements",{{13254034,1}}}
elements={"tama_elements",{{TAMA_ELEMENT_FIRE,1}}}
cm[c]=elements
end
......@@ -66,7 +66,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254034,2}}
local el={{TAMA_ELEMENT_FIRE,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
e2:SetCost(cm.cost1)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2)
elements={"tama_elements",{{13254035,1}}}
elements={"tama_elements",{{TAMA_ELEMENT_ORDER,1}}}
cm[c]=elements
end
......@@ -35,7 +35,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp)
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254035,2}}
local el={{TAMA_ELEMENT_ORDER,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
e2:SetCost(cm.cost1)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2)
elements={"tama_elements",{{13254036,1}}}
elements={"tama_elements",{{TAMA_ELEMENT_CHAOS,1}}}
cm[c]=elements
end
......@@ -51,7 +51,7 @@ function cm.distg(e,c)
return c:IsFacedown()
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254036,2}}
local el={{TAMA_ELEMENT_CHAOS,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -38,7 +38,7 @@ function cm.initial_effect(c)
e4:SetTarget(cm.remtg)
e4:SetOperation(cm.remop)
c:RegisterEffect(e4)
elements={"tama_sub_elements",{{13254031,1},{13254032,1},{13254033,1},{13254034,1},{13254035,1},{13254036,1}}}
elements={"tama_sub_elements",{{TAMA_ELEMENT_WIND,1},{TAMA_ELEMENT_EARTH,1},{TAMA_ELEMENT_WATER,1},{TAMA_ELEMENT_FIRE,1},{TAMA_ELEMENT_ORDER,1},{TAMA_ELEMENT_CHAOS,1}}}
cm[c]=elements
end
......@@ -94,7 +94,7 @@ function cm.smop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254031,1},{13254032,1},{13254033,1},{13254034,1},{13254035,1},{13254036,1}}
local el={{TAMA_ELEMENT_WIND,1},{TAMA_ELEMENT_EARTH,1},{TAMA_ELEMENT_WATER,1},{TAMA_ELEMENT_FIRE,1},{TAMA_ELEMENT_ORDER,1},{TAMA_ELEMENT_CHAOS,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -43,20 +43,20 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local sg1=Duel.GetOperatedGroup()
local sg2=sg1:Clone()
if sg1:GetCount()>0 then
if sg1:GetSum(tama.tamas_getElementCount,13254033)>0 and Duel.IsPlayerCanDiscardDeck(tp,3) then
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)>0 and Duel.IsPlayerCanDiscardDeck(tp,3) then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.DiscardDeck(tp,3,REASON_EFFECT)
sg2:Merge(Duel.GetOperatedGroup())
end
if sg1:GetSum(tama.tamas_getElementCount,13254031)>0 and Duel.IsPlayerCanDraw(tp,2) then
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND)>0 and Duel.IsPlayerCanDraw(tp,2) then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,2,2,REASON_EFFECT+REASON_DISCARD)
sg2:Merge(Duel.GetOperatedGroup())
end
if sg1:GetSum(tama.tamas_getElementCount,13254036)>0 and sg2:IsExists(cm.filter2,1,nil) then
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_CHAOS)>0 and sg2:IsExists(cm.filter2,1,nil) then
local sg3=sg2:Filter(cm.filter2,nil)
local ct=sg3:GetCount()
Duel.BreakEffect()
......
......@@ -38,7 +38,7 @@ function cm.initial_effect(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254031,2},{13254034,1}}
local el={{TAMA_ELEMENT_WIND,2},{TAMA_ELEMENT_FIRE,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -66,7 +66,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254031,2},{13254033,1}}
local el={{TAMA_ELEMENT_WIND,2},{TAMA_ELEMENT_WATER,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -94,7 +94,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254031,2},{13254032,2}}
local el={{TAMA_ELEMENT_WIND,2},{TAMA_ELEMENT_EARTH,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254032,2},{13254031,1}}
local el={{TAMA_ELEMENT_EARTH,2},{TAMA_ELEMENT_WIND,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -59,7 +59,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(sg,tp,2,REASON_EFFECT)
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254032,1},{13254034,1}}
local el={{TAMA_ELEMENT_EARTH,1},{TAMA_ELEMENT_FIRE,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -104,7 +104,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254032,2},{13254033,1}}
local el={{TAMA_ELEMENT_EARTH,2},{TAMA_ELEMENT_WATER,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254033,2},{13254031,1}}
local el={{TAMA_ELEMENT_WATER,2},{TAMA_ELEMENT_WIND,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -65,7 +65,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254033,1},{13254034,1}}
local el={{TAMA_ELEMENT_WATER,1},{TAMA_ELEMENT_FIRE,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -94,7 +94,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254033,3},{13254032,2}}
local el={{TAMA_ELEMENT_WATER,3},{TAMA_ELEMENT_EARTH,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254034,2},{13254031,1}}
local el={{TAMA_ELEMENT_FIRE,2},{TAMA_ELEMENT_WIND,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -55,7 +55,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(sg,REASON_EFFECT)
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254034,3},{13254033,2}}
local el={{TAMA_ELEMENT_FIRE,3},{TAMA_ELEMENT_WATER,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -78,7 +78,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(sg,tp,2,REASON_EFFECT)
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254034,2},{13254032,1}}
local el={{TAMA_ELEMENT_FIRE,2},{TAMA_ELEMENT_EARTH,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -89,7 +89,7 @@ function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
--attack up
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
......
......@@ -22,7 +22,7 @@ function cm.initial_effect(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254035,1}}
local el={{TAMA_ELEMENT_ORDER,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -46,7 +46,7 @@ function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254035,2}}
local el={{TAMA_ELEMENT_ORDER,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -21,7 +21,7 @@ function cm.initial_effect(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254036,1}}
local el={{TAMA_ELEMENT_CHAOS,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......@@ -45,7 +45,7 @@ function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{13254036,2}}
local el={{TAMA_ELEMENT_CHAOS,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
......
......@@ -63,7 +63,7 @@ function cm.tdfilter1(c)
return c:IsSetCard(0x3356) and c:IsAbleToDeckAsCost()
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter1,tp,LOCATION_HAND,0,2,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter1,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter1,tp,LOCATION_HAND,0,1,2,nil)
Duel.ConfirmCards(1-tp,g)
......
--纯净魔能
local m=13254047
local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
elements={"tama_elements",{{TAMA_ELEMENT_MANA,2}}}
cm[c]=elements
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
--魔能飞球
local m=13254048
local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c)
--cannot special summon
local e11=Effect.CreateEffect(c)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_SPSUMMON_CONDITION)
e11:SetValue(aux.FALSE)
c:RegisterEffect(e11)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,13254048)
e2:SetCost(cm.thcost1)
e2:SetTarget(cm.thtg1)
e2:SetOperation(cm.thop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,13254048)
e3:SetCost(cm.thcost1)
e3:SetTarget(cm.thtg1)
e3:SetOperation(cm.thop1)
c:RegisterEffect(e3)
elements={"tama_elements",{{TAMA_ELEMENT_MANA,1}}}
cm[c]=elements
end
function cm.cfilter(c)
return c:IsCode(13254047) and c:IsDiscardable()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,nil)
e:SetLabel(g:GetFirst():GetAttack())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function cm.thfilter(c)
return c:IsSetCard(0x356) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function cm.thcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_MANA,4}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
return mg:GetCount()>0 and mg:IsExists(tama.tamas_selectElementsForAbove,1,nil,mg,sg,el)
end
local sg=tama.tamas_selectAllSelectForAbove(mg,el,tp)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function cm.thfilter1(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop1(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(cm.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--不存于世的能量
local m=13254049
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:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(13254048)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.thfilter(c)
return c:IsCode(13254047) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.cfilter1(c)
return c:IsCode(13254047) and not c:IsPublic()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.cfilter1,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function cm.spfilter(c,e,tp)
return c:IsCode(13254048) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end
--魔能阵·纯净魔力召唤术
local m=13254051
local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(m,1))
e3:SetCost(cm.cost)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(13254048)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_MANA,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local sg=Group.CreateGroup()
if chk==0 then
return mg:GetCount()>0 and mg:IsExists(tama.tamas_selectElementsForAbove,1,nil,mg,sg,el)
end
local sg=tama.tamas_selectAllSelectForAbove(mg,el,tp)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x356) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if eg:GetFirst():GetReasonCard()==e:GetHandler() then
local tc=eg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabelObject(tc)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
tc=eg:GetNext()
end
end
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabelObject()==c and se:GetHandler():IsCode(e:GetOwner():GetCode())
end
......@@ -91,7 +91,8 @@ function cm.acop(e,tp,eg,ep,ev,re,r,rp)
local ct=ec:GetFlagEffectLabel(13257200)
if ct==nil then ct=0 end
if ct>0 then
ct=math.floor(math.sqrt(ct))
--ct=math.floor(math.sqrt(ct))
ct=math.ceil(ct/2)
e:GetHandler():AddCounter(0x354,ct)
end
end
......
......@@ -65,7 +65,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil
return at:GetControler()~=tp and (Duel.GetAttackTarget()==nil or Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,0,1,nil))
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local at=Duel.GetAttacker()
......
--宇宙惑星要塞-巴克特利安
local m=13257234
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Effect Draw
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
e2:SetValue(4)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCategory(CATEGORY_TODECK)
e3:SetCode(EVENT_TO_HAND)
e3:SetRange(LOCATION_FZONE)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetTarget(cm.splimit)
c:RegisterEffect(e4)
--cannot trigger
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EFFECT_CANNOT_ACTIVATE)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(1,0)
e5:SetValue(cm.aclimit)
c:RegisterEffect(e5)
--Activate
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,0))
e6:SetCategory(CATEGORY_ATKCHANGE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetRange(LOCATION_FZONE)
e6:SetCost(cm.atkcost)
e6:SetTarget(cm.atktg)
e6:SetOperation(cm.atkop)
c:RegisterEffect(e6)
local e7=e1:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e7)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.filter,nil,e,tp)
if g:GetCount()>0 then
local tdc=Duel.SendtoDeck(g,tp,2,REASON_EFFECT)
Duel.Recover(tp,tdc*500,REASON_EFFECT)
end
end
function cm.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function cm.filter(c,e,tp)
return c:IsControler(tp) and c:IsAbleToDeck() and not c:IsLevelAbove(6)
end
function cm.filter2(c,tp)
return c:IsFaceup() and c:GetSummonPlayer()~=tp
end
function cm.atkcost(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
local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,60,REASON_COST+REASON_DISCARD)
e:SetLabel(ct)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.filter2,1,nil,tp) end
local g=eg:Filter(cm.filter2,nil,tp)
Duel.SetTargetCard(g)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if e:GetHandler():IsRelateToEffect(e) then
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-e:GetLabel()*1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e1:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
--宇宙军阀首领-巴克特利安
local m=13257235
local cm=_G["c"..m]
function cm.initial_effect(c)
--cannot special summon
local e11=Effect.CreateEffect(c)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_SPSUMMON_CONDITION)
e11:SetValue(aux.FALSE)
c:RegisterEffect(e11)
--summon with no tribute
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(m,3))
e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_SUMMON_PROC)
e12:SetCondition(cm.ntcon)
c:RegisterEffect(e12)
--inactivatable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_FZONE,0)
e2:SetValue(cm.efilter)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.econ)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e4:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e4)
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_HAND)>=5
end
function cm.efilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return te:IsActiveType(TYPE_SPELL) and te:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function cm.econ(e)
return e:GetHandler():GetOwner():GetFieldCard(LOCATION_SZONE,5)~=nil
end
function cm.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
--宇宙惑星要塞-高弗母舰
local m=13257236
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--unreleaseable nonsum
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCode(EFFECT_UNRELEASABLE_NONSUM)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e6)
local e7=e3:Clone()
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e7)
--draw
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(m,1))
e8:SetCategory(CATEGORY_DRAW)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetRange(LOCATION_FZONE)
e8:SetCode(EVENT_SUMMON_SUCCESS)
e8:SetCondition(cm.drcon)
e8:SetTarget(cm.drtg)
e8:SetOperation(cm.drop)
c:RegisterEffect(e8)
local e9=e8:Clone()
e9:SetCode(EVENT_SPSUMMON_SUCCESS)
e9:SetCondition(cm.drcon1)
c:RegisterEffect(e9)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,13257226,0,0x4011,500,500,3,RACE_MACHINE,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,13257226,0,0x4011,500,500,3,RACE_MACHINE,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,13257226)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.cfilter(c)
return c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsSetCard(0x353)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and eg:IsExists(cm.cfilter,1,nil)
end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and eg:IsExists(Card.IsSetCard,1,nil,0x353)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--宇宙军阀首领-野望之高弗
local m=13257237
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCondition(aux.exccon)
e3:SetCost(cm.thcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(cm.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)==1
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,2,nil)
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and not Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_HAND,1,nil,TYPE_MONSTER) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
end
function cm.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsChainDisablable(0) then
local sel=1
local cg=Duel.GetMatchingGroup(cm.cfilter,tp,0,LOCATION_HAND,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(m,1))
if cg:GetCount()>0 then
sel=Duel.SelectOption(1-tp,1213,1214)
else
sel=Duel.SelectOption(1-tp,1214)+1
end
if sel==0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local sg=cg:Select(1-tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
Duel.NegateEffect(0)
return
end
end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(g,REASON_EFFECT)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function cm.thfilter(c)
return c:IsCode(13257236) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(m,4))
end
--前线阵地-地球
local m=13257238
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.skipcon)
e3:SetOperation(cm.skipop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(cm.drcon)
e4:SetTarget(cm.drtg)
e4:SetOperation(cm.drop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,13257229) end
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,13257229)
local tc=g:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
function cm.skipcon(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer()
return Duel.GetCustomActivityCount(m,p,ACTIVITY_CHAIN)>=4
end
function cm.skipop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer()
Duel.Hint(HINT_CARD,1,m)
Duel.SkipPhase(p,PHASE_STANDBY,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(p,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(p,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(p,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
......@@ -84,6 +84,13 @@ end
eflist={"tama_elements",elements}
c+code[c]=eflist
]]
TAMA_ELEMENT_WIND=13254031
TAMA_ELEMENT_EARTH=13254032
TAMA_ELEMENT_WATER=13254033
TAMA_ELEMENT_FIRE=13254034
TAMA_ELEMENT_ORDER=13254035
TAMA_ELEMENT_CHAOS=13254036
TAMA_ELEMENT_MANA=13254047
function tama.tamas_isExistElement(c,code)
local elements=tama.tamas_getElements(c)
local subElements=tama.tamas_getSubElements(c)
......@@ -226,9 +233,10 @@ function tama.tamas_increaseElements(codes,add)
if not tama.tamas_checkContainElements(toAdd,add) then
local i=1
while add[i] do
if not tama.tamas_checkElementsHasElement(toAdd,add[i]) then
if not tama.tamas_checkElementsHasElement(toAdd,add[i][1]) then
table.insert(toAdd,{add[i][1],0})
end
i=i+1
end
end
local i=1
......@@ -301,6 +309,7 @@ function tama.tamas_checkContainElements(codes,check)
local accept=false
while codes[j] do
if check[i][1]==codes[j][1] then
--codes has check element, current checking true
accept=true
end
j=j+1
......
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