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

byd

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