Commit 8215d5e5 authored by Huangnan's avatar Huangnan

物语纪录fix.v1

parent 12ce940a
--物语纪录·神原骏河
function c1009022.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1009022,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,1009022)
e2:SetCost(c1009022.thcost)
e2:SetTarget(c1009022.thtg)
e2:SetOperation(c1009022.thop)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1009022,3))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(c1009022.tdcon)
e3:SetTarget(c1009022.tdtg)
e3:SetOperation(c1009022.tdop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c1009022.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(1160)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
c:RegisterEffect(e1)
--tribute summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1009022,2))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1)
e3:SetCondition(c1009022.sumcon)
e3:SetCost(c1009022.cost)
e3:SetTarget(c1009022.sumtg)
e3:SetOperation(c1009022.sumop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1009022,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,10090220)
e4:SetCondition(c1009022.descon)
e4:SetTarget(c1009022.destg)
e4:SetOperation(c1009022.desop)
c:RegisterEffect(e4)
end
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1009022,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,1009022)
e2:SetCost(c1009022.thcost)
e2:SetTarget(c1009022.thtg)
e2:SetOperation(c1009022.thop)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1009022,3))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(c1009022.tdcon)
e3:SetTarget(c1009022.tdtg)
e3:SetOperation(c1009022.tdop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c1009022.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(1160)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
c:RegisterEffect(e1)
--tribute summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1009022,2))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1)
e3:SetCondition(c1009022.sumcon)
e3:SetCost(c1009022.cost)
e3:SetTarget(c1009022.sumtg)
e3:SetOperation(c1009022.sumop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1009022,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,10090220)
e4:SetCondition(c1009022.descon)
e4:SetTarget(c1009022.destg)
e4:SetOperation(c1009022.desop)
c:RegisterEffect(e4)
end
function c1009022.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckOrExtraAsCost() end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SendtoDeck(c,nil,2,REASON_COST)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1009022.thfilter(c,sc,cd)
return c:IsFaceup() and c:IsSetCard(0x520c) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
function c1009022.thfilter1(c,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x520c) and c:IsAbleToHand()
end
function c1009022.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_EXTRA) and c1009022.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1009022.thfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c1009022.thfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0)
if chk==0 then return Duel.IsExistingMatchingCard(c1009022.thfilter1,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_EXTRA)
end
function c1009022.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
local g=Duel.GetMatchingGroup(c1009022.thfilter1,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,2,2,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
function c1009022.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c1009022.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,nil,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if e:GetLabel()==1
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g1:GetFirst())
and Duel.SelectYesNo(tp,aux.Stringid(1009022,4)) then
e:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g3=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g3,1,0,0)
end
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0)
if chkc then return false end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,nil,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if e:GetLabel()==1
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g1:GetFirst())
and Duel.SelectYesNo(tp,aux.Stringid(1009022,4)) then
e:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g3=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g3,1,0,0)
end
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0)
end
function c1009022.tdop(e,tp,eg,ep,ev,re,r,rp)
local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK)
local ex2,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND)
local sg1=g1:Filter(Card.IsRelateToEffect,nil,e)
if sg1:GetCount()>0 and Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT)>1 then
local tc1=sg1:GetFirst()
local tc2=sg1:GetNext()
if tc1:GetControler()==tc2:GetControler() and tc1:IsLocation(LOCATION_DECK) and tc2:IsLocation(LOCATION_DECK) then
Duel.SortDecktop(tp,tc1:GetControler(),2)
end
end
if e:GetLabel()==1 and g2 then
local tc=g2:GetFirst()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
end
end
local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK)
local ex2,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND)
local sg1=g1:Filter(Card.IsRelateToEffect,nil,e)
if sg1:GetCount()>0 and Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT)>1 then
local tc1=sg1:GetFirst()
local tc2=sg1:GetNext()
if tc1:GetControler()==tc2:GetControler() and tc1:IsLocation(LOCATION_DECK) and tc2:IsLocation(LOCATION_DECK) then
Duel.SortDecktop(tp,tc1:GetControler(),2)
end
end
if e:GetLabel()==1 and g2 then
local tc=g2:GetFirst()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
end
end
end
function c1009022.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x520c) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x520c) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c1009022.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,1009022)==0 end
Duel.RegisterFlagEffect(tp,1009022,RESET_CHAIN,0,1)
if chk==0 then return Duel.GetFlagEffect(tp,1009022)==0 end
Duel.RegisterFlagEffect(tp,1009022,RESET_CHAIN,0,1)
end
function c1009022.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c1009022.sumfilter(c)
return c:IsSetCard(0x520c) and c:IsSummonable(true,nil,1)
return c:IsSetCard(0x520c) and c:IsSummonable(true,nil,1)
end
function c1009022.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1009022.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
if chk==0 then return Duel.IsExistingMatchingCard(c1009022.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c1009022.sumop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c1009022.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c1009022.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
end
function c1009022.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c1009022.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c1009022.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
......@@ -51,9 +51,9 @@ function c1009029.initial_effect(c)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c1009029.effcon)
e5:SetCost(c1009029.descost)
e5:SetTarget(c1009029.destg)
e5:SetOperation(c1009029.desop)
e5:SetCost(c1009029.remcost)
e5:SetTarget(c1009029.remtg)
e5:SetOperation(c1009029.remop)
c:RegisterEffect(e5)
--pendulum
local e4=Effect.CreateEffect(c)
......@@ -115,20 +115,29 @@ end
function c1009029.effcon(e)
return e:GetHandler():GetFlagEffect(1009029)>0
end
function c1009029.descost(e,tp,eg,ep,ev,re,r,rp,chk)
function c1009029.remcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1009029.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE+LOCATION_GRAVE)>0 end
local sg=Duel.GetFieldGroup(tp,0,LOCATION_SZONE+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
function c1009029.th1filter(c,p)
return c:GetOwner()==p and c:IsAbleToRemove()
end
function c1009029.desop(e,tp,eg,ep,ev,re,r,rp)
function c1009029.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetFieldGroup(tp,0,0x1c)
local dc=g:FilterCount(c1009029.th1filter,nil,1-tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c1009029.sgfilter(c,p)
return c:IsLocation(LOCATION_REMOVED) and c:IsControler(p)
end
function c1009029.remop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetFieldGroup(tp,0,LOCATION_SZONE+LOCATION_GRAVE)
local ct=Duel.SendtoDeck(sg,REASON_EFFECT)
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local g=Duel.GetFieldGroup(tp,0,0x1c)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(c1009029.sgfilter,nil,1-tp)
if ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -56,29 +56,27 @@ end
function c1009030.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x520c) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c1009030.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_EXTRA) and chkc:IsControler(tp) and c1009030.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1009030.thfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c1009030.thfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
function c1009030.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1009030.thfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function c1009030.sumfilter(c)
return c:IsSetCard(0x520c) and c:IsType(TYPE_PENDULUM) and c:IsSummonable(true,nil,1)
end
function c1009030.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local g=Duel.GetMatchingGroup(c1009030.sumfilter,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1009030,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sc=g:Select(tp,1,1,nil):GetFirst()
Duel.ShuffleHand(tp)
Duel.Summon(tp,sc,true,nil,1)
else
Duel.ShuffleHand(tp)
end
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1009030.thfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local asg=Duel.SelectMatchingCard(tp,c1009030.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local astc=asg:GetFirst()
if astc and Duel.SelectYesNo(tp,aux.Stringid(1009030,0)) then
Duel.Summon(tp,astc,true,nil,1)
end
end
function c1009030.spcfilter(c,tp,rp)
......
......@@ -36,7 +36,7 @@ function c1009036.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x20c) and c:IsAbleToRemoveAsCost()
end
function c1009036.condition(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c1009036.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1009036.cfilter,tp,LOCATION_EXTRA,0,1,nil) end
......
......@@ -87,10 +87,14 @@ function c1009037.dtop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetCondition(c1009037.dircon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ec:RegisterEffect(e1)
end
end
function c1009037.dircon(e)
return e:GetHandler():GetControler()==e:GetOwnerPlayer()
end
function c1009037.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
......
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