Commit 18161111 authored by Nemo Ma's avatar Nemo Ma

fix

parent c7a2f68e
--幻旅传说·献祭
--traveler saga tribute
--21.04.10
local m=11451402
local cm=_G["c"..m]
......@@ -15,6 +15,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetCondition(cm.costcon)
e2:SetCost(cm.costchk)
e2:SetTarget(cm.costtg)
e2:SetOperation(cm.costop)
......@@ -35,6 +36,10 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(ep,m,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.costcon(e)
cm[0]=false
return true
end
function cm.costchk(e,te,tp)
return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_MZONE,0,1,nil)
end
......@@ -43,6 +48,7 @@ function cm.costtg(e,te,tp)
return Duel.GetFlagEffect(tp,m)>0 and te:GetHandler() and not te:GetHandler():IsOnField()
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
if cm[0] then return end
Duel.ConfirmCards(1-tp,e:GetLabelObject():GetHandler())
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......@@ -59,6 +65,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
Duel.RegisterEffect(e2,tp)
end
cm[0]=true
end
function cm.efilter(e,ct)
return e:GetLabel()==ct
......
......@@ -51,7 +51,9 @@ function cm.matfilter(c)
end
function cm.costcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)>0
if Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)==0 then return false end
cm[0]=false
return true
end
function cm.costchk(e,te_or_c,tp)
return Duel.IsExistingMatchingCard(Card.IsAbleToDeckOrExtraAsCost,tp,0,LOCATION_GRAVE,1,nil)
......@@ -65,9 +67,11 @@ function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(1)~=0 and ep==tp
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
if cm[0] then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
cm[0]=true
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
......
......@@ -38,15 +38,19 @@ function cm.matfilter(c)
end
function cm.costcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>0
if Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)==0 then return false end
cm[0]=false
return true
end
function cm.costchk(e,te_or_c,tp)
return Duel.IsExistingMatchingCard(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
if cm[0] then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
cm[0]=true
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
......
......@@ -136,7 +136,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local limit=5
if order_e then limit=6 end
local g=Group.CreateGroup()
if Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
if Duel.SelectYesNo(tp,aux.Stringid(m,6)) then
local tc=sg:GetFirst()
while tc do
local dg=Group.CreateGroup()
......
......@@ -60,7 +60,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_ORDER,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,1))
end
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
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.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW))
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
......@@ -60,7 +60,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if obj and tama.tamas_isAllElementsNotAbove({{TAMA_ELEMENT_CHAOS,2}},obj) then
Duel.SelectOption(tp,aux.Stringid(m,1))
end
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
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.SelectOption(tp,aux.Stringid(m,2))
e:SetCategory(bit.bor(e:GetCategory(),CATEGORY_DRAW))
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
......@@ -2,6 +2,7 @@ local m=82224071
local cm=_G["c"..m]
cm.name="连接之黑魔导师"
function cm.initial_effect(c)
aux.AddCodeList(c,46986414)
--link summon
aux.AddLinkProcedure(c,nil,3,3,cm.lcheck)
c:EnableReviveLimit()
......
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