Commit 605e749f authored by Nemo Ma's avatar Nemo Ma

fix

parent 3c8b8973
......@@ -44,7 +44,7 @@ function cm.initial_effect(c)
e6:SetCode(m)
e6:SetRange(LOCATION_EXTRA)
c:RegisterEffect(e6)
Duel.AddCustomActivityCounter(cm,ACTIVITY_CHAIN,cm.chainfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
return not re:IsActiveType(TYPE_MONSTER)
......@@ -55,7 +55,7 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local cost=Duel.GetMatchingGroup(function(c)return c:GetType()&0x20004==0x20004 and c:IsReleasable()end,tp,LOCATION_ONFIELD,0,nil)
local res=Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentPhase()==PHASE_END
if chk==0 then return cost:CheckSubGroup(cm.fselect,1,3,res) and not e:GetHandler():IsForbidden() and e:GetHandler():CheckUniqueOnField(tp) end
if chk==0 then return cost:CheckSubGroup(cm.fselect,1,3,res) and not e:GetHandler():IsForbidden() and e:GetHandler():CheckUniqueOnField(tp) and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=cost:SelectSubGroup(tp,cm.fselect,false,1,3,res)
local cg=g:Filter(Card.IsFacedown,nil)
......@@ -337,7 +337,11 @@ function cm.chtg(_tg,res)
end
function cm.chval(_val,res)
return function(e,re,...)
local x=re:GetHandler()
local x=re
if aux.GetValueType(re)=="Effect" then x=re:GetHandler() else
local rc=Duel.CreateToken(tp,m+50)
re=rc:GetActivateEffect()
end
if x:IsHasEffect(m) then return res end
return _val(e,re,...)
end
......
......@@ -54,14 +54,14 @@ function cm.initial_effect(c)
e6:SetCode(m)
e6:SetRange(LOCATION_EXTRA)
c:RegisterEffect(e6)
Duel.AddCustomActivityCounter(cm,ACTIVITY_CHAIN,cm.chainfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
return not re:IsActiveType(TYPE_MONSTER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local cost=Duel.GetMatchingGroup(function(c)return c:IsSetCard(0x553b) and c:IsReleasable()end,tp,LOCATION_ONFIELD,0,nil)
if chk==0 then return #cost>0 and not e:GetHandler():IsForbidden() and e:GetHandler():CheckUniqueOnField(tp) end
if chk==0 then return #cost>0 and not e:GetHandler():IsForbidden() and e:GetHandler():CheckUniqueOnField(tp) and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=cost:Select(tp,1,1,e:GetHandler())
local cg=g:Filter(Card.IsFacedown,nil)
......@@ -342,7 +342,11 @@ function cm.chtg(_tg,res)
end
function cm.chval(_val,res)
return function(e,re,...)
local x=re:GetHandler()
local x=re
if aux.GetValueType(re)=="Effect" then x=re:GetHandler() else
local rc=Duel.CreateToken(tp,m+50)
re=rc:GetActivateEffect()
end
if x:IsHasEffect(m) then return res end
return _val(e,re,...)
end
......
......@@ -50,7 +50,7 @@ function cm.initial_effect(c)
e7:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)end)
e7:SetOperation(cm.effop)
c:RegisterEffect(e7)
Duel.AddCustomActivityCounter(cm,ACTIVITY_CHAIN,cm.chainfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
return not re:IsActiveType(TYPE_MONSTER)
......@@ -103,6 +103,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,se+2))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetRange(0xff)
e1:SetCode(EVENT_CUSTOM+(m+50*ct))
......@@ -161,7 +162,7 @@ function cm.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
break
end
end
return res and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) and c:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and c:IsSetCard(0x353b) and c:GetType()&0x20004==0x20004 and c:GetControler()==p
return res and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) and c:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and c:GetType()&0x20004==0x20004 and c:GetControler()==p
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e)
......@@ -453,7 +454,11 @@ function cm.chtg(_tg,res)
end
function cm.chval(_val,res)
return function(e,re,...)
local x=re:GetHandler()
local x=re
if aux.GetValueType(re)=="Effect" then x=re:GetHandler() else
local rc=Duel.CreateToken(tp,m+50)
re=rc:GetActivateEffect()
end
if x:IsHasEffect(m) then return res end
return _val(e,re,...)
end
......
......@@ -50,7 +50,7 @@ function cm.initial_effect(c)
e7:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)end)
e7:SetOperation(cm.effop)
c:RegisterEffect(e7)
Duel.AddCustomActivityCounter(cm,ACTIVITY_CHAIN,cm.chainfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
return not re:IsActiveType(TYPE_MONSTER)
......@@ -100,6 +100,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,se+2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetRange(0xff)
e1:SetCode(EVENT_CUSTOM+(m+50*ct))
......@@ -158,11 +159,11 @@ function cm.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
break
end
end
return res and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) and c:IsLocation(LOCATION_REMOVED) and c:IsSetCard(0x353b) and c:GetType()&0x20004==0x20004 and c:GetControler()==p
return res and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) and c:IsLocation(LOCATION_REMOVED) and c:GetType()&0x20004==0x20004 and c:GetControler()==p
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local le={Duel.IsPlayerAffectedByEffect(tp,m)}
for k,v in pairs(le) do
......@@ -446,7 +447,11 @@ function cm.chtg(_tg,res)
end
function cm.chval(_val,res)
return function(e,re,...)
local x=re:GetHandler()
local x=re
if aux.GetValueType(re)=="Effect" then x=re:GetHandler() else
local rc=Duel.CreateToken(tp,m+50)
re=rc:GetActivateEffect()
end
if x:IsHasEffect(m) then return res end
return _val(e,re,...)
end
......
......@@ -49,7 +49,7 @@ function cm.initial_effect(c)
e6:SetCode(m)
e6:SetRange(LOCATION_EXTRA)
c:RegisterEffect(e6)
Duel.AddCustomActivityCounter(cm,ACTIVITY_CHAIN,cm.chainfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
return not re:IsActiveType(TYPE_MONSTER)
......@@ -309,7 +309,11 @@ function cm.chtg(_tg,res)
end
function cm.chval(_val,res)
return function(e,re,...)
local x=re:GetHandler()
local x=re
if aux.GetValueType(re)=="Effect" then x=re:GetHandler() else
local rc=Duel.CreateToken(tp,m+50)
re=rc:GetActivateEffect()
end
if x:IsHasEffect(m) then return res end
return _val(e,re,...)
end
......
......@@ -54,6 +54,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......@@ -68,6 +69,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -84,6 +86,7 @@ function cm.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -97,6 +100,7 @@ end
function cm.target4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsActiveType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate4(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -65,6 +65,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......@@ -79,6 +80,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -92,6 +94,7 @@ function cm.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -108,6 +111,7 @@ end
function cm.target4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsActiveType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate4(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
......
......@@ -45,6 +45,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......@@ -59,6 +60,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -75,6 +77,7 @@ function cm.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -96,6 +99,7 @@ function cm.target4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsActiveType(TYPE_MONSTER) and g:CheckSubGroup(cm.fselect,2,2) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate4(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
......@@ -108,6 +112,7 @@ function cm.activate4(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(tg,nil,REASON_EFFECT)==0 then return end
Duel.ConfirmCards(1-tp,tg)
Duel.SendtoGrave(sg-tg,REASON_EFFECT)
Duel.ShuffleHand(tp)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_REPTILE) and c:IsLevel(8) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -49,6 +49,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......@@ -63,6 +64,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -73,6 +75,7 @@ end
function cm.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_ONFIELD)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,1-tp,LOCATION_ONFIELD,0,nil)
......@@ -92,6 +95,7 @@ end
function cm.target4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsActiveType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate4(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
......
......@@ -60,6 +60,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......@@ -76,6 +77,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,exc)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......@@ -93,6 +95,7 @@ function cm.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -123,6 +126,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -59,6 +59,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......@@ -73,6 +74,7 @@ function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -99,6 +101,7 @@ function cm.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -113,6 +116,7 @@ function cm.target4(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:IsActiveType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate4(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
......
......@@ -84,10 +84,10 @@ function cm.sretop(e,tp,eg,ep,ev,re,r,rp)
end
if exg:GetClassCount(Card.GetOriginalCode)>=3 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()==1 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
end
......
......@@ -84,7 +84,7 @@ function cm.sretop(e,tp,eg,ep,ev,re,r,rp)
end
if exg:GetClassCount(Card.GetOriginalCode)>=3 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,3,nil)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
......
......@@ -27,6 +27,7 @@ function cm.initial_effect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(cm.limcon)
e6:SetOperation(cm.chainop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
......@@ -61,7 +62,7 @@ end
function cm.limop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial()
if c:IsSummonType(SUMMON_TYPE_FUSION) and g:IsExists(Card.IsFusionCode,1,nil,89390000) and g:IsExists(Card.IsFusionCode,1,nil,89390001) and g:IsExists(Card.IsFusionCode,1,nil,89390002) and c:GetFlagEffect(m)~=0 then
if c:IsSummonType(SUMMON_TYPE_FUSION) and g:IsExists(Card.IsFusionCode,1,nil,89390000) and g:IsExists(Card.IsFusionCode,1,nil,89390001) and g:IsExists(Card.IsFusionCode,1,nil,89390002) and c:GetFlagEffect(m)>0 then
Duel.SetChainLimitTillChainEnd(cm.chainlm)
end
c:ResetFlagEffect(m)
......
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