Commit 35f9960e authored by Nemo Ma's avatar Nemo Ma

fix

parent 1eed3c5e
--悠久之秤:曲直
local m=11451505
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -94,7 +93,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
op(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then Duel.NegateActivation(ev) end
end
if re:GetHandler():GetOriginalCode()==11451510 then
if re:GetHandler():GetOriginalCode()==11451510 or (aux.GetValueType(re:GetLabelObject())=="Effect" and re:GetLabelObject():GetHandler():GetOriginalCode()==11451510) then
repop=function(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then Duel.NegateActivation(ev) end
op(e,tp,eg,ep,ev,re,r,rp)
......
--悠久之阶:旋回
local m=11451506
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -78,6 +77,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
Debug.Message(te)
Debug.Message(te:GetHandler():IsRelateToEffect(e))
if not te then return end
if not te:GetHandler():IsRelateToEffect(e) then return end
e:SetLabelObject(te:GetLabelObject())
......@@ -108,7 +109,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
if re:GetHandler():GetOriginalCode()==11451510 then
if re:GetHandler():GetOriginalCode()==11451510 or (aux.GetValueType(re:GetLabelObject())=="Effect" and re:GetLabelObject():GetHandler():GetOriginalCode()==11451510) then
repop=function(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......
--悠久之径:逶迤
local m=11451507
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -92,7 +91,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
op(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then Duel.Draw(tp,1,REASON_EFFECT) end
end
if re:GetHandler():GetOriginalCode()==11451510 then
if re:GetHandler():GetOriginalCode()==11451510 or (aux.GetValueType(re:GetLabelObject())=="Effect" and re:GetLabelObject():GetHandler():GetOriginalCode()==11451510) then
repop=function(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then Duel.Draw(tp,1,REASON_EFFECT) end
op(e,tp,eg,ep,ev,re,r,rp)
......
--悠久之忆:归尘
local m=11451508
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -99,7 +98,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
if re:GetHandler():GetOriginalCode()==11451510 then
if re:GetHandler():GetOriginalCode()==11451510 or (aux.GetValueType(re:GetLabelObject())=="Effect" and re:GetLabelObject():GetHandler():GetOriginalCode()==11451510) then
repop=function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
......
--悠久之墟:流放
local m=11451509
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -129,7 +128,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
end
end
if re:GetHandler():GetOriginalCode()==11451510 then
if re:GetHandler():GetOriginalCode()==11451510 or (aux.GetValueType(re:GetLabelObject())=="Effect" and re:GetLabelObject():GetHandler():GetOriginalCode()==11451510) then
repop=function(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
......
--悠久之枷:断裁
local m=11451510
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -147,7 +146,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(ep,2200,REASON_EFFECT)
end
end
if re:GetHandler():GetOriginalCode()==11451510 then
if re:GetHandler():GetOriginalCode()==11451510 or (aux.GetValueType(re:GetLabelObject())=="Effect" and re:GetLabelObject():GetHandler():GetOriginalCode()==11451510) then
repop=function(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Damage(ep,2200,REASON_EFFECT)
......
--悠久之心:联结
--22.01.08
local m=11451547
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,2,nil,nil,99)
......@@ -128,14 +127,17 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp)
for oc in aux.Next(og) do
oc:RegisterFlagEffect(m,0,0,1)
local te=oc:GetActivateEffect()
local con=te:GetCondition()
local tg=te:GetTarget()
local op=te:GetOperation()
local e1=Effect.CreateEffect(oc)
e1:SetCategory(te:GetCategory())
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(te:GetCondition())
if con then e1:SetCondition(con) end
e1:SetCost(cm.addcost)
e1:SetTarget(te:GetTarget())
e1:SetOperation(te:GetOperation())
if tg then e1:SetTarget(tg) end
if op then e1:SetOperation(op) end
Duel.RegisterEffect(e1,tp)
end
end
......@@ -163,4 +165,26 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local tc=te:GetHandler()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
tc:CreateEffectRelation(te)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re==te end)
e1:SetOperation(cm.rsop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end
end
\ No newline at end of file
......@@ -19,7 +19,7 @@ end
function c71400053.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=yume.YumeFieldCheck(tp,0,2,LOCATION_GRAVE) and Duel.IsPlayerCanDraw(tp,1)
local ct=Duel.GetMatchingGroupCount(c71400053.filterlink1,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local g=GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local b2=yume.IsYumeFieldOnField(tp) and Duel.IsExistingMatchingCard(c71400053.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) and ct>0 and g:GetCount()>0
if chk==0 then return b1 or b2 end
local op=0
......
......@@ -19,7 +19,7 @@ function c71400058.initial_effect(c)
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400058,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_FZONE)
......
......@@ -39,7 +39,7 @@ end
function c71400066.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then
return Duel.CheckLPCost(tp,1000) and yume.YumeFieldCheck(tp,0,2,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
return Duel.CheckLPCost(tp,1000) and yume.YumeFieldCheck(tp,0,0,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......@@ -76,7 +76,7 @@ end
function c71400066.tg1a(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then
return Duel.CheckLPCost(tp,1000) and yume.YumeFieldCheck(tp,0,2,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(c71400066.filter1a,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
return Duel.CheckLPCost(tp,1000) and yume.YumeFieldCheck(tp,0,0,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(c71400066.filter1a,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
......@@ -88,14 +88,27 @@ function c9310055.chop(e,tp,eg,ep,ev,re,r,rp)
local repop=function(e,tp,eg,ep,ev,re,r,rp)
op(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(9310055,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,REASON_EFFECT)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
if re:GetHandler():GetOriginalCode()==11451510 or (aux.GetValueType(re:GetLabelObject())=="Effect" and re:GetLabelObject():GetHandler():GetOriginalCode()==11451510) then
repop=function(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(9310055,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
op(e,tp,eg,ep,ev,re,r,rp)
end
end
re:SetOperation(repop)
if not re:IsHasCategory(CATEGORY_TODECK) then re:SetCategory(re:GetCategory()+CATEGORY_TODECK) end
re:SetLabel(re:GetLabel()|0x80)
......
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