Commit 96944857 authored by Momobako's avatar Momobako

Push by Appveyor

parent 292486a2
...@@ -65,7 +65,7 @@ function c10970005.spfilter(c,e,tp) ...@@ -65,7 +65,7 @@ function c10970005.spfilter(c,e,tp)
end end
function c10970005.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c10970005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,10970005)==0 and Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetFlagEffect(tp,10970005)==0 and Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c10970005.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c10970005.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.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.RegisterFlagEffect(tp,10970005,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,10970005,RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -133,7 +133,7 @@ function cm.filter(c,e,tp) ...@@ -133,7 +133,7 @@ function cm.filter(c,e,tp)
return c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(cm.filter1,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler(),(c:GetType() & 0x7)) return c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(cm.filter1,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler(),(c:GetType() & 0x7))
end end
function cm.filter1(c,t) function cm.filter1(c,t)
return c:IsAbleToChangeControler() and not c:IsType(TYPE_TOKEN) and c:IsType((t & 0x7)) return c:IsAbleToChangeControler() and not c:IsType(TYPE_TOKEN) and c:IsType((t & 0x7)) and (c:IsType(TYPE_MONSTER) or c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end end
function cm.target0(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target0(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and cm.filter1(chkc,e:GetLabelObject():GetType()) and chkc~=e:GetHandler() and chkc:IsControler(1-tp) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and cm.filter1(chkc,e:GetLabelObject():GetType()) and chkc~=e:GetHandler() and chkc:IsControler(1-tp) end
......
--逆行贝琳 --逆行贝琳
function c17060907.initial_effect(c) local m=17060907
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,c17060907.matfilter,1) aux.AddLinkProcedure(c,cm.matfilter,1)
--extra summon --extra summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(c17060907.sumtg) e1:SetTarget(cm.sumtg)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk --atk
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -16,21 +18,24 @@ function c17060907.initial_effect(c) ...@@ -16,21 +18,24 @@ function c17060907.initial_effect(c)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetValue(c17060907.atkval) e2:SetValue(cm.atkval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c17060907.matfilter(c) function cm.matfilter(c)
return c:GetLevel()==1 and c:IsType(TYPE_PENDULUM) return c:GetLevel()==1 and c:IsType(TYPE_PENDULUM)
end end
function c17060907.sumtg(e,c) function cm.sumtg(e,c)
return c:IsType(TYPE_PENDULUM) return c:IsType(TYPE_PENDULUM)
end end
function c17060907.atkval(e,c) function cm.atkval(e,c)
local g=e:GetHandler():GetLinkedGroup() local g=e:GetHandler():GetLinkedGroup()
if g:GetCount()==0 then local tc=g:GetFirst()
return 0 local val=0
else while tc do
local tg,val=g:GetMaxGroup(Card.GetBaseAttack) local atk=tc:GetTextAttack()
return val/2 if atk<0 then atk=0 end
val=val+atk
tc=g:GetNext()
end end
return val/2
end end
\ No newline at end of file
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