Commit 50ce2425 authored by nekrozar's avatar nekrozar

CRLF->LF

parent 757eb906
--F.A.シティGP --F.A.シティGP
function c1061200.initial_effect(c) function c1061200.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--lv up --lv up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107))
e2:SetValue(2) e2:SetValue(2)
e2:SetCondition(c1061200.lvcon) e2:SetCondition(c1061200.lvcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--cannot be target --cannot be target
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107)) e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107))
e3:SetValue(aux.tgoval) e3:SetValue(aux.tgoval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED) e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,1061200) e4:SetCountLimit(1,1061200)
e4:SetCondition(c1061200.thcon) e4:SetCondition(c1061200.thcon)
e4:SetTarget(c1061200.thtg) e4:SetTarget(c1061200.thtg)
e4:SetOperation(c1061200.thop) e4:SetOperation(c1061200.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c1061200.lvcon(e) function c1061200.lvcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end end
function c1061200.thcon(e,tp,eg,ep,ev,re,r,rp) function c1061200.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end end
function c1061200.thfilter(c) function c1061200.thfilter(c)
return c:IsSetCard(0x107) and not c:IsCode(1061200) and c:IsAbleToHand() return c:IsSetCard(0x107) and not c:IsCode(1061200) and c:IsAbleToHand()
end end
function c1061200.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c1061200.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1061200.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c1061200.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c1061200.thop(e,tp,eg,ep,ev,re,r,rp) function c1061200.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1061200.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c1061200.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--ヴェンデット・キマイラ --ヴェンデット・キマイラ
function c13482075.initial_effect(c) function c13482075.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--Negate --Negate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13482075,0)) e1:SetDescription(aux.Stringid(13482075,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,13482075) e1:SetCountLimit(1,13482075)
e1:SetCondition(c13482075.condition) e1:SetCondition(c13482075.condition)
e1:SetCost(c13482075.cost) e1:SetCost(c13482075.cost)
e1:SetTarget(c13482075.target) e1:SetTarget(c13482075.target)
e1:SetOperation(c13482075.operation) e1:SetOperation(c13482075.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk/def --atk/def
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13482075,1)) e1:SetDescription(aux.Stringid(13482075,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_RELEASE) e2:SetCode(EVENT_RELEASE)
e2:SetCountLimit(1,13482076) e2:SetCountLimit(1,13482076)
e2:SetCondition(c13482075.atkcon) e2:SetCondition(c13482075.atkcon)
e2:SetOperation(c13482075.atkop) e2:SetOperation(c13482075.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE) e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c13482075.condition(e,tp,eg,ep,ev,re,r,rp) function c13482075.condition(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end
if re:IsHasCategory(CATEGORY_NEGATE) if re:IsHasCategory(CATEGORY_NEGATE)
and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0 return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end end
function c13482075.cfilter(c) function c13482075.cfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost() return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost()
end end
function c13482075.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c13482075.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13482075.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c13482075.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c13482075.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c13482075.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c13482075.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13482075.target(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_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
function c13482075.operation(e,tp,eg,ep,ev,re,r,rp) function c13482075.operation(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
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
function c13482075.atkcon(e,tp,eg,ep,ev,re,r,rp) function c13482075.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_RITUAL) return e:GetHandler():IsReason(REASON_RITUAL)
end end
function c13482075.atkop(e,tp,eg,ep,ev,re,r,rp) function c13482075.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetValue(-500) e1:SetValue(-500)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
--オッドアイズ・アークペンデュラム・ドラゴン --オッドアイズ・アークペンデュラム・ドラゴン
function c14105623.initial_effect(c) function c14105623.initial_effect(c)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14105623,0)) e1:SetDescription(aux.Stringid(14105623,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED) e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,14105623) e1:SetCountLimit(1,14105623)
e1:SetCondition(c14105623.spcon) e1:SetCondition(c14105623.spcon)
e1:SetTarget(c14105623.sptg) e1:SetTarget(c14105623.sptg)
e1:SetOperation(c14105623.spop) e1:SetOperation(c14105623.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c14105623.cfilter(c,tp) function c14105623.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousSetCard(0x99) return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousSetCard(0x99)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end end
function c14105623.spcon(e,tp,eg,ep,ev,re,r,rp) function c14105623.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c14105623.cfilter,1,nil,tp) return eg:IsExists(c14105623.cfilter,1,nil,tp)
end end
function c14105623.spfilter(c,e,tp) function c14105623.spfilter(c,e,tp)
return c:IsSetCard(0x99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c14105623.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c14105623.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
and Duel.IsExistingMatchingCard(c14105623.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c14105623.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end end
function c14105623.spop(e,tp,eg,ep,ev,re,r,rp) function c14105623.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c14105623.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c14105623.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--覚星師ライズベルト --覚星師ライズベルト
function c14812659.initial_effect(c) function c14812659.initial_effect(c)
--lv up --lv up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14812659,0)) e1:SetDescription(aux.Stringid(14812659,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER) e1:SetHintTiming(TIMINGS_CHECK_MONSTER)
e1:SetTarget(c14812659.target) e1:SetTarget(c14812659.target)
e1:SetOperation(c14812659.operation) e1:SetOperation(c14812659.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c14812659.filter(c) function c14812659.filter(c)
return c:IsFaceup() and c:IsLevelAbove(1) return c:IsFaceup() and c:IsLevelAbove(1)
end end
function c14812659.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c14812659.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14812659.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14812659.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14812659.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c14812659.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c14812659.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c14812659.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c14812659.operation(e,tp,eg,ep,ev,re,r,rp) function c14812659.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1) e1:SetValue(1)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
--ウィッチクラフト・スクロール --ウィッチクラフト・スクロール
function c19673561.initial_effect(c) function c19673561.initial_effect(c)
--Activate --Activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19673561,0)) e1:SetDescription(aux.Stringid(19673561,0))
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c19673561.drcon) e1:SetCondition(c19673561.drcon)
e1:SetTarget(c19673561.drtg) e1:SetTarget(c19673561.drtg)
e1:SetOperation(c19673561.drop) e1:SetOperation(c19673561.drop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--ep set --ep set
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19673561,0)) e2:SetDescription(aux.Stringid(19673561,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,19673561) e2:SetCountLimit(1,19673561)
e2:SetCondition(c19673561.setcon) e2:SetCondition(c19673561.setcon)
e2:SetTarget(c19673561.settg) e2:SetTarget(c19673561.settg)
e2:SetOperation(c19673561.setop) e2:SetOperation(c19673561.setop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--change cost --change cost
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(83289866) e3:SetCode(83289866)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,19673561) e3:SetCountLimit(1,19673561)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c19673561.drcon(e,tp,eg,ep,ev,re,r,rp) function c19673561.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=eg:GetFirst() local rc=eg:GetFirst()
return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE) return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE)
and rc:IsFaceup() and rc:IsRace(RACE_SPELLCASTER) and rc:IsControler(tp) and rc:IsFaceup() and rc:IsRace(RACE_SPELLCASTER) and rc:IsControler(tp)
end end
function c19673561.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c19673561.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c19673561.drop(e,tp,eg,ep,ev,re,r,rp) function c19673561.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c19673561.rccfilter(c) function c19673561.rccfilter(c)
return c:IsFaceup() and c:IsSetCard(0x128) return c:IsFaceup() and c:IsSetCard(0x128)
end end
function c19673561.setcon(e,tp,eg,ep,ev,re,r,rp) function c19673561.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
and Duel.IsExistingMatchingCard(c19673561.rccfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c19673561.rccfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c19673561.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c19673561.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c19673561.setop(e,tp,eg,ep,ev,re,r,rp) function c19673561.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
end end
--岩投げアタック --岩投げアタック
function c20781762.initial_effect(c) function c20781762.initial_effect(c)
--send to grave --send to grave
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(20781762,0)) e1:SetDescription(aux.Stringid(20781762,0))
e1:SetCategory(CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c20781762.cost) e1:SetCost(c20781762.cost)
e1:SetTarget(c20781762.target) e1:SetTarget(c20781762.target)
e1:SetOperation(c20781762.operation) e1:SetOperation(c20781762.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c20781762.cfilter(c) function c20781762.cfilter(c)
return c:IsRace(RACE_ROCK) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_ROCK) and c:IsAbleToGraveAsCost()
end end
function c20781762.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c20781762.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c20781762.cfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c20781762.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c20781762.cfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c20781762.cfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c20781762.target(e,tp,eg,ep,ev,re,r,rp,chk) function c20781762.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500) Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end end
function c20781762.operation(e,tp,eg,ep,ev,re,r,rp) function c20781762.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
--F.A.オフロードGP --F.A.オフロードGP
function c2144946.initial_effect(c) function c2144946.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--lv up --lv up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107))
e2:SetValue(2) e2:SetValue(2)
e2:SetCondition(c2144946.lvcon) e2:SetCondition(c2144946.lvcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2144946,0)) e3:SetDescription(aux.Stringid(2144946,0))
e3:SetCategory(CATEGORY_HANDES) e3:SetCategory(CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED) e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,2144946) e3:SetCountLimit(1,2144946)
e3:SetCondition(c2144946.descon) e3:SetCondition(c2144946.descon)
e3:SetTarget(c2144946.destg) e3:SetTarget(c2144946.destg)
e3:SetOperation(c2144946.desop) e3:SetOperation(c2144946.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(2144946,1)) e4:SetDescription(aux.Stringid(2144946,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED) e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,2144947) e4:SetCountLimit(1,2144947)
e4:SetCondition(c2144946.thcon2) e4:SetCondition(c2144946.thcon2)
e4:SetTarget(c2144946.thtg2) e4:SetTarget(c2144946.thtg2)
e4:SetOperation(c2144946.thop2) e4:SetOperation(c2144946.thop2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c2144946.lvcon(e) function c2144946.lvcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function c2144946.cfilter(c,tp) function c2144946.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousSetCard(0x107) return c:GetPreviousControler()==tp and c:IsPreviousSetCard(0x107)
end end
function c2144946.descon(e,tp,eg,ep,ev,re,r,rp) function c2144946.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c2144946.cfilter,1,nil,tp) return eg:IsExists(c2144946.cfilter,1,nil,tp)
end end
function c2144946.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c2144946.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1) Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1)
end end
function c2144946.desop(e,tp,eg,ep,ev,re,r,rp) function c2144946.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND,nil) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local sg=g:RandomSelect(1-tp,1) local sg=g:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end end
function c2144946.thcon2(e,tp,eg,ep,ev,re,r,rp) function c2144946.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) return c:IsReason(REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end end
function c2144946.thfilter2(c) function c2144946.thfilter2(c)
return c:IsSetCard(0x107) and not c:IsCode(2144946) and c:IsAbleToHand() return c:IsSetCard(0x107) and not c:IsCode(2144946) and c:IsAbleToHand()
end end
function c2144946.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) function c2144946.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c2144946.thfilter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c2144946.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c2144946.thop2(e,tp,eg,ep,ev,re,r,rp) function c2144946.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c2144946.thfilter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c2144946.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--サイコ・ヒーリング --サイコ・ヒーリング
function c21488686.initial_effect(c) function c21488686.initial_effect(c)
--recover --recover
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER) e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c21488686.target) e1:SetTarget(c21488686.target)
e1:SetOperation(c21488686.operation) e1:SetOperation(c21488686.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c21488686.target(e,tp,eg,ep,ev,re,r,rp,chk) function c21488686.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21488686.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c21488686.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
local rec=Duel.GetMatchingGroupCount(c21488686.filter,tp,LOCATION_MZONE,0,nil)*1000 local rec=Duel.GetMatchingGroupCount(c21488686.filter,tp,LOCATION_MZONE,0,nil)*1000
Duel.SetTargetParam(rec) Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end end
function c21488686.filter(c) function c21488686.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PSYCHO) return c:IsFaceup() and c:IsRace(RACE_PSYCHO)
end end
function c21488686.operation(e,tp,eg,ep,ev,re,r,rp) function c21488686.operation(e,tp,eg,ep,ev,re,r,rp)
local rec=Duel.GetMatchingGroupCount(c21488686.filter,tp,LOCATION_MZONE,0,nil)*1000 local rec=Duel.GetMatchingGroupCount(c21488686.filter,tp,LOCATION_MZONE,0,nil)*1000
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,rec,REASON_EFFECT) Duel.Recover(p,rec,REASON_EFFECT)
end end
--ヴェンデット・リユニオン --ヴェンデット・リユニオン
function c2266498.initial_effect(c) function c2266498.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c2266498.target) e1:SetTarget(c2266498.target)
e1:SetOperation(c2266498.activate) e1:SetOperation(c2266498.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c2266498.cfilter(c,e,tp,m,ft) function c2266498.cfilter(c,e,tp,m,ft)
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsSetCard(0x106) or c:IsPublic() if bit.band(c:GetType(),0x81)~=0x81 or not c:IsSetCard(0x106) or c:IsPublic()
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
if c.mat_filter then if c.mat_filter then
m=m:Filter(c.mat_filter,nil,tp) m=m:Filter(c.mat_filter,nil,tp)
end end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
return m:IsExists(c2266498.spselect,1,nil,c,0,ft,m,sg) return m:IsExists(c2266498.spselect,1,nil,c,0,ft,m,sg)
end end
function c2266498.spgoal(mc,ct,sg) function c2266498.spgoal(mc,ct,sg)
return sg:CheckWithSumEqual(Card.GetRitualLevel,mc:GetLevel(),ct,ct,mc) and sg:GetClassCount(Card.GetCode)==ct return sg:CheckWithSumEqual(Card.GetRitualLevel,mc:GetLevel(),ct,ct,mc) and sg:GetClassCount(Card.GetCode)==ct
end end
function c2266498.spselect(c,mc,ct,ft,m,sg) function c2266498.spselect(c,mc,ct,ft,m,sg)
sg:AddCard(c) sg:AddCard(c)
ct=ct+1 ct=ct+1
local res=(ft>=ct and c2266498.spgoal(mc,ct,sg)) or m:IsExists(c2266498.spselect,1,sg,mc,ct,ft,m,sg) local res=(ft>=ct and c2266498.spgoal(mc,ct,sg)) or m:IsExists(c2266498.spselect,1,sg,mc,ct,ft,m,sg)
sg:RemoveCard(c) sg:RemoveCard(c)
return res return res
end end
function c2266498.filter(c,e,tp) function c2266498.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x106) and Duel.IsPlayerCanRelease(tp,c) return c:IsFaceup() and c:IsSetCard(0x106) and Duel.IsPlayerCanRelease(tp,c)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function c2266498.target(e,tp,eg,ep,ev,re,r,rp,chk) function c2266498.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return false end if ft<=0 or not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return false end
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local mg=Duel.GetMatchingGroup(c2266498.filter,tp,LOCATION_REMOVED,0,nil,e,tp) local mg=Duel.GetMatchingGroup(c2266498.filter,tp,LOCATION_REMOVED,0,nil,e,tp)
return Duel.IsExistingMatchingCard(c2266498.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft) return Duel.IsExistingMatchingCard(c2266498.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_REMOVED)
end end
function c2266498.activate(e,tp,eg,ep,ev,re,r,rp) function c2266498.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return end if ft<=0 or not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return end
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local mg=Duel.GetMatchingGroup(c2266498.filter,tp,LOCATION_REMOVED,0,nil,e,tp) local mg=Duel.GetMatchingGroup(c2266498.filter,tp,LOCATION_REMOVED,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c2266498.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,c2266498.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft)
if tg:GetCount()>0 then if tg:GetCount()>0 then
Duel.ConfirmCards(1-tp,tg) Duel.ConfirmCards(1-tp,tg)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc.mat_filter then if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil,tp) mg=mg:Filter(tc.mat_filter,nil,tp)
end end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
for i=0,98 do for i=0,98 do
local cg=mg:Filter(c2266498.spselect,sg,tc,i,ft,mg,sg) local cg=mg:Filter(c2266498.spselect,sg,tc,i,ft,mg,sg)
if cg:GetCount()==0 then break end if cg:GetCount()==0 then break end
local min=1 local min=1
if c2266498.spgoal(tc,i,sg) then if c2266498.spgoal(tc,i,sg) then
if not Duel.SelectYesNo(tp,210) then break end if not Duel.SelectYesNo(tp,210) then break end
min=0 min=0
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=cg:Select(tp,min,1,nil) local g=cg:Select(tp,min,1,nil)
if g:GetCount()==0 then break end if g:GetCount()==0 then break end
sg:Merge(g) sg:Merge(g)
end end
if sg:GetCount()==0 then return end if sg:GetCount()==0 then return end
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)==sg:GetCount() then if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)==sg:GetCount() then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
Duel.ConfirmCards(1-tp,og) Duel.ConfirmCards(1-tp,og)
tc:SetMaterial(og) tc:SetMaterial(og)
Duel.Release(og,REASON_EFFECT+REASON_RITUAL+REASON_MATERIAL) Duel.Release(og,REASON_EFFECT+REASON_RITUAL+REASON_MATERIAL)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
end end
--ヴェンデット・リバース --ヴェンデット・リバース
function c2287848.initial_effect(c) function c2287848.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,2287848) e1:SetCountLimit(1,2287848)
e1:SetCost(c2287848.cost) e1:SetCost(c2287848.cost)
e1:SetTarget(c2287848.target) e1:SetTarget(c2287848.target)
e1:SetOperation(c2287848.activate) e1:SetOperation(c2287848.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,2287849) e2:SetCountLimit(1,2287849)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c2287848.drtg) e2:SetTarget(c2287848.drtg)
e2:SetOperation(c2287848.drop) e2:SetOperation(c2287848.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c2287848.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c2287848.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c2287848.spfilter(c,e,tp) function c2287848.spfilter(c,e,tp)
return c:IsSetCard(0x106) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0x106) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c2287848.thfilter(c) function c2287848.thfilter(c)
return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand() return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand()
end end
function c2287848.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c2287848.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c2287848.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c2287848.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingTarget(c2287848.thfilter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingTarget(c2287848.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c2287848.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,c2287848.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
e:SetLabelObject(g1:GetFirst()) e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectTarget(tp,c2287848.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g2=Duel.SelectTarget(tp,c2287848.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0)
end end
function c2287848.activate(e,tp,eg,ep,ev,re,r,rp) function c2287848.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1,tc2=Duel.GetFirstTarget() local tc1,tc2=Duel.GetFirstTarget()
if tc1~=e:GetLabelObject() then tc1,tc2=tc2,tc1 end if tc1~=e:GetLabelObject() then tc1,tc2=tc2,tc1 end
if tc1:IsRelateToEffect(e) and Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and tc2:IsRelateToEffect(e) then if tc1:IsRelateToEffect(e) and Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and tc2:IsRelateToEffect(e) then
Duel.SendtoHand(tc2,nil,REASON_EFFECT) Duel.SendtoHand(tc2,nil,REASON_EFFECT)
end end
end end
function c2287848.drfilter(c) function c2287848.drfilter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToDeck() return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToDeck()
end end
function c2287848.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c2287848.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c2287848.drfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c2287848.drfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c2287848.drfilter,tp,LOCATION_REMOVED,0,5,nil) end and Duel.IsExistingTarget(c2287848.drfilter,tp,LOCATION_REMOVED,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c2287848.drfilter,tp,LOCATION_REMOVED,0,5,5,nil) local g=Duel.SelectTarget(tp,c2287848.drfilter,tp,LOCATION_REMOVED,0,5,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c2287848.drop(e,tp,eg,ep,ev,re,r,rp) function c2287848.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==5 then if ct==5 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
--ヴァルキュルスの影霊衣 --ヴァルキュルスの影霊衣
function c25857246.initial_effect(c) function c25857246.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
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_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit) e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk --atk
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(25857246,0)) e2:SetDescription(aux.Stringid(25857246,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,25857246) e2:SetCountLimit(1,25857246)
e2:SetCondition(c25857246.atkcon) e2:SetCondition(c25857246.atkcon)
e2:SetCost(c25857246.atkcost) e2:SetCost(c25857246.atkcost)
e2:SetOperation(c25857246.atkop) e2:SetOperation(c25857246.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--draw --draw
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(25857246,1)) e3:SetDescription(aux.Stringid(25857246,1))
e3:SetCategory(CATEGORY_DRAW) e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,25857247) e3:SetCountLimit(1,25857247)
e3:SetTarget(c25857246.target) e3:SetTarget(c25857246.target)
e3:SetOperation(c25857246.operation) e3:SetOperation(c25857246.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c25857246.mat_filter(c) function c25857246.mat_filter(c)
return not c:IsLevel(8) return not c:IsLevel(8)
end end
function c25857246.atkcon(e,tp,eg,ep,ev,re,r,rp) function c25857246.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
end end
function c25857246.cfilter(c) function c25857246.cfilter(c)
return c:IsSetCard(0xb4) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xb4) and c:IsAbleToRemoveAsCost()
end end
function c25857246.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c25857246.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() if chk==0 then return e:GetHandler():IsDiscardable()
and Duel.IsExistingMatchingCard(c25857246.cfilter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingMatchingCard(c25857246.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c25857246.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c25857246.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c25857246.atkop(e,tp,eg,ep,ev,re,r,rp) function c25857246.atkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then if Duel.NegateAttack() then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end end
end end
function c25857246.filter(c) function c25857246.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect() return c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end end
function c25857246.target(e,tp,eg,ep,ev,re,r,rp,chk) function c25857246.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.CheckReleaseGroupEx(tp,c25857246.filter,1,nil) end and Duel.CheckReleaseGroupEx(tp,c25857246.filter,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c25857246.operation(e,tp,eg,ep,ev,re,r,rp) function c25857246.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDraw(tp) then return end if not Duel.IsPlayerCanDraw(tp) then return end
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then ct=1 end if ct==0 then ct=1 end
if ct>2 then ct=2 end if ct>2 then ct=2 end
local g=Duel.SelectReleaseGroupEx(tp,c25857246.filter,1,ct,nil) local g=Duel.SelectReleaseGroupEx(tp,c25857246.filter,1,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
local rct=Duel.Release(g,REASON_EFFECT) local rct=Duel.Release(g,REASON_EFFECT)
Duel.Draw(tp,rct,REASON_EFFECT) Duel.Draw(tp,rct,REASON_EFFECT)
end end
end end
--ブリューナクの影霊衣 --ブリューナクの影霊衣
function c26674724.initial_effect(c) function c26674724.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
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_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit) e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(26674724,0)) e2:SetDescription(aux.Stringid(26674724,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,26674724) e2:SetCountLimit(1,26674724)
e2:SetCost(c26674724.thcost) e2:SetCost(c26674724.thcost)
e2:SetTarget(c26674724.thtg) e2:SetTarget(c26674724.thtg)
e2:SetOperation(c26674724.thop) e2:SetOperation(c26674724.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--todeck --todeck
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(26674724,1)) e3:SetDescription(aux.Stringid(26674724,1))
e3:SetCategory(CATEGORY_TODECK) e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,26674725) e3:SetCountLimit(1,26674725)
e3:SetTarget(c26674724.tdtg) e3:SetTarget(c26674724.tdtg)
e3:SetOperation(c26674724.tdop) e3:SetOperation(c26674724.tdop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c26674724.mat_filter(c) function c26674724.mat_filter(c)
return not c:IsCode(26674724) return not c:IsCode(26674724)
end end
function c26674724.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c26674724.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c26674724.thfilter(c) function c26674724.thfilter(c)
return c:IsSetCard(0xb4) and not c:IsCode(26674724) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0xb4) and not c:IsCode(26674724) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c26674724.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c26674724.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c26674724.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c26674724.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c26674724.thop(e,tp,eg,ep,ev,re,r,rp) function c26674724.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c26674724.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c26674724.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c26674724.tdfilter(c) function c26674724.tdfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA and c:IsAbleToDeck() return c:GetSummonLocation()==LOCATION_EXTRA and c:IsAbleToDeck()
end end
function c26674724.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c26674724.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c26674724.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c26674724.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c26674724.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c26674724.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c26674724.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil) local g=Duel.SelectTarget(tp,c26674724.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function c26674724.tdop(e,tp,eg,ep,ev,re,r,rp) function c26674724.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
end end
--宣告者の預言 --宣告者の預言
function c27383110.initial_effect(c) function c27383110.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c27383110.target) e1:SetTarget(c27383110.target)
e1:SetOperation(c27383110.activate) e1:SetOperation(c27383110.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--salvage --salvage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(27383110,0)) e2:SetDescription(aux.Stringid(27383110,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+27383110) e2:SetCode(EVENT_CUSTOM+27383110)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c27383110.thcon) e2:SetCondition(c27383110.thcon)
e2:SetCost(c27383110.thcost) e2:SetCost(c27383110.thcost)
e2:SetTarget(c27383110.thtg) e2:SetTarget(c27383110.thtg)
e2:SetOperation(c27383110.thop) e2:SetOperation(c27383110.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--event --event
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_END) e3:SetCode(EVENT_CHAIN_END)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c27383110.evcon) e3:SetCondition(c27383110.evcon)
e3:SetOperation(c27383110.evop) e3:SetOperation(c27383110.evop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
e1:SetLabelObject(e3) e1:SetLabelObject(e3)
end end
c27383110.fit_monster={44665365} c27383110.fit_monster={44665365}
function c27383110.filter(c,e,tp,m,ft) function c27383110.filter(c,e,tp,m,ft)
if not c:IsCode(44665365) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end if not c:IsCode(44665365) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if ft>0 then if ft>0 then
return mg:CheckWithSumEqual(Card.GetRitualLevel,6,1,99,c) return mg:CheckWithSumEqual(Card.GetRitualLevel,6,1,99,c)
else else
return mg:IsExists(c27383110.mfilterf,1,nil,tp,mg,c) return mg:IsExists(c27383110.mfilterf,1,nil,tp,mg,c)
end end
end end
function c27383110.mfilterf(c,tp,mg,rc) function c27383110.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c) Duel.SetSelectedCard(c)
return mg:CheckWithSumEqual(Card.GetRitualLevel,6,0,99,rc) return mg:CheckWithSumEqual(Card.GetRitualLevel,6,0,99,rc)
else return false end else return false end
end end
function c27383110.target(e,tp,eg,ep,ev,re,r,rp,chk) function c27383110.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c27383110.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft) return ft>-1 and Duel.IsExistingMatchingCard(c27383110.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c27383110.activate(e,tp,eg,ep,ev,re,r,rp) function c27383110.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c27383110.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,c27383110.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil local mat=nil
if ft>0 then if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,6,1,99,tc) mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,6,1,99,tc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c27383110.mfilterf,1,1,nil,tp,mg,tc) mat=mg:FilterSelect(tp,c27383110.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat) Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,6,0,99,tc) local mat2=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,6,0,99,tc)
mat:Merge(mat2) mat:Merge(mat2)
end end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
e:GetLabelObject():SetLabelObject(tc) e:GetLabelObject():SetLabelObject(tc)
end end
end end
function c27383110.thcon(e,tp,eg,ep,ev,re,r,rp) function c27383110.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler() return re:GetHandler()==e:GetHandler()
end end
function c27383110.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c27383110.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsAbleToRemove() end if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsAbleToRemove() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c27383110.thfilter(c,e,tp) function c27383110.thfilter(c,e,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e)
end end
function c27383110.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c27383110.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=eg:GetFirst() local tc=eg:GetFirst()
local mat=tc:GetMaterial() local mat=tc:GetMaterial()
if chkc then return mat:IsContains(chkc) and c27383110.thfilter(chkc,e,tp) end if chkc then return mat:IsContains(chkc) and c27383110.thfilter(chkc,e,tp) end
if chk==0 then return mat:IsExists(c27383110.thfilter,1,nil,e,tp) end if chk==0 then return mat:IsExists(c27383110.thfilter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=mat:FilterSelect(tp,c27383110.thfilter,1,1,nil,e,tp) local g=mat:FilterSelect(tp,c27383110.thfilter,1,1,nil,e,tp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c27383110.thop(e,tp,eg,ep,ev,re,r,rp) function c27383110.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
function c27383110.evcon(e,tp,eg,ep,ev,re,r,rp) function c27383110.evcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject()~=nil return e:GetLabelObject()~=nil
end end
function c27383110.evop(e,tp,eg,ep,ev,re,r,rp) function c27383110.evop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
Duel.RaiseEvent(tc,EVENT_CUSTOM+27383110,e,0,tp,tp,0) Duel.RaiseEvent(tc,EVENT_CUSTOM+27383110,e,0,tp,tp,0)
e:SetLabelObject(nil) e:SetLabelObject(nil)
end end
--F.A.オーバー・ヒート --F.A.オーバー・ヒート
function c32036866.initial_effect(c) function c32036866.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c32036866.condition) e1:SetCondition(c32036866.condition)
e1:SetTarget(c32036866.target) e1:SetTarget(c32036866.target)
e1:SetOperation(c32036866.activate) e1:SetOperation(c32036866.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--activate Spell --activate Spell
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,32036866) e2:SetCountLimit(1,32036866)
e2:SetCondition(c32036866.condition2) e2:SetCondition(c32036866.condition2)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c32036866.target2) e2:SetTarget(c32036866.target2)
e2:SetOperation(c32036866.activate2) e2:SetOperation(c32036866.activate2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c32036866.condition(e,tp,eg,ep,ev,re,r,rp) function c32036866.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end end
function c32036866.filter(c,e,tp) function c32036866.filter(c,e,tp)
return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c32036866.target(e,tp,eg,ep,ev,re,r,rp,chk) function c32036866.target(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
and Duel.IsExistingMatchingCard(c32036866.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c32036866.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c32036866.activate(e,tp,eg,ep,ev,re,r,rp) function c32036866.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c32036866.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c32036866.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(3) e1:SetValue(3)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function c32036866.condition2(e,tp,eg,ep,ev,re,r,rp) function c32036866.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldCard(tp,LOCATION_SZONE,5)==nil return Duel.GetFieldCard(tp,LOCATION_SZONE,5)==nil
end end
function c32036866.filter2(c,tp) function c32036866.filter2(c,tp)
return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true)
end end
function c32036866.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c32036866.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c32036866.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c32036866.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) end
end end
function c32036866.activate2(e,tp,eg,ep,ev,re,r,rp) function c32036866.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c32036866.filter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c32036866.filter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true) te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain()) Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end end
end end
--F.A.ライトニングマスター --F.A.ライトニングマスター
function c33158448.initial_effect(c) function c33158448.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
--atk up --atk up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c33158448.atkval) e1:SetValue(c33158448.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg) e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33158448,0)) e3:SetDescription(aux.Stringid(33158448,0))
e3:SetCategory(CATEGORY_LVCHANGE) e3:SetCategory(CATEGORY_LVCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_CHAIN_SOLVING) e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c33158448.lvcon) e3:SetCondition(c33158448.lvcon)
e3:SetOperation(c33158448.lvop) e3:SetOperation(c33158448.lvop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--pierce --pierce
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_PIERCE) e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--negate --negate
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(33158448,1)) e5:SetDescription(aux.Stringid(33158448,1))
e5:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e5:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING) e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetCountLimit(1) e5:SetCountLimit(1)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c33158448.negcon) e5:SetCondition(c33158448.negcon)
e5:SetTarget(c33158448.negtg) e5:SetTarget(c33158448.negtg)
e5:SetOperation(c33158448.negop) e5:SetOperation(c33158448.negop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c33158448.atkval(e,c) function c33158448.atkval(e,c)
return c:GetLevel()*300 return c:GetLevel()*300
end end
function c33158448.lvcon(e,tp,eg,ep,ev,re,r,rp) function c33158448.lvcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0 return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0
end end
function c33158448.lvop(e,tp,eg,ep,ev,re,r,rp) function c33158448.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_LEVEL) e4:SetCode(EFFECT_UPDATE_LEVEL)
e4:SetValue(1) e4:SetValue(1)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
end end
function c33158448.negcon(e,tp,eg,ep,ev,re,r,rp) function c33158448.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end end
function c33158448.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33158448.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsLevelAbove(3) end if chk==0 then return e:GetHandler():IsLevelAbove(3) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
function c33158448.negop(e,tp,eg,ep,ev,re,r,rp) function c33158448.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or c:IsLevelBelow(2) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or c:IsLevelBelow(2) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-2) e1:SetValue(-2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
--ヴェンデット・ナイトメア --ヴェンデット・ナイトメア
function c33971095.initial_effect(c) function c33971095.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--increase lv --increase lv
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_LVCHANGE) e2:SetCategory(CATEGORY_LVCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(c33971095.lvcost) e2:SetCost(c33971095.lvcost)
e2:SetTarget(c33971095.lvtg) e2:SetTarget(c33971095.lvtg)
e2:SetOperation(c33971095.lvop) e2:SetOperation(c33971095.lvop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--increase atk --increase atk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,33971095) e3:SetCountLimit(1,33971095)
e3:SetCondition(c33971095.atkcon) e3:SetCondition(c33971095.atkcon)
e3:SetOperation(c33971095.atkop) e3:SetOperation(c33971095.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c33971095.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) function c33971095.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
return true return true
end end
function c33971095.cfilter(c) function c33971095.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x106) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x106)
end end
function c33971095.filter(c,tp) function c33971095.filter(c,tp)
return c:IsFaceup() and c:IsLevelAbove(1) and Duel.CheckReleaseGroup(tp,c33971095.cfilter,1,c,c) return c:IsFaceup() and c:IsLevelAbove(1) and Duel.CheckReleaseGroup(tp,c33971095.cfilter,1,c,c)
end end
function c33971095.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33971095.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33971095.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33971095.filter(chkc) end
if chk==0 then if chk==0 then
if e:GetLabel()==1 then if e:GetLabel()==1 then
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingTarget(c33971095.filter,tp,LOCATION_MZONE,0,1,nil,tp) return Duel.IsExistingTarget(c33971095.filter,tp,LOCATION_MZONE,0,1,nil,tp)
else else
return false return false
end end
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectTarget(tp,c33971095.filter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectTarget(tp,c33971095.filter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
local sg=Duel.SelectReleaseGroup(tp,c33971095.cfilter,1,1,tc,tc) local sg=Duel.SelectReleaseGroup(tp,c33971095.cfilter,1,1,tc,tc)
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_COST)
e:SetLabel(sg:GetCount()) e:SetLabel(sg:GetCount())
end end
function c33971095.lvop(e,tp,eg,ep,ev,re,r,rp) function c33971095.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(e:GetLabel()) e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function c33971095.atkcon(e,tp,eg,ep,ev,re,r,rp) function c33971095.atkcon(e,tp,eg,ep,ev,re,r,rp)
local rc=eg:GetFirst() local rc=eg:GetFirst()
return rc==Duel.GetAttacker() and rc:IsStatus(STATUS_OPPO_BATTLE) and rc:IsFaceup() return rc==Duel.GetAttacker() and rc:IsStatus(STATUS_OPPO_BATTLE) and rc:IsFaceup()
and bit.band(rc:GetType(),0x81)==0x81 and rc:IsSetCard(0x106) and rc:IsControler(tp) and bit.band(rc:GetType(),0x81)==0x81 and rc:IsSetCard(0x106) and rc:IsControler(tp)
end end
function c33971095.atkop(e,tp,eg,ep,ev,re,r,rp) function c33971095.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if tc:IsFaceup() then if tc:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000) e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
--リヴェンデット・エグゼクター --リヴェンデット・エグゼクター
function c34093683.initial_effect(c) function c34093683.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--change name --change name
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(4388680) e1:SetValue(4388680)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot be target --cannot be target
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(LOCATION_ONFIELD,0) e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetCondition(c34093683.tgcon) e2:SetCondition(c34093683.tgcon)
e2:SetTarget(c34093683.tgtg) e2:SetTarget(c34093683.tgtg)
e2:SetValue(aux.tgoval) e2:SetValue(aux.tgoval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search --search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(34093683,0)) e3:SetDescription(aux.Stringid(34093683,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,34093683) e3:SetCountLimit(1,34093683)
e3:SetCondition(c34093683.thcon) e3:SetCondition(c34093683.thcon)
e3:SetTarget(c34093683.thtg) e3:SetTarget(c34093683.thtg)
e3:SetOperation(c34093683.thop) e3:SetOperation(c34093683.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c34093683.tgcon(e,tp,eg,ep,ev,re,r,rp) function c34093683.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c34093683.tgtg(e,c) function c34093683.tgtg(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
end end
function c34093683.thcon(e,tp,eg,ep,ev,re,r,rp) function c34093683.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp)) return (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp))
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c34093683.thfilter(c) function c34093683.thfilter(c)
return c:IsSetCard(0x106) and c:IsAbleToHand() return c:IsSetCard(0x106) and c:IsAbleToHand()
end end
function c34093683.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c34093683.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c34093683.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c34093683.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c34093683.thop(e,tp,eg,ep,ev,re,r,rp) function c34093683.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c34093683.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c34093683.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--時花の魔女-フルール・ド・ソルシエール --時花の魔女-フルール・ド・ソルシエール
function c36405256.initial_effect(c) function c36405256.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(36405256,0)) e1:SetDescription(aux.Stringid(36405256,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,36405256) e1:SetCountLimit(1,36405256)
e1:SetTarget(c36405256.sptg) e1:SetTarget(c36405256.sptg)
e1:SetOperation(c36405256.spop) e1:SetOperation(c36405256.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c36405256.filter(c,e,tp) function c36405256.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c36405256.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36405256.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c36405256.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c36405256.filter(chkc,e,tp) end
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c36405256.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c36405256.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c36405256.spop(e,tp,eg,ep,ev,re,r,rp) function c36405256.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetOperation(c36405256.desop) e1:SetOperation(c36405256.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
function c36405256.desop(e,tp,eg,ep,ev,re,r,rp) function c36405256.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
--エレメンタル・チャージ --エレメンタル・チャージ
function c36586443.initial_effect(c) function c36586443.initial_effect(c)
--recover --recover
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER) e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c36586443.target) e1:SetTarget(c36586443.target)
e1:SetOperation(c36586443.operation) e1:SetOperation(c36586443.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c36586443.target(e,tp,eg,ep,ev,re,r,rp,chk) function c36586443.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36586443.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c36586443.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
local rec=Duel.GetMatchingGroupCount(c36586443.filter,tp,LOCATION_MZONE,0,nil)*1000 local rec=Duel.GetMatchingGroupCount(c36586443.filter,tp,LOCATION_MZONE,0,nil)*1000
Duel.SetTargetParam(rec) Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end end
function c36586443.filter(c) function c36586443.filter(c)
return c:IsFaceup() and c:IsSetCard(0x3008) return c:IsFaceup() and c:IsSetCard(0x3008)
end end
function c36586443.operation(e,tp,eg,ep,ev,re,r,rp) function c36586443.operation(e,tp,eg,ep,ev,re,r,rp)
local rec=Duel.GetMatchingGroupCount(c36586443.filter,tp,LOCATION_MZONE,0,nil)*1000 local rec=Duel.GetMatchingGroupCount(c36586443.filter,tp,LOCATION_MZONE,0,nil)*1000
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,rec,REASON_EFFECT) Duel.Recover(p,rec,REASON_EFFECT)
end end
--F.A.シェイクダウン --F.A.シェイクダウン
function c38459905.initial_effect(c) function c38459905.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_POSITION) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,38459905) e1:SetCountLimit(1,38459905)
e1:SetTarget(c38459905.target) e1:SetTarget(c38459905.target)
e1:SetOperation(c38459905.activate) e1:SetOperation(c38459905.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,38459906) e2:SetCountLimit(1,38459906)
e2:SetCondition(aux.exccon) e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c38459905.sptg) e2:SetTarget(c38459905.sptg)
e2:SetOperation(c38459905.spop) e2:SetOperation(c38459905.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c38459905.filter(c) function c38459905.filter(c)
return c:IsFaceup() and c:IsSetCard(0x107) and c:IsCanChangePosition() return c:IsFaceup() and c:IsSetCard(0x107) and c:IsCanChangePosition()
end end
function c38459905.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38459905.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c38459905.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c38459905.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c38459905.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c38459905.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c38459905.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c38459905.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_ONFIELD)
end end
function c38459905.activate(e,tp,eg,ep,ev,re,r,rp) function c38459905.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 then if tc and tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
end end
function c38459905.desfilter(c,tp) function c38459905.desfilter(c,tp)
return c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 return c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
end end
function c38459905.spfilter(c,e,tp) function c38459905.spfilter(c,e,tp)
return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c38459905.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38459905.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and c38459905.desfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and c38459905.desfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c38459905.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) if chk==0 then return Duel.IsExistingTarget(c38459905.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
and Duel.IsExistingMatchingCard(c38459905.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c38459905.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c38459905.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c38459905.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c38459905.spop(e,tp,eg,ep,ev,re,r,rp) function c38459905.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c38459905.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c38459905.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
--F.A.ピットストップ --F.A.ピットストップ
function c38532954.initial_effect(c) function c38532954.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_LVCHANGE) e1:SetCategory(CATEGORY_DRAW+CATEGORY_LVCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,38532954) e1:SetCountLimit(1,38532954)
e1:SetTarget(c38532954.target) e1:SetTarget(c38532954.target)
e1:SetOperation(c38532954.activate) e1:SetOperation(c38532954.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38532954,0)) e2:SetDescription(aux.Stringid(38532954,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,38532955) e2:SetCountLimit(1,38532955)
e2:SetCondition(aux.exccon) e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c38532954.sptg) e2:SetTarget(c38532954.sptg)
e2:SetOperation(c38532954.spop) e2:SetOperation(c38532954.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c38532954.filter(c) function c38532954.filter(c)
return c:IsFaceup() and c:IsSetCard(0x107) and c:IsLevelAbove(3) return c:IsFaceup() and c:IsSetCard(0x107) and c:IsLevelAbove(3)
end end
function c38532954.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38532954.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c38532954.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c38532954.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c38532954.filter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c38532954.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SelectTarget(tp,c38532954.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c38532954.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,38532954) local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,38532954)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct+1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct+1)
end end
function c38532954.activate(e,tp,eg,ep,ev,re,r,rp) function c38532954.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local d=Duel.GetMatchingGroupCount(Card.IsCode,p,LOCATION_GRAVE,0,nil,38532954)+1 local d=Duel.GetMatchingGroupCount(Card.IsCode,p,LOCATION_GRAVE,0,nil,38532954)+1
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsLevelAbove(3) and not tc:IsImmuneToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsLevelAbove(3) and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(-2) e1:SetValue(-2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
end end
function c38532954.spfilter(c,e,tp) function c38532954.spfilter(c,e,tp)
return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c38532954.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38532954.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c38532954.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c38532954.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c38532954.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c38532954.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c38532954.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c38532954.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c38532954.spop(e,tp,eg,ep,ev,re,r,rp) function c38532954.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--ヴェンデット・バスタード --ヴェンデット・バスタード
function c3909436.initial_effect(c) function c3909436.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--act limit --act limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3909436,0)) e1:SetDescription(aux.Stringid(3909436,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,3909436) e1:SetCountLimit(1,3909436)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(c3909436.cost) e1:SetCost(c3909436.cost)
e1:SetTarget(c3909436.target) e1:SetTarget(c3909436.target)
e1:SetOperation(c3909436.operation) e1:SetOperation(c3909436.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(3909436,1)) e2:SetDescription(aux.Stringid(3909436,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,3909437) e2:SetCountLimit(1,3909437)
e2:SetCondition(c3909436.thcon) e2:SetCondition(c3909436.thcon)
e2:SetTarget(c3909436.thtg) e2:SetTarget(c3909436.thtg)
e2:SetOperation(c3909436.thop) e2:SetOperation(c3909436.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c3909436.cfilter(c) function c3909436.cfilter(c)
return c:IsSetCard(0x106) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x106) and c:IsAbleToRemoveAsCost()
end end
function c3909436.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c3909436.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c3909436.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c3909436.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c3909436.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c3909436.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c3909436.target(e,tp,eg,ep,ev,re,r,rp,chk) function c3909436.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp)) e:SetLabel(Duel.AnnounceType(tp))
end end
function c3909436.operation(e,tp,eg,ep,ev,re,r,rp) function c3909436.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
if e:GetLabel()==0 then if e:GetLabel()==0 then
e1:SetDescription(aux.Stringid(3909436,2)) e1:SetDescription(aux.Stringid(3909436,2))
e1:SetValue(c3909436.aclimit1) e1:SetValue(c3909436.aclimit1)
elseif e:GetLabel()==1 then elseif e:GetLabel()==1 then
e1:SetDescription(aux.Stringid(3909436,3)) e1:SetDescription(aux.Stringid(3909436,3))
e1:SetValue(c3909436.aclimit2) e1:SetValue(c3909436.aclimit2)
else else
e1:SetDescription(aux.Stringid(3909436,4)) e1:SetDescription(aux.Stringid(3909436,4))
e1:SetValue(c3909436.aclimit3) e1:SetValue(c3909436.aclimit3)
end end
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c3909436.aclimit1(e,re,tp) function c3909436.aclimit1(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) return re:IsActiveType(TYPE_MONSTER)
end end
function c3909436.aclimit2(e,re,tp) function c3909436.aclimit2(e,re,tp)
return re:IsActiveType(TYPE_SPELL) return re:IsActiveType(TYPE_SPELL)
end end
function c3909436.aclimit3(e,re,tp) function c3909436.aclimit3(e,re,tp)
return re:IsActiveType(TYPE_TRAP) return re:IsActiveType(TYPE_TRAP)
end end
function c3909436.thcon(e,tp,eg,ep,ev,re,r,rp) function c3909436.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c3909436.thfilter(c,tp) function c3909436.thfilter(c,tp)
return bit.band(c:GetType(),TYPE_RITUAL+TYPE_MONSTER)==TYPE_RITUAL+TYPE_MONSTER and c:IsAbleToHand() return bit.band(c:GetType(),TYPE_RITUAL+TYPE_MONSTER)==TYPE_RITUAL+TYPE_MONSTER and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c3909436.tgfilter,tp,LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c3909436.tgfilter,tp,LOCATION_DECK,0,1,c)
end end
function c3909436.tgfilter(c) function c3909436.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x106) and c:IsAbleToGrave() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x106) and c:IsAbleToGrave()
end end
function c3909436.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c3909436.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c3909436.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c3909436.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function c3909436.thop(e,tp,eg,ep,ev,re,r,rp) function c3909436.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=Duel.SelectMatchingCard(tp,c3909436.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp) local hg=Duel.SelectMatchingCard(tp,c3909436.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if hg:GetCount()>0 and Duel.SendtoHand(hg,tp,REASON_EFFECT)>0 if hg:GetCount()>0 and Duel.SendtoHand(hg,tp,REASON_EFFECT)>0
and hg:GetFirst():IsLocation(LOCATION_HAND) then and hg:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,hg) Duel.ConfirmCards(1-tp,hg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c3909436.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c3909436.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
end end
--F.A.カーナビゲーター --F.A.カーナビゲーター
function c39271553.initial_effect(c) function c39271553.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(39271553,0)) e1:SetDescription(aux.Stringid(39271553,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,39271553) e1:SetCountLimit(1,39271553)
e1:SetTarget(c39271553.sptg) e1:SetTarget(c39271553.sptg)
e1:SetOperation(c39271553.spop) e1:SetOperation(c39271553.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(39271553,1)) e2:SetDescription(aux.Stringid(39271553,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,39271554) e2:SetCountLimit(1,39271554)
e2:SetTarget(c39271553.thtg) e2:SetTarget(c39271553.thtg)
e2:SetOperation(c39271553.thop) e2:SetOperation(c39271553.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c39271553.filter(c) function c39271553.filter(c)
return c:IsFaceup() and c:IsSetCard(0x107) and c:GetLevel()>c:GetOriginalLevel() return c:IsFaceup() and c:IsSetCard(0x107) and c:GetLevel()>c:GetOriginalLevel()
end end
function c39271553.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c39271553.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c39271553.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c39271553.filter(chkc) end
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c39271553.filter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c39271553.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c39271553.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c39271553.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c39271553.spop(e,tp,eg,ep,ev,re,r,rp) function c39271553.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local lv=math.abs(tc:GetLevel()-tc:GetOriginalLevel()) local lv=math.abs(tc:GetLevel()-tc:GetOriginalLevel())
if tc:IsRelateToEffect(e) and lv>0 then if tc:IsRelateToEffect(e) and lv>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(-lv) e1:SetValue(-lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_LEVEL) e2:SetCode(EFFECT_CHANGE_LEVEL)
e2:SetValue(lv) e2:SetValue(lv)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
function c39271553.thfilter(c) function c39271553.thfilter(c)
return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:IsAbleToHand() return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end end
function c39271553.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c39271553.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c39271553.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c39271553.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c39271553.thop(e,tp,eg,ep,ev,re,r,rp) function c39271553.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c39271553.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c39271553.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--トマボー --トマボー
function c39703254.initial_effect(c) function c39703254.initial_effect(c)
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(39703254,0)) e1:SetDescription(aux.Stringid(39703254,0))
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c39703254.condition) e1:SetCondition(c39703254.condition)
e1:SetCost(c39703254.cost) e1:SetCost(c39703254.cost)
e1:SetTarget(c39703254.target) e1:SetTarget(c39703254.target)
e1:SetOperation(c39703254.operation) e1:SetOperation(c39703254.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c39703254.condition(e,tp,eg,ep,ev,re,r,rp) function c39703254.condition(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
if not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return false end if not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()~=1 then return false end if not g or g:GetCount()~=1 then return false end
local tg=g:GetFirst() local tg=g:GetFirst()
local c=e:GetHandler() local c=e:GetHandler()
return tg~=c and tg:IsFaceup() and tg:IsRace(RACE_PLANT) return tg~=c and tg:IsFaceup() and tg:IsRace(RACE_PLANT)
end end
function c39703254.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c39703254.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c39703254.target(e,tp,eg,ep,ev,re,r,rp,chk) function c39703254.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end end
function c39703254.operation(e,tp,eg,ep,ev,re,r,rp) function c39703254.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
--F.A.サーキットGP --F.A.サーキットGP
function c39838559.initial_effect(c) function c39838559.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--lv up --lv up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107))
e2:SetValue(2) e2:SetValue(2)
e2:SetCondition(c39838559.lvcon) e2:SetCondition(c39838559.lvcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--draw --draw
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(39838559,0)) e3:SetDescription(aux.Stringid(39838559,0))
e3:SetCategory(CATEGORY_DRAW) e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCondition(c39838559.drcon) e3:SetCondition(c39838559.drcon)
e3:SetTarget(c39838559.drtg) e3:SetTarget(c39838559.drtg)
e3:SetOperation(c39838559.drop) e3:SetOperation(c39838559.drop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED) e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,39838559) e4:SetCountLimit(1,39838559)
e4:SetCondition(c39838559.thcon2) e4:SetCondition(c39838559.thcon2)
e4:SetTarget(c39838559.thtg2) e4:SetTarget(c39838559.thtg2)
e4:SetOperation(c39838559.thop2) e4:SetOperation(c39838559.thop2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c39838559.lvcon(e) function c39838559.lvcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c39838559.drcon(e,tp,eg,ep,ev,re,r,rp) function c39838559.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=eg:GetFirst() local rc=eg:GetFirst()
return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE) return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE)
and rc:IsFaceup() and rc:IsSetCard(0x107) and rc:IsControler(tp) and rc:IsFaceup() and rc:IsSetCard(0x107) and rc:IsControler(tp)
end end
function c39838559.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c39838559.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c39838559.drop(e,tp,eg,ep,ev,re,r,rp) function c39838559.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c39838559.thcon2(e,tp,eg,ep,ev,re,r,rp) function c39838559.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) return c:IsReason(REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end end
function c39838559.thfilter2(c) function c39838559.thfilter2(c)
return c:IsSetCard(0x107) and not c:IsCode(39838559) and c:IsAbleToHand() return c:IsSetCard(0x107) and not c:IsCode(39838559) and c:IsAbleToHand()
end end
function c39838559.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) function c39838559.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c39838559.thfilter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c39838559.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c39838559.thop2(e,tp,eg,ep,ev,re,r,rp) function c39838559.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c39838559.thfilter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c39838559.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--鬼動武者 --鬼動武者
function c40509732.initial_effect(c) function c40509732.initial_effect(c)
--synchro summon --synchro summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(),1)
--actlimit --actlimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(1) e1:SetValue(1)
e1:SetCondition(c40509732.con) e1:SetCondition(c40509732.con)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable --disable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c40509732.con) e2:SetCondition(c40509732.con)
e2:SetOperation(c40509732.disop) e2:SetOperation(c40509732.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_BE_BATTLE_TARGET) e3:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon --special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40509732,0)) e4:SetDescription(aux.Stringid(40509732,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD) e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCondition(c40509732.spcon) e4:SetCondition(c40509732.spcon)
e4:SetTarget(c40509732.sptg) e4:SetTarget(c40509732.sptg)
e4:SetOperation(c40509732.spop) e4:SetOperation(c40509732.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c40509732.con(e) function c40509732.con(e)
local c=e:GetHandler() local c=e:GetHandler()
return (Duel.GetAttacker()==c and c:GetBattleTarget()) or Duel.GetAttackTarget()==c return (Duel.GetAttacker()==c and c:GetBattleTarget()) or Duel.GetAttackTarget()==c
end end
function c40509732.disop(e,tp,eg,ep,ev,re,r,rp) function c40509732.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetAttackTarget() local tc=Duel.GetAttackTarget()
if not tc then return end if not tc then return end
if tc:IsControler(tp) then tc=Duel.GetAttacker() end if tc:IsControler(tp) then tc=Duel.GetAttacker() end
c:CreateRelation(tc,RESET_EVENT+RESETS_STANDARD) c:CreateRelation(tc,RESET_EVENT+RESETS_STANDARD)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetCondition(c40509732.discon2) e1:SetCondition(c40509732.discon2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetCondition(c40509732.discon2) e2:SetCondition(c40509732.discon2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
function c40509732.discon2(e) function c40509732.discon2(e)
return e:GetOwner():IsRelateToCard(e:GetHandler()) return e:GetOwner():IsRelateToCard(e:GetHandler())
end end
function c40509732.spcon(e,tp,eg,ep,ev,re,r,rp) function c40509732.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp return rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp
end end
function c40509732.filter(c,e,tp) function c40509732.filter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c40509732.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c40509732.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c40509732.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c40509732.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c40509732.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c40509732.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40509732.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c40509732.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c40509732.spop(e,tp,eg,ep,ev,re,r,rp) function c40509732.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--スモウ魂 YOKO-ZUNA --スモウ魂 YOKO-ZUNA
function c40516623.initial_effect(c) function c40516623.initial_effect(c)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--spirit return --spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP) aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c40516623.thcon) e1:SetCondition(c40516623.thcon)
e1:SetTarget(c40516623.thtg) e1:SetTarget(c40516623.thtg)
e1:SetOperation(c40516623.thop) e1:SetOperation(c40516623.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--gy --gy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c40516623.gytg) e2:SetTarget(c40516623.gytg)
e2:SetOperation(c40516623.gyop) e2:SetOperation(c40516623.gyop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c40516623.thcon(e,tp,eg,ep,ev,re,r,rp) function c40516623.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_PENDULUM) return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_PENDULUM)
end end
function c40516623.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c40516623.thtg(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_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c40516623.thop(e,tp,eg,ep,ev,re,r,rp) function c40516623.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
function c40516623.tgfilter(c,tp) function c40516623.tgfilter(c,tp)
return Duel.IsExistingMatchingCard(c40516623.gyfilter,tp,0,LOCATION_MZONE,1,nil,c:GetColumnGroup()) return Duel.IsExistingMatchingCard(c40516623.gyfilter,tp,0,LOCATION_MZONE,1,nil,c:GetColumnGroup())
end end
function c40516623.gyfilter(c,g) function c40516623.gyfilter(c,g)
return g:IsContains(c) return g:IsContains(c)
end end
function c40516623.gytg(e,tp,eg,ep,ev,re,r,rp,chk) function c40516623.gytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40516623.tgfilter,tp,LOCATION_PZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c40516623.tgfilter,tp,LOCATION_PZONE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_MZONE)
end end
function c40516623.gyop(e,tp,eg,ep,ev,re,r,rp) function c40516623.gyop(e,tp,eg,ep,ev,re,r,rp)
local pg=Duel.GetMatchingGroup(c40516623.tgfilter,tp,LOCATION_PZONE,0,nil,tp) local pg=Duel.GetMatchingGroup(c40516623.tgfilter,tp,LOCATION_PZONE,0,nil,tp)
if pg:GetCount()==0 then return end if pg:GetCount()==0 then return end
local g=Group.CreateGroup() local g=Group.CreateGroup()
for pc in aux.Next(pg) do for pc in aux.Next(pg) do
g:Merge(Duel.GetMatchingGroup(c40516623.gyfilter,tp,0,LOCATION_MZONE,nil,pc:GetColumnGroup())) g:Merge(Duel.GetMatchingGroup(c40516623.gyfilter,tp,0,LOCATION_MZONE,nil,pc:GetColumnGroup()))
end end
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
--竜騎士ブラック・マジシャン --竜騎士ブラック・マジシャン
function c41721210.initial_effect(c) function c41721210.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,46986414,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),1,true,true) aux.AddFusionProcCodeFun(c,46986414,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),1,true,true)
--change name --change name
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(46986414) e1:SetValue(46986414)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot be target --cannot be target
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0) e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SPELL+TYPE_TRAP)) e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SPELL+TYPE_TRAP))
e3:SetValue(aux.indoval) e3:SetValue(aux.indoval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--indes --indes
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetValue(aux.tgoval) e4:SetValue(aux.tgoval)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
--デストロイ・ドラゴン --デストロイ・ドラゴン
function c44373896.initial_effect(c) function c44373896.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy & damage --destroy & damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e2:SetDescription(aux.Stringid(44373896,0)) e2:SetDescription(aux.Stringid(44373896,0))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c44373896.target) e2:SetTarget(c44373896.target)
e2:SetOperation(c44373896.operation) e2:SetOperation(c44373896.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c44373896.material_trap=83555666 c44373896.material_trap=83555666
function c44373896.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c44373896.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) 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_DESTROY,g,1,0,0)
if g:GetFirst():IsType(TYPE_MONSTER) then if g:GetFirst():IsType(TYPE_MONSTER) then
local atk=g:GetFirst():GetTextAttack() local atk=g:GetFirst():GetTextAttack()
if atk<0 then atk=0 end if atk<0 then atk=0 end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end end
end end
function c44373896.operation(e,tp,eg,ep,ev,re,r,rp) function c44373896.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
local atk=tc:GetTextAttack() local atk=tc:GetTextAttack()
if atk<0 then atk=0 end if atk<0 then atk=0 end
if Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsType(TYPE_MONSTER) then if Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsType(TYPE_MONSTER) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Damage(1-tp,atk,REASON_EFFECT) Duel.Damage(1-tp,atk,REASON_EFFECT)
end end
end end
end end
--高等儀式術 --高等儀式術
function c46052429.initial_effect(c) function c46052429.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c46052429.target) e1:SetTarget(c46052429.target)
e1:SetOperation(c46052429.activate) e1:SetOperation(c46052429.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c46052429.filter(c,e,tp,m) function c46052429.filter(c,e,tp,m)
if bit.band(c:GetType(),0x81)~=0x81 if bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
if c.mat_filter then if c.mat_filter then
m=m:Filter(c.mat_filter,nil,tp) m=m:Filter(c.mat_filter,nil,tp)
end end
return m:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) return m:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
end end
function c46052429.matfilter(c) function c46052429.matfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToGrave() return c:IsType(TYPE_NORMAL) and c:IsAbleToGrave()
end end
function c46052429.target(e,tp,eg,ep,ev,re,r,rp,chk) function c46052429.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local mg=Duel.GetMatchingGroup(c46052429.matfilter,tp,LOCATION_DECK,0,nil) local mg=Duel.GetMatchingGroup(c46052429.matfilter,tp,LOCATION_DECK,0,nil)
return Duel.IsExistingMatchingCard(c46052429.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg) return Duel.IsExistingMatchingCard(c46052429.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c46052429.activate(e,tp,eg,ep,ev,re,r,rp) function c46052429.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local mg=Duel.GetMatchingGroup(c46052429.matfilter,tp,LOCATION_DECK,0,nil) local mg=Duel.GetMatchingGroup(c46052429.matfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c46052429.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg) local tg=Duel.SelectMatchingCard(tp,c46052429.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg)
if tg:GetCount()>0 then if tg:GetCount()>0 then
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc.mat_filter then if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil,tp) mg=mg:Filter(tc.mat_filter,nil,tp)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc) local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
--天使の生き血 --天使の生き血
function c47852924.initial_effect(c) function c47852924.initial_effect(c)
--recover --recover
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER) e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c47852924.tg) e1:SetTarget(c47852924.tg)
e1:SetOperation(c47852924.op) e1:SetOperation(c47852924.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c47852924.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c47852924.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(800) Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800)
end end
function c47852924.op(e,tp,eg,ep,ev,re,r,rp) function c47852924.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT) Duel.Recover(p,d,REASON_EFFECT)
end end
--偉大魔獣 ガーゼット --偉大魔獣 ガーゼット
function c47942531.initial_effect(c) function c47942531.initial_effect(c)
--tribute check --tribute check
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK) e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c47942531.valcheck) e1:SetValue(c47942531.valcheck)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--give atk effect only when summon --give atk effect only when summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST) e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(c47942531.facechk) e2:SetOperation(c47942531.facechk)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c47942531.valcheck(e,c) function c47942531.valcheck(e,c)
local tc=c:GetMaterial():GetFirst() local tc=c:GetMaterial():GetFirst()
local atk=0 local atk=0
if tc then atk=tc:GetTextAttack()*2 end if tc then atk=tc:GetTextAttack()*2 end
if atk<0 then atk=0 end if atk<0 then atk=0 end
if e:GetLabel()==1 then if e:GetLabel()==1 then
e:SetLabel(0) e:SetLabel(0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk) e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0xff0000) e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c47942531.facechk(e,tp,eg,ep,ev,re,r,rp) function c47942531.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1) e:GetLabelObject():SetLabel(1)
end end
--ヴェンデット・コア --ヴェンデット・コア
function c49394035.initial_effect(c) function c49394035.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49394035,0)) e1:SetDescription(aux.Stringid(49394035,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,49394035) e1:SetCountLimit(1,49394035)
e1:SetCost(c49394035.spcost) e1:SetCost(c49394035.spcost)
e1:SetTarget(c49394035.sptg) e1:SetTarget(c49394035.sptg)
e1:SetOperation(c49394035.spop) e1:SetOperation(c49394035.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--gain --gain
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_BE_MATERIAL) e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c49394035.mtcon) e2:SetCondition(c49394035.mtcon)
e2:SetOperation(c49394035.mtop) e2:SetOperation(c49394035.mtop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c49394035.cfilter(c) function c49394035.cfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost() return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost()
end end
function c49394035.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c49394035.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49394035.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c49394035.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c49394035.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c49394035.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c49394035.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c49394035.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
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c49394035.spop(e,tp,eg,ep,ev,re,r,rp) function c49394035.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT) e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true) c:RegisterEffect(e1,true)
end end
end end
function c49394035.mtcon(e,tp,eg,ep,ev,re,r,rp) function c49394035.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end end
function c49394035.mtop(e,tp,eg,ep,ev,re,r,rp) function c49394035.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,49394035)~=0 then return end if Duel.GetFlagEffect(tp,49394035)~=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x106) local g=eg:Filter(Card.IsSetCard,nil,0x106)
local rc=g:GetFirst() local rc=g:GetFirst()
if not rc then return end if not rc then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval) e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true) rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE) e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT) e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true) rc:RegisterEffect(e3,true)
end end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(49394035,1)) rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(49394035,1))
Duel.RegisterFlagEffect(tp,49394035,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,49394035,RESET_PHASE+PHASE_END,0,1)
end end
--ヴェンデット・ストリゲス --ヴェンデット・ストリゲス
function c49477180.initial_effect(c) function c49477180.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49477180,0)) e1:SetDescription(aux.Stringid(49477180,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,49477180) e1:SetCountLimit(1,49477180)
e1:SetCost(c49477180.spcost) e1:SetCost(c49477180.spcost)
e1:SetTarget(c49477180.sptg) e1:SetTarget(c49477180.sptg)
e1:SetOperation(c49477180.spop) e1:SetOperation(c49477180.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--gain --gain
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_BE_MATERIAL) e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c49477180.mtcon) e2:SetCondition(c49477180.mtcon)
e2:SetOperation(c49477180.mtop) e2:SetOperation(c49477180.mtop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c49477180.spcfilter(c) function c49477180.spcfilter(c)
return c:IsSetCard(0x106) and not c:IsPublic() return c:IsSetCard(0x106) and not c:IsPublic()
end end
function c49477180.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c49477180.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49477180.spcfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c49477180.spcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c49477180.spcfilter,tp,LOCATION_HAND,0,1,1,nil) local cg=Duel.SelectMatchingCard(tp,c49477180.spcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,cg) Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c49477180.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c49477180.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
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c49477180.spop(e,tp,eg,ep,ev,re,r,rp) function c49477180.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT) e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true) c:RegisterEffect(e1,true)
end end
end end
function c49477180.mtcon(e,tp,eg,ep,ev,re,r,rp) function c49477180.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end end
function c49477180.mtop(e,tp,eg,ep,ev,re,r,rp) function c49477180.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,49477180)~=0 then return end if Duel.GetFlagEffect(tp,49477180)~=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x106) local g=eg:Filter(Card.IsSetCard,nil,0x106)
local rc=g:GetFirst() local rc=g:GetFirst()
if not rc then return end if not rc then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49477180,1)) e1:SetDescription(aux.Stringid(49477180,1))
e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW) e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLED) e1:SetCode(EVENT_BATTLED)
e1:SetTarget(c49477180.drtg) e1:SetTarget(c49477180.drtg)
e1:SetOperation(c49477180.drop) e1:SetOperation(c49477180.drop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true) rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE) e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT) e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true) rc:RegisterEffect(e3,true)
end end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(49477180,2)) rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(49477180,2))
Duel.RegisterFlagEffect(tp,49477180,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,49477180,RESET_PHASE+PHASE_END,0,1)
end end
function c49477180.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c49477180.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil and Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.GetAttackTarget()~=nil and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c49477180.drop(e,tp,eg,ep,ev,re,r,rp) function c49477180.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end end
end end
--F.A.ウィップクロッサー --F.A.ウィップクロッサー
function c49655592.initial_effect(c) function c49655592.initial_effect(c)
--atk up --atk up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c49655592.atkval) e1:SetValue(c49655592.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--activate cost --activate cost
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_ACTIVATE_COST) e2:SetCode(EFFECT_ACTIVATE_COST)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetCost(c49655592.costchk) e2:SetCost(c49655592.costchk)
e2:SetTarget(c49655592.costtg) e2:SetTarget(c49655592.costtg)
e2:SetOperation(c49655592.costop) e2:SetOperation(c49655592.costop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--accumulate --accumulate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(0x10000000+49655592) e3:SetCode(0x10000000+49655592)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--lv up --lv up
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_CHAINING) e0:SetCode(EVENT_CHAINING)
e0:SetRange(LOCATION_MZONE) e0:SetRange(LOCATION_MZONE)
e0:SetOperation(aux.chainreg) e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0) c:RegisterEffect(e0)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(49655592,0)) e4:SetDescription(aux.Stringid(49655592,0))
e4:SetCategory(CATEGORY_LVCHANGE) e4:SetCategory(CATEGORY_LVCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_CHAIN_SOLVING) e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c49655592.lvcon) e4:SetCondition(c49655592.lvcon)
e4:SetOperation(c49655592.lvop) e4:SetOperation(c49655592.lvop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--discard limit --discard limit
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,1) e5:SetTargetRange(0,1)
e5:SetCode(EFFECT_CANNOT_DISCARD_HAND) e5:SetCode(EFFECT_CANNOT_DISCARD_HAND)
e5:SetCondition(c49655592.excon) e5:SetCondition(c49655592.excon)
e5:SetValue(1) e5:SetValue(1)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD) e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_TO_GRAVE_AS_COST) e6:SetCode(EFFECT_CANNOT_TO_GRAVE_AS_COST)
e6:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(0,LOCATION_HAND) e6:SetTargetRange(0,LOCATION_HAND)
e6:SetCondition(c49655592.excon) e6:SetCondition(c49655592.excon)
e6:SetValue(1) e6:SetValue(1)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function c49655592.atkval(e,c) function c49655592.atkval(e,c)
return c:GetLevel()*300 return c:GetLevel()*300
end end
function c49655592.lvcon(e,tp,eg,ep,ev,re,r,rp) function c49655592.lvcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0 return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0
end end
function c49655592.lvop(e,tp,eg,ep,ev,re,r,rp) function c49655592.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c49655592.costchk(e,te_or_c,tp) function c49655592.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,49655592) local ct=Duel.GetFlagEffect(tp,49655592)
return Duel.CheckLPCost(tp,ct*300) return Duel.CheckLPCost(tp,ct*300)
end end
function c49655592.costtg(e,te,tp) function c49655592.costtg(e,te,tp)
if not te:IsActiveType(TYPE_MONSTER) then return false end if not te:IsActiveType(TYPE_MONSTER) then return false end
local tc=te:GetHandler() local tc=te:GetHandler()
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
if tc:GetRank()>0 then if tc:GetRank()>0 then
return tc:GetOriginalRank()<lv return tc:GetOriginalRank()<lv
elseif tc:GetLevel()>0 then elseif tc:GetLevel()>0 then
return tc:GetOriginalLevel()<lv return tc:GetOriginalLevel()<lv
else return false end else return false end
end end
function c49655592.costop(e,tp,eg,ep,ev,re,r,rp) function c49655592.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,300) Duel.PayLPCost(tp,300)
end end
function c49655592.excon(e) function c49655592.excon(e)
return e:GetHandler():IsLevelAbove(7) return e:GetHandler():IsLevelAbove(7)
end end
--超能力治療 --超能力治療
function c49980185.initial_effect(c) function c49980185.initial_effect(c)
--recover --recover
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER) e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE) e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCondition(c49980185.reccon) e1:SetCondition(c49980185.reccon)
e1:SetTarget(c49980185.rectg) e1:SetTarget(c49980185.rectg)
e1:SetOperation(c49980185.recop) e1:SetOperation(c49980185.recop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c49980185.global_check then if not c49980185.global_check then
c49980185.global_check=true c49980185.global_check=true
c49980185[0]=0 c49980185[0]=0
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_TO_GRAVE) ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c49980185.checkop) ge1:SetOperation(c49980185.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c) local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c49980185.clear) ge2:SetOperation(c49980185.clear)
Duel.RegisterEffect(ge2,0) Duel.RegisterEffect(ge2,0)
end end
end end
function c49980185.checkop(e,tp,eg,ep,ev,re,r,rp) function c49980185.checkop(e,tp,eg,ep,ev,re,r,rp)
c49980185[0]=c49980185[0]+eg:FilterCount(Card.IsRace,nil,RACE_PSYCHO) c49980185[0]=c49980185[0]+eg:FilterCount(Card.IsRace,nil,RACE_PSYCHO)
end end
function c49980185.clear(e,tp,eg,ep,ev,re,r,rp) function c49980185.clear(e,tp,eg,ep,ev,re,r,rp)
c49980185[0]=0 c49980185[0]=0
end end
function c49980185.reccon(e,tp,eg,ep,ev,re,r,rp,chk) function c49980185.reccon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetCurrentPhase()==PHASE_END return Duel.GetCurrentPhase()==PHASE_END
end end
function c49980185.rectg(e,tp,eg,ep,ev,re,r,rp,chk) function c49980185.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c49980185[0]~=0 end if chk==0 then return c49980185[0]~=0 end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(c49980185[0]*1000) Duel.SetTargetParam(c49980185[0]*1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,c49980185[0]*1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,c49980185[0]*1000)
end end
function c49980185.recop(e,tp,eg,ep,ev,re,r,rp) function c49980185.recop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,c49980185[0]*1000,REASON_EFFECT) Duel.Recover(p,c49980185[0]*1000,REASON_EFFECT)
end end
--影霊衣の万華鏡 --影霊衣の万華鏡
function c51124303.initial_effect(c) function c51124303.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,51124303) e1:SetCountLimit(1,51124303)
e1:SetTarget(c51124303.target) e1:SetTarget(c51124303.target)
e1:SetOperation(c51124303.activate) e1:SetOperation(c51124303.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c51124303.thcon) e2:SetCondition(c51124303.thcon)
e2:SetCost(c51124303.thcost) e2:SetCost(c51124303.thcost)
e2:SetTarget(c51124303.thtg) e2:SetTarget(c51124303.thtg)
e2:SetOperation(c51124303.thop) e2:SetOperation(c51124303.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c51124303.spfilter(c,e,tp,mc) function c51124303.spfilter(c,e,tp,mc)
return c:IsSetCard(0xb4) and bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc,tp)) return c:IsSetCard(0xb4) and bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc,tp))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
and mc:IsCanBeRitualMaterial(c) and mc:IsCanBeRitualMaterial(c)
end end
function c51124303.rfilter(c,mc) function c51124303.rfilter(c,mc)
local mlv=mc:GetRitualLevel(c) local mlv=mc:GetRitualLevel(c)
if mlv==mc:GetLevel() then return false end if mlv==mc:GetLevel() then return false end
local lv=c:GetLevel() local lv=c:GetLevel()
return lv==bit.band(mlv,0xffff) or lv==bit.rshift(mlv,16) return lv==bit.band(mlv,0xffff) or lv==bit.rshift(mlv,16)
end end
function c51124303.filter(c,e,tp) function c51124303.filter(c,e,tp)
local sg=Duel.GetMatchingGroup(c51124303.spfilter,tp,LOCATION_HAND,0,c,e,tp,c) local sg=Duel.GetMatchingGroup(c51124303.spfilter,tp,LOCATION_HAND,0,c,e,tp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
return sg:IsExists(c51124303.rfilter,1,nil,c) or sg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,ft) return sg:IsExists(c51124303.rfilter,1,nil,c) or sg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,ft)
end end
function c51124303.mfilter(c) function c51124303.mfilter(c)
return c:GetLevel()>0 and c:IsAbleToGrave() return c:GetLevel()>0 and c:IsAbleToGrave()
end end
function c51124303.mzfilter(c,tp) function c51124303.mzfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:GetSequence()<5 return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:GetSequence()<5
end end
function c51124303.target(e,tp,eg,ep,ev,re,r,rp,chk) function c51124303.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return false end if ft<0 then return false end
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
if ft>0 then if ft>0 then
local mg2=Duel.GetMatchingGroup(c51124303.mfilter,tp,LOCATION_EXTRA,0,nil) local mg2=Duel.GetMatchingGroup(c51124303.mfilter,tp,LOCATION_EXTRA,0,nil)
mg:Merge(mg2) mg:Merge(mg2)
else else
mg=mg:Filter(c51124303.mzfilter,nil,tp) mg=mg:Filter(c51124303.mzfilter,nil,tp)
end end
return mg:IsExists(c51124303.filter,1,nil,e,tp) return mg:IsExists(c51124303.filter,1,nil,e,tp)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c51124303.activate(e,tp,eg,ep,ev,re,r,rp) function c51124303.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return end if ft<0 then return end
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
if ft>0 then if ft>0 then
local mg2=Duel.GetMatchingGroup(c51124303.mfilter,tp,LOCATION_EXTRA,0,nil) local mg2=Duel.GetMatchingGroup(c51124303.mfilter,tp,LOCATION_EXTRA,0,nil)
mg:Merge(mg2) mg:Merge(mg2)
else else
mg=mg:Filter(Card.IsLocation,nil,LOCATION_MZONE) mg=mg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:FilterSelect(tp,c51124303.filter,1,1,nil,e,tp) local mat=mg:FilterSelect(tp,c51124303.filter,1,1,nil,e,tp)
local mc=mat:GetFirst() local mc=mat:GetFirst()
if not mc then return end if not mc then return end
local sg=Duel.GetMatchingGroup(c51124303.spfilter,tp,LOCATION_HAND,0,mc,e,tp,mc) local sg=Duel.GetMatchingGroup(c51124303.spfilter,tp,LOCATION_HAND,0,mc,e,tp,mc)
if mc:IsLocation(LOCATION_MZONE) then ft=ft+1 end if mc:IsLocation(LOCATION_MZONE) then ft=ft+1 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local b1=sg:IsExists(c51124303.rfilter,1,nil,mc) local b1=sg:IsExists(c51124303.rfilter,1,nil,mc)
local b2=sg:CheckWithSumEqual(Card.GetLevel,mc:GetLevel(),1,ft) local b2=sg:CheckWithSumEqual(Card.GetLevel,mc:GetLevel(),1,ft)
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(51124303,0))) then if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(51124303,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:FilterSelect(tp,c51124303.rfilter,1,1,nil,mc) local tg=sg:FilterSelect(tp,c51124303.rfilter,1,1,nil,mc)
local tc=tg:GetFirst() local tc=tg:GetFirst()
tc:SetMaterial(mat) tc:SetMaterial(mat)
if not mc:IsLocation(LOCATION_EXTRA) then if not mc:IsLocation(LOCATION_EXTRA) then
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
else else
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end end
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:SelectWithSumEqual(tp,Card.GetLevel,mc:GetLevel(),1,ft) local tg=sg:SelectWithSumEqual(tp,Card.GetLevel,mc:GetLevel(),1,ft)
local tc=tg:GetFirst() local tc=tg:GetFirst()
while tc do while tc do
tc:SetMaterial(mat) tc:SetMaterial(mat)
tc=tg:GetNext() tc=tg:GetNext()
end end
if not mc:IsLocation(LOCATION_EXTRA) then if not mc:IsLocation(LOCATION_EXTRA) then
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
else else
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end end
Duel.BreakEffect() Duel.BreakEffect()
tc=tg:GetFirst() tc=tg:GetFirst()
while tc do while tc do
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
tc=tg:GetNext() tc=tg:GetNext()
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
function c51124303.thcon(e,tp,eg,ep,ev,re,r,rp) function c51124303.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end end
function c51124303.cfilter(c) function c51124303.cfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function c51124303.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c51124303.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c51124303.cfilter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingMatchingCard(c51124303.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c51124303.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c51124303.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c51124303.thfilter(c) function c51124303.thfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end end
function c51124303.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c51124303.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c51124303.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c51124303.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c51124303.thop(e,tp,eg,ep,ev,re,r,rp) function c51124303.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c51124303.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c51124303.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--トリシューラの影霊衣 --トリシューラの影霊衣
function c52068432.initial_effect(c) function c52068432.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
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_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit) e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--negate --negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(52068432,0)) e2:SetDescription(aux.Stringid(52068432,0))
e2:SetCategory(CATEGORY_NEGATE) e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,52068432) e2:SetCountLimit(1,52068432)
e2:SetCondition(c52068432.negcon) e2:SetCondition(c52068432.negcon)
e2:SetCost(c52068432.negcost) e2:SetCost(c52068432.negcost)
e2:SetTarget(c52068432.negtg) e2:SetTarget(c52068432.negtg)
e2:SetOperation(c52068432.negop) e2:SetOperation(c52068432.negop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--remove --remove
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(52068432,1)) e3:SetDescription(aux.Stringid(52068432,1))
e3:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,52068433) e3:SetCountLimit(1,52068433)
e3:SetCondition(c52068432.remcon) e3:SetCondition(c52068432.remcon)
e3:SetTarget(c52068432.remtg) e3:SetTarget(c52068432.remtg)
e3:SetOperation(c52068432.remop) e3:SetOperation(c52068432.remop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c52068432.mat_filter(c) function c52068432.mat_filter(c)
return not c:IsLevel(9) return not c:IsLevel(9)
end end
function c52068432.tfilter(c,tp) function c52068432.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xb4) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) return c:IsFaceup() and c:IsSetCard(0xb4) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end end
function c52068432.negcon(e,tp,eg,ep,ev,re,r,rp) function c52068432.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c52068432.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev) return g and g:IsExists(c52068432.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
end end
function c52068432.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c52068432.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c52068432.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c52068432.negtg(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_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end end
function c52068432.negop(e,tp,eg,ep,ev,re,r,rp) function c52068432.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT) Duel.SendtoGrave(eg,REASON_EFFECT)
end end
end end
function c52068432.remcon(e,tp,eg,ep,ev,re,r,rp) function c52068432.remcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c52068432.remtg(e,tp,eg,ep,ev,re,r,rp,chk) function c52068432.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND)
end end
function c52068432.remop(e,tp,eg,ep,ev,re,r,rp) function c52068432.remop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil) local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
if g1:GetCount()>0 and g2:GetCount()>0 and g3:GetCount()>0 then if g1:GetCount()>0 and g2:GetCount()>0 and g3:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:RandomSelect(tp,1) local sg1=g1:RandomSelect(tp,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil) local sg2=g2:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg3=g3:Select(tp,1,1,nil) local sg3=g3:Select(tp,1,1,nil)
sg1:Merge(sg2) sg1:Merge(sg2)
sg1:Merge(sg3) sg1:Merge(sg3)
Duel.HintSelection(sg1) Duel.HintSelection(sg1)
Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT) Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT)
end end
end end
--カタストルの影霊衣 --カタストルの影霊衣
function c52846880.initial_effect(c) function c52846880.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
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_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit) e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(52846880,0)) e2:SetDescription(aux.Stringid(52846880,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,52846880) e2:SetCountLimit(1,52846880)
e2:SetCost(c52846880.spcost) e2:SetCost(c52846880.spcost)
e2:SetTarget(c52846880.sptg) e2:SetTarget(c52846880.sptg)
e2:SetOperation(c52846880.spop) e2:SetOperation(c52846880.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(52846880,1)) e3:SetDescription(aux.Stringid(52846880,1))
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLE_START) e3:SetCode(EVENT_BATTLE_START)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c52846880.condition) e3:SetCondition(c52846880.condition)
e3:SetTarget(c52846880.target) e3:SetTarget(c52846880.target)
e3:SetOperation(c52846880.operation) e3:SetOperation(c52846880.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c52846880.mat_filter(c) function c52846880.mat_filter(c)
return not c:IsCode(52846880) return not c:IsCode(52846880)
end end
function c52846880.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c52846880.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c52846880.spfilter(c,e,tp) function c52846880.spfilter(c,e,tp)
return c:IsSetCard(0xb4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xb4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c52846880.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c52846880.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52846880.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52846880.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c52846880.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c52846880.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c52846880.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c52846880.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c52846880.spop(e,tp,eg,ep,ev,re,r,rp) function c52846880.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c52846880.condition(e,tp,eg,ep,ev,re,r,rp) function c52846880.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget() local bc=Duel.GetAttackTarget()
if not bc then return false end if not bc then return false end
if tc:IsControler(1-tp) then tc,bc=bc,tc end if tc:IsControler(1-tp) then tc,bc=bc,tc end
if tc:IsSetCard(0xb4) and bc:GetSummonLocation()==LOCATION_EXTRA then if tc:IsSetCard(0xb4) and bc:GetSummonLocation()==LOCATION_EXTRA then
e:SetLabelObject(bc) e:SetLabelObject(bc)
return true return true
else return false end else return false end
end end
function c52846880.target(e,tp,eg,ep,ev,re,r,rp,chk) function c52846880.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local bc=e:GetLabelObject() local bc=e:GetLabelObject()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end end
function c52846880.operation(e,tp,eg,ep,ev,re,r,rp) function c52846880.operation(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject() local bc=e:GetLabelObject()
if bc:IsRelateToBattle() then if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT) Duel.Destroy(bc,REASON_EFFECT)
end end
end end
--F.A.デッド・ヒート --F.A.デッド・ヒート
function c5641251.initial_effect(c) function c5641251.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(5641251,0)) e2:SetDescription(aux.Stringid(5641251,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,5641251) e2:SetCountLimit(1,5641251)
e2:SetCondition(c5641251.spcon) e2:SetCondition(c5641251.spcon)
e2:SetTarget(c5641251.sptg) e2:SetTarget(c5641251.sptg)
e2:SetOperation(c5641251.spop) e2:SetOperation(c5641251.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk up --atk up
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(5641251,1)) e3:SetDescription(aux.Stringid(5641251,1))
e3:SetCategory(CATEGORY_LVCHANGE+CATEGORY_DESTROY) e3:SetCategory(CATEGORY_LVCHANGE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_CONFIRM) e3:SetCode(EVENT_BATTLE_CONFIRM)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c5641251.lvlcon) e3:SetCondition(c5641251.lvlcon)
e3:SetOperation(c5641251.lvlop) e3:SetOperation(c5641251.lvlop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c5641251.spcon(e,tp,eg,ep,ev,re,r,rp) function c5641251.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end end
function c5641251.spfilter(c,e,tp) function c5641251.spfilter(c,e,tp)
return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
function c5641251.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c5641251.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
and Duel.IsExistingMatchingCard(c5641251.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c5641251.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c5641251.spop(e,tp,eg,ep,ev,re,r,rp) function c5641251.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c5641251.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c5641251.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c5641251.lvlcon(e,tp,eg,ep,ev,re,r,rp) function c5641251.lvlcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget() local bc=Duel.GetAttackTarget()
if not bc then return false end if not bc then return false end
if tc:IsControler(1-tp) then bc,tc=tc,bc end if tc:IsControler(1-tp) then bc,tc=tc,bc end
return bc:IsFaceup() and tc:IsFaceup() and tc:IsSetCard(0x107) return bc:IsFaceup() and tc:IsFaceup() and tc:IsSetCard(0x107)
end end
function c5641251.lvlop(e,tp,eg,ep,ev,re,r,rp) function c5641251.lvlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget() local bc=Duel.GetAttackTarget()
if not bc then return false end if not bc then return false end
if tc:IsControler(1-tp) then bc,tc=tc,bc end if tc:IsControler(1-tp) then bc,tc=tc,bc end
local d1=0 local d1=0
local d2=0 local d2=0
while d1==d2 do while d1==d2 do
d1,d2=Duel.TossDice(tp,1,1) d1,d2=Duel.TossDice(tp,1,1)
end end
if d1>d2 then if d1>d2 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(4) e1:SetValue(4)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
else else
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
--ヴェンデット・デイブレイク --ヴェンデット・デイブレイク
function c60375194.initial_effect(c) function c60375194.initial_effect(c)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60375194+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,60375194+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c60375194.condition) e1:SetCondition(c60375194.condition)
e1:SetTarget(c60375194.target) e1:SetTarget(c60375194.target)
e1:SetOperation(c60375194.activate) e1:SetOperation(c60375194.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c60375194.condition(e,tp,eg,ep,ev,re,r,rp) function c60375194.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
end end
function c60375194.filter(c) function c60375194.filter(c)
return c:IsFaceup() and c:IsSetCard(0x106) and c:IsSummonType(SUMMON_TYPE_RITUAL) return c:IsFaceup() and c:IsSetCard(0x106) and c:IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c60375194.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60375194.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60375194.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c60375194.filter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount()-1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount()-1,0,0)
end end
function c60375194.activate(e,tp,eg,ep,ev,re,r,rp) function c60375194.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c60375194.filter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,c60375194.filter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if not tc then return end if not tc then return end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,tc) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,tc)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
--儀水鏡の幻影術 --儀水鏡の幻影術
function c64437633.initial_effect(c) function c64437633.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c64437633.target) e1:SetTarget(c64437633.target)
e1:SetOperation(c64437633.activate) e1:SetOperation(c64437633.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c64437633.filter(c,e,tp) function c64437633.filter(c,e,tp)
return c:IsSetCard(0x3a) and bit.band(c:GetType(),0x81)==0x81 and c:IsCanBeSpecialSummoned(e,0,tp,false,true) return c:IsSetCard(0x3a) and bit.band(c:GetType(),0x81)==0x81 and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end end
function c64437633.target(e,tp,eg,ep,ev,re,r,rp,chk) function c64437633.target(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
and Duel.IsExistingMatchingCard(c64437633.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c64437633.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND)
end end
function c64437633.activate(e,tp,eg,ep,ev,re,r,rp) function c64437633.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c64437633.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c64437633.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetOperation(c64437633.retop) e2:SetOperation(c64437633.retop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetCountLimit(1) e2:SetCountLimit(1)
tc:RegisterEffect(e2,true) tc:RegisterEffect(e2,true)
end end
end end
function c64437633.retop(e,tp,eg,ep,ev,re,r,rp) function c64437633.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end end
--限定解除 --限定解除
function c65450690.initial_effect(c) function c65450690.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65450690+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,65450690+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c65450690.cost) e1:SetCost(c65450690.cost)
e1:SetTarget(c65450690.target) e1:SetTarget(c65450690.target)
e1:SetOperation(c65450690.activate) e1:SetOperation(c65450690.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c65450690.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c65450690.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function c65450690.filter(c,e,tp) function c65450690.filter(c,e,tp)
return bit.band(c:GetType(),0x81)==0x81 and c:IsCanBeSpecialSummoned(e,0,tp,false,true) return bit.band(c:GetType(),0x81)==0x81 and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end end
function c65450690.target(e,tp,eg,ep,ev,re,r,rp,chk) function c65450690.target(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
and Duel.IsExistingMatchingCard(c65450690.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c65450690.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND)
end end
function c65450690.activate(e,tp,eg,ep,ev,re,r,rp) function c65450690.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65450690.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c65450690.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(65450690,RESET_EVENT+RESETS_STANDARD,0,1) tc:RegisterFlagEffect(65450690,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc) e2:SetLabelObject(tc)
e2:SetCondition(c65450690.descon) e2:SetCondition(c65450690.descon)
e2:SetOperation(c65450690.desop) e2:SetOperation(c65450690.desop)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end end
function c65450690.descon(e,tp,eg,ep,ev,re,r,rp) function c65450690.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if tc:GetFlagEffect(65450690)~=0 then if tc:GetFlagEffect(65450690)~=0 then
return true return true
else else
e:Reset() e:Reset()
return false return false
end end
end end
function c65450690.desop(e,tp,eg,ep,ev,re,r,rp) function c65450690.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
--F.A.ダークネスマスター --F.A.ダークネスマスター
function c6764709.initial_effect(c) function c6764709.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c6764709.spcon) e1:SetCondition(c6764709.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk up --atk up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetValue(c6764709.atkval) e2:SetValue(c6764709.atkval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetOperation(aux.chainreg) e3:SetOperation(aux.chainreg)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(6764709,0)) e4:SetDescription(aux.Stringid(6764709,0))
e4:SetCategory(CATEGORY_LVCHANGE) e4:SetCategory(CATEGORY_LVCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_CHAIN_SOLVING) e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c6764709.lvcon) e4:SetCondition(c6764709.lvcon)
e4:SetOperation(c6764709.lvop) e4:SetOperation(c6764709.lvop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--destroy --destroy
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(6764709,1)) e5:SetDescription(aux.Stringid(6764709,1))
e5:SetCategory(CATEGORY_DESTROY) e5:SetCategory(CATEGORY_DESTROY)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCountLimit(1) e5:SetCountLimit(1)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetTarget(c6764709.rdtg) e5:SetTarget(c6764709.rdtg)
e5:SetOperation(c6764709.rdop) e5:SetOperation(c6764709.rdop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c6764709.spfilter1(c) function c6764709.spfilter1(c)
return c:IsFaceup() and c:IsCode(6764709) return c:IsFaceup() and c:IsCode(6764709)
end end
function c6764709.spfilter2(c) function c6764709.spfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x107) and c:IsLevelAbove(7) return c:IsFaceup() and c:IsSetCard(0x107) and c:IsLevelAbove(7)
end end
function c6764709.spcon(e,c) function c6764709.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or Duel.IsExistingMatchingCard(c6764709.spfilter1,tp,LOCATION_MZONE,0,1,nil) then return false end or Duel.IsExistingMatchingCard(c6764709.spfilter1,tp,LOCATION_MZONE,0,1,nil) then return false end
return Duel.IsExistingMatchingCard(c6764709.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(c6764709.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function c6764709.atkval(e,c) function c6764709.atkval(e,c)
return c:GetLevel()*300 return c:GetLevel()*300
end end
function c6764709.lvcon(e,tp,eg,ep,ev,re,r,rp) function c6764709.lvcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0 return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0
end end
function c6764709.lvop(e,tp,eg,ep,ev,re,r,rp) function c6764709.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_LEVEL) e4:SetCode(EFFECT_UPDATE_LEVEL)
e4:SetValue(1) e4:SetValue(1)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
end end
function c6764709.rdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c6764709.rdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and e:GetHandler():IsLevelAbove(4) end and e:GetHandler():IsLevelAbove(4) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c6764709.rdop(e,tp,eg,ep,ev,re,r,rp) function c6764709.rdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelBelow(3) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelBelow(3) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-3) e1:SetValue(-3)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
--F.A.ウィナーズ --F.A.ウィナーズ
function c69553552.initial_effect(c) function c69553552.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--indes --indes
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c69553552.indcon) e2:SetCondition(c69553552.indcon)
e2:SetValue(aux.indoval) e2:SetValue(aux.indoval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--banish --banish
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE) e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,69553552) e3:SetCountLimit(1,69553552)
e3:SetCondition(c69553552.rmcon) e3:SetCondition(c69553552.rmcon)
e3:SetTarget(c69553552.rmtg) e3:SetTarget(c69553552.rmtg)
e3:SetOperation(c69553552.rmop) e3:SetOperation(c69553552.rmop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c69553552.cfilter(c) function c69553552.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107) return c:IsFaceup() and c:IsSetCard(0x107)
end end
function c69553552.indcon(e) function c69553552.indcon(e)
return Duel.IsExistingMatchingCard(c69553552.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c69553552.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c69553552.rmcon(e,tp,eg,ep,ev,re,r,rp) function c69553552.rmcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=a:GetBattleTarget() local d=a:GetBattleTarget()
if not d then return false end if not d then return false end
if not a:IsControler(tp) then a,d=d,a end if not a:IsControler(tp) then a,d=d,a end
return a:IsControler(tp) and a:IsSetCard(0x107) return a:IsControler(tp) and a:IsSetCard(0x107)
and a:GetLevel()-a:GetOriginalLevel()>=5 and a:GetLevel()-a:GetOriginalLevel()>=5
and ep~=tp and ep~=tp
end end
function c69553552.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c69553552.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end end
function c69553552.rmop(e,tp,eg,ep,ev,re,r,rp) function c69553552.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsSetCard(0x107) and tc:IsType(TYPE_FIELD) then if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsSetCard(0x107) and tc:IsType(TYPE_FIELD) then
tc:RegisterFlagEffect(69553552,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(69553552,RESET_EVENT+RESETS_STANDARD,0,0)
local wg=Duel.GetMatchingGroup(c69553552.winfilter,tp,LOCATION_REMOVED,0,nil) local wg=Duel.GetMatchingGroup(c69553552.winfilter,tp,LOCATION_REMOVED,0,nil)
if wg:GetClassCount(Card.GetCode)==3 then if wg:GetClassCount(Card.GetCode)==3 then
local WIN_REASON_FA_WINNERS=0x1d local WIN_REASON_FA_WINNERS=0x1d
Duel.Win(tp,WIN_REASON_FA_WINNERS) Duel.Win(tp,WIN_REASON_FA_WINNERS)
end end
end end
end end
function c69553552.winfilter(c) function c69553552.winfilter(c)
return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:GetFlagEffect(69553552)~=0 return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:GetFlagEffect(69553552)~=0
end end
--ヴェンデット・アニマ --ヴェンデット・アニマ
function c70491682.initial_effect(c) function c70491682.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70491682,0)) e1:SetDescription(aux.Stringid(70491682,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,70491682) e1:SetCountLimit(1,70491682)
e1:SetCost(aux.bfgcost) e1:SetCost(aux.bfgcost)
e1:SetTarget(c70491682.sptg) e1:SetTarget(c70491682.sptg)
e1:SetOperation(c70491682.spop) e1:SetOperation(c70491682.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--gain --gain
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_BE_MATERIAL) e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c70491682.mtcon) e2:SetCondition(c70491682.mtcon)
e2:SetOperation(c70491682.mtop) e2:SetOperation(c70491682.mtop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c70491682.spfilter(c,e,tp) function c70491682.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x106) and not c:IsCode(70491682) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsSetCard(0x106) and not c:IsCode(70491682) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c70491682.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c70491682.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c70491682.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c70491682.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c70491682.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingTarget(c70491682.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c70491682.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c70491682.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c70491682.spop(e,tp,eg,ep,ev,re,r,rp) function c70491682.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
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)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c70491682.splimit) e1:SetTarget(c70491682.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c70491682.splimit(e,c) function c70491682.splimit(e,c)
return c:GetRace()~=RACE_ZOMBIE return c:GetRace()~=RACE_ZOMBIE
end end
function c70491682.mtcon(e,tp,eg,ep,ev,re,r,rp) function c70491682.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end end
function c70491682.mtop(e,tp,eg,ep,ev,re,r,rp) function c70491682.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,70491682)~=0 then return end if Duel.GetFlagEffect(tp,70491682)~=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x106) local g=eg:Filter(Card.IsSetCard,nil,0x106)
local rc=g:GetFirst() local rc=g:GetFirst()
if not rc then return end if not rc then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true) rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE) e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT) e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true) rc:RegisterEffect(e2,true)
end end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(70491682,1)) rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(70491682,1))
Duel.RegisterFlagEffect(tp,70491682,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,70491682,RESET_PHASE+PHASE_END,0,1)
end end
--炎虎梁山爆 --炎虎梁山爆
function c70946699.initial_effect(c) function c70946699.initial_effect(c)
--recover --recover
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER) e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c70946699.target) e1:SetTarget(c70946699.target)
e1:SetOperation(c70946699.operation) e1:SetOperation(c70946699.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--damage --damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(70946699,0)) e2:SetDescription(aux.Stringid(70946699,0))
e2:SetCategory(CATEGORY_DAMAGE) e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c70946699.damcon) e2:SetCondition(c70946699.damcon)
e2:SetTarget(c70946699.damtg) e2:SetTarget(c70946699.damtg)
e2:SetOperation(c70946699.damop) e2:SetOperation(c70946699.damop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c70946699.target(e,tp,eg,ep,ev,re,r,rp,chk) function c70946699.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
local rec=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_ONFIELD,0,nil)*500 local rec=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_ONFIELD,0,nil)*500
Duel.SetTargetParam(rec) Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end end
function c70946699.filter(c) function c70946699.filter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsFaceup() return c:IsType(TYPE_CONTINUOUS) and c:IsFaceup()
end end
function c70946699.operation(e,tp,eg,ep,ev,re,r,rp) function c70946699.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local rec=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_ONFIELD,0,nil)*500 local rec=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_ONFIELD,0,nil)*500
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,rec,REASON_EFFECT) Duel.Recover(p,rec,REASON_EFFECT)
end end
function c70946699.damcon(e,tp,eg,ep,ev,re,r,rp) function c70946699.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_EFFECT) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_EFFECT)
and c:GetReasonPlayer()==1-tp and c:GetPreviousControler()==tp and c:GetReasonPlayer()==1-tp and c:GetPreviousControler()==tp
end end
function c70946699.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c70946699.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
local dam=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_GRAVE,0,nil)*500 local dam=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_GRAVE,0,nil)*500
Duel.SetTargetParam(dam) Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end end
function c70946699.damop(e,tp,eg,ep,ev,re,r,rp) function c70946699.damop(e,tp,eg,ep,ev,re,r,rp)
local dam=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_GRAVE,0,nil)*500 local dam=Duel.GetMatchingGroupCount(c70946699.filter,tp,LOCATION_GRAVE,0,nil)*500
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,dam,REASON_EFFECT) Duel.Damage(p,dam,REASON_EFFECT)
end end
--ケンドウ魂 KAI-DEN --ケンドウ魂 KAI-DEN
function c71614230.initial_effect(c) function c71614230.initial_effect(c)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--spirit return --spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP) aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c71614230.thcon) e1:SetCondition(c71614230.thcon)
e1:SetTarget(c71614230.thtg) e1:SetTarget(c71614230.thtg)
e1:SetOperation(c71614230.thop) e1:SetOperation(c71614230.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to grave --to grave
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c71614230.gytg) e2:SetTarget(c71614230.gytg)
e2:SetOperation(c71614230.gyop) e2:SetOperation(c71614230.gyop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71614230.thcon(e,tp,eg,ep,ev,re,r,rp) function c71614230.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_PENDULUM) return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_PENDULUM)
end end
function c71614230.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c71614230.thtg(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_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c71614230.thop(e,tp,eg,ep,ev,re,r,rp) function c71614230.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
function c71614230.tgfilter(c,tp) function c71614230.tgfilter(c,tp)
return Duel.IsExistingMatchingCard(c71614230.gyfilter,tp,0,LOCATION_ONFIELD,1,nil,c:GetColumnGroup()) return Duel.IsExistingMatchingCard(c71614230.gyfilter,tp,0,LOCATION_ONFIELD,1,nil,c:GetColumnGroup())
end end
function c71614230.gyfilter(c,g) function c71614230.gyfilter(c,g)
return g:IsContains(c) return g:IsContains(c)
end end
function c71614230.gytg(e,tp,eg,ep,ev,re,r,rp,chk) function c71614230.gytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71614230.tgfilter,tp,LOCATION_PZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c71614230.tgfilter,tp,LOCATION_PZONE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD)
end end
function c71614230.gyop(e,tp,eg,ep,ev,re,r,rp) function c71614230.gyop(e,tp,eg,ep,ev,re,r,rp)
local pg=Duel.SelectMatchingCard(tp,c71614230.tgfilter,tp,LOCATION_PZONE,0,1,1,nil,tp) local pg=Duel.SelectMatchingCard(tp,c71614230.tgfilter,tp,LOCATION_PZONE,0,1,1,nil,tp)
if pg:GetCount()==0 then return end if pg:GetCount()==0 then return end
local g=Duel.GetMatchingGroup(c71614230.gyfilter,tp,0,LOCATION_ONFIELD,nil,pg:GetFirst():GetColumnGroup()) local g=Duel.GetMatchingGroup(c71614230.gyfilter,tp,0,LOCATION_ONFIELD,nil,pg:GetFirst():GetColumnGroup())
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
--ドラゴン・復活の狂奏 --ドラゴン・復活の狂奏
function c71867500.initial_effect(c) function c71867500.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,71867500+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71867500+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c71867500.condition) e1:SetCondition(c71867500.condition)
e1:SetTarget(c71867500.target) e1:SetTarget(c71867500.target)
e1:SetOperation(c71867500.activate) e1:SetOperation(c71867500.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71867500.cfilter(c) function c71867500.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end end
function c71867500.condition(e,tp,eg,ep,ev,re,r,rp) function c71867500.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c71867500.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c71867500.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c71867500.filter(c,e,tp) function c71867500.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71867500.nfilter(c,e,tp) function c71867500.nfilter(c,e,tp)
return c71867500.filter(c,e,tp) and c:IsType(TYPE_NORMAL) return c71867500.filter(c,e,tp) and c:IsType(TYPE_NORMAL)
end end
function c71867500.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71867500.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ct>0 and Duel.IsExistingTarget(c71867500.nfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return ct>0 and Duel.IsExistingTarget(c71867500.nfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c71867500.nfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,c71867500.nfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if ct>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) if ct>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingTarget(c71867500.filter,tp,LOCATION_GRAVE,0,1,g1,e,tp) and Duel.IsExistingTarget(c71867500.filter,tp,LOCATION_GRAVE,0,1,g1,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(71867500,0)) then and Duel.SelectYesNo(tp,aux.Stringid(71867500,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,c71867500.filter,tp,LOCATION_GRAVE,0,1,1,g1,e,tp) local g2=Duel.SelectTarget(tp,c71867500.filter,tp,LOCATION_GRAVE,0,1,1,g1,e,tp)
g1:Merge(g2) g1:Merge(g2)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,g1:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,g1:GetCount(),0,0)
end end
function c71867500.activate(e,tp,eg,ep,ev,re,r,rp) function c71867500.activate(e,tp,eg,ep,ev,re,r,rp)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(0) e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<1 then return end if ct<1 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
if g:GetCount()>ct or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then if g:GetCount()>ct or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,1,1,nil) g=g:Select(tp,1,1,nil)
end end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
--煌々たる逆転の女神 --煌々たる逆転の女神
function c72589042.initial_effect(c) function c72589042.initial_effect(c)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72589042,0)) e1:SetDescription(aux.Stringid(72589042,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c72589042.condition) e1:SetCondition(c72589042.condition)
e1:SetCost(c72589042.cost) e1:SetCost(c72589042.cost)
e1:SetTarget(c72589042.target) e1:SetTarget(c72589042.target)
e1:SetOperation(c72589042.operation) e1:SetOperation(c72589042.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c72589042.condition(e,tp,eg,ep,ev,re,r,rp) function c72589042.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD+LOCATION_HAND,0,e:GetHandler())==0 return tp~=Duel.GetTurnPlayer() and Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD+LOCATION_HAND,0,e:GetHandler())==0
end end
function c72589042.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c72589042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c72589042.target(e,tp,eg,ep,ev,re,r,rp,chk) function c72589042.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
if sg:FilterCount(Card.IsDestructable,nil,e)>0 then if sg:FilterCount(Card.IsDestructable,nil,e)>0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
end end
function c72589042.filter(c,e,tp) function c72589042.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c72589042.operation(e,tp,eg,ep,ev,re,r,rp) function c72589042.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if Duel.Destroy(sg,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c72589042.filter,tp,LOCATION_DECK,0,1,nil,e,tp) if Duel.Destroy(sg,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c72589042.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(72589042,1)) then and Duel.SelectYesNo(tp,aux.Stringid(72589042,1)) then
Duel.BreakEffect() Duel.BreakEffect()
local tc=Duel.SelectMatchingCard(tp,c72589042.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local tc=Duel.SelectMatchingCard(tp,c72589042.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--アーマロイドガイデンゴー --アーマロイドガイデンゴー
function c73333463.initial_effect(c) function c73333463.initial_effect(c)
--summon success --summon success
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(73333463,0)) e1:SetDescription(aux.Stringid(73333463,0))
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c73333463.condition) e1:SetCondition(c73333463.condition)
e1:SetTarget(c73333463.target) e1:SetTarget(c73333463.target)
e1:SetOperation(c73333463.operation) e1:SetOperation(c73333463.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tribute check --tribute check
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK) e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c73333463.valcheck) e2:SetValue(c73333463.valcheck)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c73333463.valcheck(e,c) function c73333463.valcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x16) then if g:IsExists(Card.IsSetCard,1,nil,0x16) then
e:GetLabelObject():SetLabel(1) e:GetLabelObject():SetLabel(1)
else else
e:GetLabelObject():SetLabel(0) e:GetLabelObject():SetLabel(0)
end end
end end
function c73333463.condition(e,tp,eg,ep,ev,re,r,rp) function c73333463.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) and e:GetLabel()==1 return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) and e:GetLabel()==1
end end
function c73333463.filter(c) function c73333463.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end end
function c73333463.target(e,tp,eg,ep,ev,re,r,rp,chk) function c73333463.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(c73333463.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c73333463.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c73333463.operation(e,tp,eg,ep,ev,re,r,rp) function c73333463.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c73333463.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c73333463.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
--ディメンション・ポッド --ディメンション・ポッド
function c73414375.initial_effect(c) function c73414375.initial_effect(c)
--flip --flip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(73414375,0)) e1:SetDescription(aux.Stringid(73414375,0))
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c73414375.target) e1:SetTarget(c73414375.target)
e1:SetOperation(c73414375.operation) e1:SetOperation(c73414375.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c73414375.target(e,tp,eg,ep,ev,re,r,rp,chk) function c73414375.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
end end
function c73414375.operation(e,tp,eg,ep,ev,re,r,rp) function c73414375.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup() local g=Group.CreateGroup()
if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(73414375,1)) then if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(73414375,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,3,nil) local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,3,nil)
g:Merge(rg) g:Merge(rg)
end end
if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(73414375,1)) then if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(73414375,1)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(1-tp,Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,3,nil) local rg=Duel.SelectMatchingCard(1-tp,Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,3,nil)
g:Merge(rg) g:Merge(rg)
end end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
--グングニールの影霊衣 --グングニールの影霊衣
function c74122412.initial_effect(c) function c74122412.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
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_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit) e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--indes --indes
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,74122412) e2:SetCountLimit(1,74122412)
e2:SetCost(c74122412.indcost) e2:SetCost(c74122412.indcost)
e2:SetTarget(c74122412.indtg) e2:SetTarget(c74122412.indtg)
e2:SetOperation(c74122412.indop) e2:SetOperation(c74122412.indop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,74122413) e3:SetCountLimit(1,74122413)
e3:SetCost(c74122412.descost) e3:SetCost(c74122412.descost)
e3:SetTarget(c74122412.destg) e3:SetTarget(c74122412.destg)
e3:SetOperation(c74122412.desop) e3:SetOperation(c74122412.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c74122412.mat_filter(c) function c74122412.mat_filter(c)
return not c:IsLevel(7) return not c:IsLevel(7)
end end
function c74122412.indcost(e,tp,eg,ep,ev,re,r,rp,chk) function c74122412.indcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c74122412.filter(c) function c74122412.filter(c)
return c:IsFaceup() and c:IsSetCard(0xb4) return c:IsFaceup() and c:IsSetCard(0xb4)
end end
function c74122412.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74122412.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c74122412.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c74122412.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c74122412.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c74122412.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c74122412.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c74122412.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c74122412.indop(e,tp,eg,ep,ev,re,r,rp) function c74122412.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1) e1:SetValue(1)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
function c74122412.cfilter(c) function c74122412.cfilter(c)
return c:IsSetCard(0xb4) and c:IsDiscardable() return c:IsSetCard(0xb4) and c:IsDiscardable()
end end
function c74122412.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c74122412.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74122412.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c74122412.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c74122412.cfilter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,c74122412.cfilter,1,1,REASON_COST+REASON_DISCARD)
end end
function c74122412.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74122412.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c74122412.desop(e,tp,eg,ep,ev,re,r,rp) function c74122412.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
--ジャンク・デストロイヤー --ジャンク・デストロイヤー
function c74860293.initial_effect(c) function c74860293.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,c74860293.tfilter,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,c74860293.tfilter,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74860293,0)) e1:SetDescription(aux.Stringid(74860293,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c74860293.con) e1:SetCondition(c74860293.con)
e1:SetTarget(c74860293.tg) e1:SetTarget(c74860293.tg)
e1:SetOperation(c74860293.op) e1:SetOperation(c74860293.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c74860293.material_setcode=0x1017 c74860293.material_setcode=0x1017
function c74860293.tfilter(c) function c74860293.tfilter(c)
return c:IsCode(63977008) or c:IsHasEffect(20932152) return c:IsCode(63977008) or c:IsHasEffect(20932152)
end end
function c74860293.con(e,tp,eg,ep,ev,re,r,rp) function c74860293.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c74860293.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74860293.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
local mc=e:GetHandler():GetMaterialCount() local mc=e:GetHandler():GetMaterialCount()
if chk==0 then return mc>1 and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return mc>1 and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,mc-1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,mc-1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c74860293.op(e,tp,eg,ep,ev,re,r,rp) function c74860293.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
--F.A.ターボチャージャー --F.A.ターボチャージャー
function c75059201.initial_effect(c) function c75059201.initial_effect(c)
--atk up --atk up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c75059201.atkval) e1:SetValue(c75059201.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--untargetable --untargetable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE) e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c75059201.atglimit) e2:SetTarget(c75059201.atglimit)
e2:SetValue(c75059201.atlimit) e2:SetValue(c75059201.atlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c75059201.tglimit) e3:SetTarget(c75059201.tglimit)
e3:SetValue(c75059201.tgval) e3:SetValue(c75059201.tgval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--lv up --lv up
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_CHAINING) e0:SetCode(EVENT_CHAINING)
e0:SetRange(LOCATION_MZONE) e0:SetRange(LOCATION_MZONE)
e0:SetOperation(aux.chainreg) e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0) c:RegisterEffect(e0)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(75059201,0)) e4:SetDescription(aux.Stringid(75059201,0))
e4:SetCategory(CATEGORY_LVCHANGE) e4:SetCategory(CATEGORY_LVCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_CHAIN_SOLVING) e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c75059201.lvcon) e4:SetCondition(c75059201.lvcon)
e4:SetOperation(c75059201.lvop) e4:SetOperation(c75059201.lvop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--actlimit --actlimit
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EFFECT_CANNOT_ACTIVATE) e5:SetCode(EFFECT_CANNOT_ACTIVATE)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,1) e5:SetTargetRange(0,1)
e5:SetValue(c75059201.aclimit) e5:SetValue(c75059201.aclimit)
e5:SetCondition(c75059201.actcon) e5:SetCondition(c75059201.actcon)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c75059201.atkval(e,c) function c75059201.atkval(e,c)
return c:GetLevel()*300 return c:GetLevel()*300
end end
function c75059201.atglimit(e,c) function c75059201.atglimit(e,c)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
if c:GetRank()>0 then if c:GetRank()>0 then
return c:GetOriginalRank()<lv return c:GetOriginalRank()<lv
elseif c:GetLevel()>0 then elseif c:GetLevel()>0 then
return c:GetOriginalLevel()<lv return c:GetOriginalLevel()<lv
else return false end else return false end
end end
function c75059201.atlimit(e,c) function c75059201.atlimit(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
end end
function c75059201.tglimit(e,c) function c75059201.tglimit(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
end end
function c75059201.tgval(e,re,rp) function c75059201.tgval(e,re,rp)
if not aux.tgoval(e,re,rp) then return false end if not aux.tgoval(e,re,rp) then return false end
local c=re:GetHandler() local c=re:GetHandler()
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
if c:GetRank()>0 then if c:GetRank()>0 then
return c:GetOriginalRank()<lv return c:GetOriginalRank()<lv
elseif c:GetLevel()>0 then elseif c:GetLevel()>0 then
return c:GetOriginalLevel()<lv return c:GetOriginalLevel()<lv
else return false end else return false end
end end
function c75059201.lvcon(e,tp,eg,ep,ev,re,r,rp) function c75059201.lvcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0 return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0
end end
function c75059201.lvop(e,tp,eg,ep,ev,re,r,rp) function c75059201.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c75059201.aclimit(e,re,tp) function c75059201.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) return re:IsActiveType(TYPE_MONSTER)
end end
function c75059201.actcon(e) function c75059201.actcon(e)
if not e:GetHandler():IsLevelAbove(7) then return false end if not e:GetHandler():IsLevelAbove(7) then return false end
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if not a then return false end if not a then return false end
local d=a:GetBattleTarget() local d=a:GetBattleTarget()
if a:IsControler(1-e:GetHandler():GetControler()) then a,d=d,a end if a:IsControler(1-e:GetHandler():GetControler()) then a,d=d,a end
return a and a:IsSetCard(0x107) return a and a:IsSetCard(0x107)
end end
--コード・ラジエーター --コード・ラジエーター
function c75130221.initial_effect(c) function c75130221.initial_effect(c)
--hand link --hand link
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL) e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,75130221) e1:SetCountLimit(1,75130221)
e1:SetValue(c75130221.matval) e1:SetValue(c75130221.matval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable --disable
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75130221,0)) e3:SetDescription(aux.Stringid(75130221,0))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_BE_MATERIAL) e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,75130222) e3:SetCountLimit(1,75130222)
e3:SetCondition(c75130221.discon) e3:SetCondition(c75130221.discon)
e3:SetTarget(c75130221.distg) e3:SetTarget(c75130221.distg)
e3:SetOperation(c75130221.disop) e3:SetOperation(c75130221.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c75130221.mfilter(c) function c75130221.mfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_CYBERSE) return c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_CYBERSE)
end end
function c75130221.exmfilter(c) function c75130221.exmfilter(c)
return c:IsLocation(LOCATION_HAND) and c:IsCode(75130221) return c:IsLocation(LOCATION_HAND) and c:IsCode(75130221)
end end
function c75130221.matval(e,c,mg) function c75130221.matval(e,c,mg)
return c:IsSetCard(0x101) and mg:IsExists(c75130221.mfilter,1,nil) and not mg:IsExists(c75130221.exmfilter,1,nil) return c:IsSetCard(0x101) and mg:IsExists(c75130221.mfilter,1,nil) and not mg:IsExists(c75130221.exmfilter,1,nil)
end end
function c75130221.discon(e,tp,eg,ep,ev,re,r,rp) function c75130221.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
e:SetLabel(0) e:SetLabel(0)
if c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(1) end if c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(1) end
return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x101) return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x101)
end end
function c75130221.disfilter(c) function c75130221.disfilter(c)
return c:IsFaceup() and not (c:IsAttack(0) and c:IsDisabled()) return c:IsFaceup() and not (c:IsAttack(0) and c:IsDisabled())
end end
function c75130221.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75130221.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 c75130221.disfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c75130221.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c75130221.disfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c75130221.disfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c75130221.disfilter,tp,0,LOCATION_MZONE,1,1+e:GetLabel(),nil) Duel.SelectTarget(tp,c75130221.disfilter,tp,0,LOCATION_MZONE,1,1+e:GetLabel(),nil)
end end
function c75130221.disop(e,tp,eg,ep,ev,re,r,rp) function c75130221.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
for tc in aux.Next(g) do for tc in aux.Next(g) do
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0) e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE) e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET) e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
end end
end end
--スナップドラゴン --スナップドラゴン
function c75673220.initial_effect(c) function c75673220.initial_effect(c)
--remove --remove
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75673220,0)) e1:SetDescription(aux.Stringid(75673220,0))
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,75673220) e1:SetCountLimit(1,75673220)
e1:SetTarget(c75673220.target) e1:SetTarget(c75673220.target)
e1:SetOperation(c75673220.operation) e1:SetOperation(c75673220.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c75673220.target(e,tp,eg,ep,ev,re,r,rp,chk) function c75673220.target(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_REMOVE,nil,1,1-tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end end
function c75673220.operation(e,tp,eg,ep,ev,re,r,rp) function c75673220.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local rg=g:RandomSelect(tp,1) local rg=g:RandomSelect(tp,1)
local tc=rg:GetFirst() local tc=rg:GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
tc:RegisterFlagEffect(75673220,RESET_EVENT+RESETS_STANDARD,0,1) tc:RegisterFlagEffect(75673220,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabelObject(tc) e1:SetLabelObject(tc)
e1:SetCondition(c75673220.retcon) e1:SetCondition(c75673220.retcon)
e1:SetOperation(c75673220.retop) e1:SetOperation(c75673220.retop)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c75673220.retcon(e,tp,eg,ep,ev,re,r,rp) function c75673220.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if tc:GetFlagEffect(75673220)==0 then if tc:GetFlagEffect(75673220)==0 then
e:Reset() e:Reset()
return false return false
else else
return true return true
end end
end end
function c75673220.retop(e,tp,eg,ep,ev,re,r,rp) function c75673220.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
Duel.SendtoHand(tc,1-tp,REASON_EFFECT) Duel.SendtoHand(tc,1-tp,REASON_EFFECT)
end end
--F.A.ホームトランスポーター --F.A.ホームトランスポーター
function c75676192.initial_effect(c) function c75676192.initial_effect(c)
--synchro summon --synchro summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
--atk up --atk up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c75676192.atkval) e1:SetValue(c75676192.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg) e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75676192,0)) e3:SetDescription(aux.Stringid(75676192,0))
e3:SetCategory(CATEGORY_LVCHANGE) e3:SetCategory(CATEGORY_LVCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_CHAIN_SOLVING) e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c75676192.lvcon) e3:SetCondition(c75676192.lvcon)
e3:SetOperation(c75676192.lvop) e3:SetOperation(c75676192.lvop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--indes --indes
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetCondition(c75676192.indcon) e4:SetCondition(c75676192.indcon)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e4:Clone() local e5=e4:Clone()
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--special summon --special summon
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(75676192,1)) e6:SetDescription(aux.Stringid(75676192,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetType(EFFECT_TYPE_IGNITION) e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetCountLimit(1) e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e6:SetCondition(c75676192.spcon) e6:SetCondition(c75676192.spcon)
e6:SetTarget(c75676192.sptg) e6:SetTarget(c75676192.sptg)
e6:SetOperation(c75676192.spop) e6:SetOperation(c75676192.spop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function c75676192.atkval(e,c) function c75676192.atkval(e,c)
return c:GetLevel()*300 return c:GetLevel()*300
end end
function c75676192.lvcon(e,tp,eg,ep,ev,re,r,rp) function c75676192.lvcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0 return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0
end end
function c75676192.lvop(e,tp,eg,ep,ev,re,r,rp) function c75676192.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_LEVEL) e4:SetCode(EFFECT_UPDATE_LEVEL)
e4:SetValue(1) e4:SetValue(1)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
end end
function c75676192.indcon(e) function c75676192.indcon(e)
return e:GetHandler():IsLevelAbove(11) return e:GetHandler():IsLevelAbove(11)
end end
function c75676192.spcon(e,tp,eg,ep,ev,re,r,rp) function c75676192.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLevelAbove(13) return e:GetHandler():IsLevelAbove(13)
end end
function c75676192.filter(c,e,tp) function c75676192.filter(c,e,tp)
return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c75676192.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75676192.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c75676192.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c75676192.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c75676192.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c75676192.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c75676192.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c75676192.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c75676192.spop(e,tp,eg,ep,ev,re,r,rp) function c75676192.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--フォトン・アレキサンドラ・クィーン --フォトン・アレキサンドラ・クィーン
function c75797046.initial_effect(c) function c75797046.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x6a),4,2) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x6a),4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--return --return
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75797046,0)) e1:SetDescription(aux.Stringid(75797046,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(c75797046.retcost) e1:SetCost(c75797046.retcost)
e1:SetTarget(c75797046.rettg) e1:SetTarget(c75797046.rettg)
e1:SetOperation(c75797046.retop) e1:SetOperation(c75797046.retop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c75797046.retcost(e,tp,eg,ep,ev,re,r,rp,chk) function c75797046.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c75797046.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c75797046.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0)
end end
function c75797046.hfilter(c,tp) function c75797046.hfilter(c,tp)
return c:IsLocation(LOCATION_HAND) and c:IsControler(tp) return c:IsLocation(LOCATION_HAND) and c:IsControler(tp)
end end
function c75797046.retop(e,tp,eg,ep,ev,re,r,rp) function c75797046.retop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
local ct1=g:FilterCount(c75797046.hfilter,nil,tp) local ct1=g:FilterCount(c75797046.hfilter,nil,tp)
local ct2=g:FilterCount(c75797046.hfilter,nil,1-tp) local ct2=g:FilterCount(c75797046.hfilter,nil,1-tp)
if ct1==0 and ct2==0 then return end if ct1==0 and ct2==0 then return end
Duel.BreakEffect() Duel.BreakEffect()
Duel.Damage(tp,ct1*300,REASON_EFFECT,true) Duel.Damage(tp,ct1*300,REASON_EFFECT,true)
Duel.Damage(1-tp,ct2*300,REASON_EFFECT,true) Duel.Damage(1-tp,ct2*300,REASON_EFFECT,true)
Duel.RDComplete() Duel.RDComplete()
end end
--ヴェンデット・チャージ --ヴェンデット・チャージ
function c76798740.initial_effect(c) function c76798740.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,76798740+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,76798740+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c76798740.cost) e1:SetCost(c76798740.cost)
e1:SetTarget(c76798740.target) e1:SetTarget(c76798740.target)
e1:SetOperation(c76798740.activate) e1:SetOperation(c76798740.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c76798740.cfilter(c,tp) function c76798740.cfilter(c,tp)
return c:IsRace(RACE_ZOMBIE) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_ZOMBIE) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost()
and Duel.GetMZoneCount(tp,c)>0 and Duel.GetMZoneCount(tp,c)>0
end end
function c76798740.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c76798740.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76798740.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c76798740.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c76798740.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c76798740.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c76798740.filter(c,e,tp) function c76798740.filter(c,e,tp)
return c:IsSetCard(0x106) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x106) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c76798740.target(e,tp,eg,ep,ev,re,r,rp,chk) function c76798740.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76798740.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c76798740.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c76798740.activate(e,tp,eg,ep,ev,re,r,rp) function c76798740.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c76798740.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c76798740.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--ヴェンデット・ナイト --ヴェンデット・ナイト
function c76871889.initial_effect(c) function c76871889.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76871889,0)) e2:SetDescription(aux.Stringid(76871889,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,76871889) e2:SetCountLimit(1,76871889)
e2:SetCost(c76871889.thcost) e2:SetCost(c76871889.thcost)
e2:SetTarget(c76871889.thtg) e2:SetTarget(c76871889.thtg)
e2:SetOperation(c76871889.thop) e2:SetOperation(c76871889.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--chain attack --chain attack
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(76871889,1)) e3:SetDescription(aux.Stringid(76871889,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c76871889.atcon) e3:SetCondition(c76871889.atcon)
e3:SetCost(c76871889.atcost) e3:SetCost(c76871889.atcost)
e3:SetOperation(c76871889.atop) e3:SetOperation(c76871889.atop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c76871889.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c76871889.thcost(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 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) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c76871889.thfilter(c) function c76871889.thfilter(c)
return c:IsSetCard(0x106) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x106) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c76871889.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c76871889.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76871889.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c76871889.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c76871889.thop(e,tp,eg,ep,ev,re,r,rp) function c76871889.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c76871889.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c76871889.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c76871889.atcon(e,tp,eg,ep,ev,re,r,rp) function c76871889.atcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst() local ec=eg:GetFirst()
local bc=ec:GetBattleTarget() local bc=ec:GetBattleTarget()
e:SetLabelObject(ec) e:SetLabelObject(ec)
return ec:IsControler(tp) and ec:IsSetCard(0x106) and bc and bc:IsType(TYPE_MONSTER) return ec:IsControler(tp) and ec:IsSetCard(0x106) and bc and bc:IsType(TYPE_MONSTER)
and ec:IsChainAttackable(0,true) and ec:IsStatus(STATUS_OPPO_BATTLE) and ec:IsChainAttackable(0,true) and ec:IsStatus(STATUS_OPPO_BATTLE)
end end
function c76871889.atcfilter(c) function c76871889.atcfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x106) and c:IsAbleToRemoveAsCost() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x106) and c:IsAbleToRemoveAsCost()
end end
function c76871889.atcost(e,tp,eg,ep,ev,re,r,rp,chk) function c76871889.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76871889.atcfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c76871889.atcfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c76871889.atcfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c76871889.atcfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c76871889.atop(e,tp,eg,ep,ev,re,r,rp) function c76871889.atop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler() local c=e:GetHandler()
local ec=e:GetLabelObject() local ec=e:GetLabelObject()
if not ec or not ec:IsRelateToBattle() then return end if not ec or not ec:IsRelateToBattle() then return end
Duel.ChainAttack() Duel.ChainAttack()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
ec:RegisterEffect(e1) ec:RegisterEffect(e1)
end end
--カラテ魂 KURO-OBI --カラテ魂 KURO-OBI
function c77511331.initial_effect(c) function c77511331.initial_effect(c)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--spirit return --spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP) aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c77511331.thcon) e1:SetCondition(c77511331.thcon)
e1:SetTarget(c77511331.thtg) e1:SetTarget(c77511331.thtg)
e1:SetOperation(c77511331.thop) e1:SetOperation(c77511331.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--gy --gy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c77511331.gytg) e2:SetTarget(c77511331.gytg)
e2:SetOperation(c77511331.gyop) e2:SetOperation(c77511331.gyop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c77511331.thcon(e,tp,eg,ep,ev,re,r,rp) function c77511331.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_PENDULUM) return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_PENDULUM)
end end
function c77511331.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c77511331.thtg(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_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c77511331.thop(e,tp,eg,ep,ev,re,r,rp) function c77511331.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
function c77511331.tgfilter(c,tp) function c77511331.tgfilter(c,tp)
return Duel.IsExistingMatchingCard(c77511331.gyfilter,tp,0,LOCATION_ONFIELD,1,nil,c:GetColumnGroup()) return Duel.IsExistingMatchingCard(c77511331.gyfilter,tp,0,LOCATION_ONFIELD,1,nil,c:GetColumnGroup())
end end
function c77511331.gyfilter(c,g) function c77511331.gyfilter(c,g)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and g:IsContains(c) return c:IsType(TYPE_SPELL+TYPE_TRAP) and g:IsContains(c)
end end
function c77511331.gytg(e,tp,eg,ep,ev,re,r,rp,chk) function c77511331.gytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c77511331.tgfilter,tp,LOCATION_PZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c77511331.tgfilter,tp,LOCATION_PZONE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD)
end end
function c77511331.gyop(e,tp,eg,ep,ev,re,r,rp) function c77511331.gyop(e,tp,eg,ep,ev,re,r,rp)
local pg=Duel.GetMatchingGroup(c77511331.tgfilter,tp,LOCATION_PZONE,0,nil,tp) local pg=Duel.GetMatchingGroup(c77511331.tgfilter,tp,LOCATION_PZONE,0,nil,tp)
if pg:GetCount()==0 then return end if pg:GetCount()==0 then return end
local g=Group.CreateGroup() local g=Group.CreateGroup()
for pc in aux.Next(pg) do for pc in aux.Next(pg) do
g:Merge(Duel.GetMatchingGroup(c77511331.gyfilter,tp,0,LOCATION_ONFIELD,nil,pc:GetColumnGroup())) g:Merge(Duel.GetMatchingGroup(c77511331.gyfilter,tp,0,LOCATION_ONFIELD,nil,pc:GetColumnGroup()))
end end
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
--ハロハロ --ハロハロ
function c77994337.initial_effect(c) function c77994337.initial_effect(c)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--level --level
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(77994337,0)) e1:SetDescription(aux.Stringid(77994337,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetTarget(c77994337.lvtg) e1:SetTarget(c77994337.lvtg)
e1:SetOperation(c77994337.lvop) e1:SetOperation(c77994337.lvop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c77994337.lvfilter(c) function c77994337.lvfilter(c)
return c:IsFaceup() and c:GetLevel()>0 return c:IsFaceup() and c:GetLevel()>0
end end
function c77994337.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c77994337.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c77994337.lvfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c77994337.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c77994337.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c77994337.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c77994337.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c77994337.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c77994337.lvop(e,tp,eg,ep,ev,re,r,rp) function c77994337.lvop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local dc=Duel.TossDice(tp,1) local dc=Duel.TossDice(tp,1)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(dc) e1:SetValue(dc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
--破壊輪廻 --破壊輪廻
function c7852509.initial_effect(c) function c7852509.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--change code --change code
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE) e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetValue(83555666) e2:SetValue(83555666)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(c7852509.descon) e3:SetCondition(c7852509.descon)
e3:SetTarget(c7852509.destg) e3:SetTarget(c7852509.destg)
e3:SetOperation(c7852509.desop) e3:SetOperation(c7852509.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c7852509.cfilter(c) function c7852509.cfilter(c)
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
end end
function c7852509.descon(e,tp,eg,ep,ev,re,r,rp) function c7852509.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c7852509.cfilter,1,nil) return eg:IsExists(c7852509.cfilter,1,nil)
end end
function c7852509.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c7852509.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,500)
end end
function c7852509.desop(e,tp,eg,ep,ev,re,r,rp) function c7852509.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(tp,500,REASON_EFFECT,true) Duel.Damage(tp,500,REASON_EFFECT,true)
Duel.Damage(1-tp,500,REASON_EFFECT,true) Duel.Damage(1-tp,500,REASON_EFFECT,true)
Duel.RDComplete() Duel.RDComplete()
end end
end end
--リヴェンデット・バース --リヴェンデット・バース
function c7986397.initial_effect(c) function c7986397.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,7986397+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,7986397+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c7986397.target) e1:SetTarget(c7986397.target)
e1:SetOperation(c7986397.activate) e1:SetOperation(c7986397.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c7986397.dfilter(c) function c7986397.dfilter(c)
return c:IsSetCard(0x106) and c:IsLevelAbove(1) and c:IsAbleToGrave() return c:IsSetCard(0x106) and c:IsLevelAbove(1) and c:IsAbleToGrave()
end end
function c7986397.filter(c,e,tp,m,ft) function c7986397.filter(c,e,tp,m,ft)
if not c:IsSetCard(0x106) or bit.band(c:GetType(),0x81)~=0x81 if not c:IsSetCard(0x106) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
local dg=Duel.GetMatchingGroup(c7986397.dfilter,tp,LOCATION_DECK,0,nil) local dg=Duel.GetMatchingGroup(c7986397.dfilter,tp,LOCATION_DECK,0,nil)
if ft>0 then if ft>0 then
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
or dg:IsExists(c7986397.dlvfilter,1,nil,tp,mg,c) or dg:IsExists(c7986397.dlvfilter,1,nil,tp,mg,c)
else else
return ft>-1 and mg:IsExists(c7986397.mfilterf,1,nil,tp,mg,dg,c) return ft>-1 and mg:IsExists(c7986397.mfilterf,1,nil,tp,mg,dg,c)
end end
end end
function c7986397.mfilterf(c,tp,mg,dg,rc) function c7986397.mfilterf(c,tp,mg,dg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c) Duel.SetSelectedCard(c)
return mg:CheckWithSumEqual(Card.GetRitualLevel,rc:GetLevel(),0,99,rc) return mg:CheckWithSumEqual(Card.GetRitualLevel,rc:GetLevel(),0,99,rc)
or dg:IsExists(c7986397.dlvfilter,1,nil,tp,mg,rc,c) or dg:IsExists(c7986397.dlvfilter,1,nil,tp,mg,rc,c)
else return false end else return false end
end end
function c7986397.dlvfilter(c,tp,mg,rc,mc) function c7986397.dlvfilter(c,tp,mg,rc,mc)
Duel.SetSelectedCard(Group.FromCards(c,mc)) Duel.SetSelectedCard(Group.FromCards(c,mc))
return mg:CheckWithSumEqual(Card.GetRitualLevel,rc:GetLevel(),0,99,rc) return mg:CheckWithSumEqual(Card.GetRitualLevel,rc:GetLevel(),0,99,rc)
end end
function c7986397.target(e,tp,eg,ep,ev,re,r,rp,chk) function c7986397.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return Duel.IsExistingMatchingCard(c7986397.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg,ft) return Duel.IsExistingMatchingCard(c7986397.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c7986397.activate(e,tp,eg,ep,ev,re,r,rp) function c7986397.activate(e,tp,eg,ep,ev,re,r,rp)
local m=Duel.GetRitualMaterial(tp) local m=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c7986397.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,m,ft) local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c7986397.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,m,ft)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
local mat,dmat local mat,dmat
local mg=m:Filter(Card.IsCanBeRitualMaterial,tc,tc) local mg=m:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local dg=Duel.GetMatchingGroup(c7986397.dfilter,tp,LOCATION_DECK,0,nil) local dg=Duel.GetMatchingGroup(c7986397.dfilter,tp,LOCATION_DECK,0,nil)
if ft>0 then if ft>0 then
local b1=dg:IsExists(c7986397.dlvfilter,1,nil,tp,mg,tc) local b1=dg:IsExists(c7986397.dlvfilter,1,nil,tp,mg,tc)
local b2=mg:CheckWithSumEqual(Card.GetRitualLevel,tc:GetLevel(),1,99,tc) local b2=mg:CheckWithSumEqual(Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(7986397,0))) then if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(7986397,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
dmat=dg:FilterSelect(tp,c7986397.dlvfilter,1,1,nil,tp,mg,tc) dmat=dg:FilterSelect(tp,c7986397.dlvfilter,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(dmat) Duel.SetSelectedCard(dmat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),0,99,tc) mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),0,99,tc)
mat:Merge(dmat) mat:Merge(dmat)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc) mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
end end
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c7986397.mfilterf,1,1,nil,tp,mg,dg,tc) mat=mg:FilterSelect(tp,c7986397.mfilterf,1,1,nil,tp,mg,dg,tc)
local b1=dg:IsExists(c7986397.dlvfilter,1,nil,tp,mg,tc,mat:GetFirst()) local b1=dg:IsExists(c7986397.dlvfilter,1,nil,tp,mg,tc,mat:GetFirst())
Duel.SetSelectedCard(mat) Duel.SetSelectedCard(mat)
local b2=mg:CheckWithSumEqual(Card.GetRitualLevel,tc:GetLevel(),0,99,tc) local b2=mg:CheckWithSumEqual(Card.GetRitualLevel,tc:GetLevel(),0,99,tc)
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(7986397,0))) then if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(7986397,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
dmat=dg:FilterSelect(tp,c7986397.dlvfilter,1,1,nil,tp,mg,tc,mat:GetFirst()) dmat=dg:FilterSelect(tp,c7986397.dlvfilter,1,1,nil,tp,mg,tc,mat:GetFirst())
mat:Merge(dmat) mat:Merge(dmat)
Duel.SetSelectedCard(mat) Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),0,99,tc) local mat2=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),0,99,tc)
mat:Merge(mat2) mat:Merge(mat2)
else else
Duel.SetSelectedCard(mat) Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),0,99,tc) local mat2=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),0,99,tc)
mat:Merge(mat2) mat:Merge(mat2)
end end
end end
tc:SetMaterial(mat) tc:SetMaterial(mat)
if dmat then if dmat then
mat:Sub(dmat) mat:Sub(dmat)
Duel.SendtoGrave(dmat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) Duel.SendtoGrave(dmat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end end
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
tc:RegisterFlagEffect(7986397,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) tc:RegisterFlagEffect(7986397,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCondition(c7986397.descon) e1:SetCondition(c7986397.descon)
e1:SetOperation(c7986397.desop) e1:SetOperation(c7986397.desop)
e1:SetReset(RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetLabelObject(tc) e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
function c7986397.descon(e,tp,eg,ep,ev,re,r,rp) function c7986397.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(7986397)~=0 return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(7986397)~=0
end end
function c7986397.desop(e,tp,eg,ep,ev,re,r,rp) function c7986397.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
--一族の結集 --一族の結集
function c8608979.initial_effect(c) function c8608979.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c8608979.target) e1:SetTarget(c8608979.target)
e1:SetOperation(c8608979.operation) e1:SetOperation(c8608979.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(8608979,0)) e2:SetDescription(aux.Stringid(8608979,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c8608979.setcon) e2:SetCondition(c8608979.setcon)
e2:SetTarget(c8608979.settg) e2:SetTarget(c8608979.settg)
e2:SetOperation(c8608979.setop) e2:SetOperation(c8608979.setop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c8608979.filter1(c,e,tp) function c8608979.filter1(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c8608979.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c,e,tp) return c:IsFaceup() and Duel.IsExistingMatchingCard(c8608979.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c,e,tp)
end end
function c8608979.filter2(c,tc,e,tp) function c8608979.filter2(c,tc,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:GetOriginalRace()==tc:GetOriginalRace() and c:GetOriginalRace()==tc:GetOriginalRace()
and not c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and not c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end end
function c8608979.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c8608979.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) and c8608979.filter1(chkc,e,tp) end if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) and c8608979.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c8608979.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end and Duel.IsExistingTarget(c8608979.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c8608979.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c8608979.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c8608979.operation(e,tp,eg,ep,ev,re,r,rp) function c8608979.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c8608979.filter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tc,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c8608979.filter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tc,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c8608979.setcon(e,tp,eg,ep,ev,re,r,rp) function c8608979.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_EFFECT) return rp==1-tp and c:IsReason(REASON_EFFECT)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_SZONE)
end end
function c8608979.setfilter(c) function c8608979.setfilter(c)
return c:IsCode(8608979) and c:IsSSetable() return c:IsCode(8608979) and c:IsSSetable()
end end
function c8608979.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c8608979.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8608979.setfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c8608979.setfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function c8608979.setop(e,tp,eg,ep,ev,re,r,rp) function c8608979.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c8608979.setfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c8608979.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst()) Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--零鳥獣シルフィーネ --零鳥獣シルフィーネ
function c86848580.initial_effect(c) function c86848580.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WINDBEAST),4,2) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WINDBEAST),4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--negate --negate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86848580,0)) e1:SetDescription(aux.Stringid(86848580,0))
e1:SetCategory(CATEGORY_DISABLE) e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c86848580.discost) e1:SetCost(c86848580.discost)
e1:SetTarget(c86848580.distg) e1:SetTarget(c86848580.distg)
e1:SetOperation(c86848580.disop) e1:SetOperation(c86848580.disop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c86848580.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c86848580.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c86848580.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c86848580.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
end end
function c86848580.disop(e,tp,eg,ep,ev,re,r,rp) function c86848580.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
local c=e:GetHandler() local c=e:GetHandler()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
tc=g:GetNext() tc=g:GetNext()
end end
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local atk=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)*300 local atk=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)*300
if atk>0 then if atk>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk) e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_STANDBY,2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_STANDBY,2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
--キメラテック・メガフリート・ドラゴン --キメラテック・メガフリート・ドラゴン
function c87116928.initial_effect(c) function c87116928.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1093),c87116928.matfilter,1,63,true) aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1093),c87116928.matfilter,1,63,true)
aux.AddContactFusionProcedure(c,c87116928.cfilter,LOCATION_MZONE,LOCATION_MZONE,c87116928.sprop(c)) aux.AddContactFusionProcedure(c,c87116928.cfilter,LOCATION_MZONE,LOCATION_MZONE,c87116928.sprop(c))
--spsummon condition --spsummon condition
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_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c87116928.splimit) e1:SetValue(c87116928.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot be fusion material --cannot be fusion material
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c87116928.material_setcode=0x1093 c87116928.material_setcode=0x1093
function c87116928.matfilter(c) function c87116928.matfilter(c)
return c:GetSequence()>4 return c:GetSequence()>4
end end
function c87116928.splimit(e,se,sp,st) function c87116928.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end end
function c87116928.cfilter(c,fc) function c87116928.cfilter(c,fc)
return c:IsAbleToGraveAsCost() and (c:IsControler(fc:GetControler()) or c:IsFaceup()) return c:IsAbleToGraveAsCost() and (c:IsControler(fc:GetControler()) or c:IsFaceup())
end end
function c87116928.sprop(c) function c87116928.sprop(c)
return function(g) return function(g)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+0xff0000) e1:SetReset(RESET_EVENT+0xff0000)
e1:SetValue(g:GetCount()*1200) e1:SetValue(g:GetCount()*1200)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
--アーマー・ブレイカー --アーマー・ブレイカー
function c87798440.initial_effect(c) function c87798440.initial_effect(c)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87798440,0)) e1:SetDescription(aux.Stringid(87798440,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c87798440.eqtg) e1:SetTarget(c87798440.eqtg)
e1:SetOperation(c87798440.eqop) e1:SetOperation(c87798440.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--unequip --unequip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87798440,1)) e2:SetDescription(aux.Stringid(87798440,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(aux.IsUnionState) e2:SetCondition(aux.IsUnionState)
e2:SetTarget(c87798440.sptg) e2:SetTarget(c87798440.sptg)
e2:SetOperation(c87798440.spop) e2:SetOperation(c87798440.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy sub --destroy sub
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e3:SetCondition(aux.IsUnionState) e3:SetCondition(aux.IsUnionState)
e3:SetValue(c87798440.repval) e3:SetValue(c87798440.repval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--destroy --destroy
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(87798440,2)) e4:SetDescription(aux.Stringid(87798440,2))
e4:SetCategory(CATEGORY_DESTROY) e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_DAMAGE) e4:SetCode(EVENT_BATTLE_DAMAGE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c87798440.descon) e4:SetCondition(c87798440.descon)
e4:SetTarget(c87798440.destg) e4:SetTarget(c87798440.destg)
e4:SetOperation(c87798440.desop) e4:SetOperation(c87798440.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--eqlimit --eqlimit
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE) e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_EQUIP_LIMIT) e5:SetCode(EFFECT_EQUIP_LIMIT)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(c87798440.eqlimit) e5:SetValue(c87798440.eqlimit)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c87798440.old_union=true c87798440.old_union=true
function c87798440.repval(e,re,r,rp) function c87798440.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
end end
function c87798440.eqlimit(e,c) function c87798440.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR) return c:IsRace(RACE_WARRIOR)
end end
function c87798440.filter(c) function c87798440.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:GetUnionCount()==0 return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:GetUnionCount()==0
end end
function c87798440.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c87798440.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c87798440.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c87798440.filter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(87798440)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(87798440)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c87798440.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end and Duel.IsExistingTarget(c87798440.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c87798440.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,c87798440.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
e:GetHandler():RegisterFlagEffect(87798440,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(87798440,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
function c87798440.eqop(e,tp,eg,ep,ev,re,r,rp) function c87798440.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not c87798440.filter(tc) then if not tc:IsRelateToEffect(e) or not c87798440.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
if not Duel.Equip(tp,c,tc,false) then return end if not Duel.Equip(tp,c,tc,false) then return end
aux.SetUnionState(c) aux.SetUnionState(c)
end end
function c87798440.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c87798440.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(87798440)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetFlagEffect(87798440)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(87798440,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(87798440,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
function c87798440.spop(e,tp,eg,ep,ev,re,r,rp) function c87798440.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK)
end end
function c87798440.descon(e,tp,eg,ep,ev,re,r,rp) function c87798440.descon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetEquipTarget()==eg:GetFirst() and aux.IsUnionState(e) return ep~=tp and e:GetHandler():GetEquipTarget()==eg:GetFirst() and aux.IsUnionState(e)
end end
function c87798440.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c87798440.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c87798440.desop(e,tp,eg,ep,ev,re,r,rp) function c87798440.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
--合成魔獣 ガーゼット --合成魔獣 ガーゼット
function c8794435.initial_effect(c) function c8794435.initial_effect(c)
--tribute check --tribute check
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK) e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c8794435.valcheck) e1:SetValue(c8794435.valcheck)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--give atk effect only when summon --give atk effect only when summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST) e2:SetCode(EFFECT_SUMMON_COST)
e2:SetOperation(c8794435.facechk) e2:SetOperation(c8794435.facechk)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c8794435.valcheck(e,c) function c8794435.valcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
local tc=g:GetFirst() local tc=g:GetFirst()
local atk=0 local atk=0
while tc do while tc do
local catk=tc:GetTextAttack() local catk=tc:GetTextAttack()
atk=atk+(catk>=0 and catk or 0) atk=atk+(catk>=0 and catk or 0)
tc=g:GetNext() tc=g:GetNext()
end end
if e:GetLabel()==1 then if e:GetLabel()==1 then
e:SetLabel(0) e:SetLabel(0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk) e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0xff0000) e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c8794435.facechk(e,tp,eg,ep,ev,re,r,rp) function c8794435.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1) e:GetLabelObject():SetLabel(1)
end end
--ディサイシブの影霊衣 --ディサイシブの影霊衣
function c88240999.initial_effect(c) function c88240999.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
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_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit) e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--boost --boost
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88240999,0)) e2:SetDescription(aux.Stringid(88240999,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,88240999) e2:SetCountLimit(1,88240999)
e2:SetCondition(c88240999.adcon) e2:SetCondition(c88240999.adcon)
e2:SetCost(c88240999.adcost) e2:SetCost(c88240999.adcost)
e2:SetTarget(c88240999.adtg) e2:SetTarget(c88240999.adtg)
e2:SetOperation(c88240999.adop) e2:SetOperation(c88240999.adop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88240999,1)) e3:SetDescription(aux.Stringid(88240999,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,88241000) e3:SetCountLimit(1,88241000)
e3:SetTarget(c88240999.destg) e3:SetTarget(c88240999.destg)
e3:SetOperation(c88240999.desop) e3:SetOperation(c88240999.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c88240999.mat_filter(c) function c88240999.mat_filter(c)
return not c:IsLevel(10) return not c:IsLevel(10)
end end
function c88240999.adcon(e,tp,eg,ep,ev,re,r,rp) function c88240999.adcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c88240999.adcost(e,tp,eg,ep,ev,re,r,rp,chk) function c88240999.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c88240999.filter(c) function c88240999.filter(c)
return c:IsFaceup() and c:IsSetCard(0xb4) return c:IsFaceup() and c:IsSetCard(0xb4)
end end
function c88240999.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c88240999.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c88240999.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c88240999.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88240999.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c88240999.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c88240999.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c88240999.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c88240999.adop(e,tp,eg,ep,ev,re,r,rp) function c88240999.adop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1000) e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
function c88240999.desfilter(c) function c88240999.desfilter(c)
return c:IsFacedown() and c:IsAbleToRemove() return c:IsFacedown() and c:IsAbleToRemove()
end end
function c88240999.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c88240999.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c88240999.desfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c88240999.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88240999.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(c88240999.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c88240999.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,c88240999.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c88240999.desop(e,tp,eg,ep,ev,re,r,rp) function c88240999.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED) Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)
end end
end end
--ユニコールの影霊衣 --ユニコールの影霊衣
function c89463537.initial_effect(c) function c89463537.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
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_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit) e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(89463537,0)) e2:SetDescription(aux.Stringid(89463537,0))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,89463537) e2:SetCountLimit(1,89463537)
e2:SetCost(c89463537.cost) e2:SetCost(c89463537.cost)
e2:SetTarget(c89463537.target) e2:SetTarget(c89463537.target)
e2:SetOperation(c89463537.operation) e2:SetOperation(c89463537.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--disable --disable
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE) e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c89463537.distg) e3:SetTarget(c89463537.distg)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c89463537.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c89463537.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c89463537.filter(c) function c89463537.filter(c)
return c:IsSetCard(0xb4) and not c:IsCode(89463537) and c:IsAbleToHand() return c:IsSetCard(0xb4) and not c:IsCode(89463537) and c:IsAbleToHand()
end end
function c89463537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c89463537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c89463537.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c89463537.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c89463537.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c89463537.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c89463537.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c89463537.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c89463537.operation(e,tp,eg,ep,ev,re,r,rp) function c89463537.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
function c89463537.distg(e,c) function c89463537.distg(e,c)
return c:GetSummonLocation()==LOCATION_EXTRA return c:GetSummonLocation()==LOCATION_EXTRA
end end
--ロード・オブ・ドラゴン-ドラゴンの統制者- --ロード・オブ・ドラゴン-ドラゴンの統制者-
function c8978197.initial_effect(c) function c8978197.initial_effect(c)
--change name --change name
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(17985575) e1:SetValue(17985575)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(8978197,0)) e2:SetDescription(aux.Stringid(8978197,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCost(c8978197.thcost) e2:SetCost(c8978197.thcost)
e2:SetTarget(c8978197.thtg) e2:SetTarget(c8978197.thtg)
e2:SetOperation(c8978197.thop) e2:SetOperation(c8978197.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c8978197.cfilter(c) function c8978197.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDiscardable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDiscardable()
end end
function c8978197.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c8978197.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8978197.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c8978197.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c8978197.cfilter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,c8978197.cfilter,1,1,REASON_COST+REASON_DISCARD)
end end
function c8978197.thfilter(c) function c8978197.thfilter(c)
return c:IsCode(71867500,43973174,48800175) and c:IsAbleToHand() return c:IsCode(71867500,43973174,48800175) and c:IsAbleToHand()
end end
function c8978197.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c8978197.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8978197.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c8978197.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c8978197.thop(e,tp,eg,ep,ev,re,r,rp) function c8978197.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c8978197.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c8978197.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--ウィッチクラフト・ピットレ --ウィッチクラフト・ピットレ
function c95245544.initial_effect(c) function c95245544.initial_effect(c)
--Special Summon --Special Summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95245544,0)) e1:SetDescription(aux.Stringid(95245544,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,95245544) e1:SetCountLimit(1,95245544)
e1:SetCondition(c95245544.spcon) e1:SetCondition(c95245544.spcon)
e1:SetCost(c95245544.spcost) e1:SetCost(c95245544.spcost)
e1:SetTarget(c95245544.sptg) e1:SetTarget(c95245544.sptg)
e1:SetOperation(c95245544.spop) e1:SetOperation(c95245544.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_HANDES) e2:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,95245545) e2:SetCountLimit(1,95245545)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c95245544.drtg) e2:SetTarget(c95245544.drtg)
e2:SetOperation(c95245544.drop) e2:SetOperation(c95245544.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c95245544.spcon(e,tp,eg,ep,ev,re,r,rp) function c95245544.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
function c95245544.costfilter(c,tp) function c95245544.costfilter(c,tp)
if c:IsLocation(LOCATION_HAND) then return c:IsType(TYPE_SPELL) and c:IsDiscardable() end if c:IsLocation(LOCATION_HAND) then return c:IsType(TYPE_SPELL) and c:IsDiscardable() end
return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:IsHasEffect(83289866,tp) return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:IsHasEffect(83289866,tp)
end end
function c95245544.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c95245544.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c95245544.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c95245544.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil,tp) end
local g=Duel.GetMatchingGroup(c95245544.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,nil,tp) local g=Duel.GetMatchingGroup(c95245544.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
local te=tc:IsHasEffect(83289866,tp) local te=tc:IsHasEffect(83289866,tp)
if te then if te then
te:UseCountLimit(tp) te:UseCountLimit(tp)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
else else
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end end
end end
function c95245544.spfilter(c,e,tp) function c95245544.spfilter(c,e,tp)
return c:IsSetCard(0x128) and not c:IsCode(95245544) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x128) and not c:IsCode(95245544) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c95245544.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c95245544.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c95245544.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c95245544.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c95245544.spop(e,tp,eg,ep,ev,re,r,rp) function c95245544.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c95245544.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c95245544.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c95245544.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c95245544.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c95245544.tgfilter(c) function c95245544.tgfilter(c)
return c:IsSetCard(0x128) and c:IsAbleToGrave() return c:IsSetCard(0x128) and c:IsAbleToGrave()
end end
function c95245544.drop(e,tp,eg,ep,ev,re,r,rp) function c95245544.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
Duel.ShuffleHand(p) Duel.ShuffleHand(p)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(p,c95245544.tgfilter,p,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(p,c95245544.tgfilter,p,LOCATION_HAND,0,1,1,nil)
local tg=g:GetFirst() local tg=g:GetFirst()
if tg then if tg then
if Duel.SendtoGrave(g,REASON_EFFECT)==0 then if Duel.SendtoGrave(g,REASON_EFFECT)==0 then
Duel.ConfirmCards(1-p,tg) Duel.ConfirmCards(1-p,tg)
Duel.ShuffleHand(p) Duel.ShuffleHand(p)
end end
else else
local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0) local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end end
end end
--クラウソラスの影霊衣 --クラウソラスの影霊衣
function c99185129.initial_effect(c) function c99185129.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
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_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit) e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99185129,0)) e2:SetDescription(aux.Stringid(99185129,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,99185129) e2:SetCountLimit(1,99185129)
e2:SetCost(c99185129.thcost) e2:SetCost(c99185129.thcost)
e2:SetTarget(c99185129.thtg) e2:SetTarget(c99185129.thtg)
e2:SetOperation(c99185129.thop) e2:SetOperation(c99185129.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk --atk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(99185129,1)) e3:SetDescription(aux.Stringid(99185129,1))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,99185130) e3:SetCountLimit(1,99185130)
e3:SetCondition(c99185129.condition) e3:SetCondition(c99185129.condition)
e3:SetTarget(c99185129.target) e3:SetTarget(c99185129.target)
e3:SetOperation(c99185129.operation) e3:SetOperation(c99185129.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c99185129.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c99185129.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c99185129.thfilter(c) function c99185129.thfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function c99185129.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c99185129.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99185129.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c99185129.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c99185129.thop(e,tp,eg,ep,ev,re,r,rp) function c99185129.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c99185129.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c99185129.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c99185129.condition(e,tp,eg,ep,ev,re,r,rp) function c99185129.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c99185129.filter(c) function c99185129.filter(c)
return c:GetSummonLocation()==LOCATION_EXTRA and not (c:IsAttack(0) and c:IsDisabled()) return c:GetSummonLocation()==LOCATION_EXTRA and not (c:IsAttack(0) and c:IsDisabled())
end end
function c99185129.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c99185129.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c99185129.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c99185129.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c99185129.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c99185129.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c99185129.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c99185129.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c99185129.operation(e,tp,eg,ep,ev,re,r,rp) function c99185129.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0) e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE) e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET) e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment