Commit 2b7cb859 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 059ef9dd
No preview for this file type
......@@ -31,8 +31,11 @@ function c12400079.initial_effect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,12400084)
e4:SetCondition(c12400079.con4)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c12400079.tg4)
e4:SetOperation(c12400079.op4)
c:RegisterEffect(e4)
......@@ -93,23 +96,21 @@ function c12400079.op3(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c12400079.t(c,tp)
return c:IsPreviousLocation(4) and c:IsRace(RACE_MACHINE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
end
function c12400079.con4(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12400079.tt,1,nil,tp)
end
function c12400079.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(aux.TRUE,tp,4,4,1,nil) end
Duel.SelectTarget(tp,aux.TRUE,tp,4,4,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function c12400079.r(c)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsLevelAbove(1)
end
function c12400079.t(c,e,tp,lv)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsLevelBelow(lv) and c:IsRace(RACE_MACHINE)
end
function c12400079.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
Duel.Destroy(g,REASON_EFFECT)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -179,7 +179,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(tp)
Duel.Hint(3,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if #sg>0 then
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
......
......@@ -77,7 +77,7 @@ function s.checkintab(tab,v)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then
local effect_record=Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)
local effect_record={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)}
for _,ke in ipairs(effect_record) do
if not s.checkintab(record_tab,ke) then
return true
......@@ -88,7 +88,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then
local effect_record=Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)
local effect_record={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)}
for _,ke in ipairs(effect_record) do
if not s.checkintab(record_tab,ke) then
ke:SetCondition(function(ce,ctp,...)
......
......@@ -16,7 +16,7 @@ function s.initial_effect(c)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_LEAVE_GRAVE)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,id)
......@@ -62,7 +62,7 @@ function s.condition2(e,tp,eg,ep,ev,re,r,rp)
return c:GetFlagEffect(16138001)>0
end
function s.check(c)
return (c:IsCode(16138001) or aux.IsCodeListed(c,16138001)) and c:IsAbleToHand()
return (c:IsCode(16138001) or aux.IsCodeListed(c,16138001)) and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -51,6 +51,7 @@ function s.imop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.Destroy(tc,REASON_EFFECT)
if Duel.IsEnvironment(tp,16138001) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -69,6 +70,7 @@ function s.imop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function s.distg(e,c)
local tc=e:GetLabelObject()
......
......@@ -159,12 +159,12 @@ end
function s.seqop(e,tp,eg,ep,ev,re,r,rp)
local filter=0
for i=0,15 do
if not Duel.IsExistingMatchingCard(s.seqfilter,tp,0,LOCATION_ONFIELD,1,nil,i,tp) then
if not Duel.IsExistingMatchingCard(s.seqfilter,tp,0,LOCATION_MZONE,1,nil,i,tp) then
filter=filter|1<<(i+16)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local flag=Duel.SelectField(tp,1,0,LOCATION_ONFIELD,filter)
local flag=Duel.SelectField(tp,1,0,LOCATION_MZONE,filter)
Duel.Hint(HINT_ZONE,tp,flag)
local seq=math.log(flag>>16,2)
local g=Duel.GetMatchingGroup(s.seqfilter,tp,0,LOCATION_ONFIELD,nil,seq,tp)
......
......@@ -16,6 +16,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
......
......@@ -81,7 +81,7 @@ function c50213215.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c50213215.thfilter(c)
return c:IsSetCard(0xcbf) and not c:IsCode(50213215) and c:IsType(TYPE_EQUIP+TYPE_SPELL) and c:IsAbleToHand()
return c:IsSetCard(0xcbf) and not c:IsCode(50213215) and c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c50213215.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213215.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -71,7 +71,7 @@ function c50213220.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c50213220.thfilter(c)
return c:IsSetCard(0xcbf) and not c:IsCode(50213220) and c:IsType(TYPE_EQUIP+TYPE_SPELL) and c:IsAbleToHand()
return c:IsSetCard(0xcbf) and not c:IsCode(50213220) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c50213220.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50213220.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -33,7 +33,7 @@ function c50224605.initial_effect(c)
e3:SetCondition(c50224605.discon)
e3:SetTarget(c50224605.distg)
c:RegisterEffect(e3)
aux.EnableChangeCode(c,50224605,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
aux.EnableChangeCode(c,50224505,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
--100
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
......@@ -33,7 +33,7 @@ function c50224805.initial_effect(c)
e3:SetCondition(c50224805.cntcon)
e3:SetTarget(c50224805.cnttg)
c:RegisterEffect(e3)
aux.EnableChangeCode(c,50224805,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
aux.EnableChangeCode(c,50224510,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
--to deck
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
......
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