Commit 0e7c595e authored by Tachibana's avatar Tachibana

得得得得得

parent 67b25d59
Pipeline #13403 passed with stages
in 27 minutes and 51 seconds
No preview for this file type
...@@ -54,14 +54,14 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,14 +54,14 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if sg1:GetCount()>0 then if sg1:GetCount()>0 then
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)>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.BreakEffect()
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1)) Duel.SelectOption(tp,aux.Stringid(m,1))
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.DiscardDeck(tp,3,REASON_EFFECT) Duel.DiscardDeck(tp,3,REASON_EFFECT)
sg2:Merge(Duel.GetOperatedGroup()) sg2:Merge(Duel.GetOperatedGroup())
end end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND)>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.BreakEffect()
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2)) Duel.SelectOption(tp,aux.Stringid(m,2))
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
...@@ -86,7 +86,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +86,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,10)) then if Duel.SelectYesNo(tp,aux.Stringid(m,10)) then
local ct=sg3:GetCount() local ct=sg3:GetCount()
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,3)) Duel.SelectOption(tp,aux.Stringid(m,3))
Duel.SendtoDeck(sg3,tp,2,REASON_EFFECT) Duel.SendtoDeck(sg3,tp,2,REASON_EFFECT)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.DiscardDeck(tp,ct,REASON_EFFECT) Duel.DiscardDeck(tp,ct,REASON_EFFECT)
...@@ -95,7 +95,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,7 +95,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_MANA)>=3 then if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_MANA)>=3 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,4)) Duel.SelectOption(tp,aux.Stringid(m,4))
--change damage --change damage
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -114,7 +114,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -114,7 +114,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY)>=2 and Duel.IsExistingTarget(cm.filter3,tp,LOCATION_MZONE,0,1,nil,eg,ep,ev,re,r,rp) then if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY)>=2 and Duel.IsExistingTarget(cm.filter3,tp,LOCATION_MZONE,0,1,nil,eg,ep,ev,re,r,rp) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,5)) Duel.SelectOption(tp,aux.Stringid(m,5))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,eg,ep,ev,re,r,rp):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,eg,ep,ev,re,r,rp):GetFirst()
local tep=tc:GetControler() local tep=tc:GetControler()
......
...@@ -3,6 +3,15 @@ local m=13254042 ...@@ -3,6 +3,15 @@ local m=13254042
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end) xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c) 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)
--[[
--flame --flame
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
...@@ -26,17 +35,117 @@ function cm.initial_effect(c) ...@@ -26,17 +35,117 @@ function cm.initial_effect(c)
--magma --magma
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2)) e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_ACTIVATE) e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCost(cm.cost2) e3:SetCost(cm.cost2)
e3:SetOperation(cm.operation2) e3:SetOperation(cm.operation2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
]]
elements={{"tama_elements",{{TAMA_ELEMENT_FIRE,1},{TAMA_ELEMENT_MANA,1}}}} elements={{"tama_elements",{{TAMA_ELEMENT_FIRE,1},{TAMA_ELEMENT_MANA,1}}}}
cm[c]=elements cm[c]=elements
end 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_FIRE,2},{TAMA_ELEMENT_WIND,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,1))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DESTROY))
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_FIRE,5},{TAMA_ELEMENT_WATER,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_REMOVE))
local sg=Duel.GetMatchingGroup(cm.filter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_FIRE,3},{TAMA_ELEMENT_EARTH,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,3))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_ATKCHANGE))
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)
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DAMAGE))
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
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_FIRE,2},{TAMA_ELEMENT_WIND,2}},obj) then
if broken then Duel.BreakEffect() end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local ct=Duel.Destroy(sg,REASON_EFFECT)
if ct>0 and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
end
broken=true
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_FIRE,3},{TAMA_ELEMENT_WATER,2}},obj) then
if broken then Duel.BreakEffect() end
local sg=Duel.GetMatchingGroup(cm.filter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,nil)
local ct=Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
if ct>0 and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
end
broken=true
end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_FIRE,3},{TAMA_ELEMENT_EARTH,2}},obj) then
if broken then Duel.BreakEffect() end
local ct=2000
if tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then ct=3000 end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(ct)
sc:RegisterEffect(e1)
sc=g:GetNext()
end
broken=true
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
function cm.filter1(c)
return c:IsAbleToDeck() and (not c:IsLocation(LOCATION_EXTRA) or c:IsFaceup())
end
--[[
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_FIRE,2},{TAMA_ELEMENT_WIND,2}} local el={{TAMA_ELEMENT_FIRE,2},{TAMA_ELEMENT_WIND,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
...@@ -99,3 +208,4 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,3 +208,4 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
]]
...@@ -13,13 +13,16 @@ function cm.initial_effect(c) ...@@ -13,13 +13,16 @@ function cm.initial_effect(c)
e1:SetTarget(cm.remtg) e1:SetTarget(cm.remtg)
e1:SetOperation(cm.remop) e1:SetOperation(cm.remop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
elements={{"tama_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}}}} elements={{"tama_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},{TAMA_ELEMENT_MANA,1}}}}
cm[c]=elements cm[c]=elements
end 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) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_WIND,2},{TAMA_ELEMENT_EARTH,2},{TAMA_ELEMENT_WATER,2},{TAMA_ELEMENT_FIRE,2},{TAMA_ELEMENT_ORDER,2},{TAMA_ELEMENT_CHAOS,2}} local el={{TAMA_ELEMENT_WIND,2},{TAMA_ELEMENT_EARTH,2},{TAMA_ELEMENT_WATER,2},{TAMA_ELEMENT_FIRE,2},{TAMA_ELEMENT_ORDER,2},{TAMA_ELEMENT_CHAOS,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil),el)
if chk==0 then if chk==0 then
return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el) return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el)
end end
......
...@@ -43,6 +43,8 @@ function cm.initial_effect(c) ...@@ -43,6 +43,8 @@ function cm.initial_effect(c)
e4:SetTarget(cm.tdtg) e4:SetTarget(cm.tdtg)
e4:SetOperation(cm.tdop) e4:SetOperation(cm.tdop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
elements={{"tama_elements",{{TAMA_ELEMENT_MANA,1}}}}
cm[c]=elements
end end
function cm.cfilter(c) function cm.cfilter(c)
......
...@@ -72,9 +72,12 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,9 +72,12 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ConfirmCards(1-tp,tg) Duel.ConfirmCards(1-tp,tg)
end end
end end
function cm.cfilter1(c)
return #(tama.tamas_getElements(c))~=0 and c:IsAbleToDeckAsCost()
end
function cm.thcost1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_MANA,5}} local el={{TAMA_ELEMENT_MANA,5}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil),el)
if chk==0 then if chk==0 then
return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el) return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el)
end end
......
...@@ -38,16 +38,19 @@ function cm.initial_effect(c) ...@@ -38,16 +38,19 @@ function cm.initial_effect(c)
cm[c]=elements cm[c]=elements
end end
function cm.cfilter(c)
return #(tama.tamas_getElements(c))~=0 and c:IsAbleToDeckAsCost()
end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local el={{TAMA_ELEMENT_FIRE,1},{TAMA_ELEMENT_ORDER,1}} local el={{TAMA_ELEMENT_FIRE,1},{TAMA_ELEMENT_ORDER,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil),el)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local el={{TAMA_ELEMENT_FIRE,1},{TAMA_ELEMENT_ORDER,1}} local el={{TAMA_ELEMENT_FIRE,1},{TAMA_ELEMENT_ORDER,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil),el)
local sg=tama.tamas_selectElementsMaterial(mg,el,tp) local sg=tama.tamas_selectElementsMaterial(mg,el,tp)
Duel.SendtoDeck(sg,nil,2,REASON_COST) Duel.SendtoDeck(sg,nil,2,REASON_COST)
end end
...@@ -80,7 +83,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +83,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.thcost1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_ENERGY,4}} local el={{TAMA_ELEMENT_ENERGY,4}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil),el)
if chk==0 then if chk==0 then
return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el) return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el)
end end
......
...@@ -49,16 +49,19 @@ function cm.initial_effect(c) ...@@ -49,16 +49,19 @@ function cm.initial_effect(c)
cm[c]=elements cm[c]=elements
end end
function cm.cfilter(c)
return #(tama.tamas_getElements(c))~=0 and c:IsAbleToDeckAsCost()
end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local el={{TAMA_ELEMENT_WATER,1},{TAMA_ELEMENT_EARTH,1}} local el={{TAMA_ELEMENT_WATER,1},{TAMA_ELEMENT_EARTH,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil),el)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local el={{TAMA_ELEMENT_WATER,1},{TAMA_ELEMENT_EARTH,1}} local el={{TAMA_ELEMENT_WATER,1},{TAMA_ELEMENT_EARTH,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil),el)
local sg=tama.tamas_selectElementsMaterial(mg,el,tp) local sg=tama.tamas_selectElementsMaterial(mg,el,tp)
Duel.SendtoDeck(sg,nil,2,REASON_COST) Duel.SendtoDeck(sg,nil,2,REASON_COST)
end end
......
...@@ -17,9 +17,12 @@ function cm.initial_effect(c) ...@@ -17,9 +17,12 @@ function cm.initial_effect(c)
elements={{"tama_elements",{{TAMA_ELEMENT_MANA,2},{TAMA_ELEMENT_LIFE,1}}}} elements={{"tama_elements",{{TAMA_ELEMENT_MANA,2},{TAMA_ELEMENT_LIFE,1}}}}
cm[c]=elements cm[c]=elements
end end
function cm.cfilter(c)
return #(tama.tamas_getElements(c))~=0 and c:IsAbleToDeckAsCost()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_MANA,2}} local el={{TAMA_ELEMENT_MANA,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,c),el)
mg:RemoveCard(e:GetHandler()) mg:RemoveCard(e:GetHandler())
if chk==0 then if chk==0 then
return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el) return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el)
......
...@@ -51,9 +51,12 @@ end ...@@ -51,9 +51,12 @@ end
function cm.splimit(e,se,sp,st) function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS) return se:IsHasType(EFFECT_TYPE_ACTIONS)
end end
function cm.cfilter(c)
return #(tama.tamas_getElements(c))~=0 and c:IsAbleToDeckAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_CHAOS,3}} local el={{TAMA_ELEMENT_CHAOS,3}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil),el)
if chk==0 then if chk==0 then
return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el) return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el)
end end
...@@ -77,7 +80,7 @@ end ...@@ -77,7 +80,7 @@ end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
local el={{TAMA_ELEMENT_CHAOS,1},{TAMA_ELEMENT_MANA,1}} local el={{TAMA_ELEMENT_CHAOS,1},{TAMA_ELEMENT_MANA,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil),el)
local ct=tama.tamas_getElementCount(tama.tamas_sumElements(mg),TAMA_ELEMENT_CHAOS)-1 local ct=tama.tamas_getElementCount(tama.tamas_sumElements(mg),TAMA_ELEMENT_CHAOS)-1
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.tgfilter(chkc,c,ct) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.tgfilter(chkc,c,ct) end
if chk==0 then return tama.tamas_isCanSelectElementsForAbove(mg,el) and Duel.IsExistingTarget(cm.tgfilter,tp,0,LOCATION_MZONE,1,nil,c,ct) end if chk==0 then return tama.tamas_isCanSelectElementsForAbove(mg,el) and Duel.IsExistingTarget(cm.tgfilter,tp,0,LOCATION_MZONE,1,nil,c,ct) end
...@@ -87,7 +90,7 @@ function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -87,7 +90,7 @@ function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=math.ceil((atk-c:GetAttack())/300) local ct=math.ceil((atk-c:GetAttack())/300)
local el1={{TAMA_ELEMENT_CHAOS,1},{TAMA_ELEMENT_MANA,1+ct}} local el1={{TAMA_ELEMENT_CHAOS,1},{TAMA_ELEMENT_MANA,1+ct}}
local sg=tama.tamas_selectElementsMaterial(mg,el,tp) local sg=tama.tamas_selectElementsMaterial(mg,el1,tp)
Duel.SendtoDeck(sg,nil,2,REASON_COST) Duel.SendtoDeck(sg,nil,2,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk)
...@@ -103,7 +106,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,7 +106,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_MANA,2},{TAMA_ELEMENT_LIFE,1}} local el={{TAMA_ELEMENT_MANA,2},{TAMA_ELEMENT_LIFE,1}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,c),el)
mg:RemoveCard(e:GetHandler()) mg:RemoveCard(e:GetHandler())
if chk==0 then if chk==0 then
return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el) return mg:GetCount()>0 and tama.tamas_isCanSelectElementsForAbove(mg,el)
......
...@@ -39,36 +39,42 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,36 +39,42 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetValue(1)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.efilter)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true) tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetCode(EFFECT_CANNOT_ACTIVATE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,1) e3:SetValue(cm.efilter)
e3:SetValue(cm.aclimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3,true) tc:RegisterEffect(e3,true)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1) e4:SetTargetRange(1,1)
e4:SetCondition(cm.phcon) e4:SetValue(cm.aclimit)
e4:SetOperation(cm.phop) e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4,true) tc:RegisterEffect(e4,true)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(cm.phcon)
e5:SetOperation(cm.phop)
tc:RegisterEffect(e5,true)
if not tc:IsType(TYPE_EFFECT) then if not tc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e6:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE) e6:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT) e6:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e6:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true) tc:RegisterEffect(e6,true)
end end
end end
end end
...@@ -81,13 +87,16 @@ end ...@@ -81,13 +87,16 @@ end
function cm.phcon(e,tp,eg,ep,ev,re,r,rp) function cm.phcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function cm.cfilter(c)
return #(tama.tamas_getElements(c))~=0 and c:IsAbleToDeckAsCost()
end
function cm.phop(e,tp,eg,ep,ev,re,r,rp) function cm.phop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local el=tama.tamas_increaseElements(tama.tamas_getElements(c),{{TAMA_ELEMENT_MANA,1}}) local el=tama.tamas_increaseElements(tama.tamas_getElements(c),{{TAMA_ELEMENT_MANA,1}})
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el) local mg=tama.tamas_checkGroupElements(Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_GRAVE,0,nil),el)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
if tama.tamas_isCanSelectElementsForAbove(mg,el) then if tama.tamas_isCanSelectElementsForAbove(mg,el) then
local sg,elements=tama.tamas_selectElementsMaterial(mg,el,tp) local sg=tama.tamas_selectElementsMaterial(mg,el,tp)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
else else
Duel.Remove(c,POS_FACEDOWN,REASON_RULE) Duel.Remove(c,POS_FACEDOWN,REASON_RULE)
......
--飞球造物·隐飞 --飞球造物·拳石
local m=13254061 local m=13254061
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end) xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
......
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW+CATEGORY_DESTROY+CATEGORY_RECOVER) e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW+CATEGORY_DESTROY+CATEGORY_RECOVER)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.distg) e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop) e1:SetOperation(cm.disop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
--飞球的延续 --飞球的延续
local m=13254066 local m=13254066
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c) function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
......
...@@ -5,6 +5,7 @@ function c33400303.initial_effect(c) ...@@ -5,6 +5,7 @@ function c33400303.initial_effect(c)
aux.AddLinkProcedure(c,c33400303.matfilter,1,1) aux.AddLinkProcedure(c,c33400303.matfilter,1,1)
--copy effect --copy effect
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33400303,5))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
......
...@@ -18,6 +18,7 @@ function c33400304.initial_effect(c) ...@@ -18,6 +18,7 @@ function c33400304.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33400304,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
......
...@@ -5,6 +5,7 @@ function cm.initial_effect(c) ...@@ -5,6 +5,7 @@ function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--destory --destory
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
......
--夜刀神天香 蔑视 --夜刀神天香 蔑视
function c33400311.initial_effect(c) local m=33400311
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,5))
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1,33400311) e1:SetCountLimit(1,m)
e1:SetCondition(aux.bdcon) e1:SetCondition(aux.bdcon)
e1:SetOperation(c33400311.desop) e1:SetOperation(cm.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- IMMUNE -- IMMUNE
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,33400311+10000) e2:SetCountLimit(1,m+10000)
e2:SetTarget(c33400311.imtg) e2:SetTarget(cm.imtg)
e2:SetOperation(c33400311.imop) e2:SetOperation(cm.imop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c33400311.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
--cannot set --cannot set
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -38,7 +41,7 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +41,7 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,1-tp) Duel.RegisterEffect(e3,1-tp)
local e4=e1:Clone() local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetTarget(c33400311.sumlimit) e4:SetTarget(cm.sumlimit)
Duel.RegisterEffect(e4,1-tp) Duel.RegisterEffect(e4,1-tp)
--cannot trigger --cannot trigger
local e5=Effect.CreateEffect(e:GetHandler()) local e5=Effect.CreateEffect(e:GetHandler())
...@@ -46,26 +49,26 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,26 +49,26 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
e5:SetCode(EFFECT_CANNOT_TRIGGER) e5:SetCode(EFFECT_CANNOT_TRIGGER)
e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e5:SetTargetRange(LOCATION_SZONE,0) e5:SetTargetRange(LOCATION_SZONE,0)
e5:SetTarget(c33400311.distg) e5:SetTarget(cm.distg)
e5:SetReset(RESET_PHASE+PHASE_END) e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,1-tp) Duel.RegisterEffect(e5,1-tp)
if Duel.IsExistingMatchingCard(c33400311.refilter1,tp,0,LOCATION_ONFIELD,1,nil) then if Duel.IsExistingMatchingCard(cm.refilter1,tp,0,LOCATION_ONFIELD,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(33400311,0)) then if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local tc1=Duel.SelectMatchingCard(tp,c33400311.refilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local tc1=Duel.SelectMatchingCard(tp,cm.refilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Remove(tc1,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(tc1,POS_FACEDOWN,REASON_EFFECT)
end end
end end
local k1=Duel.GetMatchingGroup(c33400311.thfilter1,tp,LOCATION_GRAVE,0,nil) local k1=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_GRAVE,0,nil)
local k2=Duel.GetMatchingGroup(c33400311.thfilter2,tp,LOCATION_GRAVE,0,nil) local k2=Duel.GetMatchingGroup(cm.thfilter2,tp,LOCATION_GRAVE,0,nil)
if Duel.GetTurnPlayer()~=tp and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and (k1 or k2) then if Duel.GetTurnPlayer()~=tp and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and (k1 or k2) then
if Duel.SelectYesNo(tp,aux.Stringid(33400311,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33400311,4)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,4))
local g=Duel.SelectMatchingCard(tp,c33400311.thfilter3,tp,LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local b1=tc:IsSSetable() local b1=tc:IsSSetable()
local b2=tc:IsForbidden() local b2=tc:IsForbidden()
if b1 and (b2 or Duel.SelectOption(tp,aux.Stringid(33400311,2),aux.Stringid(33400311,3))==0) then if b1 and (b2 or Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))==0) then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
...@@ -75,35 +78,35 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,35 +78,35 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c33400311.sumlimit(e,c,sump,sumtype,sumpos,targetp) function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)~=0 return bit.band(sumpos,POS_FACEDOWN)~=0
end end
function c33400311.distg(e,c) function cm.distg(e,c)
return c:IsFacedown() return c:IsFacedown()
end end
function c33400311.refilter1(c) function cm.refilter1(c)
return c:IsAbleToRemove() and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsAbleToRemove() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c33400311.thfilter1(c) function cm.thfilter1(c)
return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end end
function c33400311.thfilter2(c) function cm.thfilter2(c)
return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsForbidden() return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsForbidden()
end end
function c33400311.thfilter3(c) function cm.thfilter3(c)
return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsSSetable() or not c:IsForbidden()) return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsSSetable() or not c:IsForbidden())
end end
function c33400311.imfilter(c) function cm.imfilter(c)
return c:IsFaceup() and c:IsSetCard(0x341) return c:IsFaceup() and c:IsSetCard(0x341)
end end
function c33400311.imtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.imtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33400311.imfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.imfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33400311.imfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.imfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c33400311.imfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,cm.imfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c33400311.imop(e,tp,eg,ep,ev,re,r,rp) function cm.imop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
--夜刀神天香 毁灭 --夜刀神天香 毁灭
function c33400312.initial_effect(c) local m=33400312
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--activate limit --activate limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1,33400312) e1:SetCountLimit(1,m)
e1:SetCondition(aux.bdcon) e1:SetCondition(aux.bdcon)
e1:SetOperation(c33400312.alsop) e1:SetOperation(cm.alsop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- Double damage -- Double damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,33400312+10000) e2:SetCountLimit(1,m+10000)
e2:SetTarget(c33400312.dbtg) e2:SetTarget(cm.dbtg)
e2:SetOperation(c33400312.dbop) e2:SetOperation(cm.dbop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c33400312.tdfilter1(c) function cm.tdfilter1(c)
return c:IsAbleToDeck() return c:IsAbleToDeck()
end end
function c33400312.aclimit(e,re,tp) function cm.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE+LOCATION_REMOVED return re:GetActivateLocation()==LOCATION_GRAVE+LOCATION_REMOVED
end end
function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp) function cm.alsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c33400312.aclimit) e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if Duel.IsExistingMatchingCard(c33400312.tdfilter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) then if Duel.IsExistingMatchingCard(cm.tdfilter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(33400312,0)) then if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local tc=Duel.SelectMatchingCard(tp,c33400312.tdfilter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,2,nil) local tc=Duel.SelectMatchingCard(tp,cm.tdfilter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,2,nil)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
end end
if Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(c33400312.dbfilter,tp,LOCATION_MZONE,0,1,nil) then if Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(cm.dbfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c33400312.dbfilter,tp,LOCATION_MZONE,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,cm.dbfilter,tp,LOCATION_MZONE,0,1,2,nil)
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -57,7 +60,7 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +60,7 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetValue(c33400312.efilter) e3:SetValue(cm.efilter)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetOwnerPlayer(tp) e3:SetOwnerPlayer(tp)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
...@@ -65,33 +68,33 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,33 +68,33 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c33400312.efilter(e,re) function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end end
function c33400312.dbfilter(c) function cm.dbfilter(c)
return c:IsFaceup() and c:IsSetCard(0x341) return c:IsFaceup() and c:IsSetCard(0x341)
end end
function c33400312.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33400312.dbfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.dbfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33400312.dbfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.dbfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c33400312.dbfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,cm.dbfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c33400312.dbop(e,tp,eg,ep,ev,re,r,rp) function cm.dbop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCondition(c33400312.damcon) e1:SetCondition(cm.damcon)
e1:SetOperation(c33400312.damop) e1:SetOperation(cm.damop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function c33400312.damcon(e,tp,eg,ep,ev,re,r,rp) function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil return ep~=tp and e:GetHandler():GetBattleTarget()~=nil
end end
function c33400312.damop(e,tp,eg,ep,ev,re,r,rp) function cm.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(1,ev*2) Duel.ChangeBattleDamage(1,ev*2)
end end
\ No newline at end of file
--D.A.L-夜刀神十香-ALTER --D.A.L-夜刀神十香-ALTER
function c33400320.initial_effect(c) local m=33400320
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -16,45 +18,46 @@ function c33400320.initial_effect(c) ...@@ -16,45 +18,46 @@ function c33400320.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,33400320) e1:SetCountLimit(1,m)
e1:SetCondition(c33400320.atkcon) e1:SetCondition(cm.atkcon)
e1:SetCost(c33400320.atkcost1) e1:SetCost(cm.atkcost1)
e1:SetTarget(c33400320.atktg) e1:SetTarget(cm.atktg)
e1:SetOperation(c33400320.atkop1) e1:SetOperation(cm.atkop1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Equip Okatana --Equip Okatana
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetOperation(c33400320.Eqop1) e4:SetOperation(cm.Eqop1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
-- --
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,5))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE) e5:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_BATTLE_DESTROYING) e5:SetCode(EVENT_BATTLE_DESTROYING)
e5:SetCondition(aux.bdcon) e5:SetCondition(aux.bdcon)
e5:SetOperation(c33400320.desop) e5:SetOperation(cm.desop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c33400320.atkcon(e,tp,eg,ep,ev,re,r,rp) function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c33400320.atkcost1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atkcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c33400320.atkfilter(c) function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x341) return c:IsFaceup() and c:IsSetCard(0x341)
end end
function c33400320.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33400320.atkfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33400320.atkfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c33400320.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c33400320.atkop1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atkop1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -70,22 +73,22 @@ function c33400320.atkop1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -70,22 +73,22 @@ function c33400320.atkop1(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(c33400320.efilter4) e2:SetValue(cm.efilter4)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
end end
function c33400320.efilter4(e,te) function cm.efilter4(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end end
function c33400320.Eqop1(e,tp,eg,ep,ev,re,r,rp) function cm.Eqop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsLocation(LOCATION_MZONE) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then if c:IsLocation(LOCATION_MZONE) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
c33400320.TojiEquip(c,e,tp,eg,ep,ev,re,r,rp) cm.TojiEquip(c,e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp) function cm.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
local token=Duel.CreateToken(tp,33400321) local token=Duel.CreateToken(tp,33400321)
Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
token:CancelToGrave() token:CancelToGrave()
...@@ -108,7 +111,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp) ...@@ -108,7 +111,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
local e4=Effect.CreateEffect(ec) local e4=Effect.CreateEffect(ec)
e4:SetType(EFFECT_TYPE_EQUIP) e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT) e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c33400320.efilter1) e4:SetValue(cm.efilter1)
token:RegisterEffect(e4) token:RegisterEffect(e4)
--indes --indes
local e5=Effect.CreateEffect(ec) local e5=Effect.CreateEffect(ec)
...@@ -116,7 +119,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp) ...@@ -116,7 +119,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e5:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e5:SetValue(c33400320.valcon) e5:SetValue(cm.valcon)
e5:SetCountLimit(1) e5:SetCountLimit(1)
token:RegisterEffect(e5) token:RegisterEffect(e5)
--atkup --atkup
...@@ -127,20 +130,20 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp) ...@@ -127,20 +130,20 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetOperation(c33400320.atkop) e3:SetOperation(cm.atkop)
token:RegisterEffect(e3) token:RegisterEffect(e3)
return true return true
else Duel.SendtoGrave(token,REASON_RULE) return false else Duel.SendtoGrave(token,REASON_RULE) return false
end end
end end
function c33400320.efilter1(e,re) function cm.efilter1(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end end
function c33400320.valcon(e,re,r,rp) function cm.valcon(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 return bit.band(r,REASON_EFFECT)~=0
end end
function c33400320.atkop(e,tp,eg,ep,ev,re,r,rp) function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ec=c:GetEquipTarget() local ec=c:GetEquipTarget()
if ec and c:IsRelateToEffect(e) then if ec and c:IsRelateToEffect(e) then
...@@ -152,10 +155,10 @@ function c33400320.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -152,10 +155,10 @@ function c33400320.atkop(e,tp,eg,ep,ev,re,r,rp)
ec:RegisterEffect(e1) ec:RegisterEffect(e1)
end end
end end
function c33400320.refilter(c) function cm.refilter(c)
return c:IsAbleToRemove() return c:IsAbleToRemove()
end end
function c33400320.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) local g1=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -167,14 +170,14 @@ local c=e:GetHandler() ...@@ -167,14 +170,14 @@ local c=e:GetHandler()
if c:IsChainAttackable() then if c:IsChainAttackable() then
Duel.ChainAttack() Duel.ChainAttack()
end end
if Duel.SelectYesNo(tp,aux.Stringid(33400320,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g1:Select(tp,1,1,nil) local tc=g1:Select(tp,1,1,nil)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end end
if Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil)and Duel.IsExistingMatchingCard(c33400320.refilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33400320,2)) then if Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil)and Duel.IsExistingMatchingCard(cm.refilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
local g3=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE+LOCATION_HAND,0,nil) local g3=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE+LOCATION_HAND,0,nil)
local g4=Duel.GetMatchingGroup(c33400320.refilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local g4=Duel.GetMatchingGroup(cm.refilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
local t3=g3:GetCount() local t3=g3:GetCount()
local t4=g4:GetCount() local t4=g4:GetCount()
local t5 local t5
......
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