Commit ff64ec76 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 628cfed2
...@@ -25,15 +25,15 @@ function s.initial_effect(c) ...@@ -25,15 +25,15 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o*20000) e3:SetCountLimit(1,id+o*20000)
e3:SetCondition(s.condition) e3:SetCondition(s.condition2)
e3:SetTarget(s.target) e3:SetTarget(s.target2)
e3:SetOperation(s.operation) e3:SetOperation(s.operation2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.filter(c) function s.filter(c)
...@@ -69,18 +69,17 @@ function s.mvcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -69,18 +69,17 @@ function s.mvcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function s.filter(c,tp) function s.mvfilter(c,tp)
local rac=s[p]
local r=LOCATION_REASON_TOFIELD local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end
return c:IsSetCard(0x6ee) and c:IsType(TYPE_MONSTER) and not c:IsAttribute(rac) return c:IsSetCard(0x6ee) and c:IsType(TYPE_MONSTER)
and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0 and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0
end end
function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and s.filter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and s.mvfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(s.mvfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,s.mvfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end end
...@@ -98,7 +97,7 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,7 +97,7 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function s.mttg(e,c) function s.mttg(e,c)
...@@ -116,7 +115,7 @@ function s.filter2(c,e,tp,m,f,chkf) ...@@ -116,7 +115,7 @@ function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) 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) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local me=Effect.CreateEffect(e:GetHandler()) local me=Effect.CreateEffect(e:GetHandler())
...@@ -142,7 +141,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -142,7 +141,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation2(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local me=Effect.CreateEffect(e:GetHandler()) local me=Effect.CreateEffect(e:GetHandler())
me:SetType(EFFECT_TYPE_FIELD) me:SetType(EFFECT_TYPE_FIELD)
......
...@@ -21,7 +21,7 @@ function s.initial_effect(c) ...@@ -21,7 +21,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.costfilter(c) function s.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc6e5) return c:IsFaceup() and c:IsSetCard(0xc6e5) and c:IsAbleToRemoveAsCost()
end end
function s.chcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -45,7 +45,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject()) Duel.ReturnToField(e:GetLabelObject())
end end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,rp,0,LOCATION_HAND,1,nil,REASON_EFFECT) end if chk==0 then return true end
end end
function s.chop(e,tp,eg,ep,ev,re,r,rp) function s.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup() local g=Group.CreateGroup()
......
...@@ -91,6 +91,7 @@ function cm.thfilter(c) ...@@ -91,6 +91,7 @@ function cm.thfilter(c)
return c:IsSetCard(0x5ef7) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x5ef7) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
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)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0) Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0)
...@@ -99,20 +100,22 @@ function cm.sumfilter(c) ...@@ -99,20 +100,22 @@ function cm.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsRace(RACE_FAIRY+RACE_FIEND+RACE_ZOMBIE) return c:IsSummonable(true,nil) and c:IsRace(RACE_FAIRY+RACE_FIEND+RACE_ZOMBIE)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.SelectYesNo(tp,aux.Stringid(m,3))
Duel.BreakEffect() Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil) Duel.Summon(tp,g:GetFirst(),true,nil)
end end
end end
end
end end
--extra summon --extra summon
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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