Commit 6754bbb1 authored by POLYMER's avatar POLYMER

fix

parent b2239a64
No preview for this file type
......@@ -30,6 +30,7 @@ function c114064005.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,114064005)
e4:SetOperation(c114064005.operation)
c:RegisterEffect(e4)
--replace
......@@ -82,14 +83,20 @@ end
function c114064005.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
if Duel.GetFlagEffect(tp,114064005)>0 then return end
Duel.RegisterFlagEffect(tp,114064005,RESET_PHASE+PHASE_END,0,1)
if c:GetPreviousLocation()==LOCATION_DECK then Duel.ShuffleDeck(tp) end
if Duel.IsExistingMatchingCard(c114064005.kufilter,tp,LOCATION_DECK,0,2,nil) then
local sg=Duel.GetMatchingGroup(c114064005.kufilter,tp,LOCATION_DECK,0,nil)
Duel.ConfirmCards(tp,sg)
end
--public
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_FLAG_EFFECT+114064005)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetRange(LOCATION_GRAVE)
e0:SetTargetRange(1,0)
e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE)
......
......@@ -130,6 +130,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if tc then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,tc)
end
end
end
\ No newline at end of file
......@@ -136,6 +136,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if tc then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,tc)
end
end
end
\ No newline at end of file
......@@ -122,6 +122,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if tc then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,tc)
end
end
end
\ No newline at end of file
......@@ -63,6 +63,7 @@ function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,nil)
if chk==0 then return #g>0 end
Duel.SendtoHand(g,nil,REASON_COST)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -122,6 +122,7 @@ function cm.adcost2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(m,3))
local pg=Duel.SelectMatchingCard(1-tp,Card.IsAbleToHandAsCost,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(pg,1-tp,REASON_COST)
Duel.ConfirmCards(tp,pg)
end
function cm.adtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(Card.IsControler,nil,tp):Filter(Card.IsLocation,nil,LOCATION_MZONE)
......
--源影依-神数雅各
function c98920105.initial_effect(c)
--fusion material
aux.EnablePendulumAttribute(c,false)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xc4),aux.FilterBoolFunction(Card.IsFusionSetCard,0x9d),true)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920105,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,98920105)
e2:SetCondition(c98920105.spcon)
e2:SetOperation(c98920105.spop)
c:RegisterEffect(e2)
--pendulum
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetDescription(aux.Stringid(98920105,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c98920105.con3)
e3:SetTarget(c98920105.tg3)
e3:SetOperation(c98920105.op3)
c:RegisterEffect(e3)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920105,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c98920105.condition)
e2:SetTarget(c98920105.target)
e2:SetOperation(c98920105.operation)
c:RegisterEffect(e2)
end
function c98920105.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,2,nil,0xc4) and (e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) or e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM))
end
function c98920105.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c98920105.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,1)
e2:SetLabel(c98920105.getsummoncount(tp))
e2:SetTarget(c98920105.splimit)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_LEFT_SPSUMMON_COUNT)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,1)
e6:SetLabel(c98920105.getsummoncount(tp))
e6:SetValue(c98920105.countval)
e6:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e6,tp)
--activate limit
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetCondition(c98920105.actcon)
e1:SetValue(c98920105.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetOperation(c98920105.aclimit1)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
function c98920105.getsummoncount(tp)
return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)
end
function c98920105.rmfilter(c,fid)
return c:GetFlagEffectLabel(98920105)==fid
end
function c98920105.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c98920105.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c98920105.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c98920105.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
function c98920105.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c98920105.getsummoncount(sump)>e:GetLabel()
end
function c98920105.countval(e,re,tp)
if c98920105.getsummoncount(tp)>e:GetLabel() then return 0 else return 1 end
end
function c98920105.actcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetCustomActivityCount(98920105,tp,ACTIVITY_CHAIN)~=0
end
function c98920105.actcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),98920105)~=0
end
function c98920105.actlimit(e,re,tp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c98920105.aclimit1(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
if ep~=tp or not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return end
Duel.RegisterFlagEffect(tp,98920105,RESET_PHASE+PHASE_END,0,1)
end
function c98920105.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c98920105.tgf3(c,tp)
return c:IsAbleToHand() and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
or aux.SZoneSequence(c:GetSequence())==4 or aux.SZoneSequence(c:GetSequence())==0)
end
function c98920105.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920105.tgf3,tp,LOCATION_SZONE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_SZONE)
end
function c98920105.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c98920105.tgf3,tp,LOCATION_SZONE,0,1,1,nil,tp)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c98920105.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0
end
function c98920105.filter(c)
return c:IsSetCard(0x9d,0xc4) and c:IsAbleToHand()
end
function c98920105.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920105.filter,tp,LOCATION_DECK,0,3,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c98920105.operation(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c98920105.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleDeck(tp)
local tg=sg:RandomSelect(1-tp,1)
tg:GetFirst():SetStatus(STATUS_TO_HAND_WITHOUT_CONFIRM,true)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
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