Commit 6bfc64b7 authored by Nemo Ma's avatar Nemo Ma

update

updated 400 cards
parent 301dd15e
No preview for this file type
expansions/pics/9910300.jpg

53.4 KB | W: | H:

expansions/pics/9910300.jpg

52.5 KB | W: | H:

expansions/pics/9910300.jpg
expansions/pics/9910300.jpg
expansions/pics/9910300.jpg
expansions/pics/9910300.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910380.jpg

56.4 KB | W: | H:

expansions/pics/9910380.jpg

55.2 KB | W: | H:

expansions/pics/9910380.jpg
expansions/pics/9910380.jpg
expansions/pics/9910380.jpg
expansions/pics/9910380.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910431.jpg

50.9 KB | W: | H:

expansions/pics/9910431.jpg

45.5 KB | W: | H:

expansions/pics/9910431.jpg
expansions/pics/9910431.jpg
expansions/pics/9910431.jpg
expansions/pics/9910431.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910433.jpg

52.8 KB | W: | H:

expansions/pics/9910433.jpg

55.2 KB | W: | H:

expansions/pics/9910433.jpg
expansions/pics/9910433.jpg
expansions/pics/9910433.jpg
expansions/pics/9910433.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910630.jpg

55.1 KB | W: | H:

expansions/pics/9910630.jpg

55 KB | W: | H:

expansions/pics/9910630.jpg
expansions/pics/9910630.jpg
expansions/pics/9910630.jpg
expansions/pics/9910630.jpg
  • 2-up
  • Swipe
  • Onion skin
--解封灵使 薇茵
function c10700429.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700429,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e1:SetCountLimit(1,10700429)
e1:SetCondition(c10700429.spcon)
e1:SetOperation(c10700429.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700429,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e2:SetCountLimit(1,10700429)
e2:SetCondition(c10700429.spcon2)
e2:SetOperation(c10700429.spop2)
e2:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700429,2))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c10700429.discon)
e3:SetCost(c10700429.discost)
e3:SetTarget(c10700429.distg)
e3:SetOperation(c10700429.disop)
c:RegisterEffect(e3)
--flip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700429,2))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e4:SetTarget(c10700429.distg)
e4:SetOperation(c10700429.disop)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10700429,4))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,10700430)
e5:SetTarget(c10700429.thtg)
e5:SetOperation(c10700429.thop)
c:RegisterEffect(e5)
end
function c10700429.spfilter1(c,tp)
return c:IsCode(37744402) and c:IsAbleToGraveAsCost()
end
function c10700429.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c10700429.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp)
end
function c10700429.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10700429.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c10700429.spfilter2(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToRemoveAsCost()
end
function c10700429.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c10700429.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,nil,tp)
end
function c10700429.spop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10700429.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,2,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10700429.discon(e,tp,eg,ep,ev,re,r,rp)
return rc~=e:GetHandler()
end
function c10700429.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFacedown() end
local pos=Duel.SelectPosition(tp,c,POS_FACEUP_ATTACK)
Duel.ChangePosition(c,pos)
end
function c10700429.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c10700429.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 c10700429.ctfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c10700429.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0)
end
function c10700429.cfilter(c)
return c:IsFaceup() and (c:IsAttribute(ATTRIBUTE_WIND) or c:IsSetCard(0xbf)) and c:IsType(TYPE_MONSTER) and not c:IsCode(10700429)
end
function c10700429.thfilter2(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c10700429.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e)
and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetValue(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c10700429.ctcon)
tc:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c10700429.thfilter2),tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and (Duel.GetMatchingGroupCount(c10700429.cfilter,tp,LOCATION_MZONE,0,1,nil)>=1 or tc:IsAttribute(ATTRIBUTE_WIND) or tc:IsSetCard(0xbf)) and Duel.SelectYesNo(tp,aux.Stringid(10700429,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
end
function c10700429.ctcon(e)
local c=e:GetOwner()
local h=e:GetHandler()
return c:IsHasCardTarget(h)
end
function c10700429.thfilter(c)
return (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsDefense(1500) and c:IsAbleToHand()) or c:IsSetCard(0xbf) or c:IsSetCard(0xc0)
end
function c10700429.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700429.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10700429.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700429.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--解封灵使 达克
function c10700431.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700431,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e1:SetCountLimit(1,10700431)
e1:SetCondition(c10700431.spcon)
e1:SetOperation(c10700431.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700430,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e2:SetCountLimit(1,10700431)
e2:SetCondition(c10700431.spcon2)
e2:SetOperation(c10700431.spop2)
e2:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700431,2))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c10700431.discon)
e3:SetCost(c10700431.discost)
e3:SetTarget(c10700431.distg)
e3:SetOperation(c10700431.disop)
c:RegisterEffect(e3)
--flip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700431,2))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e4:SetTarget(c10700431.distg)
e4:SetOperation(c10700431.disop)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10700431,4))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,10700432)
e5:SetTarget(c10700431.thtg)
e5:SetOperation(c10700431.thop)
c:RegisterEffect(e5)
end
function c10700431.spfilter1(c,tp)
return c:IsCode(19327348) and c:IsAbleToGraveAsCost()
end
function c10700431.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c10700431.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp)
end
function c10700431.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10700431.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c10700431.spfilter2(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function c10700431.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c10700431.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,nil,tp)
end
function c10700431.spop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10700431.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,2,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10700431.discon(e,tp,eg,ep,ev,re,r,rp)
return rc~=e:GetHandler()
end
function c10700431.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFacedown() end
local pos=Duel.SelectPosition(tp,c,POS_FACEUP_ATTACK)
Duel.ChangePosition(c,pos)
end
function c10700431.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c10700431.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 c10700431.ctfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c10700431.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0)
end
function c10700431.cfilter(c)
return c:IsFaceup() and (c:IsAttribute(ATTRIBUTE_DARK) or c:IsSetCard(0xbf)) and c:IsType(TYPE_MONSTER) and not c:IsCode(10700431)
end
function c10700431.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e)
and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetValue(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c10700431.ctcon)
tc:RegisterEffect(e1)
if Duel.IsPlayerCanDraw(tp,1) and (Duel.GetMatchingGroupCount(c10700431.cfilter,tp,LOCATION_MZONE,0,1,nil)>=1 or tc:IsAttribute(ATTRIBUTE_DARK) or tc:IsSetCard(0xbf)) and Duel.SelectYesNo(tp,aux.Stringid(10700431,3)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c10700431.ctcon(e)
local c=e:GetOwner()
local h=e:GetHandler()
return c:IsHasCardTarget(h)
end
function c10700431.thfilter(c)
return (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsDefense(1500) and c:IsAbleToHand()) or c:IsSetCard(0xbf) or c:IsSetCard(0xc0)
end
function c10700431.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700431.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10700431.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700431.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--解封灵使 希塔
function c10700433.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700433,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e1:SetCountLimit(1,10700433)
e1:SetCondition(c10700433.spcon)
e1:SetOperation(c10700433.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700433,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e2:SetCountLimit(1,10700433)
e2:SetCondition(c10700433.spcon2)
e2:SetOperation(c10700433.spop2)
e2:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700433,2))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c10700433.discon)
e3:SetCost(c10700433.discost)
e3:SetTarget(c10700433.distg)
e3:SetOperation(c10700433.disop)
c:RegisterEffect(e3)
--flip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700433,2))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e4:SetTarget(c10700433.distg)
e4:SetOperation(c10700433.disop)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10700433,4))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,10700434)
e5:SetTarget(c10700433.thtg)
e5:SetOperation(c10700433.thop)
c:RegisterEffect(e5)
end
function c10700433.spfilter1(c,tp)
return c:IsCode(759393) and c:IsAbleToGraveAsCost()
end
function c10700433.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c10700433.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp)
end
function c10700433.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10700433.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c10700433.spfilter2(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost()
end
function c10700433.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c10700433.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,nil,tp)
end
function c10700433.spop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10700433.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,2,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10700433.discon(e,tp,eg,ep,ev,re,r,rp)
return rc~=e:GetHandler()
end
function c10700433.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFacedown() end
local pos=Duel.SelectPosition(tp,c,POS_FACEUP_ATTACK)
Duel.ChangePosition(c,pos)
end
function c10700433.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c10700433.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 c10700433.ctfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c10700433.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0)
end
function c10700433.cfilter(c)
return c:IsFaceup() and (c:IsAttribute(ATTRIBUTE_FIRE) or c:IsSetCard(0xbf)) and c:IsType(TYPE_MONSTER) and not c:IsCode(10700433)
end
function c10700433.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e)
and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetValue(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c10700433.ctcon)
tc:RegisterEffect(e1)
if (Duel.GetMatchingGroupCount(c10700433.cfilter,tp,LOCATION_MZONE,0,1,nil)>=1 or tc:IsAttribute(ATTRIBUTE_FIRE) or tc:IsSetCard(0xbf)) and Duel.SelectYesNo(tp,aux.Stringid(10700433,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function c10700433.ctcon(e)
local c=e:GetOwner()
local h=e:GetHandler()
return c:IsHasCardTarget(h)
end
function c10700433.thfilter(c)
return (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDefense(1500) and c:IsAbleToHand()) or c:IsSetCard(0xbf) or c:IsSetCard(0xc0)
end
function c10700433.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700433.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10700433.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700433.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--解封灵使 艾莉娅
function c10700435.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700435,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e1:SetCountLimit(1,10700435)
e1:SetCondition(c10700435.spcon)
e1:SetOperation(c10700435.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700435,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e2:SetCountLimit(1,10700435)
e2:SetCondition(c10700435.spcon2)
e2:SetOperation(c10700435.spop2)
e2:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700435,2))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c10700435.discon)
e3:SetCost(c10700435.discost)
e3:SetTarget(c10700435.distg)
e3:SetOperation(c10700435.disop)
c:RegisterEffect(e3)
--flip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700435,2))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e4:SetTarget(c10700435.distg)
e4:SetOperation(c10700435.disop)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10700435,4))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,10700436)
e5:SetTarget(c10700435.thtg)
e5:SetOperation(c10700435.thop)
c:RegisterEffect(e5)
end
function c10700435.spfilter1(c,tp)
return c:IsCode(74364659) and c:IsAbleToGraveAsCost()
end
function c10700435.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c10700435.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp)
end
function c10700435.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10700435.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c10700435.spfilter2(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost()
end
function c10700435.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c10700435.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,nil,tp)
end
function c10700435.spop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10700435.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,2,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10700435.discon(e,tp,eg,ep,ev,re,r,rp)
return rc~=e:GetHandler()
end
function c10700435.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFacedown() end
local pos=Duel.SelectPosition(tp,c,POS_FACEUP_ATTACK)
Duel.ChangePosition(c,pos)
end
function c10700435.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c10700435.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 c10700435.ctfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c10700435.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0)
end
function c10700435.cfilter(c)
return c:IsFaceup() and (c:IsAttribute(ATTRIBUTE_WATER) or c:IsSetCard(0xbf)) and c:IsType(TYPE_MONSTER) and not c:IsCode(10700435)
end
function c10700435.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c10700435.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e)
and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetValue(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c10700435.ctcon)
tc:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(c10700435.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil)
if g:GetCount()>0 and (Duel.GetMatchingGroupCount(c10700435.cfilter,tp,LOCATION_MZONE,0,1,nil)>=1 or tc:IsAttribute(ATTRIBUTE_WATER) or tc:IsSetCard(0xbf)) and Duel.SelectYesNo(tp,aux.Stringid(10700435,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
function c10700435.ctcon(e)
local c=e:GetOwner()
local h=e:GetHandler()
return c:IsHasCardTarget(h)
end
function c10700435.thfilter(c)
return (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsDefense(1500) and c:IsAbleToHand()) or c:IsSetCard(0xbf) or c:IsSetCard(0xc0)
end
function c10700435.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700435.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10700435.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700435.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--解封灵使 奥丝
function c10700437.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700437,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e1:SetCountLimit(1,10700437)
e1:SetCondition(c10700437.spcon)
e1:SetOperation(c10700437.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700437,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e2:SetCountLimit(1,10700437)
e2:SetCondition(c10700437.spcon2)
e2:SetOperation(c10700437.spop2)
e2:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700437,2))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c10700437.discon)
e3:SetCost(c10700437.discost)
e3:SetTarget(c10700437.distg)
e3:SetOperation(c10700437.disop)
c:RegisterEffect(e3)
--flip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700437,2))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e4:SetTarget(c10700437.distg)
e4:SetOperation(c10700437.disop)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10700437,4))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,10700438)
e5:SetTarget(c10700437.thtg)
e5:SetOperation(c10700437.thop)
c:RegisterEffect(e5)
end
function c10700437.spfilter1(c,tp)
return c:IsCode(37970940) and c:IsAbleToGraveAsCost()
end
function c10700437.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c10700437.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp)
end
function c10700437.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10700437.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c10700437.spfilter2(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToRemoveAsCost()
end
function c10700437.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c10700437.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,nil,tp)
end
function c10700437.spop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10700437.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,2,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10700437.discon(e,tp,eg,ep,ev,re,r,rp)
return rc~=e:GetHandler()
end
function c10700437.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFacedown() end
local pos=Duel.SelectPosition(tp,c,POS_FACEUP_ATTACK)
Duel.ChangePosition(c,pos)
end
function c10700437.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c10700437.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 c10700437.ctfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c10700437.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0)
end
function c10700437.cfilter(c)
return c:IsFaceup() and (c:IsAttribute(ATTRIBUTE_EARTH) or c:IsSetCard(0xbf)) and c:IsType(TYPE_MONSTER) and not c:IsCode(10700437)
end
function c10700437.spfilter3(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10700437.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e)
and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetValue(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c10700437.ctcon)
tc:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c10700437.spfilter3),tp,LOCATION_GRAVE,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 and (Duel.GetMatchingGroupCount(c10700437.cfilter,tp,LOCATION_MZONE,0,1,nil)>=1 or tc:IsAttribute(ATTRIBUTE_EARTH) or tc:IsSetCard(0xbf)) and Duel.SelectYesNo(tp,aux.Stringid(10700437,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c10700437.ctcon(e)
local c=e:GetOwner()
local h=e:GetHandler()
return c:IsHasCardTarget(h)
end
function c10700437.thfilter(c)
return (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsDefense(1500) and c:IsAbleToHand()) or c:IsSetCard(0xbf) or c:IsSetCard(0xc0)
end
function c10700437.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700437.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10700437.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700437.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--解封灵使 艾莉娅
function c10700439.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10700439,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e1:SetCountLimit(1,10700439)
e1:SetCondition(c10700439.spcon)
e1:SetOperation(c10700439.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10700439,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetTargetRange(POS_FACEDOWN_DEFENSE,0)
e2:SetCountLimit(1,10700439)
e2:SetCondition(c10700439.spcon2)
e2:SetOperation(c10700439.spop2)
e2:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10700439,2))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c10700439.discon)
e3:SetCost(c10700439.discost)
e3:SetTarget(c10700439.distg)
e3:SetOperation(c10700439.disop)
c:RegisterEffect(e3)
--flip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10700435,2))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e4:SetTarget(c10700439.distg)
e4:SetOperation(c10700439.disop)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10700435,4))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,10700436)
e5:SetTarget(c10700439.thtg)
e5:SetOperation(c10700439.thop)
c:RegisterEffect(e5)
end
function c10700439.spfilter1(c,tp)
return c:IsCode(73318863) and c:IsAbleToGraveAsCost()
end
function c10700439.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c10700439.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp)
end
function c10700439.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10700439.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c10700439.spfilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost()
end
function c10700439.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c10700439.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,nil,tp)
end
function c10700439.spop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10700439.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE,0,2,2,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c10700439.discon(e,tp,eg,ep,ev,re,r,rp)
return rc~=e:GetHandler()
end
function c10700439.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFacedown() end
local pos=Duel.SelectPosition(tp,c,POS_FACEUP_ATTACK)
Duel.ChangePosition(c,pos)
end
function c10700439.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c10700439.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 c10700439.ctfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c10700439.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0)
end
function c10700439.cfilter(c)
return c:IsFaceup() and (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsSetCard(0xbf)) and c:IsType(TYPE_MONSTER) and not c:IsCode(10700439)
end
function c10700439.tgfilter(c)
return c:IsAbleToRemove()
end
function c10700439.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e)
and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetValue(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c10700439.ctcon)
tc:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(c10700439.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and (Duel.GetMatchingGroupCount(c10700439.cfilter,tp,LOCATION_MZONE,0,1,nil)>=1 or tc:IsAttribute(ATTRIBUTE_LIGHT) or tc:IsSetCard(0xbf)) and Duel.SelectYesNo(tp,aux.Stringid(10700439,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
end
function c10700439.ctcon(e)
local c=e:GetOwner()
local h=e:GetHandler()
return c:IsHasCardTarget(h)
end
function c10700439.thfilter(c)
return (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDefense(1500) and c:IsAbleToHand()) or c:IsSetCard(0xbf) or c:IsSetCard(0xc0)
end
function c10700439.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10700439.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10700439.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10700439.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--异样的风暴中心
local m=11451000
local cm=_G["c"..m]
function cm.initial_effect(c)
if STRANGE_EYE_OF_STORM==nil then
STRANGE_EYE_OF_STORM=true
local _Destroy=Duel.Destroy
local _Damage=Duel.Damage
function Duel.Destroy(tg,r,_)
if bit.band(r,REASON_EFFECT)~=0 then
local num=Duel.SendtoGrave(tg,r)
return num
end
local num=_Destroy(tg,r,_)
return num
end
function Duel.Damage(tp,val,r,_)
if bit.band(r,REASON_EFFECT)~=0 then
Duel.SetLP(tp,Duel.GetLP(tp)-val)
return val
end
local dam=_Damage(tp,val,r,_)
return dam
end
end
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PREDRAW)
e0:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e0:SetRange(LOCATION_HAND+LOCATION_DECK)
e0:SetOperation(cm.op)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmCards(1-tp,c)
if c:IsLocation(LOCATION_DECK) then Duel.ConfirmCards(tp,c) end
end
\ No newline at end of file
--人理之灵 藤丸立香
function c22020000.initial_effect(c)
--summon success
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SUMMON_SUCCESS)
e0:SetOperation(c22020000.sumsuc)
c:RegisterEffect(e0)
local e4=e0:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e0:Clone()
e5:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--synchro custom
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetTarget(c22020000.syntg)
e1:SetValue(1)
e1:SetOperation(c22020000.synop)
c:RegisterEffect(e1)
--hand synchro
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_HAND_SYNCHRO)
e2:SetTargetRange(0,1)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22020000,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c22020000.cost)
e3:SetTarget(c22020000.target)
e3:SetOperation(c22020000.operation)
c:RegisterEffect(e3)
end
function c22020000.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
Debug.Message("冠位指定,开启")
Duel.RegisterEffect(e1,tp)
end
function c22020000.synfilter(c,syncard,tuner,f)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c,syncard))
end
function c22020000.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
g:AddCard(c)
local ct=g:GetCount()
local res=c22020000.syngoal(g,tp,lv,syncard,minc,ct)
or (ct<maxc and mg:IsExists(c22020000.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc))
g:RemoveCard(c)
return res
end
function c22020000.syngoal(g,tp,lv,syncard,minc,ct)
return ct>=minc
and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
and g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)<=1
end
function c22020000.syntg(e,syncard,f,min,max)
local minc=min+1
local maxc=max+1
local c=e:GetHandler()
local tp=syncard:GetControler()
local lv=syncard:GetLevel()
if lv<=c:GetLevel() then return false end
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c22020000.synfilter,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f)
return mg:IsExists(c22020000.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
end
function c22020000.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local minc=min+1
local maxc=max+1
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c22020000.synfilter,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f)
for i=1,maxc do
local cg=mg:Filter(c22020000.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
if cg:GetCount()==0 then break end
local minct=1
if c22020000.syngoal(g,tp,lv,syncard,minc,i) then
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local sg=cg:Select(tp,minct,1,nil)
if sg:GetCount()==0 then break end
g:Merge(sg)
end
Duel.SetSynchroMaterial(g)
end
function c22020000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22020000.filter(c)
return c:IsSetCard(0x2ff1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c22020000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020000.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020000.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020000.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--人理之基 阿尔托莉雅
function c22020020.initial_effect(c)
--summon success
local e100=Effect.CreateEffect(c)
e100:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e100:SetCode(EVENT_SUMMON_SUCCESS)
e100:SetOperation(c22020020.sumsuc)
e100:SetCountLimit(1,22020020+EFFECT_COUNT_CODE_DUEL)
c:RegisterEffect(e100)
local e101=e100:Clone()
e101:SetCode(EVENT_SPSUMMON_SUCCESS)
e101:SetCountLimit(1,22020020+EFFECT_COUNT_CODE_DUEL)
c:RegisterEffect(e101)
local e102=e100:Clone()
e102:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e102:SetCountLimit(1,22020020+EFFECT_COUNT_CODE_DUEL)
c:RegisterEffect(e102)
--attack cost
local e103=Effect.CreateEffect(c)
e103:SetType(EFFECT_TYPE_SINGLE)
e103:SetCode(EFFECT_ATTACK_COST)
e103:SetOperation(c22020020.atop)
c:RegisterEffect(e103)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020020,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c22020020.target)
e1:SetOperation(c22020020.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020020,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,22020021)
e2:SetCondition(c22020020.spcon)
e2:SetTarget(c22020020.sptg)
e2:SetOperation(c22020020.spop)
c:RegisterEffect(e2)
end
function c22020020.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
Debug.Message("开始吧,Master!")
Duel.RegisterEffect(e1,tp)
end
function c22020020.atop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
Debug.Message("风啊,飞舞吧!")
Duel.RegisterEffect(e1,tp)
end
function c22020020.filter(c)
return c:IsCode(22020090) and c:IsAbleToHand()
end
function c22020020.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020020.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020020.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020020.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Debug.Message("梅林,快过来")
end
end
function c22020020.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsControler(tp) and tc:IsSetCard(0xff1) and tc:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c22020020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22020020.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
--人理之基 玛修·基列莱特
function c22020030.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--summon success
local e100=Effect.CreateEffect(c)
e100:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e100:SetCode(EVENT_SPSUMMON_SUCCESS)
e100:SetOperation(c22020030.sumsuc)
e100:SetCountLimit(1,22020030+EFFECT_COUNT_CODE_DUEL)
c:RegisterEffect(e100)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c22020030.cona)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xff1))
e1:SetValue(1)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c22020030.cond)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xff1))
e2:SetValue(1)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetDescription(aux.Stringid(22020030,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c22020030.condition)
e3:SetOperation(c22020030.operation)
c:RegisterEffect(e3)
end
function c22020020.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
Debug.Message("开始战斗。Matster,请下指示")
Duel.RegisterEffect(e1,tp)
end
function c22020030.cona(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttackPos()
end
function c22020030.cond(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsDefensePos()
end
function c22020030.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c22020030.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
end
end
\ No newline at end of file
--人理之基 阿尔托莉雅·Alter
function c22020040.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--summon success
local e100=Effect.CreateEffect(c)
e100:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e100:SetCode(EVENT_SPSUMMON_SUCCESS)
e100:SetOperation(c22020040.sumsuc)
e100:SetCountLimit(1,22020040+EFFECT_COUNT_CODE_DUEL)
c:RegisterEffect(e100)
--attack cost
local e103=Effect.CreateEffect(c)
e103:SetType(EFFECT_TYPE_SINGLE)
e103:SetCode(EFFECT_ATTACK_COST)
e103:SetOperation(c22020040.atop)
c:RegisterEffect(e103)
--attack up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(22020040,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c22020040.cost)
e1:SetOperation(c22020040.operation)
c:RegisterEffect(e1)
--half damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetCondition(c22020040.rdcon)
e2:SetOperation(c22020040.rdop)
c:RegisterEffect(e2)
end
function c22020040.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
Debug.Message("击垮他们!")
Duel.RegisterEffect(e1,tp)
end
function c22020040.atop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
Debug.Message("卑王铁槌!")
Duel.RegisterEffect(e1,tp)
end
function c22020040.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Debug.Message("消失吧")
end
function c22020040.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1800)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
end
end
function c22020040.rdcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and not e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xff9)
end
function c22020040.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,0)
end
\ No newline at end of file
--人理之诗 誓约胜利之剑
function c22020050.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22020050.target)
e1:SetOperation(c22020050.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c22020050.eqlimit)
c:RegisterEffect(e2)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c22020050.atkval)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,22020050)
e4:SetTarget(c22020050.destg)
e4:SetOperation(c22020050.desop)
c:RegisterEffect(e4)
end
c22020050.effect_with_altria=true
function c22020050.eqlimit(e,c)
return c:IsFaceup() and (c:IsSetCard(0xff9) or c.effect_canequip_hogu)
end
function c22020050.filter(c)
return c:IsFaceup() and (c:IsSetCard(0xff9) or c.effect_canequip_hogu)
end
function c22020050.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22020050.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020050.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c22020050.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c22020050.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
Debug.Message("聚以天上繁星之吐息,辉煌生命之奔流")
end
end
function c22020050.atkval(e,c)
if c:IsType(TYPE_XYZ) then return c:GetRank()*300
else
return c:GetLevel()*300
end
end
function c22020050.filter1(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk)
end
function c22020050.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local atk=c:GetEquipTarget():GetAttack()
if chk==0 then return Duel.IsExistingMatchingCard(c22020050.filter1,tp,0,LOCATION_MZONE,1,c,atk) end
local g=Duel.GetMatchingGroup(c22020050.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,c,atk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c22020050.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=c:GetEquipTarget():GetAttack()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c22020050.filter1,tp,0,LOCATION_MZONE,aux.ExceptThisCard(e),atk)
local ct=Duel.Destroy(g,REASON_EFFECT)
Debug.Message("接招吧,Ex——calibur!")
if ct>0 then
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
\ No newline at end of file
--人理之诗 遥远的理想乡
function c22020060.initial_effect(c)
c:EnableCounterPermit(0xfee)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c22020060.condition)
e1:SetTarget(c22020060.target)
e1:SetOperation(c22020060.activate)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(c22020060.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c22020060.desreptg)
e3:SetValue(c22020060.desrepval)
e3:SetOperation(c22020060.desrepop)
c:RegisterEffect(e3)
end
c22020060.effect_with_avalon=true
c22020060.effect_with_altria=true
function c22020060.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff9)
end
function c22020060.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22020060.ctfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c22020060.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetMatchingGroupCount(c22020060.ctfilter,tp,LOCATION_MZONE,0,c)
local c=e:GetHandler()
if chk==0 and ct>0 then return Duel.IsCanAddCounter(tp,0xfee,ct,c) end
end
function c22020060.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(c22020060.ctfilter,tp,LOCATION_MZONE,0,c)
if c:IsRelateToEffect(e) and ct>0 then
c:AddCounter(0xfee,ct)
end
end
function c22020060.tgtg(e,c)
return c:IsSetCard(0xff1) and c~=e:GetHandler()
end
function c22020060.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c22020060.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c22020060.repfilter,1,nil,tp)
and e:GetHandler():IsCanRemoveCounter(tp,0xfee,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c22020060.desrepval(e,c)
return c22020060.repfilter(c,e:GetHandlerPlayer())
end
function c22020060.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0xfee,1,REASON_EFFECT)
end
\ No newline at end of file
--拟似展开·人理之基础
function c22020070.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c22020070.condition)
e1:SetTarget(c22020070.target)
e1:SetOperation(c22020070.activate)
c:RegisterEffect(e1)
--avoid battle damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(c22020070.abdcon)
c:RegisterEffect(e2)
end
function c22020070.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c22020070.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
end
function c22020070.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToEffect(e) and Duel.NegateAttack() then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
Debug.Message("真名、伪装登录——启动")
end
end
function c22020070.cfilter(c)
return c:IsFaceup() and c:IsCode(22020030)
end
function c22020070.abdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22020070.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
local at=Duel.GetAttackTarget()
return (at==nil or at:IsAttackPos() or Duel.GetAttacker():GetAttack()>at:GetDefense())
end
--人理之基 阿尔托莉雅·Lily
function c22020080.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c22020080.regcon)
e0:SetOperation(c22020080.regop)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020080,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c22020080.thcon)
e1:SetTarget(c22020080.thtg)
e1:SetOperation(c22020080.thop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22020080,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c22020080.spcon)
e3:SetTarget(c22020080.sptg)
e3:SetOperation(c22020080.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e5)
end
function c22020080.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
end
function c22020080.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c22020080.splimit)
Duel.RegisterEffect(e1,tp)
end
function c22020080.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(22020080) and bit.band(sumtype,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
end
function c22020080.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c22020080.thfilter(c)
return (c:IsSetCard(0x1ff1) or c:IsSetCard(0x5098)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c22020080.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020080.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c22020080.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020080.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c22020080.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c22020080.spfilter(c,e,tp)
return c:IsSetCard(0x2ff1) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22020080.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22020080.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c22020080.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22020080.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--大魔术师 梅林
function c22020090.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c22020090.spcon)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020090,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22020090)
e2:SetTarget(c22020090.target)
e2:SetOperation(c22020090.operation)
c:RegisterEffect(e2)
end
function c22020090.filter(c)
return c:IsFaceup() and c:IsSetCard(0xff1)
end
function c22020090.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c22020090.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c22020090.filter1(c,e,tp,lv)
local clv=c:GetLevel()
return clv>0 and not c:IsType(TYPE_TUNER) and c:IsSetCard(0xff1) and c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(c22020090.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+clv)
end
function c22020090.filter2(c,e,tp,lv)
return c:IsLevel(lv) and c:IsSetCard(0xff9) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22020090.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c22020090.filter1(chkc,e,tp,e:GetHandler():GetLevel()) end
if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingTarget(c22020090.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c22020090.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetHandler():GetLevel())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22020090.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
local lv=c:GetLevel()+tc:GetLevel()
local g=Group.FromCards(c,tc)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c22020090.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
sg:GetFirst():CompleteProcedure()
end
end
end
\ No newline at end of file
--光辉之路
function c22020100.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22020100,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,22020100)
e3:SetCost(c22020100.cost)
e3:SetTarget(c22020100.target)
e3:SetOperation(c22020100.activate)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22020100,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCost(c22020100.cost)
e4:SetCountLimit(1,22020100)
e4:SetCondition(c22020100.actcon)
e4:SetTarget(c22020100.target1)
e4:SetOperation(c22020100.activate1)
c:RegisterEffect(e4)
end
c22020100.effect_with_altria=true
function c22020100.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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22020100.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xff1) and Duel.IsExistingMatchingCard(c22020100.filter2,tp,LOCATION_DECK,0,1,nil,c:GetCode(),e,tp)
end
function c22020100.filter2(c,code,e,tp)
return aux.IsCodeListed(c,code) and c:IsAbleToHand() and c:IsSetCard(0x3ff1)
end
function c22020100.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c22020100.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c22020100.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(22020100,1))
Duel.SelectTarget(tp,c22020100.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020100.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c22020100.filter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode(),e,tp)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function c22020100.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff9)
end
function c22020100.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22020100.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c22020100.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c.effect_with_altria
end
function c22020100.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020100.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020100.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020100.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--人理之诗 转身火生三昧
function c22020110.initial_effect(c)
aux.AddCodeList(c,22020010,22020120)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020110,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCountLimit(1,22020110+EFFECT_COUNT_CODE_OATH)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c22020110.cost)
e2:SetTarget(c22020110.thtg)
e2:SetOperation(c22020110.thop)
c:RegisterEffect(e2)
end
function c22020110.cfilter(c)
return c:IsFaceup() and c:IsCode(22020010)
end
function c22020110.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c22020110.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c22020110.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
Debug.Message("请各位明鉴!")
end
function c22020110.spfilter(c,e,tp)
return c:IsCode(22020120) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c22020110.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c22020110.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c22020110.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end
function c22020110.thop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(c22020110.filter,tp,0,LOCATION_MZONE,nil)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Debug.Message("现在,就此戳穿无法逃避的谎言——")
local g=Duel.SelectMatchingCard(tp,c22020110.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)>0 then
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
g:GetFirst():CompleteProcedure()
Duel.BreakEffect()
Duel.ChangePosition(tg,POS_FACEUP_DEFENSE)
Debug.Message("转身火生三昧!")
end
end
end
--人理之基 清姬·转身
function c22020120.initial_effect(c)
c:EnableReviveLimit()
--attack cost
local e103=Effect.CreateEffect(c)
e103:SetType(EFFECT_TYPE_SINGLE)
e103:SetCode(EFFECT_ATTACK_COST)
e103:SetOperation(c22020120.atop)
c:RegisterEffect(e103)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c22020120.splimit)
c:RegisterEffect(e1)
--attack all
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_ALL)
e2:SetValue(1)
c:RegisterEffect(e2)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE)
e3:SetValue(DOUBLE_DAMAGE)
c:RegisterEffect(e3)
end
function c22020120.atop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
Debug.Message("不会让你逃走的...")
Duel.RegisterEffect(e1,tp)
end
function c22020120.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsCode(22020110)
end
\ No newline at end of file
--人理之基 尼禄·克劳狄乌斯
function c22020130.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,22020130)
e1:SetTarget(c22020130.sptg)
e1:SetOperation(c22020130.spop)
c:RegisterEffect(e1)
--attack all
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_ALL)
e2:SetCondition(c22020130.atkcon)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c22020130.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c22020130.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
end
end
function c22020130.atkfilter(c)
return c:IsType(TYPE_FIELD)
end
function c22020130.atkcon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c22020130.atkfilter,c:GetControler(),LOCATION_FZONE,0,1,nil)
end
\ No newline at end of file
--人理之诗 邀至心荡神驰的黄金剧场
function c22020140.initial_effect(c)
aux.AddCodeList(c,22020130)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22020140+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22020140.target)
e1:SetOperation(c22020140.activate)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCode(EFFECT_DISABLE)
e2:SetCondition(c22020140.con)
c:RegisterEffect(e2)
end
function c22020140.filter(c)
return c:IsCode(22020130) and c:IsAbleToHand()
end
function c22020140.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020140.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020140.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020140.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c22020140.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff1)
end
function c22020140.con(e)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
return Duel.IsExistingMatchingCard(c22020140.atkfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE )
end
\ No newline at end of file
--人理之诗 原初之火
function c22020150.initial_effect(c)
aux.AddCodeList(c,22020130)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22020150.target)
e1:SetOperation(c22020150.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c22020150.eqlimit)
c:RegisterEffect(e2)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(700)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c22020150.atkcon)
e4:SetOperation(c22020150.atkop)
c:RegisterEffect(e4)
end
function c22020150.eqlimit(e,c)
return c:IsFaceup() and (c:IsCode(22020130) or c.effect_canequip_hogu)
end
function c22020150.filter(c)
return c:IsFaceup() and (c:IsCode(22020130) or c.effect_canequip_hogu)
end
function c22020150.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22020150.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020150.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c22020150.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c22020150.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c22020150.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if ec~=Duel.GetAttacker() and ec~=Duel.GetAttackTarget() then return false end
local tc=ec:GetBattleTarget()
return tc and tc:IsFaceup() and tc:IsDisabled()
end
function c22020150.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ec=c:GetEquipTarget()
local tc=ec:GetBattleTarget()
if ec and tc and ec:IsFaceup() and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--人理之基 尼禄·花嫁
function c22020160.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--change name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(22020130)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020160,0))
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE+CATEGORY_SEARCH)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetCountLimit(1,22020160)
e2:SetCondition(c22020160.condition)
e2:SetTarget(c22020160.rectg)
e2:SetOperation(c22020160.recop)
c:RegisterEffect(e2)
end
function c22020160.cfilter(c)
return c:IsFaceup() and c:IsDisabled()
end
function c22020160.condition(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c22020160.cfilter,tp,0,LOCATION_MZONE,nil)
return ct>0 and aux.dscon()
end
function c22020160.filter(c)
return c:IsFaceup() and c:IsSetCard(0xff1) and c:GetBaseAttack()>0
end
function c22020160.filter1(c)
return c:IsSetCard(0xff1) and c:IsAbleToHand()
end
function c22020160.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22020160.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020160.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local ct=Duel.GetMatchingGroupCount(c22020160.cfilter,tp,0,LOCATION_MZONE,nil)
local g=Duel.SelectTarget(tp,c22020160.filter,tp,LOCATION_MZONE,0,1,1,nil)
if ct<=1 then return Duel.IsExistingMatchingCard(c22020160.filter,tp,LOCATION_MZONE,0,1,nil) end
return true
end
function c22020160.recop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c22020160.filter1,tp,LOCATION_DECK,0,nil)
local g=Duel.GetMatchingGroup(c22020160.cfilter,tp,0,LOCATION_MZONE,nil)
local ct=g:GetCount()
if ct>=1 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetBaseAttack()>0 then
Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT) end
end
if ct>=2 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
if ct>=3 and Duel.SelectYesNo(tp,aux.Stringid(22020160,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g1:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
\ No newline at end of file
--人理之诗 纵使三度迎接夕阳
function c22020170.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020170,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(3,22020170+EFFECT_COUNT_CODE_DUEL)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c22020170.cost)
e1:SetTarget(c22020170.sptg)
e1:SetOperation(c22020170.spop)
c:RegisterEffect(e1)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22020170,1))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c22020170.drcon)
e4:SetTarget(c22020170.drtg)
e4:SetOperation(c22020170.drop)
c:RegisterEffect(e4)
end
function c22020170.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,22020170)==0 end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.RegisterFlagEffect(tp,22020170,RESET_PHASE+PHASE_END,0,1)
end
function c22020170.spfilter(c,e,tp)
return c:IsCode(22020130) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22020170.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22020170.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c22020170.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c22020170.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c22020170.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c22020170.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_SZONE)
end
function c22020170.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c22020170.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.SetLP(tp,8000)
end
end
\ No newline at end of file
--月桂树的戒指
function c22020180.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,22020180+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c22020180.condition)
e1:SetTarget(c22020180.target)
e1:SetOperation(c22020180.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020180,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c22020180.target2)
e2:SetOperation(c22020180.activate2)
c:RegisterEffect(e2)
end
function c22020180.tfilter(c,tp)
return c:IsOnField() and c:IsControler(tp)
end
function c22020180.condition(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c22020180.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
end
function c22020180.sfilter(c,e,tp)
return c:IsCode(22020160) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22020180.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c22020180.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if not tc:IsDisabled() then
if Duel.NegateEffect(ev) and tc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
local sc=Duel.GetFirstMatchingCard(c22020180.sfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if sc and Duel.SelectYesNo(tp,aux.Stringid(22020180,0)) then
Duel.BreakEffect()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c22020180.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c22020180.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c22020180.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020180.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c22020180.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c22020180.activate2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and tc:IsControler(1-tp) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--人理之基 尼禄·泳装
function c22020190.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--change name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(22020130)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15240238,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1)
e2:SetCondition(c22020190.con)
e2:SetTarget(c22020190.target)
e2:SetOperation(c22020190.operation)
c:RegisterEffect(e2)
end
function c22020190.con(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function c22020190.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c22020190.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c22020190.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020190.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c22020190.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c22020190.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and tc:IsControler(1-tp) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
--人理之诗 歌颂的黄金剧场
function c22020200.initial_effect(c)
aux.AddCodeList(c,22020130)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22020200+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22020200.target)
e1:SetOperation(c22020200.activate)
c:RegisterEffect(e1)
--cannot activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(c22020200.con)
e3:SetValue(c22020200.aclimit)
c:RegisterEffect(e3)
end
function c22020200.filter(c)
return c:IsCode(22020130) and c:IsAbleToHand()
end
function c22020200.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020200.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020200.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020200.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c22020200.acfilter(c,code)
return c:IsFaceup() and c:IsDisabled() and c:IsCode(code)
end
function c22020200.aclimit(e,re,tp)
return Duel.IsExistingMatchingCard(c22020200.acfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,re:GetHandler():GetCode())
end
function c22020200.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff1)
end
function c22020200.con(e)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
return Duel.IsExistingMatchingCard(c22020200.atkfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
--人理之灵 卫宫士郎
function c22020210.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22020210)
e1:SetCondition(c22020210.hspcon)
e1:SetOperation(c22020210.hspop)
e1:SetValue(1)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020210,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,22020211)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c22020210.lvcost)
e2:SetOperation(c22020210.lvop)
c:RegisterEffect(e2)
end
c22020210.effect_canequip_hogu=true
function c22020210.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.CheckLPCost(tp,1000)
end
function c22020210.hspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.PayLPCost(tp,1000)
end
function c22020210.costfilter(c,lv)
return c:IsLevelAbove(1) and c:IsSetCard(0x2ff1) and c:IsAbleToGraveAsCost()
end
function c22020210.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=e:GetHandler():GetLevel()
if chk==0 then return Duel.IsExistingMatchingCard(c22020210.costfilter,tp,LOCATION_DECK,0,1,nil,lv) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22020210.costfilter,tp,LOCATION_DECK,0,1,1,nil,lv)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(g:GetFirst():GetLevel())
end
function c22020210.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(22020220)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
\ No newline at end of file
--人理之基 英灵卫宫
function c22020220.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020220,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22020220)
e1:SetCost(c22020220.cost)
e1:SetTarget(c22020220.thtg)
e1:SetOperation(c22020220.thop)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020220,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,22020221)
e2:SetTarget(c22020220.target)
e2:SetOperation(c22020220.operation)
c:RegisterEffect(e2)
end
function c22020220.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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
Debug.Message("I am the bone of my sword...")
end
function c22020220.thfilter(c)
return c:IsCode(22020230) and c:IsAbleToHand()
end
function c22020220.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020220.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020220.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020220.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Debug.Message("I have no regrets.This is the only path...")
Duel.ConfirmCards(1-tp,g)
end
end
function c22020220.filter(c)
return c:IsSetCard(0xff1) and c:IsFaceup() and c:IsAbleToHand()
end
function c22020220.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22020220.filter(chkc) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c22020220.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c22020220.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c22020220.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--人理之诗 无限剑制
function c22020230.initial_effect(c)
aux.AddCodeList(c,22020220)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c22020230.cost0)
c:RegisterEffect(e1)
--atk & def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsCode,22020220))
e2:SetValue(1500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--tohand ex
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22020230,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,22020230)
e4:SetCondition(c22020230.spcon2)
e4:SetCost(c22020230.cost)
e4:SetTarget(c22020230.target)
e4:SetOperation(c22020230.operation)
c:RegisterEffect(e4)
--todeck
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22020230,2))
e5:SetCategory(CATEGORY_TODECK+CATEGORY_DAMAGE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1,22020230)
e5:SetCondition(c22020230.con1)
e5:SetTarget(c22020230.rettg)
e5:SetOperation(c22020230.retop)
c:RegisterEffect(e5)
--tohand ubw
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22020230,0))
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_FZONE)
e6:SetCountLimit(1,22020230)
e6:SetCondition(c22020230.spcon1)
e6:SetCost(c22020230.cost)
e6:SetTarget(c22020230.target0)
e6:SetOperation(c22020230.operation0)
c:RegisterEffect(e6)
--todeck
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(22020230,3))
e7:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY+CATEGORY_DAMAGE)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1,22020230)
e7:SetCondition(c22020230.con2)
e7:SetTarget(c22020230.tdtg)
e7:SetOperation(c22020230.tdop)
c:RegisterEffect(e7)
end
function c22020230.cost0(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Debug.Message("My whole life was unlimited blade works!")
end
function c22020230.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,22020390)
end
function c22020230.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020390)
end
function c22020230.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,22020380)
end
function c22020230.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020380)
end
function c22020230.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
Debug.Message("TRACE.ON!")
end
function c22020230.filter(c)
return c:IsSetCard(0x3ff1) and not c:IsCode(22020230) and c:IsAbleToHand()
end
function c22020230.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020230.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020230.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020230.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c22020230.filter1(c)
return c:IsSetCard(0x3ff1) and c:IsAbleToDeck()
end
function c22020230.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22020230.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020230.filter1,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c22020230.filter1,tp,LOCATION_GRAVE,0,1,99,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*200)
end
function c22020230.retop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
if ct>0 then
Duel.Damage(1-tp,ct*200,REASON_EFFECT)
end
end
function c22020230.filter0(c)
return c:IsSetCard(0x3ff1) and c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c22020230.target0(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020230.filter0,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020230.operation0(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020230.filter0,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c22020230.tdfilter(c)
return c:IsSetCard(0x3ff1) and c:IsAbleToDeck()
end
function c22020230.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c22020230.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020230.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c22020230.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c22020230.desfilter(c)
return c:IsType(TYPE_MONSTER)
end
function c22020230.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) then
local g=Duel.GetMatchingGroup(c22020230.desfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22020230,4)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
Duel.Damage(1-tp,1500,REASON_EFFECT)
end
end
end
--人理之诗 干将莫邪
function c22020240.initial_effect(c)
aux.AddCodeList(c,22020220)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22020240.target)
e1:SetOperation(c22020240.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c22020240.eqlimit)
c:RegisterEffect(e2)
--Double Attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetValue(1)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22020240,0))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,22020240)
e4:SetTarget(c22020240.thtg)
e4:SetOperation(c22020240.thop)
c:RegisterEffect(e4)
end
function c22020240.eqlimit(e,c)
return c:IsFaceup() and (c:IsCode(22020220) or c.effect_canequip_hogu)
end
function c22020240.filter(c)
return c:IsFaceup() and (c:IsCode(22020220) or c.effect_canequip_hogu)
end
function c22020240.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22020240.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020240.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c22020240.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c22020240.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c22020240.thfilter(c)
return c:IsSetCard(0x3ff1) and c:IsAbleToHand()
end
function c22020240.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22020240.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020240.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c22020240.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c22020240.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--人理之诗 炽天覆七重圆环
function c22020250.initial_effect(c)
aux.AddCodeList(c,22020220)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020250,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_BATTLE_END)
e1:SetCondition(c22020250.condition)
e1:SetOperation(c22020250.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020250,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(c22020250.drcon)
e2:SetTarget(c22020250.drtg)
e2:SetOperation(c22020250.drop)
c:RegisterEffect(e2)
end
function c22020250.cfilter(c)
return c:IsFaceup() and c:IsCode(22020220)
end
function c22020250.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.IsExistingMatchingCard(c22020250.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.GetTurnPlayer()~=tp
and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c22020250.activate(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
function c22020250.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
end
function c22020250.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c22020250.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--人理之基 库丘林
function c22020260.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020260,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,22020260)
e1:SetTarget(c22020260.sptg)
e1:SetOperation(c22020260.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,22020260)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c22020260.atkcon)
e3:SetOperation(c22020260.atkop)
c:RegisterEffect(e3)
end
function c22020260.spfilter(c,e,tp)
return c:IsSetCard(0x2ff1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22020260.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22020260.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c22020260.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22020260.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c22020260.atkcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function c22020260.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(2095764,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
--人理之诗 穿刺死棘之枪
function c22020270.initial_effect(c)
aux.AddCodeList(c,22020260)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22020270.target)
e1:SetOperation(c22020270.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c22020270.eqlimit)
c:RegisterEffect(e2)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(800)
c:RegisterEffect(e3)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22020270,0))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c22020270.atkcon)
e4:SetCost(c22020270.cost)
e4:SetTarget(c22020270.atktg)
e4:SetOperation(c22020270.atkop)
c:RegisterEffect(e4)
end
function c22020270.eqlimit(e,c)
return c:IsFaceup() and (c:IsCode(22020260) or c.effect_canequip_hogu)
end
function c22020270.filter(c)
return c:IsFaceup() and (c:IsCode(22020260) or c.effect_canequip_hogu)
end
function c22020270.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22020270.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020270.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c22020270.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c22020270.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
Debug.Message("你的心脏,我收下了!")
end
end
function c22020270.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and Duel.GetAttacker()==ec
end
function c22020270.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SelectOption(tp,aux.Stringid(22020270,0))
end
function c22020270.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c22020270.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.SelectOption(tp,aux.Stringid(22020270,1))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Debug.Message("穿刺死棘之枪!")
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--人理之基 库丘林·魔术师
function c22020280.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020280,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,22020280)
e1:SetTarget(c22020280.thtg1)
e1:SetOperation(c22020280.tgop1)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCountLimit(1,22020281)
e2:SetCondition(c22020280.efcon)
e2:SetOperation(c22020280.efop)
c:RegisterEffect(e2)
end
function c22020280.thfilter1(c)
return c:IsSetCard(0x3ff1) and c:IsAbleToHand()
end
function c22020280.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020280.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c22020280.tgop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020280.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c22020280.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function c22020280.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(22020280,1))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_DETACH_MATERIAL)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTarget(c22020280.damtg)
e1:SetOperation(c22020280.damop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(22020280,2))
end
function c22020280.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c22020280.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
\ No newline at end of file
--人理之诗 燃烧殆尽的炎之牢
function c22020290.initial_effect(c)
aux.AddCodeList(c,22020280)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c22020290.cost)
e1:SetTarget(c22020290.target)
e1:SetOperation(c22020290.activate)
c:RegisterEffect(e1)
end
function c22020290.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Debug.Message("给你个绝活!")
end
function c22020290.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsSummonType(SUMMON_TYPE_SPECIAL) end
if chk==0 then return Duel.IsExistingTarget(Card.IsSummonType,tp,0,LOCATION_MZONE,1,nil,SUMMON_TYPE_SPECIAL) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsSummonType,tp,0,LOCATION_MZONE,1,1,nil,SUMMON_TYPE_SPECIAL)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c22020290.cfilter(c)
return c:IsFaceup() and c:IsCode(22020280)
end
function c22020290.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Debug.Message("燃烧殆尽的木之巨人——")
Debug.Message("燃烧殆尽的炎之牢!")
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
if Duel.IsExistingMatchingCard(c22020290.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(22020290,0)) then
Duel.BreakEffect()
Duel.Damage(1-tp,2000,REASON_EFFECT)
end
end
end
--人理之灵 远坂凛
function c22020300.initial_effect(c)
--spsummon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020300,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,22020300)
e1:SetCost(c22020300.spcost)
e1:SetTarget(c22020300.sptg)
e1:SetOperation(c22020300.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,22020300)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22020300,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,22020301)
e3:SetTarget(c22020300.target)
e3:SetOperation(c22020300.operation)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_REMOVE)
e4:SetCountLimit(1,22020301)
c:RegisterEffect(e4)
end
function c22020300.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22020300.filter(c,e,tp)
return c:IsSetCard(0x2ff1) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c22020300.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22020300.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c22020300.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22020300.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if not tc:IsCode(22020220) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
end
Duel.SpecialSummonComplete()
end
function c22020300.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c22020300.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--人理之灵 间桐樱
function c22020310.initial_effect(c)
--xyz
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020310,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetCost(c22020310.cost)
e1:SetTarget(c22020310.target)
e1:SetOperation(c22020310.activate)
c:RegisterEffect(e1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020310,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22020310)
e2:SetTarget(c22020310.target1)
e2:SetOperation(c22020310.operation1)
c:RegisterEffect(e2)
end
function c22020310.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22020310.xfilter1(c,e,tp)
local rk=c:GetAttack()
return rk>0 and c:IsFaceup() and c:IsSetCard(0x2ff1)
and Duel.IsExistingMatchingCard(c22020310.xfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetAttack())
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
function c22020310.xfilter2(c,e,tp,mc,rk)
return c:GetAttack()==rk and c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x2ff1) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c22020310.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22020310.xfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c22020310.xfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c22020310.xfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22020310.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22020310.xfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetAttack())
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1,true)
sc:RegisterFlagEffect(22020310,RESET_EVENT+RESETS_STANDARD,0,1)
sc:CompleteProcedure()
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(sc)
e2:SetCondition(c22020310.descon)
e2:SetOperation(c22020310.desop)
Duel.RegisterEffect(e2,tp)
end
end
end
function c22020310.descon(e,tp,eg,ep,ev,re,r,rp)
local sc=e:GetLabelObject()
if sc:GetFlagEffect(22020310)~=0 then
return true
else
e:Reset()
return false
end
end
function c22020310.desop(e,tp,eg,ep,ev,re,r,rp)
local sc=e:GetLabelObject()
Duel.Destroy(sc,REASON_EFFECT)
end
function c22020310.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c22020310.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c22020310.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22020310.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c22020310.filter0,tp,LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(c22020310.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22020310.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,LOCATION_GRAVE)
end
function c22020310.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c22020310.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c22020310.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22020310.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--人理之基 美杜莎
function c22020320.initial_effect(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020320,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,22020320)
e1:SetCondition(c22020320.spcon)
e1:SetTarget(c22020320.sptg)
e1:SetOperation(c22020320.spop)
c:RegisterEffect(e1)
--spsummon opp
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22020320,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,22020321)
e3:SetCondition(c22020320.condition)
e3:SetTarget(c22020320.target)
e3:SetOperation(c22020320.operation)
c:RegisterEffect(e3)
end
function c22020320.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x2ff1) and re:GetHandler():IsType(TYPE_MONSTER)
end
function c22020320.filter(c,e,tp)
return c:IsSetCard(0x3ff1) and c:IsAbleToHand()
end
function c22020320.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020320.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)>=1 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
end
end
function c22020320.spop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020320.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)>=1
and Duel.SelectYesNo(tp,aux.Stringid(22020320,1)) then
Duel.BreakEffect()
local sg=g1:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
end
function c22020320.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():GetPreviousControler()==tp
end
function c22020320.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c22020320.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
end
end
--人理之诗 骑英之缰绳
function c22020330.initial_effect(c)
aux.AddCodeList(c,22020320)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020330,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,22020330)
e1:SetCost(c22020330.cost)
e1:SetCondition(c22020330.condition)
e1:SetTarget(c22020330.target)
e1:SetOperation(c22020330.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020330,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22020330)
e2:SetCondition(c22020330.spcon)
e2:SetTarget(c22020330.sptg)
e2:SetOperation(c22020330.spop)
c:RegisterEffect(e2)
end
function c22020330.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Debug.Message("让我优雅地消灭你们吧!")
end
function c22020330.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_HAND)
end
function c22020330.filter(c)
return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c22020330.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020330.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local sg=Duel.GetMatchingGroup(c22020330.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c22020330.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c22020330.filter,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e))
local ct=Duel.Destroy(g,REASON_EFFECT)
Debug.Message("骑英之缰绳!")
if ct>0 and c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.BreakEffect()
Duel.MoveToField(c,tp,1-tp,LOCATION_SZONE,POS_FACEDOWN,true)
end
end
function c22020330.ctfilter(c)
return c:IsFaceup() and c:IsCode(22020320)
end
function c22020330.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22020330.ctfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c22020330.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(22020330)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22020330,0x3ff1,0x11,2400,2400,6,RACE_BEAST,ATTRIBUTE_WIND) end
c:RegisterFlagEffect(22020330,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c22020330.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,22020330,0x3ff1,0x11,2400,2400,6,RACE_BEAST,ATTRIBUTE_WIND) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_REDIRECT)
e3:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e3,true)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--人理之基 尤瑞艾莉
function c22020340.initial_effect(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020340,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,22020340)
e1:SetTarget(c22020340.sptg)
e1:SetOperation(c22020340.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCountLimit(1,22020340)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCountLimit(1,22020341)
e3:SetCondition(c22020340.effcon)
e3:SetOperation(c22020340.effop)
c:RegisterEffect(e3)
end
function c22020340.filter(c,e,tp)
return c:IsLevelBelow(3) and c:IsSetCard(0x2ff1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22020340.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22020340.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)>=1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES)
end
end
function c22020340.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
local g=Duel.SelectMatchingCard(tp,c22020340.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)>=1
and Duel.SelectYesNo(tp,aux.Stringid(22020340,1)) then
Duel.BreakEffect()
local sg=g1:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
end
function c22020340.effcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsSetCard(0xfff)
end
function c22020340.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(22020340,2))
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c22020340.condition)
e1:SetTarget(c22020340.target)
e1:SetOperation(c22020340.operation)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(22020340,3))
end
function c22020340.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c22020340.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(ep,LOCATION_HAND,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end
function c22020340.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
\ No newline at end of file
--人理之诗 女神的视线
function c22020350.initial_effect(c)
aux.AddCodeList(c,22020340)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE)
e1:SetCountLimit(1,22020350+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c22020350.cost)
e1:SetTarget(c22020350.target)
e1:SetOperation(c22020350.activate)
c:RegisterEffect(e1)
end
function c22020350.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Debug.Message("嗯,让他们尝尝苦头吧!")
end
function c22020350.filter(c)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN)
end
function c22020350.spfilter(c,e,tp)
return c:IsCode(22020340) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c22020350.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22020350.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020350.filter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c22020350.filter,tp,0,LOCATION_MZONE,1,1,nil)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c22020350.chainlm)
end
end
function c22020350.chainlm(e,rp,tp)
return not e:GetHandler():IsType(TYPE_SPELL)
end
function c22020350.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEDOWN,true)
Debug.Message("女神的视线!")
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(TYPE_SPELL)
tc:RegisterEffect(e1)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(22020350,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c22020350.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
end
end
end
--人理之基 斯忒诺
function c22020360.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,c22020360.matfilter1,nil,nil,aux.NonTuner(nil),1,99)
--summon success
local e100=Effect.CreateEffect(c)
e100:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e100:SetCode(EVENT_SPSUMMON_SUCCESS)
e100:SetOperation(c22020360.sumsuc)
e100:SetCountLimit(1,22020360+EFFECT_COUNT_CODE_DUEL)
c:RegisterEffect(e100)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--damage reduce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetCondition(c22020360.rdcon)
e2:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22020360,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,22020360)
e3:SetTarget(c22020360.target)
e3:SetOperation(c22020360.operation)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22020360,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,22020360)
e4:SetCondition(c22020360.ntcon)
e4:SetTarget(c22020360.target1)
e4:SetOperation(c22020360.operation1)
c:RegisterEffect(e4)
end
function c22020360.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
Debug.Message("唔呵呵...竟将女神召唤至现界")
Debug.Message("真是可怜又有趣的人呢")
Duel.RegisterEffect(e1,tp)
end
function c22020360.rdcon(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c22020360.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or (c:IsSynchroType(TYPE_MONSTER) and c:IsSetCard(0x2ff1))
end
function c22020360.filter(c)
return c:IsSetCard(0x2ff1) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c22020360.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020360.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil)
and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 end
end
function c22020360.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22020360.filter),tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEDOWN,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL)
tc:RegisterEffect(e1)
end
end
function c22020360.rcfilter(c)
return c:IsFacedown()
end
function c22020360.ntcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22020360.rcfilter,tp,0,LOCATION_ONFIELD,1,nil)
end
function c22020360.filter1(c)
return c:IsSetCard(0x3ff1) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c22020360.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020360.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020360.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020360.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--人理之诗 女神的微笑
function c22020370.initial_effect(c)
aux.AddCodeList(c,22020360)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22020370+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c22020370.cost)
e1:SetCondition(c22020370.condition)
e1:SetTarget(c22020370.target)
e1:SetOperation(c22020370.activate)
c:RegisterEffect(e1)
end
function c22020370.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Debug.Message("唔呵呵...做好觉悟了吗?")
end
function c22020370.cfilter(c)
return c:IsFacedown()
end
function c22020370.condition(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c22020370.cfilter,tp,0,LOCATION_ONFIELD,nil)
return ct>0
end
function c22020370.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=Duel.GetMatchingGroupCount(c22020370.cfilter,tp,0,LOCATION_ONFIELD,nil)
if ct>=3 then return Duel.GetFieldGroupCount(ep,LOCATION_HAND,0)>0 end
return true
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c22020370.chainlm)
end
end
function c22020370.chainlm(e,rp,tp)
return not e:GetHandler():IsType(TYPE_TRAP)
end
function c22020370.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local g2=Duel.GetMatchingGroupCount(c22020370.cfilter,tp,0,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(c22020370.cfilter,tp,0,LOCATION_ONFIELD,nil)
local ct=g:GetCount()
if ct>=1 then
Duel.Damage(1-tp,g2*500,REASON_EFFECT)
Debug.Message("女神的微笑!")
end
if ct>=3 and #g1>0 then
Duel.ConfirmCards(tp,g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g1:FilterSelect(tp,Card.IsAbleToDeck,1,1,nil)
if #sg<=0 then return end
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
if ct>=5 and Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_ONFIELD,0,nil,22020360)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_TURN)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
end
function c22020370.todeck(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetFieldGroup(p,0,LOCATION_HAND)
if #g>0 then
Duel.ConfirmCards(p,g)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:FilterSelect(p,Card.IsAbleToDeck,1,1,nil)
if #sg<=0 then return end
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
Duel.ShuffleHand(1-p)
end
end
--人理之基 无铭
function c22020380.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0xff1),1)
c:EnableReviveLimit()
--draw
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(22020220)
c:RegisterEffect(e1)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(22020380)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22020380,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,22020380)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(c22020380.descost)
e4:SetTarget(c22020380.destg)
e4:SetOperation(c22020380.desop)
c:RegisterEffect(e4)
end
c22020380.effect_canequip_hogu=true
function c22020380.costfilter(c)
return c:IsSetCard(0x3ff1) and c:IsAbleToRemoveAsCost()
end
function c22020380.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020380.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22020380.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c22020380.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c22020380.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--人理之基 卫宫·Alter
function c22020390.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xff1),4,2)
c:EnableReviveLimit()
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(22020220)
c:RegisterEffect(e1)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(22020390)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22020390,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,22020390)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c22020390.cost)
e3:SetTarget(c22020390.target)
e3:SetOperation(c22020390.operation)
c:RegisterEffect(e3)
end
c22020390.effect_canequip_hogu=true
function c22020390.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c22020390.filter(c)
return c:IsSetCard(0x3ff1) and c:IsAbleToHand()
end
function c22020390.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020390.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22020390.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22020390.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--裁定者的召唤
function c22020400.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020400,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22020400+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22020400.target)
e1:SetOperation(c22020400.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020400,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCost(c22020400.thcost)
e2:SetTarget(c22020400.target1)
e2:SetOperation(c22020400.activate1)
c:RegisterEffect(e2)
end
function c22020400.filter(c,e,tp,m1,m2,ft)
if not c:IsSetCard(0x2ff1) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:Merge(m2)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(c22020400.mfilterf,1,nil,tp,mg,c)
end
end
function c22020400.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end
function c22020400.mfilter(c)
return c:GetLevel()>0 and c:IsSetCard(0xfff) and c:IsAbleToRemove()
end
function c22020400.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22020400.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c22020400.mfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c22020400.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2,ft)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c22020400.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c22020400.mfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c22020400.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2,ft)
local tc=tg:GetFirst()
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(mg2)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c22020400.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c22020400.filter0(c,e,tp)
return c:IsSetCard(0x2ff1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22020400.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22020400.filter0(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c22020400.filter0,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c22020400.filter0,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c22020400.activate1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--人理之基 贞德·达尔克
function c22020410.initial_effect(c)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020410,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,22020410)
e1:SetTarget(c22020410.destg)
e1:SetOperation(c22020410.desop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020410,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,22020411)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c22020410.discon)
e2:SetTarget(c22020410.distg)
e2:SetOperation(c22020410.disop)
c:RegisterEffect(e2)
--flip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22020410,2))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCost(c22020410.cost)
e3:SetCondition(c22020410.spcon2)
e3:SetTarget(c22020410.target)
e3:SetOperation(c22020410.operation)
c:RegisterEffect(e3)
end
function c22020410.desfilter(c)
return c:IsType(TYPE_MONSTER)
end
function c22020410.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c22020410.desfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c22020410.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
g:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c22020410.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c22020410.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c22020410.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c22020410.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
Duel.Draw(tp,1,REASON_EFFECT)
end
function c22020410.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c22020410.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020420)
end
function c22020410.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c22020410.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Draw(p,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
\ No newline at end of file
--人理之基 吾之神明在此
function c22020420.initial_effect(c)
c:SetUniqueOnField(1,0,22020420)
aux.AddCodeList(c,22020410)
--change effect type
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetCode(22020420)
e0:SetRange(LOCATION_SZONE)
e0:SetTargetRange(1,0)
c:RegisterEffect(e0)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020420,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c22020420.condition)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020420,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,22020420)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c22020420.cost)
e2:SetCondition(c22020420.discon)
e2:SetTarget(c22020420.distg)
e2:SetOperation(c22020420.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(22020420,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,22020420)
c:RegisterEffect(e3)
end
function c22020420.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Debug.Message("主的力量降临于此!")
end
function c22020420.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c22020420.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c22020420.filter(c)
return c:IsFaceup() and c:IsSetCard(0xff1) and c:IsCanTurnSet()
end
function c22020420.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc~=c and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22020420.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22020420.filter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c22020420.filter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c22020420.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.BreakEffect()
Debug.Message("我之旗帜啊,请保护我的同胞们!")
Debug.Message("吾主在此!")
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
end
--人理之基 天草四郎
function c22020430.initial_effect(c)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020430,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,22020430)
e1:SetTarget(c22020430.destg)
e1:SetOperation(c22020430.desop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020430,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,22020431)
e2:SetCondition(c22020430.condition)
e2:SetTarget(c22020430.target)
e2:SetOperation(c22020430.operation)
c:RegisterEffect(e2)
end
function c22020430.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c22020430.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c22020430.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_MZONE,1,nil,TYPE_MONSTER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c22020430.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_MZONE,1,1,nil,TYPE_MONSTER)
g:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c22020430.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c22020430.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
function c22020430.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c22020430.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(rc,REASON_EFFECT)~=0 and rc:GetBaseAttack()>=0
and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(rc:GetBaseAttack())
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--人理之基 始皇帝
function c22020440.initial_effect(c)
c:EnableReviveLimit()
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020440,0))
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCountLimit(1,22020440)
e1:SetCondition(c22020440.condition)
e1:SetCost(c22020440.cost)
e1:SetTarget(c22020440.target)
e1:SetOperation(c22020440.operation)
c:RegisterEffect(e1)
--card set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22020440,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,22020441)
e2:SetCondition(c22020440.spcon)
e2:SetTarget(c22020440.pentg)
e2:SetOperation(c22020440.penop)
c:RegisterEffect(e2)
end
function c22020440.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c22020440.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and Duel.CheckLPCost(tp,2500) end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
Duel.PayLPCost(tp,2500)
end
function c22020440.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c22020440.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c22020440.cfilter(c,tp)
return c:GetSummonLocation()==LOCATION_HAND or c:GetSummonLocation()==LOCATION_GRAVE and c:GetPreviousControler()==1-tp
end
function c22020440.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22020440.cfilter,1,nil,tp)
end
function c22020440.penfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and not c:IsForbidden()
end
function c22020440.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020440.penfilter,tp,LOCATION_DECK,0,1,nil)
and (Duel.CheckLocation(tp,LOCATION_SZONE,0) or Duel.CheckLocation(tp,LOCATION_SZONE,1)) end
end
function c22020440.penop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c22020440.penfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
...@@ -48,7 +48,7 @@ function c22070370.splimit(e,se,sp,st) ...@@ -48,7 +48,7 @@ function c22070370.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end end
function c22070370.remcon(e,tp,eg,ep,ev,re,r,rp) function c22070370.remcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function c22070370.remtg(e,tp,eg,ep,ev,re,r,rp,chk) function c22070370.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
......
...@@ -3,7 +3,6 @@ function c40009016.initial_effect(c) ...@@ -3,7 +3,6 @@ function c40009016.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),2,63,true)
aux.AddFusionProcFunFunRep(c,c40009016.matfilter,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),1,63,true) aux.AddFusionProcFunFunRep(c,c40009016.matfilter,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),1,63,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -29,7 +29,7 @@ function c79029042.sfilter2(c,e,tp) ...@@ -29,7 +29,7 @@ function c79029042.sfilter2(c,e,tp)
return c:IsSetCard(0x1904) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x1904) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c79029042.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c79029042.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c79029042.sfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c79029042.sfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c79029042.sfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c79029042.sfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c79029042.sfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c79029042.sfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c79029042.sfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c79029042.sfilter,tp,LOCATION_MZONE,0,1,1,nil)
local a=Duel.SelectMatchingCard(tp,c79029042.sfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local a=Duel.SelectMatchingCard(tp,c79029042.sfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -26,14 +26,14 @@ function c79029046.filter(c) ...@@ -26,14 +26,14 @@ function c79029046.filter(c)
end end
function c79029046.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79029046.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029046.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c79029046.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,0,0,tp,LOCATION_DECK)
end
function c79029046.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Debug.Message("香草会助大家一臂之力的!") Debug.Message("香草会助大家一臂之力的!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029046,0)) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029046,0))
local g=Duel.SelectMatchingCard(tp,c79029046.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c79029046.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,LOCATION_DECK)
end
function c79029046.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
......
...@@ -27,11 +27,10 @@ function c79029219.fil(c) ...@@ -27,11 +27,10 @@ function c79029219.fil(c)
end end
function c79029219.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79029219.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029219.fil,tp,LOCATION_MZONE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_MZONE,5) or Duel.CheckLocation(tp,LOCATION_MZONE,6)) end if chk==0 then return Duel.IsExistingMatchingCard(c79029219.fil,tp,LOCATION_MZONE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_MZONE,5) or Duel.CheckLocation(tp,LOCATION_MZONE,6)) end
local g=Duel.SelectMatchingCard(tp,c79029219.fil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetTargetCard(g)
end end
function c79029219.activate(e,tp,eg,ep,ev,re,r,rp) function c79029219.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local g=Duel.SelectMatchingCard(tp,c79029219.fil,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
local op=0 local op=0
local b1=Duel.CheckLocation(tp,LOCATION_MZONE,6) local b1=Duel.CheckLocation(tp,LOCATION_MZONE,6)
local b2=Duel.CheckLocation(tp,LOCATION_MZONE,5) local b2=Duel.CheckLocation(tp,LOCATION_MZONE,5)
...@@ -56,9 +55,7 @@ function c79029219.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,9 +55,7 @@ function c79029219.sgcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c79029219.sgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c79029219.sgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND+LOCATION_REMOVED+LOCATION_DECK,0,1,nil,0x1904) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND+LOCATION_REMOVED+LOCATION_DECK,0,1,nil,0x1904) end
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND+LOCATION_REMOVED+LOCATION_DECK,0,1,1,nil,0x1904) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,0)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0)
end end
function c79029219.cfilter(c) function c79029219.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1904) and c:GetLevel()>=9 return c:IsFaceup() and c:IsSetCard(0x1904) and c:GetLevel()>=9
...@@ -66,8 +63,11 @@ end ...@@ -66,8 +63,11 @@ end
function c79029219.ghfilter(c) function c79029219.ghfilter(c)
return c:GetSequence()>4 return c:GetSequence()>4
end end
function c79029219.tggfil(c)
return c:IsAbleToGrave() and c:IsSetCard(0x1904)
end
function c79029219.sgop(e,tp,eg,ep,ev,re,r,rp) function c79029219.sgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.SelectMatchingCard(tp,c79029219.tggfil,tp,LOCATION_HAND+LOCATION_REMOVED+LOCATION_DECK,0,1,1,nil):GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c79029219.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c79029219.ghfilter,tp,0,LOCATION_MZONE,1,nil) then if Duel.IsExistingMatchingCard(c79029219.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c79029219.ghfilter,tp,0,LOCATION_MZONE,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(79029219,2)) then if Duel.SelectYesNo(tp,aux.Stringid(79029219,2)) then
......
...@@ -44,11 +44,11 @@ end ...@@ -44,11 +44,11 @@ end
function c79029220.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79029220.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c79029220.sfil,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED,0,2,2,nil,e,tp) local g=Duel.GetMatchingGroup(c79029220.sfil,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED,0,2,2,nil,e,tp)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and g:CheckSubGroup(c79029220.fselect,2,2) end if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and g:CheckSubGroup(c79029220.fselect,2,2) end
local sg=g:SelectSubGroup(tp,c79029220.fselect,false,2,2,e,tp)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,0)
end end
function c79029220.activate(e,tp,eg,ep,ev,re,r,rp) function c79029220.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c79029220.sfil,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED,0,2,2,nil,e,tp)
local sg=g:SelectSubGroup(tp,c79029220.fselect,false,2,2,e,tp)
local tc=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end end
......
...@@ -41,12 +41,10 @@ function c79029240.ssfil2(c,e,tp) ...@@ -41,12 +41,10 @@ function c79029240.ssfil2(c,e,tp)
end end
function c79029240.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79029240.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029240.sfil,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c79029240.sfil,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local sg=Duel.SelectMatchingCard(tp,c79029240.sfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
Duel.SetTargetCard(sg)
end end
function c79029240.activate(e,tp,eg,ep,ev,re,r,rp) function c79029240.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.SelectMatchingCard(tp,c79029240.sfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
--immune --immune
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -69,12 +67,10 @@ function c79029240.thfil(c,e,tp) ...@@ -69,12 +67,10 @@ function c79029240.thfil(c,e,tp)
end end
function c79029240.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c79029240.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029240.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c79029240.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
local sg=Duel.SelectMatchingCard(tp,c79029240.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,nil)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,tp,nil)
end end
function c79029240.thop(e,tp,eg,ep,ev,re,r,rp) function c79029240.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.SelectMatchingCard(tp,c79029240.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
Duel.SendtoHand(tc,tp,REASON_EFFECT) Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
......
...@@ -29,7 +29,6 @@ function c79029282.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +29,6 @@ function c79029282.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,4000) Duel.PayLPCost(tp,4000)
end end
function c79029282.condition(e,tp,eg,ep,ev,re,r,rp) function c79029282.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c79029282.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79029282.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -11,6 +11,7 @@ function c79029330.initial_effect(c) ...@@ -11,6 +11,7 @@ function c79029330.initial_effect(c)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
......
...@@ -10,63 +10,130 @@ function c79029365.initial_effect(c) ...@@ -10,63 +10,130 @@ function c79029365.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(79029199) e2:SetValue(79029199)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--pos --seq
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79029365,0))
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_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(c79029365.poscost) e2:SetCost(c79029365.seqcost)
e2:SetTarget(c79029365.postg) e2:SetTarget(c79029365.seqtg)
e2:SetOperation(c79029365.posop) e2:SetOperation(c79029365.seqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--seq2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79029365,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,79029365)
e2:SetCost(c79029365.seqcost)
e2:SetTarget(c79029365.seqtg1)
e2:SetOperation(c79029365.seqop1)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,09029365)
e4:SetTarget(c79029365.sptg)
e4:SetOperation(c79029365.spop)
c:RegisterEffect(e4)
end end
function c79029365.poscost(e,tp,eg,ep,ev,re,r,rp,chk) function c79029365.seqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.GetFlagEffect(tp,79029365)==0 end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.GetFlagEffect(tp,79029365)==0 end
Duel.RegisterFlagEffect(tp,79029365,0,0,0) Duel.RegisterFlagEffect(tp,79029365,0,0,0)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c79029365.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c79029365.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79029365,2))
local flag=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0) local flag=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0)
e:SetLabel(flag) e:SetLabel(flag)
Duel.Hint(HINT_ZONE,tp,flag) Duel.Hint(HINT_ZONE,tp,flag)
end end
function c79029365.posop(e,tp,eg,ep,ev,re,r,rp) function c79029365.seqop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("今天的运势是......你们真不走运。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029365,5))
local flag=e:GetLabel() local flag=e:GetLabel()
local seq=math.log(bit.rshift(flag,16),2) local seq=math.log(bit.rshift(flag,16),2)
if not Duel.CheckLocation(1-tp,LOCATION_MZONE,seq) if not Duel.CheckLocation(1-tp,LOCATION_MZONE,seq) then return end
or Duel.GetFlagEffect(tp,79029365)~=0 then return end
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_MUST_USE_MZONE) e1:SetCode(EFFECT_MUST_USE_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_NO_TURN_RESET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(flag | 0x600060) e1:SetValue(flag | 0x600060)
e1:SetCountLimit(1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST) e2:SetCode(EVENT_ADJUST)
e2:SetLabelObject(e1)
e2:SetLabel(seq) e2:SetLabel(seq)
e2:SetCondition(c79029365.adcon)
e2:SetOperation(c79029365.adop) e2:SetOperation(c79029365.adop)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c79029365.ckfil(c,seq) function c79029365.ckfil(c,seq)
return c:GetSequence()==seq return c:GetSequence()==seq
end end
function c79029365.adop(e,tp,eg,ep,ev,re,r,rp) function c79029365.adcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetLabel() local seq=e:GetLabel()
if Duel.IsExistingMatchingCard(c79029365.ckfil,1-tp,LOCATION_MZONE,0,1,nil,seq) then local tp=e:GetHandler()
return Duel.IsExistingMatchingCard(c79029365.ckfil,tp,0,LOCATION_MZONE,1,nil,seq)
end
function c79029365.adop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("恶灵,都消散了。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029365,6))
Duel.ResetFlagEffect(tp,79029365) Duel.ResetFlagEffect(tp,79029365)
e:GetLabelObject():Reset()
e:Reset() e:Reset()
Debug.Message("..") end
function c79029365.seqtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) end
end
function c79029365.seqop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79029365,3))
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0)
local nseq=math.log(bit.rshift(s,16),2)
Duel.MoveSequence(g:GetFirst(),nseq)
Debug.Message("你们回不了家了。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029365,4))
end end
end end
function c79029365.seqfil(c,e,seq)
return c:GetSequence()==seq
or (c:GetSequence()==5 and e:GetHandler():GetSequence()==1)
or (c:GetSequence()==6 and e:GetHandler():GetSequence()==3)
end
function c79029365.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local seq=c:GetPreviousSequence()
local cg=Duel.GetMatchingGroup(c79029365.seqfil,tp,0,LOCATION_ONFIELD,nil,e,seq)
if chk==0 then return cg:GetCount()>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end
cg:KeepAlive()
e:SetLabelObject(cg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c79029365.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local seq=c:GetPreviousSequence()
local cg=e:GetLabelObject()
if cg:GetCount()<=0 then return end
local g=cg:Select(tp,1,1,nil)
Duel.Overlay(c,g)
Duel.SpecialSummon(c,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
Debug.Message("你们的怨恨,我收下了。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029365,7))
end
--企鹅物流·术士干员-莫斯提马·序时之匙
function c79029366.initial_effect(c)
--spsummon condition
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e2)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c79029366.efilter)
c:RegisterEffect(e2)
--sp
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,79029366)
e1:SetCondition(c79029366.spcon)
e1:SetTarget(c79029366.sptg)
e1:SetOperation(c79029366.spop)
c:RegisterEffect(e1)
--skip
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c79029366.skcon)
e3:SetOperation(c79029366.skop)
c:RegisterEffect(e3)
end
function c79029366.efilter(e,te)
return te:GetOwner():GetControler()~=e:GetOwner():GetControler()
end
function c79029366.spcon(e,tp,eg,ep,ev,re,r,rp)
local x=0
local y=0
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp then
x=x+1
else
y=y+1
end
end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and x>=2 and y>=2
end
function c79029366.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(aux.FALSE)
end
function c79029366.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(ev*1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
Duel.SpecialSummonComplete()
Debug.Message("差不多该结束了吧?")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029366,6))
local dg=Group.CreateGroup()
for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler()
dg:AddCard(tc)
end
local lg=dg:Select(tp,0,99,nil)
local lc=lg:GetFirst()
while lc do
lc:RegisterFlagEffect(79029366,RESET_CHAIN,0,1)
lc=lg:GetNext()
end
for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
local p=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER)
local tc=te:GetHandler()
if tc:GetFlagEffect(79029366)~=0 then
Duel.ChangeChainOperation(i,c79029366.repop)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79029366,i))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(te)
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and not te:IsHasProperty(EFFECT_FLAG_PLAYER_TARGET) then
e1:SetOperation(c79029366.xsop)
else
e1:SetOperation(c79029366.drop)
end
Duel.RegisterEffect(e1,p)
end
end
end
function c79029366.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
function c79029366.xsop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp)
end
end
function c79029366.repop(e,tp,eg,ep,ev,re,r,rp)
end
function c79029366.skcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c79029366.skop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("偶尔追求一些刺激,也是不坏的选择。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029366,7))
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_SKIP_BP)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_SKIP_M2)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetCode(EFFECT_SKIP_M1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
--闪刀姬 吸血鬼千金
function c8899.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,8899)
e1:SetCost(c8899.spcost)
e1:SetTarget(c8899.sptg)
e1:SetOperation(c8899.spop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(8899,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c8899.atkcon)
e2:SetCost(c8899.atkcost)
e2:SetOperation(c8899.atkop)
c:RegisterEffect(e2)
end
function c8899.tgfilter(c,tp)
return c:GetOwner()~=tp and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>-1
end
function c8899.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8899.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c8899.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c8899.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c8899.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c8899.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()
and (Duel.GetAttacker():IsControler(tp)
or Duel.GetAttackTarget():IsControler(tp))
end
function c8899.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(8899)==0
and Duel.CheckLPCost(tp,100) end
local lp=Duel.GetLP(tp)
local m=math.floor(math.min(lp,3000)/100)
local t={}
for i=1,m do
t[i]=i*100
end
local ac=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,ac)
e:SetLabel(ac)
e:GetHandler():RegisterFlagEffect(8899,RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c8899.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttacker()
if c:IsControler(1-tp) then c=Duel.GetAttackTarget() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(e:GetLabel())
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
...@@ -5,6 +5,7 @@ function c9910199.initial_effect(c) ...@@ -5,6 +5,7 @@ function c9910199.initial_effect(c)
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:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910198) e1:SetCountLimit(1,9910198)
e1:SetCondition(c9910199.spcon1) e1:SetCondition(c9910199.spcon1)
......
...@@ -68,6 +68,7 @@ function c9910376.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -68,6 +68,7 @@ function c9910376.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
end end
function c9910376.setop(e,tp,eg,ep,ev,re,r,rp) function c9910376.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
......
...@@ -61,17 +61,15 @@ function c9910380.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,17 +61,15 @@ function c9910380.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() local rc=re:GetHandler()
if not c:IsRelateToEffect(e) or not rc:IsRelateToEffect(re) then return end if not c:IsRelateToEffect(e) or not rc:IsRelateToEffect(re) then return end
if Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)~=0 and rc:IsLocation(LOCATION_REMOVED) then if Duel.Remove(rc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 and rc:IsLocation(LOCATION_REMOVED) then
local lv=rc:GetOriginalLevel() local lv=rc:GetOriginalLevel()
local lp=Duel.GetLP(tp) local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-lv*100) Duel.SetLP(tp,lp-lv*300)
local fid=c:GetFieldID() rc:RegisterFlagEffect(9910380,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
rc:RegisterFlagEffect(9910380,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
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:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(fid)
e1:SetLabelObject(rc) e1:SetLabelObject(rc)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c9910380.retcon) e1:SetCondition(c9910380.retcon)
...@@ -80,22 +78,8 @@ function c9910380.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,22 +78,8 @@ function c9910380.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c9910380.retcon(e,tp,eg,ep,ev,re,r,rp) function c9910380.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() return e:GetLabelObject():GetFlagEffect(9910380)~=0
if tc and tc:GetFlagEffectLabel(9910380)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end end
function c9910380.retop(e,tp,eg,ep,ev,re,r,rp) function c9910380.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() Duel.ReturnToField(e:GetLabelObject())
local op=tc:GetOwner()
local b1=tc:IsAbleToHand()
local b2=Duel.GetLocationCount(op,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,op)
if b2 and (not b1 or Duel.SelectOption(tp,1104,1152)==1) then
Duel.SpecialSummon(tc,0,tp,op,false,false,POS_FACEUP)
elseif b1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end end
--艾雅法拉 --赛博空间逃脱
function c9910431.initial_effect(c) function c9910431.initial_effect(c)
--link summon --Activate
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(c9910431.valcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() --to grave
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,9910431)
e2:SetCondition(c9910431.tgcon)
e2:SetCost(c9910431.tgcost)
e2:SetTarget(c9910431.tgtg)
e2:SetOperation(c9910431.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--attack twice --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_CHAINING)
e3:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e3:SetRange(LOCATION_SZONE)
e3:SetValue(1) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,9910431)
e3:SetCondition(c9910431.thcon)
e3:SetTarget(c9910431.thtg)
e3:SetOperation(c9910431.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--atk down
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c9910431.atkcon)
e4:SetTarget(c9910431.atktg)
e4:SetOperation(c9910431.atkop)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCondition(c9910431.descon)
e5:SetCost(c9910431.descost)
e5:SetTarget(c9910431.destg)
e5:SetOperation(c9910431.desop)
c:RegisterEffect(e5)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetOperation(c9910431.sumsuc)
c:RegisterEffect(e8)
end end
function c9910431.sumsuc(e,tp,eg,ep,ev,re,r,rp) function c9910431.tgcon(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SOUND,0,aux.Stringid(9910431,0)) return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c9910431.valcon(e) function c9910431.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local res=false if chk==0 then return Duel.CheckLPCost(tp,800) end
local c=e:GetHandler() Duel.PayLPCost(tp,800)
local ph=Duel.GetCurrentPhase() end
if ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and c:GetFlagEffect(9910431)<2 then function c9910431.tgfilter1(c)
res=true local res=c:IsSetCard(0x6950) and c:IsLocation(LOCATION_HAND)
c:RegisterFlagEffect(9910431,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1) return c:IsRace(RACE_CYBERSE) and c:IsAbleToGrave() and (not res or Duel.IsPlayerCanDraw(tp,1))
end
return res
end end
function c9910431.atkcon(e,tp,eg,ep,ev,re,r,rp) function c9910431.tgfilter2(c)
return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget() return c:IsRace(RACE_CYBERSE) and c:IsAbleToGrave()
end end
function c9910431.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c9910431.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c9910431.tgfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end end
function c9910431.atkop(e,tp,eg,ep,ev,re,r,rp) function c9910431.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if g:GetCount()>0 then local g=Duel.SelectMatchingCard(tp,c9910431.tgfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
local sc=g:GetFirst() local tc=g:GetFirst()
while sc do if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0
local e1=Effect.CreateEffect(e:GetHandler()) and tc:IsSetCard(0x6950) and tc:IsPreviousLocation(LOCATION_HAND) then
e1:SetType(EFFECT_TYPE_SINGLE) Duel.BreakEffect()
e1:SetCode(EFFECT_UPDATE_ATTACK) Duel.Draw(tp,1,REASON_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-1500)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
end end
Duel.Hint(HINT_SOUND,0,aux.Stringid(9910431,1))
end end
function c9910431.descon(e,tp,eg,ep,ev,re,r,rp) function c9910431.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function c9910431.thfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsFaceup() and c:IsAbleToGrave()
end end
function c9910431.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910431.spfilter(c,e,tp)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end return c:IsSetCard(0x6950) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
local rt=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,rt,REASON_COST+REASON_DISCARD)
e:SetLabel(ct)
end end
function c9910431.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c9910431.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9910431.thfilter(chkc) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) if chk==0 then return Duel.IsExistingTarget(c9910431.thfilter,tp,LOCATION_MZONE,0,1,nil) end
local ct=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0) local g=Duel.SelectTarget(tp,c9910431.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end end
function c9910431.desop(e,tp,eg,ep,ev,re,r,rp) function c9910431.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local tc=Duel.GetFirstTarget()
if Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)<ct then return end if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) and tc:IsSetCard(0x6950) and tc:IsType(TYPE_FUSION) and tc:IsLocation(LOCATION_EXTRA)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,ct,ct,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if g:GetCount()==ct then and Duel.IsExistingMatchingCard(c9910431.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
Duel.HintSelection(g) and Duel.SelectYesNo(tp,aux.Stringid(9910431,0)) then
Duel.Destroy(g,REASON_EFFECT) Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910431.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
Duel.Hint(HINT_SOUND,0,aux.Stringid(9910431,2))
end end
--安洁莉娜 --重力统御者
function c9910433.initial_effect(c) function c9910433.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
c:EnableReviveLimit() c:EnableReviveLimit()
--activate cost --remove
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_REMOVE)
e1:SetCode(EFFECT_ACTIVATE_COST) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCountLimit(1,9910433)
e1:SetTargetRange(0,1) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c9910433.costchk) e1:SetTarget(c9910433.rmtg)
e1:SetTarget(c9910433.costtg) e1:SetOperation(c9910433.rmop)
e1:SetOperation(c9910433.costop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--accumulate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(0x10000000+9910433)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c9910433.rmtg)
e3:SetOperation(c9910433.rmop)
c:RegisterEffect(e3)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetOperation(c9910433.sumsuc)
c:RegisterEffect(e8)
end
function c9910433.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SOUND,0,aux.Stringid(9910433,0))
end
function c9910433.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,9910433)
return Duel.IsPlayerCanDiscardDeckAsCost(tp,ct*2)
end
function c9910433.costtg(e,te)
return te:IsActiveType(TYPE_MONSTER)
end
function c9910433.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,2,REASON_COST)
end end
function c9910433.filter(c,id) function c9910433.filter(c,id)
return c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:IsAbleToRemove() return c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:IsAbleToRemove()
...@@ -62,23 +24,47 @@ function c9910433.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -62,23 +24,47 @@ function c9910433.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c9910433.filter(chkc,id) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c9910433.filter(chkc,id) end
if chk==0 then return Duel.IsExistingTarget(c9910433.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,id) end if chk==0 then return Duel.IsExistingTarget(c9910433.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,id) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c9910433.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil,id) local g=Duel.SelectTarget(tp,c9910433.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,6,nil,id)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c9910433.rmop(e,tp,eg,ep,ev,re,r,rp) function c9910433.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then if tg:GetCount()>0 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
Duel.Hint(HINT_SOUND,0,aux.Stringid(9910433,1))
end end
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_REMOVED) local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)
if ct~=5 then return end if ct<2 then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) e1:SetValue(aux.imval1)
e1:SetTargetRange(0xff,0xff) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1)
e1:SetReset(RESET_PHASE+PHASE_END) if ct<4 then return end
Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetTargetRange(0xff,0xff)
e2:SetValue(LOCATION_REMOVED)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
if ct~=6 then return end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetCondition(c9910433.negcon)
e3:SetOperation(c9910433.negop)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c9910433.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainDisablable(ev) and Duel.GetFlagEffect(tp,9910433)<1
end
function c9910433.negop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(9910433,0)) then return end
Duel.Hint(HINT_CARD,0,9910433)
Duel.RegisterFlagEffect(tp,9910433,RESET_PHASE+PHASE_END,0,1)
Duel.NegateEffect(ev)
end end
...@@ -48,7 +48,9 @@ function c9910630.initial_effect(c) ...@@ -48,7 +48,9 @@ function c9910630.initial_effect(c)
end end
end end
function c9910630.ffilter(c,fc,sub,mg,sg) function c9910630.ffilter(c,fc,sub,mg,sg)
return not sg or not sg:IsExists(Card.IsRace,1,c,c:GetRace()) return not sg or sg:FilterCount(aux.TRUE,c)==0
or (sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute())
and not sg:IsExists(Card.IsRace,1,c,c:GetRace()))
end end
function c9910630.checkop(e,tp,eg,ep,ev,re,r,rp) function c9910630.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsActiveType(TYPE_MONSTER) then return end if not re:IsActiveType(TYPE_MONSTER) then return end
...@@ -65,19 +67,17 @@ function c9910630.sprfilter1(c,sc) ...@@ -65,19 +67,17 @@ function c9910630.sprfilter1(c,sc)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end end
function c9910630.sprfilter2(g,tp,sc) function c9910630.sprfilter2(g,tp,sc)
return g:IsExists(c9910630.sprfilter3,1,nil,tp,sc) and g:GetClassCount(Card.GetRace)==3 return Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and g:GetClassCount(Card.GetRace)==3
end and g:GetClassCount(Card.GetAttribute)==1
function c9910630.sprfilter3(c,tp,sc)
return c:IsLocation(LOCATION_MZONE) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0
end end
function c9910630.sprcon(e,c) function c9910630.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c9910630.sprfilter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,c) local g=Duel.GetMatchingGroup(c9910630.sprfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,c)
return Duel.GetFlagEffect(tp,9910630)>=3 and g:CheckSubGroup(c9910630.sprfilter2,3,3,tp,c) return Duel.GetFlagEffect(tp,9910630)>=3 and g:CheckSubGroup(c9910630.sprfilter2,3,3,tp,c)
end end
function c9910630.sprop(e,tp,eg,ep,ev,re,r,rp,c) function c9910630.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c9910630.sprfilter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,c) local g=Duel.GetMatchingGroup(c9910630.sprfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,c9910630.sprfilter2,true,3,3,tp,c) local sg=g:SelectSubGroup(tp,c9910630.sprfilter2,true,3,3,tp,c)
c:SetMaterial(sg) c:SetMaterial(sg)
......
--创生之海
function c9910803.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910803)
e1:SetTarget(c9910803.rmtg)
e1:SetOperation(c9910803.rmop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,9910804)
e2:SetCost(c9910803.thcost)
e2:SetTarget(c9910803.thtg)
e2:SetOperation(c9910803.thop)
c:RegisterEffect(e2)
end
function c9910803.rmfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToRemove()
end
function c9910803.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local tc=Duel.GetFieldCard(tp,LOCATION_GRAVE,Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)-1)
if chk==0 then return Duel.IsExistingTarget(c9910803.rmfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
and tc and tc:IsCanBeEffectTarget(e) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c9910803.rmfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetTargetCard(tc)
g:AddCard(tc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9910803.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c9910803.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()~=2 or Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=2 then return end
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local flag=false
if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,9910801,0x6951,0x4011,0,500,1,RACE_FAIRY,ATTRIBUTE_LIGHT)
and Duel.SelectYesNo(tp,aux.Stringid(9910803,0)) then
if not flag then Duel.BreakEffect() end
local token=Duel.CreateToken(tp,9910801)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then
flag=true
ft=ft-1
end
end
if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,9910802,0x6951,0x4011,500,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT)
and Duel.SelectYesNo(tp,aux.Stringid(9910803,1)) then
if not flag then Duel.BreakEffect() end
local token=Duel.CreateToken(tp,9910802)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then
flag=true
ft=ft-1
end
end
if flag then Duel.SpecialSummonComplete() end
end
function c9910803.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function c9910803.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c9910803.thfilter(c)
return c:IsSetCard(0x6951) and c:GetCode()~=9910803 and c:IsAbleToHand()
end
function c9910803.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910803.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9910803.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910803.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--创生之炎
function c9910805.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910805)
e1:SetTarget(c9910805.destg)
e1:SetOperation(c9910805.desop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,9910806)
e2:SetCost(c9910805.thcost)
e2:SetTarget(c9910805.thtg)
e2:SetOperation(c9910805.thop)
c:RegisterEffect(e2)
end
function c9910805.desfilter(c,tp)
return c:IsLocation(LOCATION_HAND) or Duel.GetMZoneCount(tp,c)>0
end
function c9910805.locfilter(g)
return g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) and g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND)
end
function c9910805.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c9910805.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,c)
if chk==0 then return g:CheckSubGroup(c9910805.locfilter,2,2)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,2,tp,LOCATION_ONFIELD+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c9910805.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c9910805.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local g=Duel.GetMatchingGroup(c9910805.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:SelectSubGroup(tp,c9910805.locfilter,true,2,2)
if sg:GetCount()~=2 or Duel.Destroy(sg,REASON_EFFECT)~=2 then return end
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local flag=false
if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,9910801,0x6951,0x4011,0,500,1,RACE_FAIRY,ATTRIBUTE_LIGHT)
and Duel.SelectYesNo(tp,aux.Stringid(9910805,0)) then
if not flag then Duel.BreakEffect() end
local token=Duel.CreateToken(tp,9910801)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then
flag=true
ft=ft-1
end
end
if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,9910802,0x6951,0x4011,500,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT)
and Duel.SelectYesNo(tp,aux.Stringid(9910805,1)) then
if not flag then Duel.BreakEffect() end
local token=Duel.CreateToken(tp,9910802)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then
flag=true
ft=ft-1
end
end
if flag then Duel.SpecialSummonComplete() end
end
function c9910805.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function c9910805.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c9910805.thfilter(c)
return c:IsSetCard(0x6951) and c:GetCode()~=9910805 and c:IsAbleToHand()
end
function c9910805.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910805.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9910805.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910805.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--创生融合
function c9910807.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c9910807.target)
e1:SetOperation(c9910807.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,9910807)
e2:SetCondition(c9910807.thcon)
e2:SetCost(c9910807.thcost)
e2:SetTarget(c9910807.thtg)
e2:SetOperation(c9910807.thop)
c:RegisterEffect(e2)
end
function c9910807.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c9910807.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x6951) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c9910807.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c9910807.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c9910807.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c9910807.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c9910807.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c9910807.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c9910807.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c9910807.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c9910807.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c9910807.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end
local g=Duel.GetDecktopGroup(tp,3)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0
return result
end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c9910807.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.ConfirmDecktop(p,3)
local g=Duel.GetDecktopGroup(p,3)
if #g>0 then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sc=g:Select(p,1,1,nil):GetFirst()
if sc:IsAbleToHand() then
Duel.SendtoHand(sc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sc)
Duel.ShuffleHand(p)
else
Duel.SendtoGrave(sc,REASON_RULE)
end
end
if #g>1 then
Duel.SortDecktop(tp,tp,#g-1)
for i=1,#g-1 do
local dg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(dg:GetFirst(),1)
end
end
end
--创生原核
function c9910808.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x6951),2,true)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9910808)
e1:SetCondition(c9910808.thcon1)
e1:SetCost(c9910808.thcost)
e1:SetTarget(c9910808.regtg)
e1:SetOperation(c9910808.regop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c9910808.thcon2)
c:RegisterEffect(e2)
--release
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_RELEASE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,9910809)
e3:SetCondition(c9910808.rlcon)
e3:SetTarget(c9910808.rltg)
e3:SetOperation(c9910808.rlop)
c:RegisterEffect(e3)
end
function c9910808.thcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(9910808)==0
end
function c9910808.thcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(9910808)~=0
end
function c9910808.thcfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c9910808.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c9910808.thcfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c9910808.thcfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c9910808.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x6951) end
end
function c9910808.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c9910808.thcon)
e1:SetOperation(c9910808.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9910808.thfilter(c)
return c:IsSetCard(0x6951) and c:IsAbleToHand()
end
function c9910808.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910808.thfilter,tp,LOCATION_DECK,0,1,nil)
end
function c9910808.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910808)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910808.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c9910808.rlcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end
function c9910808.rlcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910808.rlcfilter,1,e:GetHandler(),tp)
end
function c9910808.rltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsReleasableByEffect() end
if chk==0 then return Duel.IsExistingTarget(Card.IsReleasableByEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,Card.IsReleasableByEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
end
function c9910808.rlop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Release(tc,REASON_EFFECT)
end
e:GetHandler():RegisterFlagEffect(9910808,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
--创生之铁
function c9910810.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,9910810+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c9910810.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c9910810.drcon)
e2:SetTarget(c9910810.drtg)
e2:SetOperation(c9910810.drop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCost(c9910810.setcost)
e3:SetTarget(c9910810.settg)
e3:SetOperation(c9910810.setop)
c:RegisterEffect(e3)
end
function c9910810.sumfilter(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end
function c9910810.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c9910810.sumfilter,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910810,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
local atk=POS_FACEUP_ATTACK
local def=POS_FACEDOWN_DEFENSE
if (s1 and s2 and Duel.SelectPosition(tp,tc,atk+def)==atk) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
end
function c9910810.rlcfilter(c,tp)
return c:IsCode(9910801) and c:GetPreviousControler()==tp
end
function c9910810.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910810.rlcfilter,1,nil,tp)
end
function c9910810.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c9910810.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c9910810.rfilter(c,e,tp,mc)
if not c:IsCode(9910802) then return false end
if Duel.GetMZoneCount(tp,c,tp)>0 and Duel.IsExistingMatchingCard(c9910810.setfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) then return true end
local flag=Duel.GetLocationCount(tp,LOCATION_SZONE)==0 and mc:IsLocation(LOCATION_SZONE) and mc:GetSequence()<5
return Duel.IsExistingMatchingCard(c9910810.setfilter2,tp,LOCATION_DECK,0,1,nil,flag)
end
function c9910810.setfilter1(c,e,tp)
return c:IsSetCard(0x6951) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c9910810.setfilter2(c,ignore)
return c:IsSetCard(0x6961) and not c:IsCode(9910810) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
end
function c9910810.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroup(tp,c9910810.rfilter,1,c,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c9910810.rfilter,1,1,c,e,tp,c)
g:AddCard(c)
Duel.Release(g,REASON_COST)
end
function c9910810.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function c9910810.setfilter(c,e,tp)
if not c:IsSetCard(0x6951) then return false end
if c:IsType(TYPE_MONSTER) then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
else return not c:IsCode(9910810) and c:IsSSetable() end
end
function c9910810.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c9910810.setfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
if tc:IsType(TYPE_MONSTER) then
res=Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
if res~=0 then Duel.ConfirmCards(1-tp,tc) end
else
Duel.SSet(tp,tc)
end
end
--创生之锈
function c9910811.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c9910811.target)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c9910811.descon)
e2:SetCost(c9910811.descost)
e2:SetTarget(c9910811.destg)
e2:SetOperation(c9910811.desop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCost(c9910811.setcost)
e3:SetTarget(c9910811.settg)
e3:SetOperation(c9910811.setop)
c:RegisterEffect(e3)
end
function c9910811.rmfilter(c)
return c:IsFaceup() and c:IsAbleToRemove()
end
function c9910811.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c9910811.rmfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return true end
if Duel.IsExistingTarget(c9910811.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
and Duel.SelectYesNo(tp,aux.Stringid(9910811,0)) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e:SetOperation(c9910811.activate)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9910811.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,e:GetHandler())
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c9910811.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
for tc in aux.Next(g) do
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
end
function c9910811.descon(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetCardTarget()
local rc=re:GetHandler()
return tg and rc and tg:IsContains(rc) and Duel.IsChainNegatable(ev)
end
function c9910811.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,9910802) end
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,9910802)
Duel.Release(g,REASON_COST)
end
function c9910811.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c9910811.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c9910811.rfilter(c,e,tp,mc)
if not c:IsCode(9910801) then return false end
if Duel.GetMZoneCount(tp,c,tp)>0 and Duel.IsExistingMatchingCard(c9910811.setfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) then return true end
local flag=Duel.GetLocationCount(tp,LOCATION_SZONE)==0 and mc:IsLocation(LOCATION_SZONE) and mc:GetSequence()<5
return Duel.IsExistingMatchingCard(c9910811.setfilter2,tp,LOCATION_DECK,0,1,nil,flag)
end
function c9910811.setfilter1(c,e,tp)
return c:IsSetCard(0x6951) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c9910811.setfilter2(c,ignore)
return c:IsSetCard(0x6961) and not c:IsCode(9910811) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
end
function c9910811.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroup(tp,c9910811.rfilter,1,c,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c9910811.rfilter,1,1,c,e,tp,c)
g:AddCard(c)
Duel.Release(g,REASON_COST)
end
function c9910811.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function c9910811.setfilter(c,e,tp)
if not c:IsSetCard(0x6951) then return false end
if c:IsType(TYPE_MONSTER) then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
else return not c:IsCode(9910811) and c:IsSSetable() end
end
function c9910811.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c9910811.setfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
if tc:IsType(TYPE_MONSTER) then
res=Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
if res~=0 then Duel.ConfirmCards(1-tp,tc) end
else
Duel.SSet(tp,tc)
end
end
--创生冻结
function c9910812.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetTarget(c9910812.target)
e1:SetOperation(c9910812.activate)
c:RegisterEffect(e1)
--destroy or remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,9910812)
e2:SetCost(c9910812.descost)
e2:SetTarget(c9910812.destg)
e2:SetOperation(c9910812.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c9910812.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c9910812.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c9910812.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local min=0
local max=0
if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) then min=1 end
if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,tp,POS_FACEDOWN) then max=2 end
if min==0 then min=max end
if max==0 then max=min end
if chk==0 then return min>0 and Duel.CheckReleaseGroup(tp,Card.IsSetCard,min,nil,0x6951) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,min,max,nil,0x6951)
e:SetLabel(g:GetCount())
Duel.Release(g,REASON_COST)
end
function c9910812.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local label=e:GetLabel()
if chk==0 then return true end
if label==1 then
e:SetCategory(CATEGORY_DESTROY)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9910812,0))
elseif label==2 then
e:SetCategory(CATEGORY_REMOVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(9910812,1))
else
e:SetCategory(0)
end
end
function c9910812.desop(e,tp,eg,ep,ev,re,r,rp)
local label=e:GetLabel()
if label==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
elseif label==2 then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil,tp,POS_FACEDOWN)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(tp,1)
local tc=sg:GetFirst()
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
tc:RegisterFlagEffect(9910812,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c9910812.retcon)
e1:SetOperation(c9910812.retop)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
end
function c9910812.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(9910812)==0 then
e:Reset()
return false
else
return Duel.GetTurnPlayer()~=tp
end
end
function c9910812.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
--创生原核
function c9910813.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x6951),3,true)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910813,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9910813)
e1:SetCondition(c9910813.condition1)
e1:SetCost(c9910813.discost)
e1:SetTarget(c9910813.distg)
e1:SetOperation(c9910813.disop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c9910813.condition2)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9910813,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,9910814)
e3:SetCondition(c9910813.condition1)
e3:SetCost(c9910813.descost)
e3:SetTarget(c9910813.destg)
e3:SetOperation(c9910813.desop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCondition(c9910813.condition2)
c:RegisterEffect(e4)
end
function c9910813.filter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x6951)
end
function c9910813.condition1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9910813.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)<3
end
function c9910813.condition2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9910813.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=3
end
function c9910813.rfilter(c,code)
return c:IsCode(code) and c:IsAbleToRemoveAsCost()
end
function c9910813.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910813.rfilter,tp,LOCATION_GRAVE,0,1,nil,9910803) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9910813.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,9910803)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c9910813.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c9910813.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 c9910813.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910813.disfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c9910813.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c9910813.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
function c9910813.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910813.rfilter,tp,LOCATION_GRAVE,0,1,nil,9910805) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9910813.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,9910805)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c9910813.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c9910813.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
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