Commit 59d22903 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 27a28400
......@@ -105,16 +105,17 @@ end
function s.setfilter(c,code)
return aux.IsCodeListed(c,code) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsSSetable() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return s.tgcheck(chkc,tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(s.tgcheck,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.tgcheck,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or not tc:IsFaceup() then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tc:GetCode())
if g:GetCount()>0 then
Duel.SSet(tp,g)
end
......
......@@ -87,7 +87,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP,zone) then
Duel.BreakEffect()
local g=c:GetColumnGroup()
local dg=g:Filter(s.decheck,nil,1-tp)
local dg=g:Filter(s.cfilter,nil,1-tp)
if Duel.Destroy(dg,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
local tc=og:GetFirst()
......
......@@ -28,7 +28,8 @@ function s.specialsum(c)
c:RegisterEffect(e2)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:GetFlagEffect(id)==0
end
function s.spfilter(c,e,tp)
......
......@@ -13,8 +13,9 @@ function s.searchcard(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCountLimit(1,id+114)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.seacon)
e1:SetTarget(s.seatg)
e1:SetOperation(s.seaop)
c:RegisterEffect(e1)
......@@ -22,6 +23,9 @@ function s.searchcard(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function s.seacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)~=0
end
function s.searchfilter(c)
return c:IsRace(RACE_ROCK) and c:IsLevel(1) and c:IsAbleToHand()
end
......
......@@ -117,6 +117,7 @@ function cm.actcon(e)
end
--recover/damage
function cm.gabcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return re and c:IsSetCard(0xef1)
end
function cm.gabtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -54,7 +54,7 @@ function cm.synlimit(e,c)
end
--special summon
function cm.descfilter(c)
return c:IsSetCard(0xef1) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
return c:IsSetCard(0xef1) and not c:IsPublic()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.descfilter,tp,LOCATION_HAND,0,1,nil) end
......@@ -111,6 +111,7 @@ function cm.splimit(e,c)
end
--special summon/to hand
function cm.stpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return re and c:IsSetCard(0xef1)
end
function cm.stpfilter(c,e,tp,ft)
......
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