Commit ac1b3f0f authored by nanahira's avatar nanahira
parents 70fc45cb ef0f2d48
...@@ -37,7 +37,7 @@ function c12003000.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function c12003000.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12003000.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c12003000.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_COST)
end end
end end
function c12003000.con2(e,tp,eg,ep,ev,re,r,rp) function c12003000.con2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -43,7 +43,7 @@ end ...@@ -43,7 +43,7 @@ end
function c12003002.operation(e,tp,eg,ep,ev,re,r,rp) function c12003002.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and e:GetHandler():IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_COST)
end end
end end
function c12003002.extg(e,c) function c12003002.extg(e,c)
......
...@@ -4,61 +4,61 @@ local cm=_G["c"..m] ...@@ -4,61 +4,61 @@ local cm=_G["c"..m]
local mil=require("expansions/script/Millux") local mil=require("expansions/script/Millux")
cm.is_series_with_rabbit=true cm.is_series_with_rabbit=true
function cm.initial_effect(c) function cm.initial_effect(c)
mil.rabat_return(c,m,1) mil.rabat_return(c,m,1)
--tohand --tohand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0) e1:SetHintTiming(0,0x1e0)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget( e1:SetTarget(
function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0)
end) end)
e1:SetOperation( e1:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--meet --meet
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK) e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_HAND) e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m..1) e2:SetCountLimit(1,m..1)
e2:SetCondition(mil.return_con) e2:SetCondition(mil.return_con)
e2:SetTarget( e2:SetTarget(
function(e,tp,eg,ep,ev,re,r,rp,chk) function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end) end)
e2:SetOperation( e2:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)<3 then return end if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)<3 then return end
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if mil.is_series(tc,'rabbit') then if mil.is_series(tc,'rabbit') then
Duel.SortDecktop(tp,1-tp,3) Duel.SortDecktop(tp,1-tp,3)
end end
end) end)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and mil.is_series(c,'rabbit') and not c:IsCode(m) and c:IsAbleToHand() return c:IsFaceup() and mil.is_series(c,'rabbit') and not c:IsCode(m) and c:IsAbleToHand()
end end
\ No newline at end of file
...@@ -4,72 +4,71 @@ local cm=_G["c"..m] ...@@ -4,72 +4,71 @@ local cm=_G["c"..m]
local mil=require("expansions/script/Millux") local mil=require("expansions/script/Millux")
cm.is_series_with_rabbit=true cm.is_series_with_rabbit=true
function cm.initial_effect(c) function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m..1) e1:SetCountLimit(1,m..1)
e1:SetCost( e1:SetCost(
function(e,tp,eg,ep,ev,re,r,rp,chk) function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end) end)
e1:SetTarget( e1:SetTarget(
function(e,tp,eg,ep,ev,re,r,rp,chk) function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end) end)
e1:SetOperation( e1:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--negate --negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0)) e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetCondition( e2:SetCondition(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(cm.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev) return g and g:IsExists(cm.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
end) end)
e2:SetCost( e2:SetCost(
function(e,tp,eg,ep,ev,re,r,rp,chk) function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end) end)
e2:SetTarget( e2:SetTarget(
function(e,tp,eg,ep,ev,re,r,rp,chk) function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end) end)
e2:SetOperation( e2:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT)
Duel.Destroy(eg,REASON_EFFECT) end
end end)
end) c:RegisterEffect(e2)
c:RegisterEffect(e2)
end end
function cm.tfilter(c,tp) function cm.tfilter(c,tp)
return c:IsFaceup() and mil.is_series(c,'rabbit') and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) return c:IsFaceup() and mil.is_series(c,'rabbit') and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsCode(50008200) and c:IsAbleToHand() return c:IsCode(50008200) and c:IsAbleToHand()
end end
\ No newline at end of file
...@@ -4,86 +4,87 @@ local cm=_G["c"..m] ...@@ -4,86 +4,87 @@ local cm=_G["c"..m]
local mil=require("expansions/script/Millux") local mil=require("expansions/script/Millux")
cm.is_series_with_rabbit=true cm.is_series_with_rabbit=true
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,function(c) aux.AddLinkProcedure(c,function(c)
return mil.is_series(c,'rabbit') return mil.is_series(c,'rabbit')
end,2,2) end,2,2)
--indes --indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(function(e) return e:GetHandler():IsLinkState() end) e1:SetCondition(function(e) return e:GetHandler():IsLinkState() end)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(aux.tgoval) e3:SetValue(aux.tgoval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon --special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0)) e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m) e4:SetCountLimit(1,m)
e4:SetTarget( e4:SetTarget(
function(e,tp,eg,ep,ev,re,r,rp,chk) function(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=e:GetHandler():GetLinkedZone() local zone=e:GetHandler():GetLinkedZone()
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>1 if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>1
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,zone) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.SelectOption(tp,70,71,72)) e:SetLabel(Duel.SelectOption(tp,70,71,72))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end) end)
e4:SetOperation( e4:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<=1 then return end if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<=1 then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
local sgnum=0 local sgnum=0
local opt=e:GetLabel() local opt=e:GetLabel()
if opt==0 then if opt==0 then
sgnum=g:Filter(Card.IsType,nil,TYPE_MONSTER):GetCount() sgnum=g:Filter(Card.IsType,nil,TYPE_MONSTER):GetCount()
elseif opt==1 then elseif opt==1 then
sgnum=g:Filter(Card.IsType,nil,TYPE_SPELL):GetCount() sgnum=g:Filter(Card.IsType,nil,TYPE_SPELL):GetCount()
elseif opt==2 then elseif opt==2 then
sgnum=g:Filter(Card.IsType,nil,TYPE_TRAP):GetCount() sgnum=g:Filter(Card.IsType,nil,TYPE_TRAP):GetCount()
end end
if sgnum>1 then Duel.ShuffleHand(1-tp)
local zone=e:GetHandler():GetLinkedZone() if sgnum>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local zone=e:GetHandler():GetLinkedZone()
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,zone) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:GetFirst() local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
local effectnum=0 local sc=sg:GetFirst()
if sc then local effectnum=0
if zone~=0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) if sc then
and (not sc:IsAbleToHand() or Duel.SelectYesNo(tp,aux.Stringid(m,1))) then if zone~=0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
effectnum=Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP,zone) and (not sc:IsAbleToHand() or Duel.SelectYesNo(tp,aux.Stringid(m,1))) then
else effectnum=Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP,zone)
effectnum=Duel.SendtoHand(sc,nil,REASON_EFFECT) else
Duel.ConfirmCards(1-tp,sc) effectnum=Duel.SendtoHand(sc,nil,REASON_EFFECT)
end Duel.ConfirmCards(1-tp,sc)
local rthg=Duel.GetMatchingGroup(cm.rthfilter,tp,LOCATION_ONFIELD,0,e:GetHandler()) end
if effectnum~=0 and rthg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then local rthg=Duel.GetMatchingGroup(cm.rthfilter,tp,LOCATION_ONFIELD,0,e:GetHandler())
Duel.BreakEffect() if effectnum~=0 and rthg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.BreakEffect()
local rthgs=rthg:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
Duel.SendtoHand(rthgs,nil,REASON_EFFECT) local rthgs=rthg:Select(tp,1,1,nil)
end Duel.SendtoHand(rthgs,nil,REASON_EFFECT)
end end
end end
end) end
c:RegisterEffect(e4) end)
c:RegisterEffect(e4)
end end
function cm.spfilter(c,e,tp,zone) function cm.spfilter(c,e,tp,zone)
return mil.is_series(c,'rabbit') and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or (zone~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone))) return mil.is_series(c,'rabbit') and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or (zone~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)))
end end
function cm.rthfilter(c) function cm.rthfilter(c)
return c:IsFaceup() and mil.is_series(c,'rabbit') return c:IsFaceup() and mil.is_series(c,'rabbit')
end end
\ No newline at end of file
...@@ -4,94 +4,95 @@ local cm=_G["c"..m] ...@@ -4,94 +4,95 @@ local cm=_G["c"..m]
local mil=require("expansions/script/Millux") local mil=require("expansions/script/Millux")
cm.is_series_with_rabbit=true cm.is_series_with_rabbit=true
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,function(c) aux.AddLinkProcedure(c,function(c)
return mil.is_series(c,'rabbit') return mil.is_series(c,'rabbit')
end,2,2) end,2,2)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget( e1:SetTarget(
function(e,tp,eg,ep,ev,re,r,rp,chk) function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>2 and Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>2 and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3)) local op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3))
e:SetLabel(op) e:SetLabel(op)
end) end)
e1:SetOperation( e1:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local tpe=0 local tpe=0
if e:GetLabel()==0 then if e:GetLabel()==0 then
tpe=TYPE_FUSION tpe=TYPE_FUSION
elseif e:GetLabel()==1 then elseif e:GetLabel()==1 then
tpe=TYPE_SYNCHRO tpe=TYPE_SYNCHRO
elseif e:GetLabel()==2 then elseif e:GetLabel()==2 then
tpe=TYPE_XYZ tpe=TYPE_XYZ
else tpe=TYPE_LINK else tpe=TYPE_LINK
end end
local sg=g:Filter(Card.IsType,nil,tpe) local sg=g:Filter(Card.IsType,nil,tpe)
local ct=sg:GetClassCount(Card.GetCode) local ct=sg:GetClassCount(Card.GetCode)
if ct>2 then if ct>2 then
local drmum = Duel.Draw(tp,1,REASON_EFFECT) local drmum = Duel.Draw(tp,1,REASON_EFFECT)
local rthg=Duel.GetMatchingGroup(cm.rthfilter,tp,LOCATION_ONFIELD,0,e:GetHandler()) local rthg=Duel.GetMatchingGroup(cm.rthfilter,tp,LOCATION_ONFIELD,0,e:GetHandler())
if drmun~=0 and rthg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then if drmun~=0 and rthg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local rthgs=rthg:Select(tp,1,1,nil) local rthgs=rthg:Select(tp,1,1,nil)
Duel.SendtoHand(rthgs,nil,REASON_EFFECT) Duel.SendtoHand(rthgs,nil,REASON_EFFECT)
end end
end end
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,5)) e2:SetDescription(aux.Stringid(m,5))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget( e2:SetTarget(
function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,3,e:GetHandler) end if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,3,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,3,3,nil) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
end) end)
e2:SetOperation( e2:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp) function(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.SendtoHand(tg,nil,REASON_EFFECT) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
local g=Duel.GetOperatedGroup() Duel.SendtoHand(tg,nil,REASON_EFFECT)
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_EXTRA) local g=Duel.GetOperatedGroup()
if ct==3 then local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_EXTRA)
Duel.BreakEffect() if ct==3 then
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil) Duel.BreakEffect()
if g:GetCount()>1 then local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) if g:GetCount()>1 then
local sg=g:Select(tp,2,2,nil) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) local sg=g:Select(tp,2,2,nil)
Duel.SortDecktop(tp,tp,2) Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
else Duel.SortDecktop(tp,tp,2)
local hg=Duel.GetFieldGroup(p,LOCATION_HAND,0) else
local ct=Duel.SendtoDeck(hg,nil,0,REASON_EFFECT) local hg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.SortDecktop(tp,tp,ct) local ct=Duel.SendtoDeck(hg,nil,0,REASON_EFFECT)
end Duel.SortDecktop(tp,tp,ct)
end end
end) end
c:RegisterEffect(e2) end)
c:RegisterEffect(e2)
end end
function cm.rthfilter(c) function cm.rthfilter(c)
return c:IsFaceup() and mil.is_series(c,'rabbit') return c:IsFaceup() and mil.is_series(c,'rabbit')
end end
function cm.filter(c) function cm.filter(c)
return mil.is_series(c,'rabbit') and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return mil.is_series(c,'rabbit') and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
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