Commit b236d38f authored by Nemo Ma's avatar Nemo Ma

fix

parent 8528bf78
No preview for this file type
...@@ -23,7 +23,11 @@ function cm.initial_effect(c) ...@@ -23,7 +23,11 @@ function cm.initial_effect(c)
end end
function cm.spfilter(c,e,tp,mg) function cm.spfilter(c,e,tp,mg)
if bit.band(c:GetType(),0x81)~=0x81 or c.mat_filter or c.mat_group_check or not (c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)) then return false end if bit.band(c:GetType(),0x81)~=0x81 or c.mat_filter or c.mat_group_check or not (c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)) then return false end
return #mg>0 and #mg*3+3>c:GetLevel() local ct=math.max(1,tc:GetLevel()//3)
return #mg>0 and mg:CheckSubGroup(cm.fselect,ct,ct,c,tp)
end
function cm.fselect(g,c,tp)
return Duel.GetMZoneCount(tp,g)>0
end end
function cm.mfilter(c) function cm.mfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
...@@ -46,7 +50,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +50,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local ct=math.max(1,tc:GetLevel()//3) local ct=math.max(1,tc:GetLevel()//3)
local mat=mg:Select(tp,ct,ct,nil) local mat=mg:SelectSubGroup(tp,cm.fselect,false,ct,ct,c,tp)
if not mat or #mat==0 then return end if not mat or #mat==0 then return end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
...@@ -60,7 +64,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,7 +64,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function cm.filter(c,e,tp,ec) function cm.filter(c,e,tp,ec)
return c:IsSetCard(0x97f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.clfilter,tp,LOCATION_GRAVE,0,1,ec,c) return c:IsSetCard(0x97f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.clfilter,tp,LOCATION_GRAVE,0,1,ec,c) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function cm.clfilter(c,tc) function cm.clfilter(c,tc)
return aux.IsCodeListed(tc,c:GetCode()) return aux.IsCodeListed(tc,c:GetCode())
......
...@@ -11,8 +11,7 @@ function cm.initial_effect(c) ...@@ -11,8 +11,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SUMMON_COST) e1:SetCode(EFFECT_SUMMON_COST)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,0xff)
e1:SetTargetRange(0,1)
e1:SetCondition(cm.costcon) e1:SetCondition(cm.costcon)
e1:SetCost(cm.costchk) e1:SetCost(cm.costchk)
e1:SetOperation(cm.costop) e1:SetOperation(cm.costop)
...@@ -59,7 +58,7 @@ function cm.spfilter(c,e,tp) ...@@ -59,7 +58,7 @@ function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummon(tp) and Duel.IsPlayerCanDraw(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,63060238) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummon(tp) and Duel.IsPlayerCanDraw(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,63060238) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
......
...@@ -64,7 +64,6 @@ function cm.atkval(e,c) ...@@ -64,7 +64,6 @@ function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),0,LOCATION_MZONE,nil)*800 return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),0,LOCATION_MZONE,nil)*800
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
Debug.Message(Duel.GetFlagEffect(tp,m)>0)
return rp==1-tp and Duel.GetFlagEffect(tp,m)>0 return rp==1-tp and Duel.GetFlagEffect(tp,m)>0
end end
function cm.filter1(c,e,tp) function cm.filter1(c,e,tp)
......
...@@ -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()
......
...@@ -76,28 +76,28 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -76,28 +76,28 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local obj={} local obj={}
if index then obj=tama.get(index) end if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_FIRE,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_FIRE,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1)) Duel.SelectOption(tp,aux.Stringid(m,1))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DESTROY)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DESTROY))
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_WATER,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_WATER,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2)) Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_REMOVE)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_REMOVE))
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_EARTH,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WIND,3},{TAMA_ELEMENT_EARTH,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,3)) Duel.SelectOption(tp,aux.Stringid(m,3))
local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ht1=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) local ht1=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW))
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ht1-ht) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ht1-ht)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,4)) Duel.SelectOption(tp,aux.Stringid(m,4))
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,5)) Duel.SelectOption(tp,aux.Stringid(m,5))
Duel.SetChainLimit(cm.chainlm) Duel.SetChainLimit(cm.chainlm)
end end
end end
...@@ -122,7 +122,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,7 +122,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=2 local ct=2
if tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then ct=4 end if tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then ct=4 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local eg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,ct,nil) local eg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,ct,nil)
if eg:GetCount()>0 then if eg:GetCount()>0 then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end end
......
...@@ -73,26 +73,27 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -73,26 +73,27 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local obj={} local obj={}
if index then obj=tama.get(index) end if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_EARTH,2},{TAMA_ELEMENT_WIND,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_EARTH,2},{TAMA_ELEMENT_WIND,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1)) Duel.SelectOption(tp,aux.Stringid(m,1))
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
local g1=g:Filter(Card.IsCanTurnSet,nil) local g1=g:Filter(Card.IsCanTurnSet,nil)
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_POSITION)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_POSITION))
Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,g1:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,g1:GetCount(),0,0)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_EARTH,3},{TAMA_ELEMENT_FIRE,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_EARTH,3},{TAMA_ELEMENT_FIRE,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2)) Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DESTROY)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DESTROY))
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_EARTH,3},{TAMA_ELEMENT_WATER,2}},obj) then 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) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,4)) Duel.SelectOption(tp,aux.Stringid(m,4))
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,5)) Duel.SelectOption(tp,aux.Stringid(m,5))
Duel.SetChainLimit(cm.chainlm) Duel.SetChainLimit(cm.chainlm)
end end
end end
......
...@@ -77,23 +77,23 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,23 +77,23 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local obj={} local obj={}
if index then obj=tama.get(index) end if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WATER,3},{TAMA_ELEMENT_FIRE,3}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WATER,3},{TAMA_ELEMENT_FIRE,3}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1)) Duel.SelectOption(tp,aux.Stringid(m,1))
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WATER,2},{TAMA_ELEMENT_WIND,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WATER,2},{TAMA_ELEMENT_WIND,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2)) Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_REMOVE)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_REMOVE))
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WATER,3},{TAMA_ELEMENT_EARTH,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_WATER,3},{TAMA_ELEMENT_EARTH,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,3)) Duel.SelectOption(tp,aux.Stringid(m,3))
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,4)) Duel.SelectOption(tp,aux.Stringid(m,4))
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,5)) Duel.SelectOption(tp,aux.Stringid(m,5))
Duel.SetChainLimit(cm.chainlm) Duel.SetChainLimit(cm.chainlm)
end end
end end
......
...@@ -72,27 +72,27 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,27 +72,27 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local obj={} local obj={}
if index then obj=tama.get(index) end 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 obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_FIRE,2},{TAMA_ELEMENT_WIND,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1)) Duel.SelectOption(tp,aux.Stringid(m,1))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DESTROY)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DESTROY))
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_FIRE,5},{TAMA_ELEMENT_WATER,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_FIRE,5},{TAMA_ELEMENT_WATER,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2)) Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_REMOVE)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_REMOVE))
local sg=Duel.GetMatchingGroup(cm.filter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,nil) 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) Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_FIRE,3},{TAMA_ELEMENT_EARTH,2}},obj) then 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)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_ATKCHANGE))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,3))
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,4)) Duel.SelectOption(tp,aux.Stringid(m,4))
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,5)) Duel.SelectOption(tp,aux.Stringid(m,5))
Duel.SetChainLimit(cm.chainlm) Duel.SetChainLimit(cm.chainlm)
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DAMAGE)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DAMAGE))
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
......
...@@ -58,15 +58,15 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,15 +58,15 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local obj={} local obj={}
if index then obj=tama.get(index) end if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1)) Duel.SelectOption(tp,aux.Stringid(m,1))
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,1}},obj) and (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_EARTH)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_FIRE))>=1 then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,1}},obj) and ((tama.tamas_getElementCount(obj,TAMA_ELEMENT_WIND)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_WATER)+tama.tamas_getElementCount,(obj,TAMA_ELEMENT_EARTH)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_FIRE))>=1 then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2)) Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW))
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,3)) Duel.SelectOption(tp,aux.Stringid(m,3))
Duel.SetChainLimit(cm.chainlm) Duel.SetChainLimit(cm.chainlm)
end end
end end
......
...@@ -58,15 +58,15 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,15 +58,15 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local obj={} local obj={}
if index then obj=tama.get(index) end if index then obj=tama.get(index) end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1)) Duel.SelectOption(tp,aux.Stringid(m,1))
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,1}},obj) and (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_EARTH)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_FIRE))>=1 then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,1}},obj) and ((tama.tamas_getElementCount(obj,TAMA_ELEMENT_WIND)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_WATER)+tama.tamas_getElementCount,(obj,TAMA_ELEMENT_EARTH)+tama.tamas_getElementCount(obj,TAMA_ELEMENT_FIRE))>=1 then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2)) Duel.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW)) e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW))
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,3)) Duel.SelectOption(tp,aux.Stringid(m,3))
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
end end
end end
......
...@@ -32,18 +32,18 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,18 +32,18 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if sg1:GetCount()<=0 then return end if sg1:GetCount()<=0 then return end
local j=1 local j=1
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ORDER)>=1 then if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ORDER)>=1 then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,1)) Duel.SelectOption(tp,aux.Stringid(m,1))
j=j+1 j=j+1
end end
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND))>=1 then if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WATER)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_WIND))>=1 then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,2)) Duel.SelectOption(tp,aux.Stringid(m,2))
for i=1,j do for i=1,j do
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT)
end end
end end
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_EARTH)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY))>=1 and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_EARTH)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY))>=1 and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,3)) Duel.SelectOption(tp,aux.Stringid(m,3))
for i=1,j do for i=1,j do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
...@@ -56,7 +56,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_FIRE)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY))>=1 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then if (sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_FIRE)+sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_ENERGY))>=1 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,4)) Duel.SelectOption(tp,aux.Stringid(m,4))
for i=1,j do for i=1,j do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
...@@ -69,22 +69,24 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,22 +69,24 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_LIFE)>=1 then if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_LIFE)>=1 then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,5)) Duel.SelectOption(tp,aux.Stringid(m,5))
for i=1,j do for i=1,j do
Duel.BreakEffect() Duel.BreakEffect()
Duel.Recover(tp,1000,REASON_EFFECT) Duel.Recover(tp,1000,REASON_EFFECT)
end end
end end
if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_CHAOS)>=1 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 then if sg1:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_CHAOS)>=1 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 then
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(m,6)) Duel.SelectOption(tp,aux.Stringid(m,6))
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
for i=1,j do for i=1,j do
local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK) local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_DECK,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT) Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
end end
end end
Duel.ShuffleDeck(1-tp) Duel.ShuffleDeck(1-tp)
......
...@@ -50,10 +50,10 @@ function cm.smop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,10 +50,10 @@ function cm.smop(e,tp,eg,ep,ev,re,r,rp)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
local el=tama.tamas_sumElements(sg) local el=tama.tamas_sumElements(sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
local g1=Duel.GetMatchingGroupCount(cm.thfilter,tp,LOCATION_DECK,0,nil,el) local g1=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil,el)
if g1:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if g1:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,g1:GetCount(),nil) local sg1=g1:Select(tp,1,1,nil)
local tc=sg1:GetFirst() local tc=sg1:GetFirst()
if Duel.SendtoHand(sg1,tp,REASON_EFFECT)>0 and tc:IsSummonable(true,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then if Duel.SendtoHand(sg1,tp,REASON_EFFECT)>0 and tc:IsSummonable(true,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -138,3 +138,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,3 +138,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function cm.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil
end
...@@ -38,9 +38,9 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,9 +38,9 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,90351981) return Duel.IsPlayerAffectedByEffect(tp,90351981)
end end
function cm.costfilter(c,tp) function cm.costfilter(c,tp)
return c:IsType(TYPE_MONSTER) and (c:IsControler(tp) or c:IsFaceup()) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),c:GetRace()) return c:IsReleasableByEffect() and c:IsType(TYPE_MONSTER) and (c:IsControler(tp) or c:IsFaceup()) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),c:GetRace(),tp)
end end
function cm.thfilter(c,lv,rac) function cm.thfilter(c,lv,rac,tp)
return c:IsSetCard(0x11b) and not c:IsCode(m) and c:IsAbleToHand() and (rac&RACE_MACHINE==0 or Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,c,lv)) return c:IsSetCard(0x11b) and not c:IsCode(m) and c:IsAbleToHand() and (rac&RACE_MACHINE==0 or Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,c,lv))
end end
function cm.tgfilter(c,lv) function cm.tgfilter(c,lv)
...@@ -67,9 +67,9 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,9 +67,9 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
if not tc then return end if not tc then return end
local lv,rac=tc:GetLevel(),tc:GetRace() local lv,rac=tc:GetLevel(),tc:GetRace()
if Duel.Release(tc,REASON_COST)~=0 then if Duel.Release(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv,rac) local hg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv,rac,tp)
if #hg>0 and Duel.SendtoHand(hg,nil,REASON_EFFECT)~=0 then if #hg>0 and Duel.SendtoHand(hg,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,hg) Duel.ConfirmCards(1-tp,hg)
local sg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil,lv) local sg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil,lv)
......
...@@ -71,7 +71,7 @@ end ...@@ -71,7 +71,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND+LOCATION_EXTRA) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -18,7 +18,7 @@ function c60001002.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +18,7 @@ function c60001002.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c60001002.cfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c60001002.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c60001002.ssfilter(c) function c60001002.ssfilter(c)
return c:IsSetCard(0xf1) and c:IsAbleToGrave() return c:IsSetCard(0xf1) and c:IsType(TYPE_MONSTER)
end end
function c60001002.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60001002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -22,7 +22,7 @@ function c60001011.initial_effect(c) ...@@ -22,7 +22,7 @@ function c60001011.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c60001011.filter(c) function c60001011.filter(c)
return c:IsSetCard(0xf1) and c:IsAbleToHand() return c:IsSetCard(0xf1) and c:IsAbleToHand() and not c:IsCode(60001011)
end end
function c60001011.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60001011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001011.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c60001011.filter,tp,LOCATION_DECK,0,1,nil) end
......
--冥之魔妖-阎魔 --冥之魔妖-阎魔
function c72100115.initial_effect(c) function c72100115.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,c72100115.matfilter,1,1) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x121),1,1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(72100115,0)) e2:SetDescription(aux.Stringid(72100115,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
...@@ -32,6 +32,3 @@ function c72100115.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,6 +32,3 @@ function c72100115.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c72100115.matfilter(c)
return c:IsLinkSetCard(0x121) and c:IsLevel(4)
end
\ No newline at end of file
...@@ -92,7 +92,7 @@ function c76029004.rhop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +92,7 @@ function c76029004.rhop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("就算是在前线指挥作战,也有最合适的造型。") Debug.Message("就算是在前线指挥作战,也有最合适的造型。")
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect() then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
......
...@@ -22,7 +22,7 @@ function c79029527.filter1(c,e,tp) ...@@ -22,7 +22,7 @@ function c79029527.filter1(c,e,tp)
return c:IsType(TYPE_LINK) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and rg:GetCount()>=lv and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) return c:IsType(TYPE_LINK) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and rg:GetCount()>=lv and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false)
end end
function c79029527.filter3(c) function c79029527.filter3(c)
return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end end
function c79029527.filter2(c) function c79029527.filter2(c)
return c:IsType(TYPE_LINK) and c:IsSetCard(0x11b) return c:IsType(TYPE_LINK) and c:IsSetCard(0x11b)
......
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