Commit 4af8223b authored by CubeRuler's avatar CubeRuler

fix

parent e706a0ab
Pipeline #17104 passed with stages
in 35 minutes and 26 seconds
This diff is collapsed.
This diff is collapsed.
......@@ -59,13 +59,13 @@ function cm.check(c,e,tp)
return c:IsRace(RACE_ROCK) and c:IsLevelAbove(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsSummonableCard()
end
function cm.chtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.chop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,g)
......
......@@ -13,29 +13,39 @@ function c33400114.initial_effect(c)
e1:SetOperation(c33400114.activate)
c:RegisterEffect(e1)
end
function c33400114.tfilter(c,e,tp)
return c:IsCode(33400011) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
function c33400114.tfilter(c,e,tp,tc)
return c:IsCode(33400011) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c33400114.filter(c,e,tp)
return c:IsSetCard(0x3341) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c33400114.tfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c33400114.tfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c33400114.chkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3341)
end
function c33400114.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33400114.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33400114.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(100)
return true
end
function c33400114.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c33400114.tfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
if chk==0 then
if e:GetLabel()==100 then
return Duel.IsExistingMatchingCard(c33400114.filter,tp,LOCATION_MZONE,0,1,nil,e,tp)
else
return Duel.IsExistingMatchingCard(c33400114.tfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,nil)
end
end
if e:GetLabel() == 100 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33400114.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(0)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c33400114.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33400114.tfilter),tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local sg=Duel.SelectMatchingCard(tp,c33400114.tfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
......
......@@ -3,6 +3,8 @@ local m=33502916
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,cm.xyzfilter,4,2)
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
......@@ -28,6 +30,9 @@ function cm.initial_effect(c)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
function cm.xyzfilter(c)
return c:IsRace(RACE_MACHINE)
end
function cm.filter(c)
return aux.IsCodeListed(c,33502900)
end
......
......@@ -1773,7 +1773,7 @@ function cm.SRoverDrawOp(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnCount()==1 then
ct=1
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_DRAW_COUNT)}
for _,te in pairs(eset) do if te:GetValue()>dt then dt=te:GetValue() end end
for _,te in pairs(eset) do if te:GetValue()>ct then ct=te:GetValue() end end
end
if ct>3 then return end
Duel.Hint(HINT_CARD,0,c:GetOriginalCode())
......
......@@ -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)
......
......@@ -51,7 +51,7 @@ function c71400069.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c71400069.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),tp,POS_FACEDOWN)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),tp,POS_FACEDOWN) end
end
function c71400069.filter1(c)
return c:IsCode(71400038) and c:IsAbleToHand()
......
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