Commit e190cc55 authored by POLYMER's avatar POLYMER

fix

parent e6958ec4
......@@ -9,12 +9,12 @@ function s.initial_effect(c)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--back
local e3=Effect.CreateEffect(c)
--back
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(0x30)
e3:SetCountLimit(1,id)
e3:SetCost(s.spcost)
......@@ -25,82 +25,82 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
getmetatable(e:GetHandler()).announce_filter={TYPE_RITUAL,OPCODE_ISTYPE,TYPE_SPELL+TYPE_TRAP,OPCODE_ISTYPE,OPCODE_NOT,OPCODE_AND}
getmetatable(e:GetHandler()).announce_filter={TYPE_RITUAL,OPCODE_ISTYPE,TYPE_SPELL+TYPE_TRAP,OPCODE_ISTYPE,OPCODE_NOT,OPCODE_AND}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
e:SetLabel(ac)
e:SetLabel(ac)
end
function s.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:IsType(TYPE_RITUAL)
return c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:IsType(TYPE_RITUAL+TYPE_MONSTER)
end
function s.cdfilter(c,code)
return c:IsCode(13000757) or c:IsCode(code)
return c:IsCode(13000757) or c:IsCode(code)
end
function s.rlfilter(c)
return c:IsReleasable() and c:IsType(TYPE_RITUAL)
and c:IsType(TYPE_MONSTER+TYPE_SPELL)
return c:IsReleasable() and c:IsType(TYPE_RITUAL)
and c:IsType(TYPE_MONSTER+TYPE_SPELL)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
local RspCheck=false
local c=e:GetHandler()
local cid=e:GetLabel()
local RspCheck=false
if Duel.IsPlayerCanDiscardDeck(tp,3) then
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:GetCount()>0 then
if g:IsExists(s.cdfilter,1,nil,cid) then RspCheck=true end
if g:IsExists(s.cdfilter,1,nil,cid) then RspCheck=true end
if g:IsExists(s.filter,1,nil,e,tp) and Duel.GetLocationCount(tp,0x04)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:FilterSelect(tp,s.filter,1,1,nil,e,tp)
local tc=sg:GetFirst()
if RspCheck and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
else
if Duel.SpecialSummonStep(tc,0,tp,tp,true,true,POS_FACEUP) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
local tc=sg:GetFirst()
if RspCheck and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
else
if Duel.SpecialSummonStep(tc,0,tp,tp,true,true,POS_FACEUP) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
g:Sub(sg)
end
local rg=g:Filter(s.rlfilter,nil)
end
local rg=g:Filter(s.rlfilter,nil)
if #rg>0 then
Duel.Release(rg,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
Duel.Release(rg,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
end
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0x02,0,1,nil)
and e:GetHandler():IsAbleToDeckAsCost() end
and e:GetHandler():IsAbleToDeckAsCost() end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function s.mfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
local mg=Duel.GetMatchingGroup(s.mfilter,tp,0x06,0,nil)
local lg=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,0x40,0,nil,mg,c)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,0x40,0,1,nil,e,tp,mg,c,chkf)
s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
local mg=Duel.GetMatchingGroup(s.mfilter,tp,0x06,0,nil)
local lg=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,0x40,0,nil,mg,c)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,0x40,0,1,nil,e,tp,mg,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
......@@ -110,15 +110,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
res=Duel.IsExistingMatchingCard(s.filter2,tp,0x40,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
local op=2
if #lg>0 and res then op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3),aux.Stringid(id,4))
elseif res then op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,4)) if op==1 then op=2 end
elseif #lg>0 then op=Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))+1
else return end
if op==0 then
s.fusion(e,tp,eg,ep,ev,re,r,rp,mg)
end
if op==1 then
local op=2
if #lg>0 and res then op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3),aux.Stringid(id,4))
elseif res then op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,4)) if op==1 then op=2 end
elseif #lg>0 then op=Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))+1
else return end
if op==0 then
s.fusion(e,tp,eg,ep,ev,re,r,rp,mg)
end
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=lg:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),mg,c)
......@@ -128,7 +128,7 @@ function s.fusion(e,tp,eg,ep,ev,re,r,rp,mg)
local c=e:GetHandler()
local chkf=tp
local mg1=Group.CreateGroup()
mg1:Merge(mg)
mg1:Merge(mg)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,0x40,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
......
......@@ -36,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(1500)
e1:SetValue(800)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
......@@ -56,13 +56,14 @@ function s.rlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=tc:GetCode()
local cs=_G["c"..code]
Duel.SSet(tp,tc,tp,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e1)
if Duel.SSet(tp,tc,tp,true) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e1)
end
--copy effect
if tc:IsType(TYPE_QUICKPLAY) then return end
local e2=Effect.CreateEffect(c)
......@@ -72,18 +73,13 @@ function s.rlop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetValue(TYPE_QUICKPLAY)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,code+EFFECT_COUNT_CODE_OATH)
e3:SetTarget(cs.target)
e3:SetOperation(cs.activate)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e3)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0))
local eff=tc:GetActivateEffect()
local eff2=eff:Clone()
eff:SetDescription(aux.Stringid(id,0))
eff2:SetProperty(eff2:GetProperty(),EFFECT_FLAG2_COF)
eff2:SetHintTiming(TIMING_END_PHASE,TIMING_END_PHASE)
eff2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(eff2)
end
end
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
--e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
......@@ -15,6 +15,7 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetCost(cm.cost)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
end
......@@ -45,9 +46,10 @@ function cm.handcon(e)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetTurnPlayer()==tp or Duel.IsExistingMatchingCard(cm.hcfil,tp,LOCATION_HAND,0,1,nil) end
if Duel.GetTurnPlayer()==tp then
e:SetLabel(1)
else
e:SetLabel(1)
if Duel.GetTurnPlayer()~=tp then
--e:SetLabel(1)
--else
e:SetLabel(2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.GetMatchingGroup(cm.hcfil,tp,LOCATION_HAND,0,nil):Select(tp,1,1,nil)
......
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