Commit 8ec40764 authored by TanakaKotoha's avatar TanakaKotoha

delete

parent b6b1cf59
No preview for this file type
--马纳历亚新生·露
function c72430301.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72430301,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,72430301)
e1:SetCost(c72430301.cost1)
e1:SetTarget(c72430301.target1)
e1:SetOperation(c72430301.operation1)
c:RegisterEffect(e1)
-- back to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(72430301,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,72430351)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c72430301.target2)
e2:SetOperation(c72430301.operation2)
c:RegisterEffect(e2)
end
--e 1
function c72430301.cost1(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 c72430301.filtera(c)
return c:IsSetCard(0x724) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c72430301.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c72430301.filtera,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c72430301.operation1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c72430301.filtera,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
--e 2
function c72430301.filterb(c,e)
return c:IsSetCard(0x724) and c:IsType(TYPE_SPELL) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end
function c72430301.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(c72430301.filterb,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and g:GetClassCount(Card.GetCode)>2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
aux.GCheckAdditional=aux.dncheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,3,3)
aux.GCheckAdditional=nil
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c72430301.operation2(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct==3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--马纳历亚骑士·欧文
function c72430303.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72430303,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,72430303)
e1:SetTarget(c72430303.target1)
e1:SetOperation(c72430303.operation1)
c:RegisterEffect(e1)
--copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(72430303,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,72430353)
e2:SetCondition(aux.exccon)
e2:SetCost(c72430303.cost2)
e2:SetTarget(c72430303.target2)
e2:SetOperation(c72430303.operation2)
c:RegisterEffect(e2)
end
--e1
function c72430303.filter1(c)
return c:IsSetCard(0x724) and not c:IsCode(72430303) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c72430303.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430303.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c72430303.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c72430303.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
--e2
function c72430303.cpfilter(c,exc,e,tp,eg,ep,ev,re,r,rp)
local te=c:CheckActivateEffect(true,true,false)
if not (c:IsSetCard(0x724) and c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and te and te:GetOperation()) then return false end
local tg=te:GetTarget()
return (not tg) or tg(e,tp,eg,ep,ev,re,r,rp,0,nil,exc)
end
function c72430303.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c72430303.cpfilter,tp,LOCATION_GRAVE,0,1,nil,c,e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c72430303.cpfilter,tp,LOCATION_GRAVE,0,1,1,nil,c,e,tp,eg,ep,ev,re,r,rp)
local te=g:GetFirst():CheckActivateEffect(true,true,false)
e:SetLabelObject(te)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c72430303.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local te=e:GetLabelObject()
if chkc then
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc,c)
end
if chk==0 then return true end
e:SetProperty(te:GetProperty())
e:SetLabel(te:GetLabel())
e:SetLabelObject(te:GetLabelObject())
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
te:SetLabel(e:GetLabel())
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function c72430303.operation2(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
e:SetLabel(te:GetLabel())
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
te:SetLabel(e:GetLabel())
te:SetLabelObject(e:GetLabelObject())
end
\ No newline at end of file
--马纳历亚创作家·琪可
function c72430304.initial_effect(c)
--search def
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72430304,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,72430304)
e1:SetTarget(c72430304.target1)
e1:SetOperation(c72430304.operation1)
c:RegisterEffect(e1)
--def to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,72430354)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c72430304.target2)
e2:SetOperation(c72430304.operation2)
c:RegisterEffect(e2)
end
--e1
function c72430304.filter1(c)
return c:IsCode(72430309) and c:IsAbleToHand()
end
function c72430304.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430304.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c72430304.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c72430304.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
--e2
function c72430304.filter2(c)
return c:IsCode(72430309) and c:IsAbleToHand()
end
function c72430304.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c72430304.filter2(chck)end
if chk==0 then return Duel.IsExistingTarget(c72430304.filter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c72430304.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c72430304.operation2(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 c72430305.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72430305,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,72430305)
e1:SetTarget(c72430305.sumtg)
e1:SetOperation(c72430305.sumop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,72430355)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c72430305.sumtg2)
e3:SetOperation(c72430305.sumop2)
c:RegisterEffect(e3)
end
function c72430305.filter(c,e,sp)
return c:IsCode(72430302) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c72430305.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430305.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c72430305.sumop(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,c72430305.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c72430305.sumtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430305.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c72430305.sumop2(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,c72430305.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--马纳历亚创作家·琪可
function c72430306.initial_effect(c)
--search def
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72430306,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,72430306)
e1:SetTarget(c72430306.target1)
e1:SetOperation(c72430306.operation1)
c:RegisterEffect(e1)
--def to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,72430356)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c72430306.target2)
e2:SetOperation(c72430306.operation2)
c:RegisterEffect(e2)
end
--e1
function c72430306.filter1(c)
return c:IsCode(72430308) and c:IsAbleToHand()
end
function c72430306.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430306.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c72430306.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c72430306.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
--e2
function c72430306.filter2(c)
return c:IsCode(72430308) and c:IsAbleToHand()
end
function c72430306.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c72430306.filter2(chck)end
if chk==0 then return Duel.IsExistingTarget(c72430306.filter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c72430306.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c72430306.operation2(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 c72430307.initial_effect(c)
--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,72430307+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c72430307.target)
e1:SetOperation(c72430307.activate)
c:RegisterEffect(e1)
end
function c72430307.filter(c)
return c:IsCode(72430308,72430309) and c:IsAbleToHand()
end
function c72430307.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430307.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c72430307.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c72430307.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 c72430308.initial_effect(c)
--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:SetTarget(c72430308.target)
e1:SetOperation(c72430308.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,72430308)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c72430308.thcon)
e2:SetTarget(c72430308.thtg)
e2:SetOperation(c72430308.thop)
c:RegisterEffect(e2)
end
function c72430308.filter(c)
return c:IsFaceup()
end
function c72430308.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 c72430308.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c72430308.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c72430308.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c72430308.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,0,REASON_EFFECT)~=0 then
--if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Damage(1-tp,400,REASON_EFFECT)
end
end
--e2
function c72430308.rccfilter(c)
return c:IsFaceup() and c:IsSetCard(0x724)
end
function c72430308.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
and Duel.IsExistingMatchingCard(c72430308.rccfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c72430308.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c72430308.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--马纳历亚防御阵
function c72430309.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c72430309.target)
e1:SetOperation(c72430309.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,72430309)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c72430309.thcon)
e2:SetTarget(c72430309.thtg)
e2:SetOperation(c72430309.thop)
c:RegisterEffect(e2)
end
function c72430309.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,72430321,0,0x4011,1000,1000,1,RACE_ROCK,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c72430309.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,72430321,0,0x4011,1000,1000,1,RACE_ROCK,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) then return end
local token=Duel.CreateToken(tp,72430321)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e2)
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(c72430309.linklimit)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e6:SetValue(c72430309.synlimit)
token:RegisterEffect(e6)
end
Duel.SpecialSummonComplete()
end
function c72430309.linklimit(e,c)
if not c then return false end
return not c:IsRace(RACE_SPELLCASTER)
end
function c72430309.synlimit(e,c)
if not c then return false end
return not c:IsRace(RACE_SPELLCASTER)
end
--e2
function c72430309.rccfilter(c)
return c:IsFaceup() and c:IsSetCard(0x724)
end
function c72430309.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
and Duel.IsExistingMatchingCard(c72430309.rccfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c72430309.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c72430309.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--马纳历亚的伟大研究
function c72430310.initial_effect(c)
--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,72430310+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c72430310.target)
e1:SetOperation(c72430310.activate)
c:RegisterEffect(e1)
end
function c72430310.filter(c)
return c:IsSetCard(0x724) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c72430310.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430310.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c72430310.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c72430310.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
--马纳历亚的睿智
m=72430311
function c72430311.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c72430311.target)
e1:SetOperation(c72430311.activate)
c:RegisterEffect(e1)
end
--MODAN
function c72430311.filtera(c)
return c:IsCode(72430308) and c:IsAbleToHand()
end
function c72430311.filterb(c)
return c:IsCode(72430309) and c:IsAbleToHand()
end
function c72430311.filterc(c)
return c:IsSetCard(0x724) and c:IsAbleToDeck()
end
function c72430311.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430311.filtera,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c72430311.filterb,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c72430311.filterc,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c72430311.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(c72430311.filterc,p,LOCATION_HAND,0,nil)
if g:GetCount()>=1 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:Select(p,1,1,nil)
Duel.ConfirmCards(1-p,sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c72430311.filtera,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c72430311.filterb,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--魔法学院·马纳历亚
function c72430313.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c72430313.activate)
c:RegisterEffect(e1)
--atk up
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.IsSetCard,0x724))
e2:SetValue(c72430313.val)
c:RegisterEffect(e2)
--def up
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
-- spell back
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e2:SetDescription(aux.Stringid(72430313,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCost(c72430313.cost)
e2:SetTarget(c72430313.target2)
e2:SetOperation(c72430313.operation2)
c:RegisterEffect(e2)
end
--e1
function c72430313.filter1(c)
return c:IsCode(72430308,72430309) and c:IsAbleToHand()
end
function c72430313.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c72430313.filter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(72430313,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--e2
function c72430313.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_SPELL)*100
end
--e3
function c72430313.filter2(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToHand()
end
function c72430313.filter3(c)
return c:IsSetCard(0x724) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c72430313.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 c72430313.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430313.filter3,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c72430313.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE+CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c72430313.operation2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c72430313.filter3,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c72430313.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g2,tc,nil,REASON_EFFECT)
end
end
end
--魔法始祖·马纳历亚
function c72430331.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x724),aux.NonTuner(nil),1,99)
c:EnableReviveLimit()
--add type
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c72430331.tncon)
e1:SetOperation(c72430331.tnop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c72430331.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--shcool
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(72430331,0))
e3:SetCategory(CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,72430331)
e3:SetCondition(c72430331.thcon)
e3:SetTarget(c72430331.target1)
e3:SetOperation(c72430331.operation1)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(72430331,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,72430381)
e4:SetCost(c72430331.spcost)
e4:SetCondition(c72430331.spcon)
e4:SetTarget(c72430331.sptg)
e4:SetOperation(c72430331.spop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(72430331,ACTIVITY_SPSUMMON,c72430331.counterfilter)
end
--e1
function c72430331.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c72430331.tncon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function c72430331.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
--e3
function c72430331.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c72430331.filter1(c,tp)
return c:IsCode(72430313) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c72430331.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430331.filter1,tp,LOCATION_DECK,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
end
function c72430331.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(72430331,2))
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,72430331,RESET_CHAIN,0,1) end
local tc=Duel.SelectMatchingCard(tp,c72430331.filter1,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
Duel.ResetFlagEffect(tp,72430331)
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
--e4
function c72430331.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsRace(RACE_SPELLCASTER)
end
function c72430331.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_SPELLCASTER) and c:IsLocation(LOCATION_EXTRA)
end
function c72430331.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(72430331,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c72430331.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c72430331.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c72430331.spfilter(c,e,tp)
return c:IsSetCard(0x724) and not c:IsCode(72430331) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c72430331.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c72430331.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c72430331.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,aux.NecroValleyFilter(c72430331.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--马纳历亚光魔法教师·米兰
function c72430332.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),aux.NonTuner(nil),1,99)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
-- e1:SetDescription(aux.Stringid(72430332,0))
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,72430332)
e1:SetCondition(c72430332.thcon)
e1:SetTarget(c72430332.target1)
e1:SetOperation(c72430332.operation1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER,TIMING_MSET)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,72430382)
e2:SetCost(c72430332.cost2)
e2:SetTarget(c72430332.target2)
e2:SetOperation(c72430332.operation2)
c:RegisterEffect(e2)
end
--e1
function c72430332.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c72430332.filter1(c)
return c:IsCode(72430308,72430309) and c:IsAbleToHand()
end
function c72430332.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430332.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c72430332.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c72430332.filter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--e2
function c72430332.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x724) and c:IsDiscardable(REASON_COST)
end
function c72430332.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430332.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c72430332.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c72430332.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,72430322,0,0x4011,1500,1500,1,RACE_MACHINE,ATTRIBUTE_EART) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c72430332.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,72430322,0,0x4011,1500,1500,1,RACE_MACHINE,ATTRIBUTE_EART) then return end
local token=Duel.CreateToken(tp,72430322)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
--马纳历亚魔导公主·安
function c72430333.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,c72430333.matfilter1,nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x724),1,99)
c:EnableReviveLimit()
--big spell or big EVENT
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c72430333.target)
e1:SetOperation(c72430333.operation)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,72430333)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(c72430333.spcon)
e2:SetTarget(c72430333.sptg)
e2:SetOperation(c72430333.spop)
c:RegisterEffect(e2)
end
function c72430333.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c:IsSynchroType(TYPE_NORMAL)
end
function c72430333.filter1(c)
return c:IsCode(72430308) and c:IsDiscardable(REASON_EFFECT)
end
function c72430333.filter2(c)
return c:IsCode(72430309) and c:IsDiscardable(REASON_EFFECT)
end
function c72430333.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c72430333.filter1,tp,LOCATION_HAND,0,1,nil)
local b2= Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,72430323,0,0x4011,4000,4000,1,RACE_WARRIOR,ATTRIBUTE_EARTH,POS_FACEUP) and Duel.IsExistingMatchingCard(c72430333.filter2,tp,LOCATION_HAND,0,1,nil)
if chk==0 then return b1 or b2 end
end
function c72430333.tokentarget(e,c)
return c:IsSetCard(0x724)
end
function c72430333.tokenfilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c72430333.operation(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c72430333.filter1,tp,LOCATION_HAND,0,1,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,72430323,0,0x4011,4000,4000,1,RACE_WARRIOR,ATTRIBUTE_EARTH,POS_FACEUP) and Duel.IsExistingMatchingCard(c72430333.filter2,tp,LOCATION_HAND,0,1,nil)
local opt=0
if b1 and b2 then opt=Duel.SelectOption(tp,aux.Stringid(72430333,1),aux.Stringid(72430333,2))
elseif b1 then opt=Duel.SelectOption(tp,aux.Stringid(72430333,1))
elseif b2 then opt=Duel.SelectOption(tp,aux.Stringid(72430333,2))+1
else return end
if opt==0 then
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
if Duel.DiscardHand(tp,c72430333.filter1,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then
--Duel.BreakEffect()
Duel.Destroy(sg,REASON_EFFECT)
end
elseif opt==1 then
if Duel.DiscardHand(tp,c72430333.filter2,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then
local token=Duel.CreateToken(tp,72430323)
--Duel.BreakEffect()
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(c72430333.tokentarget)
e1:SetValue(c72430333.tokenfilter)
token:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
end
end
--e2
function c72430333.spfilter(c,e,tp)
return c:IsSetCard(0x724) and not c:IsCode(72430333) 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 c72430333.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c72430333.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(c72430333.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c72430333.spop(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c72430333.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
--马纳历亚见习教师·帕丝卡尔
function c72430334.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,72430334)
e1:SetCondition(c72430334.condition1)
e1:SetTarget(c72430334.target1)
e1:SetOperation(c72430334.operation1)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c72430334.condition2)
e2:SetTarget(c72430334.target2)
e2:SetOperation(c72430334.operation2)
c:RegisterEffect(e2)
end
--e1
function c72430334.condition1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c72430334.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,72430324,0,0x4011,1500,1500,1,RACE_MACHINE,ATTRIBUTE_EART) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c72430334.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,72430324,0,0x4011,1500,1500,1,RACE_MACHINE,ATTRIBUTE_EART) then return end
local token=Duel.CreateToken(tp,72430324)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
--e2
function c72430334.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c72430334.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(72430334)==0
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
e:GetHandler():RegisterFlagEffect(72430334,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c72430334.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
--马纳历亚公主·安
function c72430336.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,c72430336.matfilter1,nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x724),1,99)
c:EnableReviveLimit()
--link success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72430336,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,72430336)
e1:SetCondition(c72430336.con)
e1:SetTarget(c72430336.target)
e1:SetOperation(c72430336.operation)
c:RegisterEffect(e1)
end
function c72430336.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c:IsSynchroType(TYPE_NORMAL)
end
function c72430336.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c72430336.filteratk(c)
return c:IsCode(72430308)
end
function c72430336.filterdef(c)
return c:IsCode(72430309)
end
function c72430336.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
-- local b1=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)~=0 and Duel.IsExistingMatchingCard(c72430336.filteratk,tp,LOCATION_GRAVE,0,1,nil)
-- local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)~=0 and Duel.IsPlayerCanSpecialSummonMonster(tp,72430321,0,0x4011,1000,1000,1,RACE_ROCK,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) and Duel.IsExistingMatchingCard(c72430336.filterdef,tp,LOCATION_GRAVE,0,1,nil)
local b0=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil)
local b1=Duel.IsExistingMatchingCard(c72430336.filteratk,tp,LOCATION_GRAVE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c72430336.filterdef,tp,LOCATION_GRAVE,0,1,nil)
local op=0
if b0 and b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(72430336,1),aux.Stringid(72430336,2))
elseif b0 and b1 then
op=Duel.SelectOption(tp,aux.Stringid(72430336,1))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(72430336,2))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_TODECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,nil,1-tp,LOCATION_ONFIELD)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,nil,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,nil,0,0)
end
end
function c72430336.linklimit(e,c)
if not c then return false end
return not c:IsRace(RACE_SPELLCASTER)
end
function c72430336.synlimit(e,c)
if not c then return false end
return not c:IsRace(RACE_SPELLCASTER)
end
function c72430336.operation(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
local a1=Duel.GetMatchingGroupCount(c72430336.filteratk,tp,LOCATION_GRAVE,0,nil)
local a2=Duel.GetMatchingGroupCount(c72430336.filterdef,tp,LOCATION_GRAVE,0,nil)
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,0,a1,nil)
if g1~=0 then
Duel.SendtoDeck(g1,nil,2,REASON_EFFECT)
end
else
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 and a2>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,72430321,0,0x4011,1000,1000,1,RACE_ROCK,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) then
local count=math.min(ft,a2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then count=1 end
if count>1 then
local num={}
local i=1
while i<=count do
num[i]=i
i=i+1
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(72430336,3))
count=Duel.AnnounceNumber(tp,table.unpack(num))
end
repeat
local token=Duel.CreateToken(tp,72430321)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e2)
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(c72430336.linklimit)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e6:SetValue(c72430336.synlimit)
token:RegisterEffect(e6)
count=count-1
until count==0
Duel.SpecialSummonComplete()
end
end
end
--马纳历亚龙人公主·古蕾娅
function c72430341.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c72430341.lcheck)
c:EnableReviveLimit()
--as spellcaster
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_RACE)
e1:SetRange(LOCATION_EXTRA+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetValue(RACE_SPELLCASTER)
c:RegisterEffect(e1)
--des
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER,TIMING_MSET)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c72430341.cost2)
e2:SetTarget(c72430341.target2)
e2:SetOperation(c72430341.operation2)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,72430341)
e3:SetTarget(c72430341.target3)
e3:SetOperation(c72430341.operation3)
c:RegisterEffect(e3)
end
function c72430341.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x724)
end
--e2
function c72430341.costfilter(c)
return c:IsCode(72430308) and c:IsDiscardable(REASON_COST)
end
function c72430341.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430341.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c72430341.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c72430341.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c72430341.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--e3
function c72430341.cfilter(c,tp)
return c:IsLocation(LOCATION_HAND) and c:IsCode(72430309) and c:IsDiscardable(REASON_EFFECT)
end
function c72430341.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c72430341.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c72430341.operation3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c72430341.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
local c=e:GetHandler()
local tc=tg:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--马纳历亚龙人·古蕾娅
function c72430342.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,4,c72430342.lcheck)
c:EnableReviveLimit()
--as spellcaster
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_RACE)
e1:SetRange(LOCATION_EXTRA+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetValue(RACE_SPELLCASTER)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c72430342.atkval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(72430342,0))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetCountLimit(1)
e3:SetCost(c72430342.cost1)
e3:SetCondition(c72430342.atkcon)
e3:SetTarget(c72430342.atktg)
e3:SetOperation(c72430342.atkop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(72430342,1))
e4:SetCategory(CATEGORY_NEGATE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCode(EVENT_CHAINING)
e3:SetCost(c72430342.cost2)
e4:SetCondition(c72430342.negcon)
e4:SetTarget(c72430342.negtg)
e4:SetOperation(c72430342.negop)
c:RegisterEffect(e4)
end
function c72430342.chainlm(e,ep,tp)
return tp==ep
end
function c72430342.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x724)
end
--e2
function c72430342.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_SPELL)*200
end
--e3
function c72430342.filter1(c)
return c:IsCode(72430308) and not c:IsPublic()
end
function c72430342.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430342.filter1,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c72430342.filter1,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c72430342.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
return tc and tc:IsFaceup() and tc:GetAttack()>0
end
function c72430342.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c72430342.filter1,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
Duel.SetTargetCard(e:GetHandler():GetBattleTarget())
end
function c72430342.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
if c:IsRelateToEffect(e) and c:IsFaceup() then
local atk=tc:GetAttack()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(math.ceil(atk))
c:RegisterEffect(e2)
end
Duel.SetChainLimit(c72430342.chainlm)
end
--e4
function c72430342.filter2(c)
return c:IsCode(72430309) and not c:IsPublic()
end
function c72430342.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430342.filter2,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c72430342.filter2,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c72430342.negcon(e,tp,eg,ep,ev,re,r,rp)
return (re:GetActivateLocation()==LOCATION_GRAVE or re:GetActivateLocation()==LOCATION_HAND) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c72430342.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72430342.filter2,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c72430342.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
Duel.SetChainLimit(c72430342.chainlm)
end
--type
\ No newline at end of file
--马纳历亚的密友
function c72430399.initial_effect(c)
--spsummon gry
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72430399,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,72430399+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c72430399.spcon1)
e1:SetTarget(c72430399.sptg1)
e1:SetOperation(c72430399.spop1)
c:RegisterEffect(e1)
--spsummon an
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(72430399,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,72430399+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c72430399.spcon2)
e2:SetTarget(c72430399.sptg2)
e2:SetOperation(c72430399.spop2)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(72430399,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,72430399+EFFECT_COUNT_CODE_OATH)
e3:SetCondition(c72430399.decon)
e3:SetTarget(c72430399.detg)
e3:SetOperation(c72430399.deop)
c:RegisterEffect(e3)
end
--an
function c72430399.filter1(c)
return (c:IsCode(72430333) or c:IsCode(72430336) or c:IsCode(47550015) or c:IsCode(17035350) )
end
--gry
function c72430399.filter2(c)
return (c:IsCode(72430341) or c:IsCode(72430342) or c:IsCode(47550017) or c:IsCode(17035360) )
end
--limit
function c72430399.getsummoncount(tp)
return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)+Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)
end
function c72430399.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c72430399.getsummoncount(sump)>e:GetLabel()
end
function c72430399.countval(e,re,tp)
if c72430399.getsummoncount(tp)>e:GetLabel() then return 0 else return 1 end
end
--e1
function c72430399.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c72430399.filter1,tp,LOCATION_MZONE,0,1,nil)
end
function c72430399.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c72430399.filter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c72430399.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c72430399.filter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
local e2=Effect.CreateEffect(e:GetOwner())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetTargetRange(1,0)
e2:SetLabel(c72430399.getsummoncount(tp))
e2:SetTarget(c72430399.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e3,tp)
local e6=Effect.CreateEffect(e:GetOwner())
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_LEFT_SPSUMMON_COUNT)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,0)
e6:SetLabel(c72430399.getsummoncount(tp))
e6:SetValue(c72430399.countval)
e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp)
end
end
--e2
function c72430399.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c72430399.filter2,tp,LOCATION_MZONE,0,1,nil)
end
function c72430399.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c72430399.filter1,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c72430399.spop2(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,c72430399.filter1,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
local e2=Effect.CreateEffect(e:GetOwner())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetTargetRange(1,0)
e2:SetLabel(c72430399.getsummoncount(tp))
e2:SetTarget(c72430399.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e3,tp)
local e6=Effect.CreateEffect(e:GetOwner())
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_LEFT_SPSUMMON_COUNT)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,0)
e6:SetLabel(c72430399.getsummoncount(tp))
e6:SetValue(c72430399.countval)
e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp)
end
end
--e3
function c72430399.decon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c72430399.filter2,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c72430399.filter1,tp,LOCATION_MZONE,0,1,nil)
end
function c72430399.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c72430399.deop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
\ No newline at end of file
...@@ -56,7 +56,7 @@ function c81012027.linkcon(e) ...@@ -56,7 +56,7 @@ function c81012027.linkcon(e)
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_XYZ) return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_XYZ)
end end
function c81012027.mtfilter(c,tp) function c81012027.mtfilter(c,tp)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsLocation(LOCATION_GRAVE)
end end
function c81012027.mtcon(e,tp,eg,ep,ev,re,r,rp) function c81012027.mtcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c81012027.mtfilter,1,nil,tp) return eg:IsExists(c81012027.mtfilter,1,nil,tp)
......
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