Commit dd61c217 authored by root's avatar root

Refresh on 2024-09-25 16:12:58

parent 04b1f149
...@@ -64,8 +64,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,8 +64,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.spfilter1(c,e,tp) function s.spfilter1(c,e,tp)
return (c:IsSetCard(0xc2) or (c:IsLevel(7,8) and c:IsRace(RACE_DRAGON))) return (c:IsSetCard(0xc2) or (c:IsLevel(7,8) and c:IsRace(RACE_DRAGON)))
and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.IsExistingMatchingCard(s.tfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,c:GetAttribute()) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
......
--永遠の淑女 ベアトリーチェ
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop)
c:EnableReviveLimit()
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetCost(s.tgcost)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsSetCard(0xb1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd5)
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST,nil)
end
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tup=Duel.GetTurnPlayer()
local g=c:GetOverlayGroup()
local y=g:IsExists((Card.IsSetCard),1,nil,0xb1)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) and (tup==1-tp or y) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_DESTROY)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xb1) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
...@@ -43,28 +43,6 @@ function s.aclimit(e,re,tp) ...@@ -43,28 +43,6 @@ function s.aclimit(e,re,tp)
end end
function s.drop(e,tp,eg,ep,ev,re,r,rp) function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.drcon1)
e1:SetOperation(s.drop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.regcon)
e2:SetOperation(s.regop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(s.drcon2)
e3:SetOperation(s.drop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCode(EVENT_PHASE+PHASE_END)
...@@ -87,38 +65,13 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,38 +65,13 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
e6:SetReset(RESET_PHASE+PHASE_END) e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp) Duel.RegisterEffect(e6,tp)
end end
function s.filter(c,sp)
return c:IsSummonPlayer(sp) and c:IsSummonLocation(LOCATION_EXTRA)
end
function s.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.filter,1,nil,1-tp)
and not Duel.IsChainSolving()
end
function s.drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.filter,1,nil,1-tp)
and Duel.IsChainSolving()
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id+o,RESET_CHAIN,0,1)
end
function s.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id+o)>0
end
function s.drop2(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,id+o)
Duel.ResetFlagEffect(tp,id+o)
Duel.Draw(tp,n,REASON_EFFECT)
end
function s.regop2(e,tp,eg,ep,ev,re,r,rp) function s.regop2(e,tp,eg,ep,ev,re,r,rp)
if rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE and re:GetHandler():IsSummonLocation(LOCATION_EXTRA) then if rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE and re:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) then
Duel.RegisterFlagEffect(tp,id+o+o,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,id+o+o,RESET_CHAIN,0,1)
end end
end end
function s.drcon3(e,tp,eg,ep,ev,re,r,rp) function s.drcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id+o+o)~=0 and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE and re:GetHandler():IsSummonLocation(LOCATION_EXTRA) and ep~=tp return Duel.GetFlagEffect(tp,id+o+o)~=0 and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE and re:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) and ep~=tp
end end
function s.drop3(e,tp,eg,ep,ev,re,r,rp) function s.drop3(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
......
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+id)
e2:SetCost(s.thcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+id+id)
e3:SetCondition(s.poscon)
e3:SetTarget(s.postg)
e3:SetOperation(s.posop)
c:RegisterEffect(e3)
end
function s.rfilter(c)
return c:IsSetCard(0x171) and c:IsAbleToRemoveAsCost()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
end
function s.thfilter(c,e,tp)
if not (c:IsSetCard(0x171) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4)) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.poscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==1-tp and re:GetHandler():IsOnField() and re:GetHandler():IsFaceup() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetAttack()>=2500
end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsFaceup() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,1,0,0)
end
function s.posop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) and rc:IsLocation(LOCATION_MZONE) and rc:IsFaceup() then
Duel.ChangePosition(rc,POS_FACEDOWN_DEFENSE)
end
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,8,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,id+id)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(s.cost2)
e2:SetCondition(s.con2)
e2:SetTarget(s.tg2)
e2:SetOperation(s.op2)
c:RegisterEffect(e2)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x171) and c:IsType(TYPE_FUSION+TYPE_SYNCHRO)
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function s.cfilter(c)
return c:IsLevel(3) and c:IsRace(RACE_PSYCHO)
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function s.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(), REASON_EFFECT)
end
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
c:SetSPSummonOnce(id)
aux.AddLinkProcedure(c,s.matfilter,1,1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.cost)
e2:SetCondition(s.thcon1)
e2:SetTarget(s.target)
e2:SetOperation(s.activate)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(s.thcon2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id+id)
e4:SetCost(s.spcost)
e4:SetCondition(s.thcon1)
e4:SetTarget(s.sptg2)
e4:SetOperation(s.spop2)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCondition(s.thcon2)
c:RegisterEffect(e5)
end
function s.matfilter(c)
return c:IsLinkSetCard(0x11b,0xfe)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function s.thcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end
function s.thfilter(c)
return c:IsAbleToHand() and (c:IsCode(90351981) or (c:IsSetCard(0xfe) and c:IsType(TYPE_MONSTER)))
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.costfilter(c)
return c:IsSetCard(0x11b) and c:IsAbleToRemoveAsCost()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddLinkProcedure(c,nil,2,99,s.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon1)
e1:SetTarget(s.r2htg)
e1:SetOperation(s.r2hop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(s.thcon2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,id+id)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetCondition(s.tgcon1)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCondition(s.tgcon2)
c:RegisterEffect(e4)
end
function s.lfilter(c)
return c:IsLinkType(TYPE_LINK) and c:IsLinkSetCard(0x11b)
end
function s.lcheck(g)
return g:IsExists(s.lfilter,1,nil)
end
function s.thcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end
function s.r2hfilter(c)
return c:IsSetCard(0x11b,0xfe) and not c:IsCode(id) and c:IsAbleToHand() and c:IsFaceup()
end
function s.gcfilter2(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function s.r2htg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.r2hfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.r2hfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.r2hfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_HAND)
end
function s.r2hop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_HAND) then
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(s.gcfilter2,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,s.gcfilter2,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.GetControl(g:GetFirst(),tp)
end
end
end
end
function s.tgcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousSequence()>4 and c:IsPreviousLocation(LOCATION_MZONE) and c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and not aux.IsCanBeQuickEffect(c,tp,90351981)
end
function s.tgcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousSequence()>4 and c:IsPreviousLocation(LOCATION_MZONE) and c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and aux.IsCanBeQuickEffect(c,tp,90351981)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost1)
e1:SetTarget(s.sptg1)
e1:SetOperation(s.spop1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+id)
e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
end
function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler(),e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.indtg(e,c)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_FUSION)
end
function s.spfilter2(c,e,tp)
return c:IsSetCard(0x133) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(s.spcon)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id)
e3:SetTarget(s.sptg1)
e3:SetOperation(s.spop1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetCountLimit(1,id+id)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(s.target)
e4:SetOperation(s.activate)
c:RegisterEffect(e4)
end
function s.fusfilter(c)
return c:IsSetCard(0x133) and c:IsAbleToRemoveAsCost()
end
function s.fselect(g)
return g:GetClassCount(Card.GetLevel)==2 and g:GetClassCount(Card.GetAttribute)==1 and g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local fg=Duel.GetMatchingGroup(s.fusfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return fg:CheckSubGroup(s.fselect,2,2)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local fg=Duel.GetMatchingGroup(s.fusfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=fg:SelectSubGroup(tp,s.fselect,false,2,2)
c:SetMaterial(sg)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end
end
function s.filter0(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function s.filter1(c,e)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) 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)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter1),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
if mat:IsExists(Card.IsFacedown,1,nil) then
local cg=mat:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
end
if mat:Filter(s.cfilter,nil):GetCount()>0 then
local cg=mat:Filter(s.cfilter,nil)
Duel.HintSelection(cg)
end
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function s.cfilter(c)
return c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED)
end
\ No newline at end of file
...@@ -47,6 +47,9 @@ end ...@@ -47,6 +47,9 @@ end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(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_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp) function cm.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
......
--共鸣干扰
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,70902743)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCost(s.accost)
c:RegisterEffect(e3)
end
function s.lvfilter(c)
return c:IsLevelAbove(2) and c:IsFaceup()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-1)
tc:RegisterEffect(e1)
end
end
end
function s.rmfilter(c)
return c:IsSetCard(0x57) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.tkcsfilter,tp,LOCATION_GRAVE,0,1,c) and c:IsAbleToRemoveAsCost() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.tkcsfilter,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function s.mfilter(c)
return c:IsCode(70902743) and c:IsType(TYPE_MONSTER)
end
function s.syncheck(g,tp,syncard)
return g:IsExists(s.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
end
function s.scfilter(c,tp,mg)
return mg:CheckSubGroup(s.syncheck,2,#mg,tp,c)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-1)
tc:RegisterEffect(e1)
end
Duel.AdjustAll()
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
if Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(s.scfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tg=mg:SelectSubGroup(tp,s.syncheck,false,2,#mg,tp,sc)
Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1)
end
end
end
end
function s.cfilter(c)
return c:IsType(TYPE_TUNER) and c:IsDiscardable()
end
function s.accost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD+REASON_COST,e:GetHandler())
end
\ No newline at end of file
--效果遮断
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsLevelAbove(5) and (c:IsSetCard(0x8) or c:IsType(TYPE_NORMAL))
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function s.cfilter2(c)
return c:IsFaceup() and (c:IsCode(89943723) or c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,89943723))
end
function s.ffilter(c,e,tp)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,89943723)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,c,e,tp)
end
function s.spfilter(c,fc,e,tp)
return c:IsAttackBelow(1000) and aux.IsMaterialListCode(fc,c:GetCode()) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re)
and Duel.Destroy(eg,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,s.ffilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc then
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,tc,e,tp)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if sg and sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
\ No newline at end of file
--E・HERO ベーパー・ネオス
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
aux.AddFusionProcCode3(c,89943723,17955766,89621922,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,aux.tdcfop(c))
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--up atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.atkcon)
e2:SetTarget(s.atktg)
e2:SetOperation(s.atkop)
c:RegisterEffect(e2)
--return
aux.EnableNeosReturn(c,s.retop,s.set_category)
end
s.material_setcode=0x8
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_EXTRA)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()):GetSum(Card.GetBaseAttack)>0 end
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,c):GetSum(Card.GetBaseAttack)
if atk>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(atk)
c:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,c)
for tc in aux.Next(g) do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_ATTACK_FINAL)
e4:SetValue(math.ceil(tc:GetAttack()/2))
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
end
end
end
end
function s.set_category(e,tp,eg,ep,ev,re,r,rp)
local ct=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
if c:IsLocation(LOCATION_EXTRA) then
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ct>0 then
Duel.Draw(p,ct,REASON_EFFECT)
end
end
end
\ No newline at end of file
--元素英雄 太阳新宇侠
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
aux.AddFusionProcCode3(c,89943723,17732278,54959865,false,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_ONFIELD,0,aux.tdcfop(c))
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.descon)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--return
aux.EnableNeosReturn(c,s.retop,s.set_category)
end
s.material_setcode=0x8
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_EXTRA)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local ct=Duel.Destroy(sg,REASON_EFFECT)
if ct>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,ct,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,ct,ct,nil)
if dg:GetCount()>0 then
Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
function s.set_category(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,8000)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
if c:IsLocation(LOCATION_EXTRA) then
Duel.Recover(tp,8000,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -31,10 +31,10 @@ function s.initial_effect(c) ...@@ -31,10 +31,10 @@ function s.initial_effect(c)
--destroy & ac synchro --destroy & ac synchro
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2)) e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_DESTROY) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DAMAGE) e4:SetCode(EVENT_DAMAGE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCountLimit(1,id+o*2) e4:SetCountLimit(1,id+o*2)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.descon) e4:SetCondition(s.descon)
...@@ -42,8 +42,11 @@ function s.initial_effect(c) ...@@ -42,8 +42,11 @@ function s.initial_effect(c)
e4:SetOperation(s.desop) e4:SetOperation(s.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.spf(c)
return not c:IsRace(RACE_MACHINE) and c:IsFacedown()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp return ep==1-tp and not Duel.IsExistingMatchingCard(s.spf,tp,LOCATION_MZONE,0,1,nil)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -98,26 +101,16 @@ end ...@@ -98,26 +101,16 @@ end
function s.descon(e,tp,eg,ep,ev,re,r,rp) function s.descon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp return ep==1-tp
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
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.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetTargetsRelateToChain() local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if tc then if g:GetCount()>0 then
if Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil) local sg=g:Select(tp,1,1,nil)
if g:GetCount()>0 then Duel.SynchroSummon(tp,sg:GetFirst(),nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
end end
end end
function s.descon1(e,tp,eg,ep,ev,re,r,rp) function s.descon1(e,tp,eg,ep,ev,re,r,rp)
......
--凶导的落印
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--negative
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.handfilter(c,tp)
return c:IsType(TYPE_RITUAL) and c:IsSetCard(0x145) and not c:IsPublic() and Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil,tp,c:GetLevel())
end
function s.desfilter(c,tp,lvl)
return aux.NegateEffectMonsterFilter(c) and c:IsLevel(lvl) and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetAttack())
end
function s.tgfilter(c,atk)
return c:IsAttackAbove(atk) and c:IsAbleToGrave()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.handfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.handfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,g)
e:SetLabel(g:GetFirst():GetLevel())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lvl=e:GetLabel()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.desfilter(chkc,tp,lvl) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,s.desfilter,tp,0,LOCATION_MZONE,1,1,nil,tp,lvl)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local atk=tc:GetAttack()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,atk)
local gc=g:GetFirst()
if gc and Duel.SendtoGrave(gc,REASON_EFFECT)~=0 and gc:IsLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1)
tc:RegisterEffect(e2)
local e3=e2:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e3)
local e4=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(s.fuslimit)
tc:RegisterEffect(e4)
if tc:IsRace(RACE_SPELLCASTER) then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(s.racecondition)
e5:SetCost(s.racecost)
e5:SetOperation(s.raceactivate)
tc:RegisterEffect(e5)
end
end
end
end
function s.racefilter(c,tp)
return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:IsControler(1-tp) and c:IsSetCard(0x145)
end
function s.racecondition(e,tp,eg,ep,ev,re,r,rp)
return eg ~= nil and eg:IsExists(s.racefilter,1,nil,tp)
end
function s.racecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.tefilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function s.raceactivate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.tefilter,tp,LOCATION_MZONE,0,nil)
Duel.SendtoDeck(g:Filter(Card.IsAbleToExtra,nil),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
\ No newline at end of file
--光子交易
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x7b,0x55) and c:IsDiscardable()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,s.filter,1,1,REASON_COST+REASON_DISCARD)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) then
Duel.SetChainLimit(aux.FALSE)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--银河爆风
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetCondition(aux.dscon)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsFaceup() and c:IsSetCard(0x7b,0x55)
end
function s.negfilter(c)
return aux.NegateAnyFilter(c)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(s.negfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g2=Duel.SelectTarget(tp,s.negfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
e:SetLabelObject(g2:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g2,1,0,0)
if Duel.GetTurnPlayer()==tp then
Duel.SetChainLimit(s.chainlm)
end
end
function s.chainlm(e,ep,tp)
return tp==ep
end
function s.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsSetCard(0x7b)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local lc=tg:GetFirst()
if #tg~=2 then return end
if lc==tc then lc=tg:GetNext() end
if lc:IsRelateToEffect(e) and lc:IsControler(tp)
and lc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(math.ceil(lc:GetAttack()/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
lc:RegisterEffect(e1)
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
if tc:IsType(TYPE_TRAPMONSTER) then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
end
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local dc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
if dc then
Duel.NegateRelatedChain(dc,RESET_TURN_SET)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EFFECT_DISABLE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetCode(EFFECT_DISABLE_EFFECT)
e6:SetValue(RESET_TURN_SET)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e6)
if tc:IsType(TYPE_TRAPMONSTER) then
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e7:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e7)
end
end
end
end
end
end
\ No newline at end of file
--铠刃的巨神兵
local s,id,o=GetID()
function c191981027.initial_effect(c)
--summon with 3 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(s.ttcon)
e1:SetOperation(s.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LIMIT_SET_PROC)
e2:SetCondition(s.setcon)
c:RegisterEffect(e2)
--normal
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id)
e3:SetTarget(s.target)
e3:SetOperation(s.opreation)
c:RegisterEffect(e3)
--copy effect
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1)
e4:SetCost(s.copycost)
e4:SetTarget(s.copytg)
e4:SetOperation(s.copyop)
c:RegisterEffect(e4)
end
--proc
function s.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.setcon(e,c,minc)
if not c then return true end
return false
end
--normal
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) or
Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE)
end
function s.opreation(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
if #g1>0 then
Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
if #g2>0 then
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)
end
end
--copy
function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.copyfilter(c)
return c:IsType(TYPE_MONSTER) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
and ((c:IsRace(RACE_DIVINE)) or (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_FUSION)))
end
function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and c:IsControler(tp) and s.copyfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(s.copyfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.copyfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,c)
end
function s.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_GRAVE+LOCATION_GRAVE) then
local cid=0
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetLabelObject(e1)
e3:SetLabel(cid)
e3:SetOperation(s.rstop)
c:RegisterEffect(e3)
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function s.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
if cid~=0 then
c:ResetEffect(cid,RESET_COPY)
c:ResetEffect(RESET_DISABLE,RESET_EVENT)
end
local e1=e:GetLabelObject()
e1:Reset()
Duel.HintSelection(Group.FromCards(c))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
\ No newline at end of file
--邪心英雄 浊泥雪魔
local s,id,o=GetID()
function c191981028.initial_effect(c)
aux.AddCodeList(c,94820406)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,s.ffilter,s.ffilter1,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(s.efilter)
c:RegisterEffect(e2)
--material check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(s.valcheck)
c:RegisterEffect(e3)
--summon success
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(s.regcon)
e4:SetOperation(s.regop)
c:RegisterEffect(e4)
e4:SetLabelObject(e3)
end
s.material_setcode=0x8
s.dark_calling=true
--fusion
function s.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x08)
end
function s.ffilter1(c)
return c:IsFusionAttribute(ATTRIBUTE_EARTH) and c:IsSetCard(0x08)
end
--immune
function s.efilter(e,te)
return te:IsActiveType(TYPE_TRAP+TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
and e:GetLabelObject():GetLabel()~=0
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(s.aclimit)
e1:SetCondition(s.atccon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
end
function s.atccon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 ) and Duel.GetTurnPlayer()~=tp
end
function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE
end
--material
function s.accon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabel()==1
end
function s.valcheck(e,c)
local mg=c:GetMaterial()
local flag=0
if mg:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then flag=1 end
c:RegisterFlagEffect(id,RESET_EVENT+0x4fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
e:SetLabel(flag)
end
\ No newline at end of file
--邪心英雄 恐惧刃魔
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,94820406)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,s.matfilter,2,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.retg)
e2:SetOperation(s.reop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetCode(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+100)
e3:SetCondition(s.discon)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
--pierce
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_PIERCE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_FUSION))
c:RegisterEffect(e4)
end
s.material_setcode=0x8
s.dark_calling=true
function s.matfilter(c,fc,sub,mg,sg)
local b1=c:IsFusionSetCard(0x8) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or (sg:IsExists(Card.IsRace,1,c,RACE_FIEND) and sg:IsExists(Card.IsLevelAbove,1,nil,7)))
local b2=c:IsRace(RACE_FIEND) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or (sg:IsExists(Card.IsFusionSetCard,1,c,0x8) and sg:IsExists(Card.IsLevelAbove,1,nil,7)))
return b1 or b2
end
function s.tgdfilter(c)
return c:IsAbleToHand() and c:IsCode(191981040)
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0x10,0x10,5,nil) and Duel.IsExistingMatchingCard(s.tgdfilter,tp,0x01,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,5,PLAYER_ALL,0x10)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x01)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0x10,0x10,5,5,nil)
if #g>0 then
Duel.HintSelection(g)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=Duel.SelectMatchingCard(tp,s.tgdfilter,tp,0x01,0,1,1,nil)
if #hg>0 then
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
end
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_MAIN1
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(0x04) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,0x04,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,0x04,1,1,nil)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
--cannot release
local e4=e1:Clone()
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e5)
local e9=e5:Clone()
e9:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e9)
local e6=e9:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e6)
local e7=e9:Clone()
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e7)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_PHASE+PHASE_BATTLE)
e8:SetLabelObject(tc)
e8:SetCondition(s.bpcon)
e8:SetOperation(s.bpop)
Duel.RegisterEffect(e8,tp)
end
end
function s.bpcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:GetFlagEffect(m)~=0 and tc:IsControler(1-tp) and tc:IsLocation(0x04) and tc:GetAttack()>0
end
function s.bpop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
e:Reset()
end
\ No newline at end of file
--邪心英雄 湮灭星魔
local s,id,o=GetID()
function c191981030.initial_effect(c)
aux.AddCodeList(c,94820406)
aux.AddFusionProcFunRep(c,s.ffilter,4,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_GRAVE_ACTION+CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
end
s.material_setcode=0x8
s.dark_calling=true
function s.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x8) and (not sg or not sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute()))
end
--to deck
function s.mtfilter(c)
return (aux.IsCodeListed(c,94820406) or c:IsSetCard(0x46)) and c:IsAbleToHand()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,5,nil)
end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,5,0,0)
Duel.SetOperationInfo(0,CATEGORY_SEARCH+CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,5,5,nil)
if g:GetCount()>4 then
local ct=Duel.SendtoDeck(g,nil,LOCATION_DECKSHF,REASON_EFFECT)
if ct==5 then
local sg=Duel.GetMatchingGroup(tp,s.mtfilter,tp,LOCATION_DECK,0,1,1,nil)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local og=sg:Select(tp,1,1,nil)
Duel.SendtoHand(og,nil,REASON_EFFECT)
Duel.ConfirmCards(tp,og)
end
end
end
end
\ No newline at end of file
...@@ -55,12 +55,12 @@ end ...@@ -55,12 +55,12 @@ end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,800,REASON_EFFECT) Duel.Damage(1-tp,500,REASON_EFFECT)
end end
end end
function s.costfilter(c) function s.costfilter(c)
......
--恐啡肽狂龙支配
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(s.atkcon)
e2:SetValue(s.atkval)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id)
e3:SetCost(s.descost)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id+100)
e4:SetCondition(s.spcon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.conafilter(c)
return c:IsFaceup() and c:IsSetCard(0x173)
end
function s.atkcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(s.conafilter,tp,0x04,0,1,nil) and Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function s.atkval(e)
return -math.abs(Duel.GetLP(0)-Duel.GetLP(1))
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function s.tgdfilter(c)
return c:IsRace(RACE_DINOSAUR) and c:IsType(0x1)
end
function s.tgdfilter2(c)
return c:IsSetCard(0x173) and c:IsType(0x4) and not c:IsType(TYPE_CONTINUOUS) and c:IsSSetable()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgdfilter,tp,0x06,0,1,nil) and Duel.IsExistingMatchingCard(s.tgdfilter2,tp,0x01,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,0x06)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,s.tgdfilter,tp,0x06,0,1,1,nil):GetFirst()
if tc then
if tc:IsLocation(0x04) then
Duel.HintSelection(Group.FromCards(tc))
end
if Duel.Destroy(tc,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.tgdfilter2,tp,0x01,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=2000
end
function s.tgsfilter(c,e,tp)
return c:IsSetCard(0x173) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgsfilter,tp,0x01,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x01)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.tgsfilter,tp,0x01,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--高速疾行机人 交错魂轮
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--damage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--sp
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+100)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_MATERIAL_CHECK)
e9:SetValue(s.valcheck)
c:RegisterEffect(e9)
--sp
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,id+200)
e3:SetCondition(s.spcon2)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
end
function s.tgtfilter(c)
return c.toss_dice and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgtfilter,tp,0x01,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x01)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,0x01)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,4))
local tc=Duel.SelectMatchingCard(tp,s.tgtfilter,tp,0x01,0,1,1,nil):GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
function s.ckvalfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroType(TYPE_SYNCHRO)
end
function s.valcheck(e,c)
if c:GetMaterial():IsExists(s.ckvalfilter,1,nil) then
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)~=0
end
function s.tgsfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsFaceup() and c:IsAbleToDeck()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(0x20) and s.tgsfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tgsfilter,tp,0x20,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tgsfilter,tp,0x20,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x40)
end
function s.opsfilter(c,e,tp,lv)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsLevel(lv) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local lv=tc:GetLevel()
if tc:IsRelateToChain() and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) then
Duel.BreakEffect()
local exshuffleck=false
if tc:IsLocation(0x40) then exshuffleck=true end
if lv~=0 and Duel.IsExistingMatchingCard(s.opsfilter,tp,0x40,0,1,nil,e,tp,lv) and Duel.SelectYesNo(tp,aux.Stringid(m,6)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,6))
local g=Duel.SelectMatchingCard(tp,s.opsfilter,tp,0x40,0,1,1,nil,e,tp,lv)
if #g>0 then
if exshuffleck then Duel.ShuffleExtra(tp) end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(s.splimit)
Duel.RegisterEffect(e2,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(0x40) and not c:IsAttribute(ATTRIBUTE_WIND)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,0x04)>0
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
function s.tgsfilter2(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.tgsfilter2,tp,0x10,0,nil,e,tp)
local ct=math.min(Duel.GetMZoneCount(tp,e:GetHandler()),#g,3)
if chk==0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) and ct>1 then ct=1 end
return ct>0 and g:CheckSubGroup(s.opsfilter2,1,ct) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0x10)
end
function s.opsfilter2(g)
return g:GetSum(Card.GetLevel)==9
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.tgsfilter2,tp,0x10,0,nil,e,tp)
local ct=math.min(Duel.GetMZoneCount(tp),#g,3)
if ct>0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:SelectSubGroup(tp,s.opsfilter2,false,1,ct)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--高速疾行机人 积木女武神
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WIND),1)
c:EnableReviveLimit()
--damage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+100)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
end
function s.tgsfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(0x10) and chkc:IsControler(tp) and s.tgsfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.tgsfilter,tp,0x10,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.tgsfilter,tp,0x10,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(s.splimit)
Duel.RegisterEffect(e2,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(0x40) and not c:IsAttribute(ATTRIBUTE_WIND)
end
function s.tgtfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgtfilter,tp,0x40,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,0x40)
end
function s.optfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToHand() and c:IsFaceup()
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectTarget(tp,s.tgtfilter,tp,0x40,0,1,1,nil):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT) and tc:IsLocation(0x10) then
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(s.optfilter,tp,0x20,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local gc=Duel.SelectMatchingCard(tp,s.optfilter,tp,0x20,0,1,1,nil):GetFirst()
if gc then
Duel.HintSelection(Group.FromCards(gc))
Duel.SendtoHand(gc,nil,REASON_EFFECT)
if gc:IsLocation(0x02) then
Duel.ConfirmCards(1-tp,gc)
end
end
end
end
end
\ No newline at end of file
--高速疾行机人 自转陀螺
local s,id=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,s.synfilter,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WIND),1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+100)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
end
function s.synfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_WIND)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.tgsfilter(c,e,tp)
return c:IsSetCard(0x2016) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgsfilter,tp,0x01,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x01)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.tgsfilter,tp,0x01,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(s.splimit)
Duel.RegisterEffect(e2,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(0x40) and not c:IsAttribute(ATTRIBUTE_WIND)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
--高速疾行机人 分灵突破智游
local s,id=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WIND),1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+100)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(0x0c)
end
function s.tgsfilter(c,e,tp)
return c:IsSetCard(0x2016) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function s.tgtfilter(c)
return c:IsSetCard(0x2016) and c:IsType(0x4) and c:IsSSetable()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgtfilter,tp,0x01,0,1,nil) end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.tgtfilter,tp,0x01,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--疾行机人赛道
local s,id,o=GetID()
function c191981055.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--cost
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e2:SetCost(s.cost)
e2:SetTarget(s.thtg2)
e2:SetOperation(s.thop2)
c:RegisterEffect(e2)
--extra summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e3:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2016))
c:RegisterEffect(e3)
--act limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_FZONE)
e4:SetOperation(s.chainop)
c:RegisterEffect(e4)
end
function s.thfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.costfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.thfilter2(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
local tc=g:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
if tc:IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
function s.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsAttribute(ATTRIBUTE_WIND) and re:GetHandler():IsType(TYPE_SYNCHRO) and re:GetHandler():IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) and ep==tp then
Duel.SetChainLimit(s.chainlm)
end
end
function s.chainlm(e,rp,tp)
return tp==rp
end
\ No newline at end of file
--疾行机人手里剑飓风
local s,id=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(0x08)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id)
e3:SetCondition(s.descon)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(0x08)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,id+100)
e4:SetTarget(s.damtg)
e4:SetOperation(s.damop)
c:RegisterEffect(e4)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(0x18)
e2:SetTarget(s.reptg)
e2:SetValue(s.repval)
e2:SetOperation(s.repop)
c:RegisterEffect(e2)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,0x0c,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,0x0c,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function s.tgdfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:GetAttack()~=c:GetBaseAttack()
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(s.tgdfilter,tp,0x04,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectTarget(tp,s.tgdfilter,tp,0x04,0,1,1,nil):GetFirst()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,idath.abs(tc:GetAttack()-tc:GetBaseAttack()))
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local dam=math.abs(tc:GetAttack()-tc:GetBaseAttack())
if tc:IsRelateToChain() and dam~=0 then
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
function s.repfilter(c,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_SYNCHRO)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function s.repval(e,c)
return s.repfilter(c,e:GetHandlerPlayer())
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--疾行机人 巨目画片
local s,id,o=GetID()
function c191981057.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+100)
e2:SetCost(s.cost)
e2:SetTarget(s.sptg1)
e2:SetOperation(s.spop1)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_CHAINING)
e3:SetCost(s.dcost)
e3:SetCondition(s.discon)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
end
--
function s.costfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--dis
function s.dcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil,c)
and c:IsAbleToRemoveAsCost() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.disfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(tp)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(s.disfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--风魔女-生命之钟
local s,id=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WIND),1)
c:EnableReviveLimit()
--damage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(0x04)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,id+100)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(s.negcon)
e2:SetTarget(s.negtg)
e2:SetOperation(s.negop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(0x10)
e3:SetCountLimit(1,id+200)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.tgsfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.tgsfilter,tp,0x10,0,2,nil,e,tp) and Duel.GetMZoneCount(tp)>=2 and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.tgsfilter,tp,0x10,0,2,2,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tg,ct=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil),Duel.GetMZoneCount(tp)
if #tg>0 and ct>0 then
if #tg==2 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if #tg>ct then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
tg=tg:FilterSelect(tp,Card.IsCanBeSpecialSummoned,ct,ct,nil,e,tp)
end
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)>Duel.GetLP(1-tp) and re:IsActiveType(0x1) and rp==1-tp and Duel.IsChainNegatable(ev)
end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,re:GetHandler():GetBaseAttack())
end
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
Duel.Damage(1-tp,re:GetHandler():GetBaseAttack(),REASON_EFFECT)
end
end
function s.tgsfilter2(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.tgsfilter2,tp,0x10,0,2,e:GetHandler(),e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.tgsfilter,tp,0x10,0,2,2,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--魔术师之筒
local s,id,o=GetID()
function c191981061.initial_effect(c)
aux.AddCodeList(c,38033126,46986414)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(s.necon)
e2:SetTarget(s.netg)
e2:SetOperation(s.neop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.scon)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
end
function s.cc(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsFaceup()
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()~=nil and Duel.IsExistingMatchingCard(s.cc,tp,LOCATION_MZONE,0,1,nil)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,500,1-tp,0)
end
function s.filter(c)
return c:IsCode(46986414,38033126) and c:IsFaceup()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c):GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if tc:IsType(TYPE_MONSTER) and tc:IsLocation(LOCATION_REMOVED) then
local atk=tc:GetPreviousAttackOnField()
if atk<0 then atk=0 end
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
end
end
--negate
function s.necon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(s.cc,tp,LOCATION_MZONE,0,1,nil)
end
function s.netg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function s.neop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)then
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if tc:IsType(TYPE_MONSTER) and tc:IsLocation(LOCATION_REMOVED) then
local atk=tc:GetPreviousAttackOnField()
if atk<0 then atk=0 end
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
end
end
end
--set
function s.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function s.setfilter(c)
return c:GetType()==TYPE_TRAP and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--魔术师之镜
local s,id,o=GetID()
function c191981062.initial_effect(c)
aux.AddCodeList(c,38033126,46986414)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.necon)
e1:SetTarget(s.netg)
e1:SetOperation(s.neop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,4))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.scon)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
end
function s.cc(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsFaceup()
end
function s.filter(c)
return c:IsCode(38033126,46986414) and c:IsFaceup()
end
--negate
function s.necon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(s.cc,tp,LOCATION_MZONE,0,1,nil)
end
function s.netg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function s.neop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not Duel.NegateActivation(ev) then return end
if rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and aux.NecroValleyFilter()(rc) and rc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and rc:IsFaceup()then
if (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and rc:IsSSetable(true)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.SSet(tp,rc)
end
end
end
--set
function s.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function s.setfilter(c)
return c:IsType(TYPE_QUICKPLAY) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--tohand
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cc,tp,LOCATION_MZONE,0,1,nil)
end
function s.ssc(c)
return c:IsType(TYPE_FIELD+TYPE_CONTINUOUS) and c:IsAbleToHand() and c:IsFaceup()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.ssc(chkc) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(s.ssc,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.ssc,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if g:GetFirst():IsLocation(LOCATION_GRAVE)then
e:SetCategory(CATEGORY_LEAVE_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and not tc:IsForbidden() and Duel.SelectYesNo(tp,aux.Stringid(id,5)) then
Duel.MoveToField(tc,tp,1-tc:GetControler(),LOCATION_SZONE,POS_FACEUP,true)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--禁断的奥义书
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,46986414,38033121)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.atktg)
e3:SetOperation(s.atkop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function s.spfilter(c,e,tp,code)
return c:IsCode(46986414,38033121) and not c:IsOriginalCodeRule(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,ec:GetOriginalCodeRule()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=e:GetHandler():GetEquipTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,ec:GetOriginalCodeRule())
local tc=g:GetFirst()
Duel.DisableSelfDestroyCheck()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.Equip(tp,c,tc) then
if ec then
Duel.BreakEffect()
Duel.Equip(tp,ec,tc)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(s.eqlimit2)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetLabelObject(tc)
ec:RegisterEffect(e3)
end
end
Duel.DisableSelfDestroyCheck(false)
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.eqlimit2(e,c)
return c==e:GetLabelObject()
end
function s.filter(c)
return c:IsFaceup() and c:IsCode(46986414,38033121)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return s.filter(ec) end
e:SetLabelObject(tc)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
local lv=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,4))
local lv=Duel.AnnounceLevel(tp,5,8,lv)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--增殖魔术
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,40640057,46986414,38033121)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.cecondition)
e1:SetTarget(s.cetarget)
e1:SetOperation(s.ceoperation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.thcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsLevelAbove(6) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK)
end
function s.cecondition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.spfilter(c,e,tp)
return c:IsAttack(300) and c:IsDefenseBelow(200) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.cetarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,rp,0,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,1,nil,e,tp) end
end
function s.cfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_RITUAL)
end
function s.ceoperation(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
if Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
if tc then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EFFECT_DISABLE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetCode(EFFECT_DISABLE_EFFECT)
e6:SetValue(RESET_TURN_SET)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e6)
if tc:IsType(TYPE_TRAPMONSTER) then
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e7:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e7)
end
end
end
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(1-tp,s.spfilter,tp,0,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,1-tp,1-tp,false,false,POS_FACEUP)
end
end
function s.cfilter3(c)
return c:IsFaceup() and c:IsCode(46986414,38033121)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(s.cfilter3,tp,LOCATION_MZONE,0,1,nil)
end
function s.thfilter(c)
return aux.IsCodeListed(c,40640057) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--混沌-黑魔术的降临
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,46986414,38033121)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.rcheck(tp,g,c)
return g:IsExists(Card.IsCode,1,nil,46986414,38033121)
end
function s.rsfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK)
end
function s.cfilter(c,tp)
return (c:IsFaceup() and c:IsControler(tp) and c:IsCode(46986414,38033121) and c:GetEquipCount()>0) or c:IsControler(1-tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
aux.RCheckAdditional=s.rcheck
local res=false
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) then
res=Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,s.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
else
res=Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,s.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
end
aux.RCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
::cancel::
local c=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.RCheckAdditional=s.rcheck
local tg=nil
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) then
tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,s.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
else
tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,s.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
end
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,true,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat then
aux.RCheckAdditional=nil
goto cancel
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
aux.RCheckAdditional=nil
end
function s.cspfilter(c)
return c:IsFaceupEx() and c:IsCode(46986414,38033121)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
and Duel.IsExistingMatchingCard(s.cspfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xcf) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local sc=g:GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,true,POS_FACEUP)
end
end
\ No newline at end of file
--女武神魔术少女
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,38033121)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetCondition(s.indcon)
e4:SetTarget(s.indtg)
e4:SetValue(s.efilter)
c:RegisterEffect(e4)
end
function s.cfilter(c)
return (c:IsRace(RACE_SPELLCASTER) or bit.band(c:GetType(),TYPE_SPELL+TYPE_COUNTER)==TYPE_SPELL+TYPE_COUNTER) and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.thfilter(c)
return aux.IsCodeListed(c,38033121) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.indcon(e)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==1-e:GetHandlerPlayer()
end
function s.indtg(e,c)
return c:IsSetCard(0x20a2)
end
function s.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
\ No newline at end of file
--沉默魔术少女
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.drcon)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o*2)
e3:SetCondition(s.discon)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return (c:IsRace(RACE_SPELLCASTER) or bit.band(c:GetType(),TYPE_SPELL+TYPE_COUNTER)==TYPE_SPELL+TYPE_COUNTER) and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x20a2)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and Duel.GetTurnPlayer()==1-e:GetHandlerPlayer()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and Duel.IsChainDisablable(ev) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--舞蹈魔术少女
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.descon)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,id+o*2)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return (c:IsRace(RACE_SPELLCASTER) or bit.band(c:GetType(),TYPE_SPELL+TYPE_COUNTER)==TYPE_SPELL+TYPE_COUNTER) and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.spcfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x20a2) and c:IsControler(tp)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spcfilter,1,nil,tp)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-e:GetHandlerPlayer()
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x20a2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) and Duel.GetMZoneCount(tp)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
end
\ No newline at end of file
--次元魔术少女
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x20a2))
e2:SetValue(1)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.discon)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return (c:IsRace(RACE_SPELLCASTER) or bit.band(c:GetType(),TYPE_SPELL+TYPE_COUNTER)==TYPE_SPELL+TYPE_COUNTER) and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.spcfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x20a2) and c:IsControler(tp)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spcfilter,1,nil,tp)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if not c:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--捕食奇袭
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCost(s.accost)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return c:IsSetCard(0x10f3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1041,1) end
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1041,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1041,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:AddCounter(0x1041,1) and tc:IsLevelAbove(2) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(s.lvcon)
e1:SetValue(1)
tc:RegisterEffect(e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function s.lvcon(e)
return e:GetHandler():GetCounter(0x1041)>0
end
function s.tgfilter(c)
return c:IsSetCard(0xf3) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.cfilter(c)
return c:IsSetCard(0x10f3) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function s.accost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD+REASON_COST,e:GetHandler())
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsLevelAbove,5),aux.NonTuner(nil),1)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsLevelAbove,5),1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_COUNTER+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.ctcon)
e1:SetTarget(s.cttg)
e1:SetOperation(s.ctop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsFaceup))
e3:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.descon2)
e4:SetTarget(s.destg2)
e4:SetOperation(s.desop2)
c:RegisterEffect(e4)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.thfilter(c)
return c:IsSetCard(0x10f3,0x2016) and c:IsAbleToHand()
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1041,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1041,1) and
Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1041,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:AddCounter(0x1041,1) and tc:GetLevel()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(s.lvcon)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
function s.lvcon(e)
return e:GetHandler():GetCounter(0x1041)>0
end
function s.descon2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsRelateToEffect(re) and rp~=tp
end
function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2))
end
function s.desop2(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -3,19 +3,19 @@ local m=30005301 ...@@ -3,19 +3,19 @@ local m=30005301
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--summon limit --summon limit
local e1=Effect.CreateEffect(c) --local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) --e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) --e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_SUMMON) --e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(cm.sumcon) --e1:SetCondition(cm.sumcon)
c:RegisterEffect(e1) --c:RegisterEffect(e1)
--spsummon limit --spsummon limit
local e2=Effect.CreateEffect(c) --local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) --e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) --e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION) --e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetValue(cm.sumlimit) --e2:SetValue(cm.sumlimit)
c:RegisterEffect(e2) --c:RegisterEffect(e2)
--Effect 1 --Effect 1
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_RELEASE) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_RELEASE)
...@@ -45,6 +45,7 @@ function cm.initial_effect(c) ...@@ -45,6 +45,7 @@ function cm.initial_effect(c)
e51:SetCode(EVENT_FREE_CHAIN) e51:SetCode(EVENT_FREE_CHAIN)
e51:SetRange(LOCATION_MZONE) e51:SetRange(LOCATION_MZONE)
e51:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e51:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e51:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e51:SetCondition(cm.ztcon) e51:SetCondition(cm.ztcon)
e51:SetCost(cm.tcost) e51:SetCost(cm.tcost)
e51:SetTarget(cm.ttg) e51:SetTarget(cm.ttg)
...@@ -104,7 +105,6 @@ end ...@@ -104,7 +105,6 @@ end
--Effect 1 --Effect 1
function cm.rsf(c,tp) function cm.rsf(c,tp)
if not c:IsType(TYPE_TRAP) then return false end if not c:IsType(TYPE_TRAP) then return false end
if not c:IsType(TYPE_CONTINUOUS) then return false end
local re=Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE) local re=Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)
local val=nil local val=nil
local tge=nil local tge=nil
...@@ -144,7 +144,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -144,7 +144,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(gt,nil,REASON_EFFECT) Duel.SendtoHand(gt,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,gt) Duel.ConfirmCards(1-tp,gt)
end end
function cm.ddop(e,tp,eg,ep,ev,re,r,rp) function cm.ddop3(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -153,6 +153,28 @@ function cm.ddop(e,tp,eg,ep,ev,re,r,rp) ...@@ -153,6 +153,28 @@ function cm.ddop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.ddop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_SINGLE)
e13:SetCode(EFFECT_SPSUMMON_COST)
e13:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e13:SetCost(cm.spcost)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(0xff,0xfe)
e3:SetTarget(cm.eftg)
e3:SetLabelObject(e13)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.spcost(e,c,tp)
return false
end
function cm.eftg(e,c)
return c:IsType(TYPE_MONSTER) or c:IsType(TYPE_SPELL)
end
--Effect 2 --Effect 2
function cm.thcf(c,tp) function cm.thcf(c,tp)
if c:GetPreviousLocation()~=LOCATION_ONFIELD then return false end if c:GetPreviousLocation()~=LOCATION_ONFIELD then return false end
......
...@@ -70,7 +70,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -70,7 +70,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
g:AddCard(c) g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.mf,tp,LOCATION_ONFIELD,0,nil) local g=Duel.GetMatchingGroup(cm.mf,tp,LOCATION_ONFIELD,0,nil)
if chk==0 then return #g>0 end if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
...@@ -226,7 +226,7 @@ function cm.aff(c) ...@@ -226,7 +226,7 @@ function cm.aff(c)
end end
function cm.bfcon(e) function cm.bfcon(e)
local loc=LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED local loc=LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED
local g=Duel.GetMatchingGroup(cm.af,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil) local g=Duel.GetMatchingGroup(cm.af,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
return #g>0 return #g>0
end end
function cm.atkval(e,c) function cm.atkval(e,c)
......
...@@ -33,31 +33,23 @@ function cm.initial_effect(c) ...@@ -33,31 +33,23 @@ function cm.initial_effect(c)
cm.global_check=true cm.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD) ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetCondition(cm.lecon) ge1:SetOperation(cm.checkop)
ge1:SetOperation(cm.leop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
--all --all
function cm.zpf(c,tp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local b1=c:IsPreviousControler(tp) local rc=re:GetHandler()
local b2=bit.band(c:GetPreviousTypeOnField(),TYPE_TRAP)~=0 local race,lv=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE,CHAININFO_TRIGGERING_LEVEL)
local b3=c:GetReasonPlayer()==1-tp if re:IsActiveType(TYPE_TRAP) or (race&RACE_FIEND>0 and lv&6>0) then
return b1 and b2 and b3 Duel.RegisterFlagEffect(0,m+100,RESET_PHASE+PHASE_END,0,1)
end Duel.RegisterFlagEffect(1,m+100,RESET_PHASE+PHASE_END,0,1)
function cm.lecon(e,tp,eg,ep,ev,re,r,rp) end
return eg:IsExists(cm.zpf,1,nil,0) or eg:IsExists(cm.zpf,1,nil,1)
end
function cm.leop(e,tp,eg,ep,ev,re,r,rp)
local ag=eg:Filter(cm.zpf,nil,0)
local bg=eg:Filter(cm.zpf,nil,1)
if #ag>0 then Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1) end
if #bg>0 then Duel.RegisterFlagEffect(1,m,RESET_PHASE+PHASE_END,0,1) end
end end
--Effect 1 --Effect 1
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),m)>0 return Duel.GetFlagEffect(e:GetHandlerPlayer(),m+100)>0
end end
function cm.th(c) function cm.th(c)
local b1=c:IsAttack(2500) local b1=c:IsAttack(2500)
...@@ -101,7 +93,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,7 +93,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
dh=true dh=true
end end
if dh==true and ec:IsRelateToEffect(e) then if dh==true and ec:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD)
end end
end end
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.con) --e1:SetCondition(cm.con)
e1:SetTarget(cm.tg) e1:SetTarget(cm.tg)
e1:SetOperation(cm.op) e1:SetOperation(cm.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
---覆转之魔
local m=30005314
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Effect 1
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_SZONE)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCountLimit(1)
e5:SetTarget(cm.ztg)
e5:SetOperation(cm.zop)
c:RegisterEffect(e5)
--Effect 2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--Effect 3
local e51=Effect.CreateEffect(c)
e51:SetCategory(CATEGORY_SUMMON+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION+CATEGORY_TOHAND)
e51:SetType(EFFECT_TYPE_QUICK_O)
e51:SetCode(EVENT_FREE_CHAIN)
e51:SetRange(LOCATION_GRAVE)
e51:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e51:SetCountLimit(1,m)
e51:SetCost(aux.bfgcost)
e51:SetTarget(cm.tg)
e51:SetOperation(cm.op)
c:RegisterEffect(e51)
end
--Effect 1
function cm.ssf(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.ztg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.ssf,tp,LOCATION_ONFIELD,0,nil,e,tp)
if chk==0 then return #g>0 end
end
function cm.zop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.ssf,tp,LOCATION_ONFIELD,0,nil,e,tp)
if #g==0 then return false end
local gt=g:Select(tp,1,1,nil)
if #gt==0 then return false end
local tc=gt:GetFirst()
if tc:IsFacedown() then
local b1=tc:IsType(TYPE_QUICKPLAY) or tc:IsType(TYPE_TRAP)
if b1 then
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_SINGLE)
e01:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e01:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e01:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e01)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
else
local te=tc:GetActivateEffect()
local se=te:Clone()
local con_c=te:GetCondition()
se:SetProperty(te:GetProperty(),EFFECT_FLAG2_COF)
se:SetCode(EVENT_CHAIN_END)
se:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()~=0 or not e:GetHandler():IsLocation(LOCATION_SZONE) then return false end
return not con_c or con_c(e,tp,eg,ep,ev,re,r,rp) end)
se:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(se)
end
tc:RegisterFlagEffect(m+m+m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
else
if tc:IsCanTurnSet() then
tc:CancelToGrave()
Duel.ChangePosition(tc,POS_FACEDOWN)
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
--Effect 2
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,TYPES_EFFECT_TRAP_MONSTER,0,3000,6,RACE_FIEND,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,TYPES_EFFECT_TRAP_MONSTER,0,3000,6,RACE_FIEND,ATTRIBUTE_EARTH) or not c:IsRelateToEffect(e) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local a=Duel.GetAttacker()
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetReset(RESET_EVENT+RESETS_REDIRECT)
e11:SetValue(LOCATION_DECK)
c:RegisterEffect(e11)
end
if a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,c)
end
end
end
--Effect 3
function cm.th(c)
local b1=c:IsLocation(LOCATION_DECK) and c:IsAttack(2700) and c:IsDefense(1000)
local b2=c:IsLocation(LOCATION_GRAVE) and c:IsLevel(6)
return c:IsRace(RACE_FIEND) and (b1 or b2) and c:IsAbleToHand()
end
function cm.suf(c)
return c:IsRace(RACE_FIEND) and c:IsLevel(6) and c:IsSummonable(true,nil)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler()
local kg=Duel.GetMatchingGroup(cm.th,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if chk==0 then return #kg>0 end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler()
local kg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.th),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if #kg==0 then return false end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local gc=kg:Select(tp,1,1,nil):GetFirst()
if gc==nil or not gc then return false end
if Duel.SendtoHand(gc,nil,REASON_EFFECT)==0 or gc:GetLocation()~=LOCATION_HAND then return false end
Duel.ConfirmCards(1-tp,gc)
Duel.ShuffleHand(tp)
local sg=Duel.GetMatchingGroup(cm.suf,tp,LOCATION_HAND,0,nil)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.suf,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
if not tc or tc==nil then return false end
Duel.Summon(tp,tc,true,nil)
end
end
--划谋之魔
local m=30005315
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Effect 1
local e51=Effect.CreateEffect(c)
e51:SetDescription(aux.Stringid(m,0))
e51:SetCategory(CATEGORY_SUMMON+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION+CATEGORY_TOHAND)
e51:SetType(EFFECT_TYPE_QUICK_O)
e51:SetCode(EVENT_FREE_CHAIN)
e51:SetRange(LOCATION_SZONE)
e51:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
--e51:SetCountLimit(1)
e51:SetCost(cm.cost)
e51:SetTarget(cm.tg)
e51:SetOperation(cm.op)
c:RegisterEffect(e51)
--Effect 2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--Effect 3
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_GRAVE)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCost(aux.bfgcost)
e5:SetCountLimit(1,m)
e5:SetTarget(cm.gtg)
e5:SetOperation(cm.gop)
c:RegisterEffect(e5)
end
--Effect 1
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function cm.th(c)
local b1=c:IsLocation(LOCATION_DECK) and c:IsAttack(2700) and c:IsDefense(1000)
local b2=c:IsLocation(LOCATION_GRAVE) and c:IsLevel(6)
return c:IsRace(RACE_FIEND) and (b1 or b2) and c:IsAbleToHand()
end
function cm.suf(c)
return c:IsRace(RACE_FIEND) and c:IsLevel(6) and c:IsSummonable(true,nil)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler()
local kg=Duel.GetMatchingGroup(cm.th,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if chk==0 then return #kg>0 end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler()
local kg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.th),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if #kg==0 then return false end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local gc=kg:Select(tp,1,1,nil):GetFirst()
if gc==nil or not gc then return false end
if Duel.SendtoHand(gc,nil,REASON_EFFECT)==0 or gc:GetLocation()~=LOCATION_HAND then return false end
Duel.ConfirmCards(1-tp,gc)
Duel.ShuffleHand(tp)
local sg=Duel.GetMatchingGroup(cm.suf,tp,LOCATION_HAND,0,nil)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.suf,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
if not tc or tc==nil then return false end
Duel.Summon(tp,tc,true,nil)
end
end
--Effect 2
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,TYPES_EFFECT_TRAP_MONSTER,2700,1000,6,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,TYPES_EFFECT_TRAP_MONSTER,2700,1000,6,RACE_FIEND,ATTRIBUTE_DARK) or not c:IsRelateToEffect(e) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local a=Duel.GetAttacker()
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetReset(RESET_EVENT+RESETS_REDIRECT)
e11:SetValue(LOCATION_DECK)
c:RegisterEffect(e11)
end
if a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,c)
end
end
end
--Effect 3
function cm.ch(c)
return c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function cm.gtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ch,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
end
function cm.gop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.ch,tp,LOCATION_ONFIELD,0,nil)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:Select(tp,1,#g,nil)
if #tg==0 then return false end
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
\ No newline at end of file
--猩红姬 唤魔者
local m=30005317
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,3,cm.lcheck)
c:EnableReviveLimit()
--extra material
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_FIELD)
e01:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e01:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e01:SetRange(LOCATION_EXTRA)
e01:SetTargetRange(LOCATION_SZONE,0)
e01:SetTarget(cm.mattg)
e01:SetValue(cm.matval)
c:RegisterEffect(e01)
--Effect 1
local e31=Effect.CreateEffect(c)
e31:SetType(EFFECT_TYPE_SINGLE)
e31:SetCode(EFFECT_IMMUNE_EFFECT)
e31:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e31:SetRange(LOCATION_MZONE)
e31:SetValue(cm.efilter)
c:RegisterEffect(e31)
--Effect 2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.tcon)
e3:SetTarget(cm.ttg)
e3:SetOperation(cm.top)
c:RegisterEffect(e3)
--Effect 3
local e4=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(cm.dcon)
e4:SetTarget(cm.dtg)
e4:SetOperation(cm.dop)
c:RegisterEffect(e4)
--all
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
--
function cm.sf(c)
return c:GetOriginalType()&TYPE_TRAP~=0
end
function cm.lcheck(g,lc)
return g:FilterCount(cm.sf,nil)>=2 and g:FilterCount(Card.IsLocation,nil,LOCATION_SZONE)<=1
end
function cm.mattg(e,c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP)
end
function cm.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,true
end
--Effect 1
function cm.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
--Effect 2
function cm.tcon(e,tp,eg,ep,ev,re,r,rp)
--if re:GetHandler()==e:GetHandler() then return false end
local loc,race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_RACE)
local b1=re:IsActiveType(TYPE_TRAP)
local b2=re:IsActiveType(TYPE_MONSTER) and race&RACE_FIEND~=0
return loc&LOCATION_ONFIELD~=0 and (b1 or b2)
end
function cm.gf(c)
local b1=c:IsLocation(LOCATION_DECK) and c:IsAbleToGrave()
local b2=c:IsLocation(LOCATION_REMOVED)
return c:IsFaceupEx() and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and (b1 or b2)
end
function cm.ttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.gf,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function cm.top(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler()
local loc=LOCATION_DECK+LOCATION_REMOVED
local g=Duel.GetMatchingGroup(cm.gf,tp,loc,0,nil)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sgc=g:Select(tp,1,1,nil):GetFirst()
if sgc==nil then return false end
if sgc:IsLocation(LOCATION_REMOVED) then
Duel.SendtoGrave(sgc,REASON_EFFECT+REASON_RETURN)
else
Duel.SendtoGrave(sgc,REASON_EFFECT)
end
Duel.AdjustAll()
if sgc:IsLocation(LOCATION_GRAVE) and ec:IsFaceup() and ec:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(ec)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
ec:RegisterEffect(e1)
end
end
--Effect 3
function cm.dcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function cm.cf(c)
local b1=c:IsLocation(LOCATION_GRAVE) and c:IsAbleToHand()
local b2=c:IsLocation(LOCATION_REMOVED)
return c:IsFaceupEx() and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and (b1 or b2)
end
function cm.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.cf,tp,LOCATION_GRAVE+LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
end
function cm.dop(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.cf),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if #rg==0 and #tg==0 then return end
local op=aux.SelectFromOptions(tp,{#rg>0,1192},{#tg>0,1191})
if op==1 then
cm.rmove(e,tp,eg,ep,ev,re,r,rp)
else
cm.tohand(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.rmove(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tag=g:Select(tp,1,1,nil)
if #tag==0 then return false end
Duel.Remove(tag,POS_FACEUP,REASON_EFFECT)
end
function cm.tohand(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.cf),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if #g==0 then return end
local tg=g:Filter(aux.NecroValleyFilter(Card.IsAbleToHand),nil)
local gg=g:Filter(Card.IsLocation,nil,LOCATION_REMOVED)
local op=aux.SelectFromOptions(tp,{#tg>0,1190},{#gg>0,1191})
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tag=tg:Select(tp,1,1,nil)
if #tag==0 then return false end
Duel.SendtoHand(tag,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tag)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tag=gg:Select(tp,1,1,nil)
if #tag==0 then return false end
Duel.SendtoGrave(tag,REASON_EFFECT+REASON_RETURN)
end
end
--魔傀行军
local m=30005318
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Effect 1
local e51=Effect.CreateEffect(c)
e51:SetCategory(CATEGORY_GRAVE_ACTION+CATEGORY_SPECIAL_SUMMON+CATEGORY_SUMMON)
e51:SetType(EFFECT_TYPE_QUICK_O)
e51:SetCode(EVENT_FREE_CHAIN)
e51:SetRange(LOCATION_SZONE)
e51:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e51:SetCountLimit(1)
e51:SetTarget(cm.tg)
e51:SetOperation(cm.op)
c:RegisterEffect(e51)
--Effect 2
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_GRAVE)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCountLimit(1,m)
e5:SetCost(aux.bfgcost)
e5:SetTarget(cm.rdtg)
e5:SetOperation(cm.rdop)
c:RegisterEffect(e5)
end
--Effect 1
function cm.suf(c,ec)
if not c:IsRace(RACE_FIEND) or not c:IsLevel(6) then return false end
local e1=Effect.CreateEffect(ec)
e1:SetDescription(aux.Stringid(30005304,3))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(cm.ntcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local res=c:IsSummonable(true,nil)
e1:Reset()
return res
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.spf(c,e,tp)
if not c:IsType(TYPE_TRAP) or not c:IsType(TYPE_CONTINUOUS) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local b1=Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),nil,TYPES_NORMAL_TRAP_MONSTER,500,0,6,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,tp)
return ft>0 and b1
end
function cm.nf(c)
return c:IsFaceup() and c:IsCode(30005317)
end
function cm.xpf(c,e,tp)
return c:IsFaceupEx() and cm.spf(c,e,tp)
end
function cm.zef(c,e,tp)
return not c:IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsFaceupEx() and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:CheckUniqueOnField(tp)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED
local hg=Duel.GetMatchingGroup(cm.suf,tp,LOCATION_HAND,0,nil,e:GetHandler())
local pg=Duel.GetMatchingGroup(cm.spf,tp,LOCATION_HAND+LOCATION_SZONE,0,nil,e,tp)
local ng=Duel.GetMatchingGroup(cm.nf,tp,LOCATION_ONFIELD,0,nil,e,tp)
local xg=Duel.GetMatchingGroup(cm.zef,tp,loc,0,nil,e,tp)
if chk==0 then return #hg>0 or #pg>0 or (#ng>0 and #xg>0) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED
local hg=Duel.GetMatchingGroup(cm.suf,tp,LOCATION_HAND,0,nil,e:GetHandler())
local pg=Duel.GetMatchingGroup(cm.spf,tp,LOCATION_HAND+LOCATION_SZONE,0,nil,e,tp)
local ng=Duel.GetMatchingGroup(cm.nf,tp,LOCATION_ONFIELD,0,nil,e,tp)
local xg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.zef),tp,loc,0,nil,e,tp)
if #hg==0 and #pg==0 and (#xg==0 and #ng==0) then return end
local ek=#ng>0 and #xg>0
local op=aux.SelectFromOptions(tp,{#hg>0,aux.Stringid(m,0)},{#pg>0,aux.Stringid(m,1)},{ek,aux.Stringid(m,2)})
if op==1 then
cm.pop(e,tp,eg,ep,ev,re,r,rp)
elseif op==2 then
local tc=pg:FilterSelect(tp,cm.spf,1,1,nil,e,tp):GetFirst()
if tc:IsOnField() and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end
cm.spp(e,tp,tc,tp)
Duel.SpecialSummonComplete()
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local zc=xg:Select(tp,1,1,nil):GetFirst()
if not zc or zc==nil then return false end
Duel.MoveToField(zc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function cm.pop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler()
local kg=Duel.GetMatchingGroup(cm.suf,tp,LOCATION_HAND,0,nil,ec)
if #kg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.suf,tp,LOCATION_HAND,0,1,1,nil,ec):GetFirst()
if not tc or tc==nil then return false end
local e1=Effect.CreateEffect(ec)
e1:SetDescription(aux.Stringid(30005304,3))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(cm.ntcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(ec)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_NEGATED)
e2:SetOperation(cm.rstop)
e2:SetLabelObject(e1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.Summon(tp,tc,true,nil)
end
end
function cm.rstop(e,tp,eg,ep,ev,re,r,rp)
local e1=e:GetLabelObject()
if e1 then e1:Reset() end
e:Reset()
end
function cm.spp(e,tp,tc,sp)
tc:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP,ATTRIBUTE_DARK,RACE_FIEND,6,500,0)
Duel.SpecialSummonStep(tc,0,tp,sp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(0)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(6)
tc:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e4:SetValue(ATTRIBUTE_DARK)
tc:RegisterEffect(e4,true)
local e5=e1:Clone()
e5:SetCode(EFFECT_CHANGE_RACE)
e5:SetValue(RACE_FIEND)
tc:RegisterEffect(e5,true)
end
--Effect 2
function cm.ddf(c)
local b1=c:IsRace(RACE_FIEND)
local b2=c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS
return b1 or b2
end
function cm.of(c)
return c:IsOnField() and c:IsFacedown()
end
function cm.rdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.ddf,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return #g>=2 and Duel.IsPlayerCanDraw(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
end
function cm.rdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.ddf,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if #g<2 then return end
local dg=g:Select(tp,2,#g,nil)
local kg=dg:Filter(cm.of,nil)
if #kg>0 then Duel.ConfirmCards(1-tp,kg) end
local ct=Duel.Destroy(dg,REASON_EFFECT)
if ct==0 then return false end
Duel.BreakEffect()
Duel.Draw(tp,ct+1,REASON_EFFECT)
end
\ No newline at end of file
...@@ -11034,6 +11034,11 @@ SHUT UP!(172016014) 通常魔法 (Custom) ...@@ -11034,6 +11034,11 @@ SHUT UP!(172016014) 通常魔法 (Custom)
● 卡从额外卡组送去墓地时,场上与那些怪兽具有相同类型的怪兽(融合·超量·同调·连接·灵摆)效果无效并破坏。 ● 卡从额外卡组送去墓地时,场上与那些怪兽具有相同类型的怪兽(融合·超量·同调·连接·灵摆)效果无效并破坏。
提示文本:特殊召唤、从卡组盖放、同类怪兽送去墓地、「教导的圣女 奎玛」效果生效中 提示文本:特殊召唤、从卡组盖放、同类怪兽送去墓地、「教导的圣女 奎玛」效果生效中
凶导的落印(172016311) 永续陷阱 (Custom)
系列:烙印、教导
①:展示手卡的1只「教导」仪式怪兽,以对方场上1只等级相同的怪兽为对象才能发动。把持有那只怪兽的攻击力以上的攻击力的1只怪兽从额外卡组送去墓地。只要作为对象的怪兽在场上表侧表示存在,其效果无效,不能作为超量·同调·连接素材使用。作为对象的怪兽是魔法使族怪兽的场合,再得到以下效果。
● 对方对「教导」怪兽的仪式召唤成功时,(必须)把这张卡解放发动。自身场上的融合·同调·超量·连接怪兽全部回到持有者的额外卡组。
地中族邪界兽的巢穴(172016315) 永续魔法 (Custom) 地中族邪界兽的巢穴(172016315) 永续魔法 (Custom)
系列:地中族邪界 系列:地中族邪界
①:自己对「地中族」怪兽召唤·特殊召唤·反转召唤成功时才能发动。展示自己卡组正中3张/4张卡。从那之中选择1只「地中族」怪兽加入手卡,其他的按照喜欢的顺序放回卡组上面或卡组下面。 ①:自己对「地中族」怪兽召唤·特殊召唤·反转召唤成功时才能发动。展示自己卡组正中3张/4张卡。从那之中选择1只「地中族」怪兽加入手卡,其他的按照喜欢的顺序放回卡组上面或卡组下面。
......
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