Commit c67f9a52 authored by Nemo Ma's avatar Nemo Ma

fix

parent 7030b1e5
Pipeline #2915 failed with stages
--飞球造物·吸血球 --飞球造物·吸血球
local m=c13254058 local m=c13254058
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -85,6 +85,11 @@ end ...@@ -85,6 +85,11 @@ end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsSetCard(0x353) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x353) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.canActivate(c,PCe,eg,ep,ev,re,r,rp)
local tep=c:GetControler()
local target=PCe:GetTarget()
return not target or target(PCe,tep,eg,ep,ev,re,r,rp,0)
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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
......
...@@ -9,7 +9,7 @@ function cm.initial_effect(c) ...@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_EXTRA_TRIBUTE) e0:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e0:SetTargetRange(LOCATION_HAND,0) e0:SetTargetRange(LOCATION_HAND,0)
e0:SetTarget(aux.TargetBoolFunction(cm.limit)) e0:SetTarget(function(e,c) return c~=e:GetHandler() end)
e0:SetValue(POS_FACEUP_ATTACK) e0:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--double tribute --double tribute
...@@ -48,11 +48,6 @@ function cm.initial_effect(c) ...@@ -48,11 +48,6 @@ function cm.initial_effect(c)
e12:SetOperation(cm.bgmop) e12:SetOperation(cm.bgmop)
c:RegisterEffect(e12) c:RegisterEffect(e12)
end end
function cm.limit(c)
return function (e,c)
return e:GetHandler()~=c
end
end
function cm.condition(e,c) function cm.condition(e,c)
return c:IsRace(RACE_MACHINE) return c:IsRace(RACE_MACHINE)
end end
......
...@@ -139,13 +139,9 @@ function cm.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -139,13 +139,9 @@ function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.bgmop(e,tp,eg,ep,ev,re,r,rp) function cm.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(m,4)) Duel.Hint(11,0,aux.Stringid(m,4))
end end
...@@ -39,7 +39,7 @@ function cm.initial_effect(c) ...@@ -39,7 +39,7 @@ function cm.initial_effect(c)
e5:SetDescription(aux.Stringid(m,2)) e5:SetDescription(aux.Stringid(m,2))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING) e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetRange(LOCATION_GRAVE) e5:SetRange(LOCATION_MZONE)
e5:SetCondition(cm.condition) e5:SetCondition(cm.condition)
e5:SetOperation(cm.operation) e5:SetOperation(cm.operation)
c:RegisterEffect(e5) c:RegisterEffect(e5)
......
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