Commit 0abfac43 authored by POLYMER's avatar POLYMER

fix

parent 81859bc7
......@@ -10,21 +10,22 @@ function c33700792.initial_effect(c)
e1:SetTarget(c33700792.target)
e1:SetOperation(c33700792.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(33700792,ACTIVITY_SPSUMMON,c33700792.counterfilter)
end
function c33700792.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function c33700792.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
if chk==0 then return Duel.GetCustomActivityCount(33700792,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(e)
e1:SetTarget(c33700792.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetLabelObject(e)
e2:SetTarget(c33700792.splimit)
Duel.RegisterEffect(e2,tp)
end
function c33700792.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return se~=e:GetLabelObject() and c:IsLocation(LOCATION_EXTRA)
......
......@@ -89,7 +89,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSpecialSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=g:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummonRule(tp,sc)
end
end
......
......@@ -144,6 +144,8 @@ function s.PendCondition()
return g:IsExists(s.PConditionFilter,1,nil,e,tp,lscale,rscale,eset)
end
end
local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end
function s.PendOperation()
return function(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local rpz=Duel.GetMatchingGroup(s.rpzfilter,tp,LOCATION_SZONE,0,nil):GetFirst()
......@@ -205,6 +207,10 @@ function s.PendOperation()
aux.PendulumChecklist=aux.PendulumChecklist|(0x1<<tp)
end
sg:Merge(g)
if KOISHI_CHECK then
c:SetCardData(CARDDATA_LSCALE,6)
rpz:SetCardData(CARDDATA_LSCALE,8)
end
Duel.HintSelection(Group.FromCards(c))
Duel.HintSelection(Group.FromCards(rpz))
--
......@@ -225,10 +231,9 @@ function s.PendOperation()
-- loc=0xff
-- mt.psummonable_location=loc
--end
local zone=0xff
if exgc>=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM) then
local lzone=Duel.GetLinkedZone(tp)
zone=zone~lzone
if KOISHI_CHECK then
tc:RegisterFlagEffect(id+2,0,0,1,tc:GetOriginalType())
tc:SetCardData(CARDDATA_TYPE,TYPE_NORMAL+TYPE_MONSTER)
end
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -257,12 +262,51 @@ function s.PendOperation()
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(7)
tc:RegisterEffect(e6,true)
--tc:SetStatus(STATUS_EFFECT_ENABLED,true)
--tc:SetStatus(STATUS_PROC_COMPLETE,true)
--tc:SetStatus(STATUS_SUMMONING,true)
if not KOISHI_CHECK then
local zone=0xff
if exgc>=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM) then
local lzone=Duel.GetLinkedZone(tp)
zone=zone~lzone
end
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP,zone)
end
end
if #spellg>0 and KOISHI_CHECK then
--summon cost
local ge0=Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_FIELD)
ge0:SetCode(EFFECT_SPSUMMON_COST)
ge0:SetTargetRange(LOCATION_HAND,0)
ge0:SetLabelObject(spellg)
ge0:SetCost(s.costchk)
ge0:SetOperation(s.costop)
Duel.RegisterEffect(ge0,tp)
spellg:KeepAlive()
end
if not KOISHI_CHECK then
Duel.SpecialSummonComplete()
end
--Duel.SpecialSummon(spellg,SUMMON_TYPE_PENDULUM,tp,tp,true,false,POS_FACEUP)
end
end
function s.costchk(e,c,tp)
return true
end
function s.costop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if #g>0 then
for tc in aux.Next(g) do
if tc:GetFlagEffect(id+2)~=0 then
tc:SetCardData(CARDDATA_TYPE,tc:GetFlagEffectLabel(id+2))
tc:ResetFlagEffect(id+2)
end
end
end
e:Reset()
end
function s.spellfilter(c)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL)
end
......@@ -26,17 +26,17 @@ function c91030020.initial_effect(c)
e2:SetOperation(c91030020.spop2)
c:RegisterEffect(e2)
end
function c91030020.lfilter(c)
return c:IsLinkSummonable(nil)
end
function c91030020.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c91030020.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c91030020.lfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.LinkSummon(tp,g:GetFirst(),nil)
local g=Duel.SelectMatchingCard(tp,Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil)
local tc=g:GetFirst()
if tc then
Duel.LinkSummon(tp,tc,nil)
end
end
function c91030020.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and bit.band(c:GetPreviousTypeOnField(),TYPE_LINK)~=0
......
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