Commit 345600d4 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:purerosefallen/ygopro-222DIY-cards

parents e823f4d1 998871fc
This source diff could not be displayed because it is too large. You can view the blob instead.
--虚构之炎 --虚构之炎
function c11200112.initial_effect(c) function c11200112.initial_effect(c)
local e1=aux.AddRitualProcGreater2(c,c11200112.filter,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,c11200112.mfilter) local e1=aux.AddRitualProcGreater2Code2(c,11200103,11200104,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,c11200112.mfilter)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c11200112.cost) e1:SetCost(c11200112.cost)
e1:SetCountLimit(1,11200112) e1:SetCountLimit(1,11200112+EFFECT_COUNT_CODE_OATH)
end end
function c11200112.filter(c) function c11200112.mfilter(c)
return c:IsCode(11200103,11200104) return c:IsType(TYPE_MONSTER)
end end
function c11200112.mfilter(c) function c11200112.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsType(TYPE_MONSTER) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
end and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
function c11200112.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler())
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end e1:SetType(EFFECT_TYPE_FIELD)
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetLabelObject(e)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTarget(c11200112.sumlimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetLabelObject(e) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTarget(c11200112.splimit) e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp) e2:SetReset(RESET_PHASE+PHASE_END)
end e2:SetTargetRange(1,0)
function c11200112.splimit(e,c,sump,sumtype,sumpos,targetp,se) Duel.RegisterEffect(e2,tp)
return se~=e:GetLabelObject() local e3=e2:Clone()
end e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp)
end
function c11200112.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabelObject()~=se
end
--炼狱骑士团 暗刃龙 --炼狱骑士团 暗刃龙
function c40008674.initial_effect(c) function c40008674.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40008674,0)) e1:SetDescription(aux.Stringid(40008674,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40008674) e1:SetCountLimit(1,40008674)
e1:SetCost(c40008674.cost1) e1:SetCost(c40008674.cost1)
e1:SetCondition(c40008674.spcon1) e1:SetCondition(c40008674.spcon1)
e1:SetTarget(c40008674.target) e1:SetTarget(c40008674.target)
e1:SetOperation(c40008674.activate) e1:SetOperation(c40008674.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40008674,2)) e4:SetDescription(aux.Stringid(40008674,2))
e4:SetCategory(CATEGORY_DRAW) e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c40008674.thcost) e4:SetCost(c40008674.thcost)
e4:SetCountLimit(1,40008675) e4:SetCountLimit(1,40008675)
e4:SetTarget(c40008674.thtg) e4:SetTarget(c40008674.thtg)
e4:SetOperation(c40008674.thop) e4:SetOperation(c40008674.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c40008674.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40008674.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40008677) return not Duel.IsPlayerAffectedByEffect(tp,40008677)
end end
function c40008674.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40008674.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer() return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end end
function c40008674.spcon3(e,tp,eg,ep,ev,re,r,rp) function c40008674.spcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()==e:GetHandlerPlayer() return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end end
function c40008674.cosfilter3(c) function c40008674.cosfilter3(c)
return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost() return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost()
end end
function c40008674.cost3(e,tp,eg,ep,ev,re,r,rp,chk) function c40008674.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008674.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008674.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c40008674.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008674.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008674.tgop) e2:SetOperation(c40008674.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008674.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c40008674.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008674.tgop) e2:SetOperation(c40008674.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008674.cosfilter1(c,tp) function c40008674.cosfilter1(c,tp)
if c:IsLocation(LOCATION_HAND) then return c:IsDiscardable() end if c:IsLocation(LOCATION_HAND) then return c:IsDiscardable() end
return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost() return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost()
end end
function c40008674.cosfilter2(c) function c40008674.cosfilter2(c)
return c:IsCode(40008674) and c:IsAbleToRemoveAsCost() return c:IsCode(40008674) and c:IsAbleToRemoveAsCost()
end end
function c40008674.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c40008674.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008674.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(c40008674.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008674.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(c40008674.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c40008674.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008674.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
local g1=Duel.GetMatchingGroup(c40008674.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tp) local g1=Duel.GetMatchingGroup(c40008674.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g1:Select(tp,1,1,nil):GetFirst() local tc=g1:Select(tp,1,1,nil):GetFirst()
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
else else
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end end
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008674.tgop) e2:SetOperation(c40008674.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end end
function c40008674.tgop(e,tp,eg,ep,ev,re,r,rp) function c40008674.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false) e:GetOwner():CancelToGrave(false)
end end
end end
function c40008674.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40008674.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,40008676,0,0x4011,1100,0,2,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end and Duel.IsPlayerCanSpecialSummonMonster(tp,40008676,0,0x4011,1100,0,2,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c40008674.activate(e,tp,eg,ep,ev,re,r,rp) function c40008674.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008676,0,0x4011,1100,0,2,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008676,0,0x4011,1100,0,2,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,40008676) local token=Duel.CreateToken(tp,40008676)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
then then
Duel.Equip(tp,c,token) Duel.Equip(tp,c,token)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c40008674.eqlimit) e1:SetValue(c40008674.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40008674,1)) e2:SetDescription(aux.Stringid(40008674,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(c40008674.sccon) e2:SetCountLimit(1)
e2:SetTarget(c40008674.sctg) e2:SetCondition(c40008674.sccon)
e2:SetOperation(c40008674.scop) e2:SetTarget(c40008674.sctg)
c:RegisterEffect(e2) e2:SetOperation(c40008674.scop)
local e3=Effect.CreateEffect(c) c:RegisterEffect(e2)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) local e3=Effect.CreateEffect(c)
e3:SetRange(LOCATION_SZONE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c40008674.eftg) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetLabelObject(e2) e3:SetTarget(c40008674.eftg)
c:RegisterEffect(e3) e3:SetLabelObject(e2)
else c:RegisterEffect(e3)
c:CancelToGrave(false) else
Duel.SpecialSummonComplete() c:CancelToGrave(false)
end Duel.SpecialSummonComplete()
end end
function c40008674.eqlimit(e,c) end
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c function c40008674.eqlimit(e,c)
end return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
function c40008674.eftg(e,c) end
return e:GetHandler():GetEquipTarget()==c function c40008674.eftg(e,c)
end return e:GetHandler():GetEquipTarget()==c
function c40008674.sccon(e,tp,eg,ep,ev,re,r,rp) end
local ph=Duel.GetCurrentPhase() function c40008674.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then local ph=Duel.GetCurrentPhase()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) if Duel.GetTurnPlayer()==tp then
else return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN1 or ph==PHASE_MAIN2 else
end return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function c40008674.sctg(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end function c40008674.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function c40008674.scop(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c40008674.scop(e,tp,eg,ep,ev,re,r,rp)
if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end
if g:GetCount()>0 then local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SynchroSummon(tp,sg:GetFirst(),c) local sg=g:Select(tp,1,1,nil)
end Duel.SynchroSummon(tp,sg:GetFirst(),c)
end end
function c40008674.cfilter(c,tp) end
return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost() function c40008674.cfilter(c,tp)
end return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost()
function c40008674.thcost(e,tp,eg,ep,ev,re,r,rp,chk) end
local c=e:GetHandler() function c40008674.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsAbleToRemoveAsCost() local c=e:GetHandler()
and Duel.IsExistingMatchingCard(c40008674.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end if chk==0 then return c:IsAbleToRemoveAsCost()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) and Duel.IsExistingMatchingCard(c40008674.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end
local g=Duel.SelectMatchingCard(tp,c40008674.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g:AddCard(c) local g=Duel.SelectMatchingCard(tp,c40008674.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST) g:AddCard(c)
end Duel.Remove(g,POS_FACEUP,REASON_COST)
function c40008674.thtg(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end function c40008674.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetParam(1) Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetTargetParam(1)
end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
function c40008674.thop(e,tp,eg,ep,ev,re,r,rp) end
if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end function c40008674.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetOperatedGroup():GetFirst() if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end
if tc:IsSetCard(0xf14) then local tc=Duel.GetOperatedGroup():GetFirst()
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008674,3)) then if tc:IsSetCard(0xf14) then
Duel.ConfirmCards(1-tp,tc) if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008674,3)) then
Duel.BreakEffect() Duel.ConfirmCards(1-tp,tc)
Duel.Draw(tp,1,REASON_EFFECT) Duel.BreakEffect()
end Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
end
--炼狱骑士团 十字弓弩龙 --炼狱骑士团 十字弓弩龙
function c40008680.initial_effect(c) function c40008680.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40008680,0)) e1:SetDescription(aux.Stringid(40008680,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40008680) e1:SetCountLimit(1,40008680)
e1:SetCost(c40008680.cost1) e1:SetCost(c40008680.cost1)
e1:SetCondition(c40008680.spcon1) e1:SetCondition(c40008680.spcon1)
e1:SetTarget(c40008680.target) e1:SetTarget(c40008680.target)
e1:SetOperation(c40008680.activate) e1:SetOperation(c40008680.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40008680,2)) e4:SetDescription(aux.Stringid(40008680,2))
e4:SetCategory(CATEGORY_DRAW) e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c40008680.thcost) e4:SetCost(c40008680.thcost)
e4:SetCountLimit(1,40008681) e4:SetCountLimit(1,40008681)
e4:SetTarget(c40008680.destg) e4:SetTarget(c40008680.destg)
e4:SetOperation(c40008680.desop) e4:SetOperation(c40008680.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c40008680.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40008680.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40008677) return not Duel.IsPlayerAffectedByEffect(tp,40008677)
end end
function c40008680.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40008680.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer() return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end end
function c40008680.spcon3(e,tp,eg,ep,ev,re,r,rp) function c40008680.spcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()==e:GetHandlerPlayer() return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end end
function c40008680.cosfilter3(c) function c40008680.cosfilter3(c)
return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost() return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost()
end end
function c40008680.cost3(e,tp,eg,ep,ev,re,r,rp,chk) function c40008680.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008680.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008680.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c40008680.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008680.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008680.tgop) e2:SetOperation(c40008680.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008680.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c40008680.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008680.tgop) e2:SetOperation(c40008680.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008680.cosfilter1(c,tp) function c40008680.cosfilter1(c,tp)
if c:IsLocation(LOCATION_HAND) then return c:IsDiscardable() end if c:IsLocation(LOCATION_HAND) then return c:IsDiscardable() end
return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost() return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost()
end end
function c40008680.cosfilter2(c) function c40008680.cosfilter2(c)
return c:IsCode(40008680) and c:IsAbleToRemoveAsCost() return c:IsCode(40008680) and c:IsAbleToRemoveAsCost()
end end
function c40008680.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c40008680.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008680.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(c40008680.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008680.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(c40008680.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c40008680.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008680.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
local g1=Duel.GetMatchingGroup(c40008680.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tp) local g1=Duel.GetMatchingGroup(c40008680.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g1:Select(tp,1,1,nil):GetFirst() local tc=g1:Select(tp,1,1,nil):GetFirst()
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
else else
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end end
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008680.tgop) e2:SetOperation(c40008680.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end end
function c40008680.tgop(e,tp,eg,ep,ev,re,r,rp) function c40008680.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false) e:GetOwner():CancelToGrave(false)
end end
end end
function c40008680.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40008680.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,40008682,0,0x4011,1300,0,3,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end and Duel.IsPlayerCanSpecialSummonMonster(tp,40008682,0,0x4011,1300,0,3,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c40008680.activate(e,tp,eg,ep,ev,re,r,rp) function c40008680.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008682,0,0x4011,1300,0,3,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008682,0,0x4011,1300,0,3,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,40008682) local token=Duel.CreateToken(tp,40008682)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
then then
Duel.Equip(tp,c,token) Duel.Equip(tp,c,token)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c40008680.eqlimit) e1:SetValue(c40008680.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40008680,1)) e2:SetDescription(aux.Stringid(40008680,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetTarget(c40008680.thtg) e2:SetCountLimit(1)
e2:SetOperation(c40008680.thop) e2:SetTarget(c40008680.thtg)
c:RegisterEffect(e2) e2:SetOperation(c40008680.thop)
local e3=Effect.CreateEffect(c) c:RegisterEffect(e2)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) local e3=Effect.CreateEffect(c)
e3:SetRange(LOCATION_SZONE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c40008680.eftg) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetLabelObject(e2) e3:SetTarget(c40008680.eftg)
c:RegisterEffect(e3) e3:SetLabelObject(e2)
else c:RegisterEffect(e3)
c:CancelToGrave(false) else
Duel.SpecialSummonComplete() c:CancelToGrave(false)
end Duel.SpecialSummonComplete()
end end
function c40008680.eqlimit(e,c) end
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c function c40008680.eqlimit(e,c)
end return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
function c40008680.eftg(e,c) end
return e:GetHandler():GetEquipTarget()==c function c40008680.eftg(e,c)
end return e:GetHandler():GetEquipTarget()==c
function c40008680.thfilter(c) end
return c:IsFaceup() and c:IsAbleToHand() function c40008680.thfilter(c)
end return c:IsFaceup() and c:IsAbleToHand()
function c40008680.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c40008680.thfilter(chkc) end function c40008680.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c40008680.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c40008680.thfilter(chkc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) if chk==0 then return Duel.IsExistingTarget(c40008680.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.SelectTarget(tp,c40008680.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) local g=Duel.SelectTarget(tp,c40008680.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
function c40008680.thop(e,tp,eg,ep,ev,re,r,rp) end
local tc=Duel.GetFirstTarget() function c40008680.thop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then local tc=Duel.GetFirstTarget()
Duel.SendtoHand(tc,nil,REASON_EFFECT) if tc:IsRelateToEffect(e) then
end Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
function c40008680.cfilter(c,tp) end
return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost() function c40008680.cfilter(c,tp)
end return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost()
function c40008680.thcost(e,tp,eg,ep,ev,re,r,rp,chk) end
local c=e:GetHandler() function c40008680.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsAbleToRemoveAsCost() local c=e:GetHandler()
and Duel.IsExistingMatchingCard(c40008680.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end if chk==0 then return c:IsAbleToRemoveAsCost()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) and Duel.IsExistingMatchingCard(c40008680.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end
local g=Duel.SelectMatchingCard(tp,c40008680.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g:AddCard(c) local g=Duel.SelectMatchingCard(tp,c40008680.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST) g:AddCard(c)
end Duel.Remove(g,POS_FACEUP,REASON_COST)
function c40008680.filter(c) end
return c:IsFacedown() function c40008680.filter(c)
end return c:IsFacedown()
function c40008680.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chkc then return chkc:IsOnField() and c40008680.filter(chkc) end function c40008680.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c40008680.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chkc then return chkc:IsOnField() and c40008680.filter(chkc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) if chk==0 then return Duel.IsExistingTarget(c40008680.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.SelectTarget(tp,c40008680.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) local g=Duel.SelectTarget(tp,c40008680.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
function c40008680.desop(e,tp,eg,ep,ev,re,r,rp) end
local tc=Duel.GetFirstTarget() function c40008680.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then local tc=Duel.GetFirstTarget()
if Duel.Destroy(tc,REASON_EFFECT)==0 then return end if tc:IsRelateToEffect(e) then
local tc=Duel.GetOperatedGroup():GetFirst() if Duel.Destroy(tc,REASON_EFFECT)==0 then return end
if tc:IsType(TYPE_SPELL) then local tc=Duel.GetOperatedGroup():GetFirst()
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008680,3)) then if tc:IsType(TYPE_SPELL) then
Duel.ConfirmCards(1-tp,tc) if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008680,3)) then
Duel.BreakEffect() Duel.ConfirmCards(1-tp,tc)
Duel.Draw(tp,1,REASON_EFFECT) Duel.BreakEffect()
end Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
end end
end
--炼狱骑士团 银杖龙 --炼狱骑士团 银杖龙
function c40008683.initial_effect(c) function c40008683.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40008683,0)) e1:SetDescription(aux.Stringid(40008683,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40008683) e1:SetCountLimit(1,40008683)
e1:SetCost(c40008683.cost1) e1:SetCost(c40008683.cost1)
e1:SetCondition(c40008683.spcon1) e1:SetCondition(c40008683.spcon1)
e1:SetTarget(c40008683.target) e1:SetTarget(c40008683.target)
e1:SetOperation(c40008683.activate) e1:SetOperation(c40008683.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40008683,2)) e4:SetDescription(aux.Stringid(40008683,2))
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c40008683.thcost) e4:SetCost(c40008683.thcost)
e4:SetCountLimit(1,40008684) e4:SetCountLimit(1,40008684)
e2:SetCondition(c40008683.dbcon) e2:SetCondition(c40008683.dbcon)
e4:SetTarget(c40008683.dbtg) e4:SetTarget(c40008683.dbtg)
e4:SetOperation(c40008683.dbop) e4:SetOperation(c40008683.dbop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c40008683.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40008683.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40008677) return not Duel.IsPlayerAffectedByEffect(tp,40008677)
end end
function c40008683.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40008683.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=tp return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=tp
end end
function c40008683.spcon3(e,tp,eg,ep,ev,re,r,rp) function c40008683.spcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and not Duel.GetTurnPlayer()~=tp return Duel.IsPlayerAffectedByEffect(tp,40008677) and not Duel.GetTurnPlayer()~=tp
end end
function c40008683.cosfilter3(c) function c40008683.cosfilter3(c)
return c:IsSetCard(0xf14) and (c:IsAbleToGraveAsCost() or c:IsDiscardable()) return c:IsSetCard(0xf14) and (c:IsAbleToGraveAsCost() or c:IsDiscardable())
end end
function c40008683.cost3(e,tp,eg,ep,ev,re,r,rp,chk) function c40008683.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008683.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008683.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c40008683.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008683.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008683.tgop) e2:SetOperation(c40008683.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008683.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c40008683.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008683.tgop) e2:SetOperation(c40008683.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008683.cosfilter1(c) function c40008683.cosfilter1(c)
return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost() return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost()
end end
function c40008683.cosfilter2(c) function c40008683.cosfilter2(c)
return c:IsCode(40008683) and c:IsAbleToRemoveAsCost() return c:IsCode(40008683) and c:IsAbleToRemoveAsCost()
end end
function c40008683.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c40008683.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008683.cosfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c40008683.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008683.cosfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c40008683.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c40008683.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008683.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,c40008683.cosfilter1,tp,LOCATION_DECK,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,c40008683.cosfilter1,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(g1,REASON_COST) Duel.SendtoGrave(g1,REASON_COST)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008683.tgop) e2:SetOperation(c40008683.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008683.tgop(e,tp,eg,ep,ev,re,r,rp) function c40008683.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false) e:GetOwner():CancelToGrave(false)
end end
end end
function c40008683.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40008683.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,40008685,0,0x4011,700,0,1,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end and Duel.IsPlayerCanSpecialSummonMonster(tp,40008685,0,0x4011,700,0,1,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c40008683.activate(e,tp,eg,ep,ev,re,r,rp) function c40008683.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008685,0,0x4011,700,0,1,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008685,0,0x4011,700,0,1,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,40008685) local token=Duel.CreateToken(tp,40008685)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
then then
Duel.Equip(tp,c,token) Duel.Equip(tp,c,token)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c40008683.eqlimit) e1:SetValue(c40008683.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40008683,1)) e2:SetDescription(aux.Stringid(40008683,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(c40008683.sccon) e2:SetCountLimit(1)
e2:SetTarget(c40008683.sctg) e2:SetCondition(c40008683.sccon)
e2:SetOperation(c40008683.scop) e2:SetTarget(c40008683.sctg)
c:RegisterEffect(e2) e2:SetOperation(c40008683.scop)
local e3=Effect.CreateEffect(c) c:RegisterEffect(e2)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) local e3=Effect.CreateEffect(c)
e3:SetRange(LOCATION_SZONE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c40008683.eftg) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetLabelObject(e2) e3:SetTarget(c40008683.eftg)
c:RegisterEffect(e3) e3:SetLabelObject(e2)
else c:RegisterEffect(e3)
c:CancelToGrave(false) else
Duel.SpecialSummonComplete() c:CancelToGrave(false)
end Duel.SpecialSummonComplete()
end end
function c40008683.eqlimit(e,c) end
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c function c40008683.eqlimit(e,c)
end return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
function c40008683.eftg(e,c) end
return e:GetHandler():GetEquipTarget()==c function c40008683.eftg(e,c)
end return e:GetHandler():GetEquipTarget()==c
function c40008683.sccon(e,tp,eg,ep,ev,re,r,rp) end
local ph=Duel.GetCurrentPhase() function c40008683.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then local ph=Duel.GetCurrentPhase()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) if Duel.GetTurnPlayer()==tp then
else return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN1 or ph==PHASE_MAIN2 else
end return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function c40008683.sctg(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end function c40008683.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function c40008683.scop(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c40008683.scop(e,tp,eg,ep,ev,re,r,rp)
if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end
if g:GetCount()>0 then local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SynchroSummon(tp,sg:GetFirst(),c) local sg=g:Select(tp,1,1,nil)
end Duel.SynchroSummon(tp,sg:GetFirst(),c)
end end
function c40008683.cfilter(c,tp) end
return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost() function c40008683.cfilter(c,tp)
end return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost()
function c40008683.thcost(e,tp,eg,ep,ev,re,r,rp,chk) end
local c=e:GetHandler() function c40008683.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsAbleToRemoveAsCost() local c=e:GetHandler()
and Duel.IsExistingMatchingCard(c40008683.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end if chk==0 then return c:IsAbleToRemoveAsCost()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) and Duel.IsExistingMatchingCard(c40008683.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end
local g=Duel.SelectMatchingCard(tp,c40008683.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g:AddCard(c) local g=Duel.SelectMatchingCard(tp,c40008683.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST) g:AddCard(c)
end Duel.Remove(g,POS_FACEUP,REASON_COST)
function c40008683.dbcon(e,tp,eg,ep,ev,re,r,rp) end
return Duel.IsAbleToEnterBP() function c40008683.dbcon(e,tp,eg,ep,ev,re,r,rp)
end return Duel.IsAbleToEnterBP()
function c40008683.dbfilter(c) end
return c:IsFaceup() and c:GetFlagEffect(40008683)==0 function c40008683.dbfilter(c)
end return c:IsFaceup() and c:GetFlagEffect(40008683)==0
function c40008683.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c40008683.dbfilter(chkc) end function c40008683.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c40008683.dbfilter,tp,LOCATION_MZONE,0,1,nil) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c40008683.dbfilter(chkc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) if chk==0 then return Duel.IsExistingTarget(c40008683.dbfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SelectTarget(tp,c40008683.dbfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
end Duel.SelectTarget(tp,c40008683.dbfilter,tp,LOCATION_MZONE,0,1,1,nil)
function c40008683.dbop(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c40008683.dbop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local tc=Duel.GetFirstTarget()
e1:SetType(EFFECT_TYPE_FIELD) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetTarget(c40008683.ftarget) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetLabel(tc:GetFieldID()) e1:SetTarget(c40008683.ftarget)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetLabel(tc:GetFieldID())
Duel.RegisterEffect(e1,tp) e1:SetReset(RESET_PHASE+PHASE_END)
if tc:IsRelateToEffect(e) then Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) if tc:IsRelateToEffect(e) then
e2:SetType(EFFECT_TYPE_SINGLE) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetCode(EFFECT_DIRECT_ATTACK)
tc:RegisterEffect(e2) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end tc:RegisterEffect(e2)
if tc:IsSetCard(0xf14) then end
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008683,3)) then if tc:IsSetCard(0xf14) then
Duel.ConfirmCards(1-tp,tc) if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008683,3)) then
Duel.BreakEffect() Duel.ConfirmCards(1-tp,tc)
Duel.Draw(tp,1,REASON_EFFECT) Duel.BreakEffect()
end Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
function c40008683.ftarget(e,c) end
return e:GetLabel()~=c:GetFieldID() function c40008683.ftarget(e,c)
end return e:GetLabel()~=c:GetFieldID()
end
--炼狱骑士团 血斧龙 --炼狱骑士团 血斧龙
function c40008688.initial_effect(c) function c40008688.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40008688,0)) e1:SetDescription(aux.Stringid(40008688,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40008688) e1:SetCountLimit(1,40008688)
e1:SetCost(c40008688.cost1) e1:SetCost(c40008688.cost1)
e1:SetCondition(c40008688.spcon1) e1:SetCondition(c40008688.spcon1)
e1:SetTarget(c40008688.target) e1:SetTarget(c40008688.target)
e1:SetOperation(c40008688.activate) e1:SetOperation(c40008688.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40008688,2)) e4:SetDescription(aux.Stringid(40008688,2))
e4:SetCategory(CATEGORY_DRAW) e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c40008688.thcost) e4:SetCost(c40008688.thcost)
e4:SetCountLimit(1,40008689) e4:SetCountLimit(1,40008689)
e4:SetTarget(c40008688.destg) e4:SetTarget(c40008688.destg)
e4:SetOperation(c40008688.desop) e4:SetOperation(c40008688.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c40008688.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40008688.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40008677) return not Duel.IsPlayerAffectedByEffect(tp,40008677)
end end
function c40008688.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40008688.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer() return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end end
function c40008688.spcon3(e,tp,eg,ep,ev,re,r,rp) function c40008688.spcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()==e:GetHandlerPlayer() return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end end
function c40008688.cosfilter3(c) function c40008688.cosfilter3(c)
return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost() return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost()
end end
function c40008688.cost3(e,tp,eg,ep,ev,re,r,rp,chk) function c40008688.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008688.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008688.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c40008688.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008688.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008688.tgop) e2:SetOperation(c40008688.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008688.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c40008688.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008688.tgop) e2:SetOperation(c40008688.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008688.cosfilter1(c,tp) function c40008688.cosfilter1(c,tp)
if c:IsLocation(LOCATION_HAND) then return c:IsDiscardable() end if c:IsLocation(LOCATION_HAND) then return c:IsDiscardable() end
return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost() return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost()
end end
function c40008688.cosfilter2(c) function c40008688.cosfilter2(c)
return c:IsCode(40008688) and c:IsAbleToRemoveAsCost() return c:IsCode(40008688) and c:IsAbleToRemoveAsCost()
end end
function c40008688.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c40008688.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008688.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(c40008688.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008688.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(c40008688.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c40008688.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008688.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
local g1=Duel.GetMatchingGroup(c40008688.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tp) local g1=Duel.GetMatchingGroup(c40008688.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g1:Select(tp,1,1,nil):GetFirst() local tc=g1:Select(tp,1,1,nil):GetFirst()
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
else else
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end end
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008688.tgop) e2:SetOperation(c40008688.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end end
function c40008688.tgop(e,tp,eg,ep,ev,re,r,rp) function c40008688.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false) e:GetOwner():CancelToGrave(false)
end end
end end
function c40008688.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40008688.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,40008690,0,0x4011,1500,0,4,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end and Duel.IsPlayerCanSpecialSummonMonster(tp,40008690,0,0x4011,1500,0,4,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c40008688.activate(e,tp,eg,ep,ev,re,r,rp) function c40008688.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008690,0,0x4011,1500,0,4,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008690,0,0x4011,1500,0,4,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,40008690) local token=Duel.CreateToken(tp,40008690)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
then then
Duel.Equip(tp,c,token) Duel.Equip(tp,c,token)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c40008688.eqlimit) e1:SetValue(c40008688.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40008688,1)) e2:SetDescription(aux.Stringid(40008688,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetTarget(c40008688.thtg) e2:SetCountLimit(1)
e2:SetOperation(c40008688.thop) e2:SetTarget(c40008688.thtg)
c:RegisterEffect(e2) e2:SetOperation(c40008688.thop)
local e3=Effect.CreateEffect(c) c:RegisterEffect(e2)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) local e3=Effect.CreateEffect(c)
e3:SetRange(LOCATION_SZONE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c40008688.eftg) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetLabelObject(e2) e3:SetTarget(c40008688.eftg)
c:RegisterEffect(e3) e3:SetLabelObject(e2)
else c:RegisterEffect(e3)
c:CancelToGrave(false) else
Duel.SpecialSummonComplete() c:CancelToGrave(false)
end Duel.SpecialSummonComplete()
end end
function c40008688.eqlimit(e,c) end
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c function c40008688.eqlimit(e,c)
end return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
function c40008688.eftg(e,c) end
return e:GetHandler():GetEquipTarget()==c function c40008688.eftg(e,c)
end return e:GetHandler():GetEquipTarget()==c
function c40008688.thfilter(c) end
return c:IsSetCard(0xf14) and not c:IsCode(40008688) and c:IsAbleToHand() function c40008688.thfilter(c)
end return c:IsSetCard(0xf14) and not c:IsCode(40008688) and c:IsAbleToHand()
function c40008688.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chk==0 then return true end function c40008688.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) if chk==0 then return true end
end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
function c40008688.thop(e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) function c40008688.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c40008688.thfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if g:GetCount()>0 then local g=Duel.SelectMatchingCard(tp,c40008688.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g) Duel.SendtoHand(g,nil,REASON_EFFECT)
end Duel.ConfirmCards(1-tp,g)
end end
function c40008688.cfilter(c,tp) end
return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost() function c40008688.cfilter(c,tp)
end return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost()
function c40008688.thcost(e,tp,eg,ep,ev,re,r,rp,chk) end
local c=e:GetHandler() function c40008688.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsAbleToRemoveAsCost() local c=e:GetHandler()
and Duel.IsExistingMatchingCard(c40008688.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end if chk==0 then return c:IsAbleToRemoveAsCost()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) and Duel.IsExistingMatchingCard(c40008688.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end
local g=Duel.SelectMatchingCard(tp,c40008688.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g:AddCard(c) local g=Duel.SelectMatchingCard(tp,c40008688.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST) g:AddCard(c)
end Duel.Remove(g,POS_FACEUP,REASON_COST)
function c40008688.filter(c) end
return c:IsFaceup() function c40008688.filter(c)
end return c:IsFaceup()
function c40008688.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40008688.filter(chkc) end function c40008688.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c40008688.filter,tp,LOCATION_MZONE,0,1,nil) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40008688.filter(chkc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) if chk==0 then return Duel.IsExistingTarget(c40008688.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SelectTarget(tp,c40008688.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
end Duel.SelectTarget(tp,c40008688.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c40008688.desop(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c40008688.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local c=e:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then local tc=Duel.GetFirstTarget()
local e1=Effect.CreateEffect(c) if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c40008688.efilter) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOwnerPlayer(tp) e1:SetValue(c40008688.efilter)
tc:RegisterEffect(e1) e1:SetOwnerPlayer(tp)
end tc:RegisterEffect(e1)
if tc:IsSetCard(0xf14) then end
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008688,3)) then if tc:IsSetCard(0xf14) then
Duel.ConfirmCards(1-tp,tc) if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008688,3)) then
Duel.BreakEffect() Duel.ConfirmCards(1-tp,tc)
Duel.Draw(tp,1,REASON_EFFECT) Duel.BreakEffect()
end Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
function c40008688.efilter(e,re) end
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() function c40008688.efilter(e,re)
end return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--炼狱骑士团 巨剪龙 --炼狱骑士团 巨剪龙
function c40008694.initial_effect(c) function c40008694.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40008694,0)) e1:SetDescription(aux.Stringid(40008694,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40008694) e1:SetCountLimit(1,40008694)
e1:SetCost(c40008694.cost1) e1:SetCost(c40008694.cost1)
e1:SetCondition(c40008694.spcon1) e1:SetCondition(c40008694.spcon1)
e1:SetTarget(c40008694.target) e1:SetTarget(c40008694.target)
e1:SetOperation(c40008694.activate) e1:SetOperation(c40008694.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40008694,2)) e4:SetDescription(aux.Stringid(40008694,2))
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c40008694.thcost) e4:SetCost(c40008694.thcost)
e4:SetCountLimit(1,40008695) e4:SetCountLimit(1,40008695)
e4:SetTarget(c40008694.thtg) e4:SetTarget(c40008694.thtg)
e4:SetOperation(c40008694.thop) e4:SetOperation(c40008694.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c40008694.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40008694.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40008677) return not Duel.IsPlayerAffectedByEffect(tp,40008677)
end end
function c40008694.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40008694.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer() return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end end
function c40008694.spcon3(e,tp,eg,ep,ev,re,r,rp) function c40008694.spcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()==e:GetHandlerPlayer() return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end end
function c40008694.cosfilter3(c) function c40008694.cosfilter3(c)
return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost() return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost()
end end
function c40008694.cost3(e,tp,eg,ep,ev,re,r,rp,chk) function c40008694.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008694.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008694.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c40008694.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008694.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008694.tgop) e2:SetOperation(c40008694.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008694.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c40008694.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008694.tgop) e2:SetOperation(c40008694.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008694.cosfilter1(c,tp) function c40008694.cosfilter1(c,tp)
if c:IsLocation(LOCATION_HAND) then return c:IsDiscardable() end if c:IsLocation(LOCATION_HAND) then return c:IsDiscardable() end
return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost() return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost()
end end
function c40008694.cosfilter2(c) function c40008694.cosfilter2(c)
return c:IsCode(40008694) and c:IsAbleToRemoveAsCost() return c:IsCode(40008694) and c:IsAbleToRemoveAsCost()
end end
function c40008694.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c40008694.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008694.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(c40008694.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008694.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(c40008694.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c40008694.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008694.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
local g1=Duel.GetMatchingGroup(c40008694.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tp) local g1=Duel.GetMatchingGroup(c40008694.costfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g1:Select(tp,1,1,nil):GetFirst() local tc=g1:Select(tp,1,1,nil):GetFirst()
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
else else
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end end
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008694.tgop) e2:SetOperation(c40008694.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end end
function c40008694.tgop(e,tp,eg,ep,ev,re,r,rp) function c40008694.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false) e:GetOwner():CancelToGrave(false)
end end
end end
function c40008694.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40008694.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,40008696,0,0x4011,1100,0,2,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end and Duel.IsPlayerCanSpecialSummonMonster(tp,40008696,0,0x4011,1100,0,2,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c40008694.activate(e,tp,eg,ep,ev,re,r,rp) function c40008694.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008696,0,0x4011,1100,0,2,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008696,0,0x4011,1100,0,2,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,40008696) local token=Duel.CreateToken(tp,40008696)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
then then
Duel.Equip(tp,c,token) Duel.Equip(tp,c,token)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c40008694.eqlimit) e1:SetValue(c40008694.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40008694,1)) e2:SetDescription(aux.Stringid(40008694,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(c40008694.sccon) e2:SetCountLimit(1)
e2:SetTarget(c40008694.sctg) e2:SetCondition(c40008694.sccon)
e2:SetOperation(c40008694.scop) e2:SetTarget(c40008694.sctg)
c:RegisterEffect(e2) e2:SetOperation(c40008694.scop)
local e3=Effect.CreateEffect(c) c:RegisterEffect(e2)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) local e3=Effect.CreateEffect(c)
e3:SetRange(LOCATION_SZONE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c40008694.eftg) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetLabelObject(e2) e3:SetTarget(c40008694.eftg)
c:RegisterEffect(e3) e3:SetLabelObject(e2)
else c:RegisterEffect(e3)
c:CancelToGrave(false) else
Duel.SpecialSummonComplete() c:CancelToGrave(false)
end Duel.SpecialSummonComplete()
end end
function c40008694.eqlimit(e,c) end
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c function c40008694.eqlimit(e,c)
end return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
function c40008694.eftg(e,c) end
return e:GetHandler():GetEquipTarget()==c function c40008694.eftg(e,c)
end return e:GetHandler():GetEquipTarget()==c
function c40008694.sccon(e,tp,eg,ep,ev,re,r,rp) end
local ph=Duel.GetCurrentPhase() function c40008694.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then local ph=Duel.GetCurrentPhase()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) if Duel.GetTurnPlayer()==tp then
else return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN1 or ph==PHASE_MAIN2 else
end return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function c40008694.sctg(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end function c40008694.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function c40008694.scop(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c40008694.scop(e,tp,eg,ep,ev,re,r,rp)
if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end
if g:GetCount()>0 then local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SynchroSummon(tp,sg:GetFirst(),c) local sg=g:Select(tp,1,1,nil)
end Duel.SynchroSummon(tp,sg:GetFirst(),c)
end end
function c40008694.cfilter(c,tp) end
return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost() function c40008694.cfilter(c,tp)
end return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost()
function c40008694.thcost(e,tp,eg,ep,ev,re,r,rp,chk) end
local c=e:GetHandler() function c40008694.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsAbleToRemoveAsCost() local c=e:GetHandler()
and Duel.IsExistingMatchingCard(c40008694.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end if chk==0 then return c:IsAbleToRemoveAsCost()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) and Duel.IsExistingMatchingCard(c40008694.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end
local g=Duel.SelectMatchingCard(tp,c40008694.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g:AddCard(c) local g=Duel.SelectMatchingCard(tp,c40008694.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST) g:AddCard(c)
end Duel.Remove(g,POS_FACEUP,REASON_COST)
function c40008694.thtg(e,tp,eg,ep,ev,re,r,rp,chk) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) end function c40008694.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chkc then return chkc:IsLocation(LOCATION_MZONE) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
end Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
function c40008694.thop(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c40008694.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local c=e:GetHandler()
if tc:IsRelateToEffect(e) then local tc=Duel.GetFirstTarget()
local e1=Effect.CreateEffect(c) if tc:IsRelateToEffect(e) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(1) e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetValue(1)
tc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local e2=e1:Clone() tc:RegisterEffect(e1)
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) local e2=e1:Clone()
tc:RegisterEffect(e2) e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
local e5=e1:Clone() tc:RegisterEffect(e2)
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) local e5=e1:Clone()
c:RegisterEffect(e5) e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
if tc:IsSetCard(0xf14) then c:RegisterEffect(e5)
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008694,3)) then if tc:IsSetCard(0xf14) then
Duel.ConfirmCards(1-tp,tc) if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008694,3)) then
Duel.BreakEffect() Duel.ConfirmCards(1-tp,tc)
Duel.Draw(tp,1,REASON_EFFECT) Duel.BreakEffect()
end Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
end end
end
--炼狱骑士团 刚链索命龙 --炼狱骑士团 刚链索命龙
function c40008697.initial_effect(c) function c40008697.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40008697,0)) e1:SetDescription(aux.Stringid(40008697,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40008697) e1:SetCountLimit(1,40008697)
e1:SetCost(c40008697.cost1) e1:SetCost(c40008697.cost1)
e1:SetCondition(c40008697.spcon1) e1:SetCondition(c40008697.spcon1)
e1:SetTarget(c40008697.target) e1:SetTarget(c40008697.target)
e1:SetOperation(c40008697.activate) e1:SetOperation(c40008697.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40008697,2)) e4:SetDescription(aux.Stringid(40008697,2))
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c40008697.thcost) e4:SetCost(c40008697.thcost)
e4:SetCountLimit(1,40008698) e4:SetCountLimit(1,40008698)
e2:SetCondition(c40008697.dbcon) e2:SetCondition(c40008697.dbcon)
e4:SetTarget(c40008697.dbtg) e4:SetTarget(c40008697.dbtg)
e4:SetOperation(c40008697.dbop) e4:SetOperation(c40008697.dbop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c40008697.spcon1(e,tp,eg,ep,ev,re,r,rp) function c40008697.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,40008677) return not Duel.IsPlayerAffectedByEffect(tp,40008677)
end end
function c40008697.spcon2(e,tp,eg,ep,ev,re,r,rp) function c40008697.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=tp return Duel.IsPlayerAffectedByEffect(tp,40008677) and Duel.GetTurnPlayer()~=tp
end end
function c40008697.spcon3(e,tp,eg,ep,ev,re,r,rp) function c40008697.spcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,40008677) and not Duel.GetTurnPlayer()~=tp return Duel.IsPlayerAffectedByEffect(tp,40008677) and not Duel.GetTurnPlayer()~=tp
end end
function c40008697.cosfilter3(c) function c40008697.cosfilter3(c)
return c:IsSetCard(0xf14) and (c:IsAbleToGraveAsCost() or c:IsDiscardable()) return c:IsSetCard(0xf14) and (c:IsAbleToGraveAsCost() or c:IsDiscardable())
end end
function c40008697.cost3(e,tp,eg,ep,ev,re,r,rp,chk) function c40008697.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008697.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008697.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c40008697.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008697.cosfilter3,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008697.tgop) e2:SetOperation(c40008697.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008697.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c40008697.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008697.tgop) e2:SetOperation(c40008697.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008697.cosfilter1(c) function c40008697.cosfilter1(c)
return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost() return c:IsSetCard(0xf14) and c:IsAbleToGraveAsCost()
end end
function c40008697.cosfilter2(c) function c40008697.cosfilter2(c)
return c:IsCode(40008697) and c:IsAbleToRemoveAsCost() return c:IsCode(40008697) and c:IsAbleToRemoveAsCost()
end end
function c40008697.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c40008697.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008697.cosfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c40008697.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40008697.cosfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c40008697.cosfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c40008697.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40008697.cosfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,c40008697.cosfilter1,tp,LOCATION_DECK,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,c40008697.cosfilter1,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(g1,REASON_COST) Duel.SendtoGrave(g1,REASON_COST)
local c=e:GetHandler() local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD) e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED) e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c40008697.tgop) e2:SetOperation(c40008697.tgop)
e2:SetLabel(cid) e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN) e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c40008697.tgop(e,tp,eg,ep,ev,re,r,rp) function c40008697.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false) e:GetOwner():CancelToGrave(false)
end end
end end
function c40008697.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40008697.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,40008699,0,0x4011,1900,0,5,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end and Duel.IsPlayerCanSpecialSummonMonster(tp,40008699,0,0x4011,1900,0,5,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c40008697.activate(e,tp,eg,ep,ev,re,r,rp) function c40008697.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008699,0,0x4011,1900,0,5,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,40008699,0,0x4011,1900,0,5,RACE_DRAGON,ATTRIBUTE_FIRE,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,40008699) local token=Duel.CreateToken(tp,40008699)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
then then
Duel.Equip(tp,c,token) Duel.Equip(tp,c,token)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c40008697.eqlimit) e1:SetValue(c40008697.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40008697,1)) e2:SetDescription(aux.Stringid(40008697,1))
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetTarget(c40008688.thtg) e2:SetCountLimit(1)
e2:SetOperation(c40008688.thop) e2:SetTarget(c40008688.thtg)
c:RegisterEffect(e2) e2:SetOperation(c40008688.thop)
local e3=Effect.CreateEffect(c) c:RegisterEffect(e2)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) local e3=Effect.CreateEffect(c)
e3:SetRange(LOCATION_SZONE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c40008697.eftg) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetLabelObject(e2) e3:SetTarget(c40008697.eftg)
c:RegisterEffect(e3) e3:SetLabelObject(e2)
else c:RegisterEffect(e3)
c:CancelToGrave(false) else
Duel.SpecialSummonComplete() c:CancelToGrave(false)
end Duel.SpecialSummonComplete()
end end
function c40008697.eqlimit(e,c) end
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c function c40008697.eqlimit(e,c)
end return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
function c40008697.eftg(e,c) end
return e:GetHandler():GetEquipTarget()==c function c40008697.eftg(e,c)
end return e:GetHandler():GetEquipTarget()==c
function c40008697.thfilter(c) end
return c:IsSetCard(0xf14) and not c:IsCode(40008697) and c:IsAbleToGrave() function c40008697.thfilter(c)
end return c:IsSetCard(0xf14) and not c:IsCode(40008697) and c:IsAbleToGrave()
function c40008697.thtg(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return Duel.IsExistingMatchingCard(c40008697.thfilter,tp,LOCATION_DECK,0,1,nil) end function c40008697.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) if chk==0 then return Duel.IsExistingMatchingCard(c40008697.thfilter,tp,LOCATION_DECK,0,1,nil) end
end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
function c40008697.thop(e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) function c40008697.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c40008697.thfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if g:GetCount()>0 then local g=Duel.SelectMatchingCard(tp,c40008697.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT) if g:GetCount()>0 then
end Duel.SendtoGrave(g,REASON_EFFECT)
end end
function c40008697.cfilter(c,tp) end
return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost() function c40008697.cfilter(c,tp)
end return c:IsSetCard(0xf14) and c:IsAbleToRemoveAsCost()
function c40008697.thcost(e,tp,eg,ep,ev,re,r,rp,chk) end
local c=e:GetHandler() function c40008697.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsAbleToRemoveAsCost() local c=e:GetHandler()
and Duel.IsExistingMatchingCard(c40008697.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end if chk==0 then return c:IsAbleToRemoveAsCost()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) and Duel.IsExistingMatchingCard(c40008697.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end
local g=Duel.SelectMatchingCard(tp,c40008697.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g:AddCard(c) local g=Duel.SelectMatchingCard(tp,c40008697.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST) g:AddCard(c)
end Duel.Remove(g,POS_FACEUP,REASON_COST)
function c40008697.dbcon(e,tp,eg,ep,ev,re,r,rp) end
return Duel.IsAbleToEnterBP() function c40008697.dbcon(e,tp,eg,ep,ev,re,r,rp)
end return Duel.IsAbleToEnterBP()
function c40008697.dbfilter(c) end
return c:IsFaceup() and c:GetFlagEffect(40008697)==0 function c40008697.dbfilter(c)
end return c:IsFaceup() and c:GetFlagEffect(40008697)==0
function c40008697.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c40008697.dbfilter(chkc) end function c40008697.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c40008697.dbfilter,tp,LOCATION_MZONE,0,1,nil) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c40008697.dbfilter(chkc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) if chk==0 then return Duel.IsExistingTarget(c40008697.dbfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SelectTarget(tp,c40008697.dbfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
end Duel.SelectTarget(tp,c40008697.dbfilter,tp,LOCATION_MZONE,0,1,1,nil)
function c40008697.dbop(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c40008697.dbop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local tc=Duel.GetFirstTarget()
e1:SetType(EFFECT_TYPE_FIELD) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetValue(c40008697.aclimit) e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE) e1:SetValue(c40008697.aclimit)
Duel.RegisterEffect(e1,tp) e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
if tc:IsSetCard(0xf14) then Duel.RegisterEffect(e1,tp)
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008697,3)) then if tc:IsSetCard(0xf14) then
Duel.ConfirmCards(1-tp,tc) if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(40008697,3)) then
Duel.BreakEffect() Duel.ConfirmCards(1-tp,tc)
Duel.Draw(tp,1,REASON_EFFECT) Duel.BreakEffect()
end Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
function c40008697.aclimit(e,re,tp) end
return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) function c40008697.aclimit(e,re,tp)
end return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
end
--绫濑亚梦·幼驯染 --绫濑亚梦·幼驯染
function c81011020.initial_effect(c) function c81011020.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c81011023.ffilter,3,true) aux.AddFusionProcFunRep(c,c81011020.ffilter,3,true)
--name --name
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetTarget(c81011020.nmtg) e1:SetTarget(c81011020.nmtg)
e1:SetOperation(c81011020.nmop) e1:SetOperation(c81011020.nmop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--token --token
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_REMOVE) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,81011020) e2:SetCountLimit(1,81011020)
e2:SetCondition(c81011020.tkcon) e2:SetCondition(c81011020.tkcon)
e2:SetTarget(c81011020.tktg) e2:SetTarget(c81011020.tktg)
e2:SetOperation(c81011020.tkop) e2:SetOperation(c81011020.tkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,81011920+EFFECT_COUNT_CODE_SINGLE) e3:SetCountLimit(1,81011920+EFFECT_COUNT_CODE_SINGLE)
e3:SetTarget(c81011020.sptg) e3:SetTarget(c81011020.sptg)
e3:SetOperation(c81011020.spop) e3:SetOperation(c81011020.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EVENT_REMOVE) e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c81011020.ffilter(c,fc,sub,mg,sg) function c81011020.ffilter(c,fc,sub,mg,sg)
return (not c:IsType(TYPE_TOKEN)) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())) return (not c:IsType(TYPE_TOKEN)) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end end
function c81011020.nmfilter(c,cd) function c81011020.nmfilter(c,cd)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
and not c:IsCode(cd) and not c:IsCode(cd)
end end
function c81011020.nmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81011020.nmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cd=e:GetHandler():GetCode() local cd=e:GetHandler():GetCode()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c81011020.nmfilter(chkc,cd) end if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c81011020.nmfilter(chkc,cd) end
if chk==0 then return Duel.IsExistingTarget(c81011020.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,cd) end if chk==0 then return Duel.IsExistingTarget(c81011020.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,cd) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c81011020.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,cd) Duel.SelectTarget(tp,c81011020.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,cd)
end end
function c81011020.nmop(e,tp,eg,ep,ev,re,r,rp) function c81011020.nmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup()) then if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup()) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetOriginalCode()) e1:SetValue(tc:GetOriginalCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c81011020.tkcon(e,tp,eg,ep,ev,re,r,rp) function c81011020.tkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonType,1,e:GetHandler(),SUMMON_TYPE_FUSION) return eg:IsExists(Card.IsSummonType,1,e:GetHandler(),SUMMON_TYPE_FUSION)
end end
function c81011020.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function c81011020.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsPlayerCanSpecialSummonMonster(tp,81011019,0,0x4011,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) end and Duel.IsPlayerCanSpecialSummonMonster(tp,81011019,0,0x4011,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c81011020.tkop(e,tp,eg,ep,ev,re,r,rp) function c81011020.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,81011019,0,0x4011,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) then if Duel.IsPlayerCanSpecialSummonMonster(tp,81011019,0,0x4011,2800,2000,8,RACE_PLANT,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,81011019) local token=Duel.CreateToken(tp,81011019)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
function c81011020.thfilter2(c) function c81011020.thfilter2(c)
return c:IsCode(81011021) and c:IsAbleToHand() return c:IsCode(81011021) and c:IsAbleToHand()
end end
function c81011020.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81011020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81011020.thfilter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c81011020.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c81011020.spop(e,tp,eg,ep,ev,re,r,rp) function c81011020.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c81011020.thfilter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c81011020.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--第三领域 --第三领域
function c9980197.initial_effect(c) function c9980197.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(9980197,0)) e5:SetDescription(aux.Stringid(9980197,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1) e5:SetCountLimit(1)
e5:SetTarget(c9980197.sptg) e5:SetTarget(c9980197.sptg)
e5:SetOperation(c9980197.spop) e5:SetOperation(c9980197.spop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9980197,1)) e2:SetDescription(aux.Stringid(9980197,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c9980197.thcon) e2:SetCondition(c9980197.thcon)
e2:SetTarget(c9980197.thtg) e2:SetTarget(c9980197.thtg)
e2:SetOperation(c9980197.thop) e2:SetOperation(c9980197.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9980197,2)) e1:SetDescription(aux.Stringid(9980197,2))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c9980197.cost) e1:SetCost(c9980197.cost)
e1:SetTarget(c9980197.target) e1:SetTarget(c9980197.target)
e1:SetOperation(c9980197.activate) e1:SetOperation(c9980197.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c9980197.cfilter2(c,tp) function c9980197.filter3(c,e,tp)
return c:IsSetCard(0x6bc8) and c:IsReason(REASON_BATTLE+REASON_EFFECT) return c:IsFaceup() and c:IsSetCard(0x6bc8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp end
end function c9980197.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c9980197.spcon(e,tp,eg,ep,ev,re,r,rp) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c9980197.filter3(chkc,e,tp) end
return eg:IsExists(c9980197.cfilter2,1,nil,tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end and Duel.IsExistingTarget(c9980197.filter3,tp,LOCATION_SZONE,0,1,nil,e,tp) end
function c9980197.filter3(c,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
return c:IsFaceup() and c:IsSetCard(0x6bc8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) local g=Duel.SelectTarget(tp,c9980197.filter3,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
function c9980197.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c9980197.filter3(chkc,e,tp) end function c9980197.spop(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if not Duel.IsExistingMatchingCard(c9980197.filter3,tp,LOCATION_SZONE,0,5,nil) then return end
and Duel.IsExistingTarget(c9980197.filter3,tp,LOCATION_SZONE,0,1,nil,e,tp) end local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if tc:IsRelateToEffect(e) then
local g=Duel.SelectTarget(tp,c9980197.filter3,tp,LOCATION_SZONE,0,1,1,nil,e,tp) Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end
end Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980197,3))
function c9980197.spop(e,tp,eg,ep,ev,re,r,rp) end
if not Duel.IsExistingMatchingCard(c9980197.filter3,tp,LOCATION_SZONE,0,5,nil) then return end function c9980197.cfilter(c,tp)
local tc=Duel.GetFirstTarget() return c:IsReason(REASON_BATTLE+REASON_EFFECT)
if tc:IsRelateToEffect(e) then and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) end
end function c9980197.thcon(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980197,3)) return eg:IsExists(c9980197.cfilter,1,nil,tp)
end end
function c9980197.cfilter(c,tp) function c9980197.thfilter(c)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) return c:IsSetCard(0x6bc8) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp end
end function c9980197.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c9980197.thcon(e,tp,eg,ep,ev,re,r,rp) if chk==0 then return Duel.IsExistingMatchingCard(c9980197.filter,tp,LOCATION_DECK,0,1,nil) end
return eg:IsExists(c9980197.cfilter,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c9980197.thfilter(c) function c9980197.thop(e,tp,eg,ep,ev,re,r,rp)
return c:IsSetCard(0x6bc8) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
end local g=Duel.SelectMatchingCard(tp,c9980197.filter,tp,LOCATION_DECK,0,1,1,nil)
function c9980197.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if g:GetCount()>0 then
if chk==0 then return Duel.IsExistingMatchingCard(c9980197.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.ConfirmCards(1-tp,g)
end end
function c9980197.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980197,3))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) end
local g=Duel.SelectMatchingCard(tp,c9980197.filter,tp,LOCATION_DECK,0,1,1,nil) function c9980197.costfilter(c)
if g:GetCount()>0 then return c:IsFaceup() and c:IsSetCard(0x6bc8) and c:IsAbleToGraveAsCost()
Duel.SendtoHand(g,nil,REASON_EFFECT) end
Duel.ConfirmCards(1-tp,g) function c9980197.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end e:SetLabel(1)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980197,3)) if chk==0 then return Duel.IsExistingMatchingCard(c9980197.costfilter,tp,LOCATION_SZONE,0,4,nil) end
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
function c9980197.costfilter(c) local g=Duel.SelectMatchingCard(tp,c9980197.costfilter,tp,LOCATION_SZONE,0,4,4,nil)
return c:IsFaceup() and c:IsSetCard(0x6bc8) and c:IsAbleToGraveAsCost() Duel.SendtoGrave(g,REASON_COST)
end end
function c9980197.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c9980197.filter(c,e,tp)
e:SetLabel(1) return c:IsSetCard(0x6bc8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
if chk==0 then return Duel.IsExistingMatchingCard(c9980197.costfilter,tp,LOCATION_SZONE,0,4,nil) end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) function c9980197.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,c9980197.costfilter,tp,LOCATION_SZONE,0,4,4,nil) if chk==0 then
Duel.SendtoGrave(g,REASON_COST) if e:GetLabel()~=1 then
end return Duel.IsExistingMatchingCard(c9980197.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
function c9980197.filter(c,e,tp) else
return c:IsSetCard(0x6bc8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) e:SetLabel(0)
end return Duel.IsExistingMatchingCard(c9980197.filter,tp,LOCATION_SZONE,0,1,nil,e,tp)
function c9980197.target(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then end
if e:GetLabel()~=1 then e:SetLabel(0)
return Duel.IsExistingMatchingCard(c9980197.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
else end
e:SetLabel(0) function c9980197.ctfilter(c,tp)
return Duel.IsExistingMatchingCard(c9980197.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) return c:GetPreviousControler()==tp and c:IsLocation(LOCATION_GRAVE)
end end
end function c9980197.activate(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(0) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SendtoGrave(g,REASON_EFFECT)
end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
function c9980197.ctfilter(c,tp) g=Duel.GetOperatedGroup()
return c:GetPreviousControler()==tp and c:IsLocation(LOCATION_GRAVE) local ct=g:FilterCount(c9980197.ctfilter,nil,1-tp)
end if ft>ct then ft=ct end
function c9980197.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SendtoGrave(g,REASON_EFFECT) g=Duel.SelectMatchingCard(tp,c9980197.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if g:GetCount()>0 then
g=Duel.GetOperatedGroup() Duel.BreakEffect()
local ct=g:FilterCount(c9980197.ctfilter,nil,1-tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if ft>ct then ft=ct end end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980197,3))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) end
g=Duel.SelectMatchingCard(tp,c9980197.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980197,3))
end
--MRS拟态甲斗-骑士形态 --MRS拟态甲斗-骑士形态
function c9980573.initial_effect(c) function c9980573.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9980573) e1:SetCountLimit(1,9980573)
e1:SetCondition(c9980573.spcon) e1:SetCondition(c9980573.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--damage --damage
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,9980573) e1:SetCountLimit(1,99805731)
e1:SetTarget(c9980573.target) e1:SetTarget(c9980573.target)
e1:SetOperation(c9980573.operation) e1:SetOperation(c9980573.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9980573,1)) e1:SetDescription(aux.Stringid(9980573,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCost(aux.bfgcost) e1:SetCost(aux.bfgcost)
e1:SetCountLimit(1,99805730) e1:SetCountLimit(1,99805730)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c9980573.sptg) e1:SetTarget(c9980573.sptg)
e1:SetOperation(c9980573.spop) e1:SetOperation(c9980573.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--summon success --summon success
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SUMMON_SUCCESS) e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetOperation(c9980573.sumsuc) e4:SetOperation(c9980573.sumsuc)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e4:Clone() local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS) e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c9980573.sumsuc(e,tp,eg,ep,ev,re,r,rp) function c9980573.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980573,2)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980573,2))
end end
function c9980573.filter(c) function c9980573.filter(c)
return c:IsFaceup() and c:IsSetCard(0xcbca) and not c:IsCode(9980573) return c:IsFaceup() and c:IsSetCard(0xcbca) and not c:IsCode(9980573)
end end
function c9980573.spcon(e,c) function c9980573.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9980573.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c9980573.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end end
function c9980573.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9980573.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end end
function c9980573.operation(e,tp,eg,ep,ev,re,r,rp) function c9980573.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(p,d,REASON_EFFECT)>0 then if Duel.Damage(p,d,REASON_EFFECT)>0 then
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980573,3)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980573,3))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.BreakEffect() Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000) e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
if Duel.GetFlagEffect(tp,9980573)~=0 then return end if Duel.GetFlagEffect(tp,9980573)~=0 then return end
--extra summon --extra summon
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(9980573,0)) e2:SetDescription(aux.Stringid(9980573,0))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xcbca)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xcbca))
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
c:RegisterEffect(e2,tp) c:RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,9980573,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,9980573,RESET_PHASE+PHASE_END,0,1)
end end
function c9980573.filter1(c,e,tp) function c9980573.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xcbca) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xcbca)
and Duel.IsExistingMatchingCard(c9980573.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1) and Duel.IsExistingMatchingCard(c9980573.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1)
and Duel.GetLocationCountFromEx(tp,tp,c)>0 and Duel.GetLocationCountFromEx(tp,tp,c)>0
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c9980573.filter2(c,e,tp,mc,rk) function c9980573.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_WIND) and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_WIND) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c9980573.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9980573.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9980573.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9980573.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c9980573.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c9980573.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c9980573.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SelectTarget(tp,c9980573.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c9980573.spop(e,tp,eg,ep,ev,re,r,rp) function c9980573.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9980573.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c9980573.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then if mg:GetCount()~=0 then
Duel.Overlay(sc,mg) Duel.Overlay(sc,mg)
end end
sc:SetMaterial(Group.FromCards(tc)) sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc)) Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980573,3)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980573,3))
sc:CompleteProcedure() sc:CompleteProcedure()
end end
end end
\ No newline at end of file
--Hyper Rider Kick --Hyper Rider Kick
function c9980577.initial_effect(c) function c9980577.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,9980577+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,9980577+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c9980577.cost) e1:SetCost(c9980577.cost)
e1:SetTarget(c9980577.target) e1:SetTarget(c9980577.target)
e1:SetOperation(c9980577.activate) e1:SetOperation(c9980577.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c9980577.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c9980577.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
return true return true
end end
function c9980577.costfilter(c) function c9980577.costfilter(c)
return c:IsSetCard(0xcbca) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xcbca) and c:IsAbleToRemoveAsCost()
end end
function c9980577.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9980577.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then if chk==0 then
if e:GetLabel()==1 then if e:GetLabel()==1 then
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingMatchingCard(c9980577.costfilter,tp,LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(c9980577.costfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,e:GetHandler())
else return false end else return false end
end end
e:SetLabel(0) e:SetLabel(0)
local rt=Duel.GetTargetCount(aux.TRUE,tp,0,LOCATION_ONFIELD,e:GetHandler()) local rt=Duel.GetTargetCount(aux.TRUE,tp,0,LOCATION_ONFIELD,e:GetHandler())
if rt>2 then rt=2 end if rt>2 then rt=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local cg=Duel.SelectMatchingCard(tp,c9980577.costfilter,tp,LOCATION_GRAVE,0,1,rt,nil) local cg=Duel.SelectMatchingCard(tp,c9980577.costfilter,tp,LOCATION_GRAVE,0,1,rt,nil)
local ct=cg:GetCount() local ct=cg:GetCount()
Duel.Remove(cg,POS_FACEUP,REASON_COST) Duel.Remove(cg,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,ct,ct,e:GetHandler()) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,ct,ct,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c9980577.activate(e,tp,eg,ep,ev,re,r,rp) function c9980577.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980577,0)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980577,0))
end end
end
--古朗基·14号 --古朗基·14号
function c9980580.initial_effect(c) function c9980580.initial_effect(c)
--cannot special summon --cannot special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_DECK) e1:SetRange(LOCATION_DECK)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c9980580.spcon) e1:SetCondition(c9980580.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9980580,1)) e2:SetDescription(aux.Stringid(9980580,1))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,9980580) e2:SetCountLimit(1,9980580)
e2:SetTarget(c9980580.destg) e2:SetTarget(c9980580.destg)
e2:SetOperation(c9980580.desop) e2:SetOperation(c9980580.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9980580,0)) e2:SetDescription(aux.Stringid(9980580,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,99805800) e2:SetCountLimit(1,99805800)
e2:SetCondition(c9980580.thcon) e2:SetCondition(c9980580.thcon)
e2:SetCost(c9980580.cost) e2:SetTarget(c9980580.thtg)
e2:SetTarget(c9980580.thtg) e2:SetOperation(c9980580.thop)
e2:SetOperation(c9980580.thop) c:RegisterEffect(e2)
c:RegisterEffect(e2) end
end function c9980580.spcon(e,c)
function c9980580.spcon(e,c) if c==nil then return true end
if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil) end
end function c9980580.desfilter(c)
function c9980580.desfilter(c) return c:GetSequence()<5
return c:GetSequence()<5 end
end function c9980580.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c9980580.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c9980580.desfilter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c9980580.desfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c9980580.desfilter,tp,0,LOCATION_SZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c9980580.desfilter,tp,0,LOCATION_SZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,c9980580.desfilter,tp,0,LOCATION_SZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c9980580.desfilter,tp,0,LOCATION_SZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end
end function c9980580.desop(e,tp,eg,ep,ev,re,r,rp)
function c9980580.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget()
local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT)
Duel.Destroy(tc,REASON_EFFECT) Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980580,2))
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980580,2)) end
end end
end function c9980580.thcon(e,tp,eg,ep,ev,re,r,rp)
function c9980580.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT)
return e:GetHandler():IsReason(REASON_EFFECT) end
end function c9980580.thfilter(c)
function c9980580.thfilter(c) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_DARK) and not c:IsCode(9980580) and c:IsAbleToHand()
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_DARK) and not c:IsCode(9980580) and c:IsAbleToHand() end
end function c9980580.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c9980580.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c9980580.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c9980580.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end
end function c9980580.thop(e,tp,eg,ep,ev,re,r,rp)
function c9980580.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c9980580.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c9980580.thfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then
if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(1-tp,g) Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980580,3))
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980580,3)) end
end end
end
--古朗基·3号 --古朗基·3号
function c9980581.initial_effect(c) function c9980581.initial_effect(c)
--cannot special summon --cannot special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_DECK) e1:SetRange(LOCATION_DECK)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c9980581.spcon) e1:SetCondition(c9980581.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9980581,0)) e1:SetDescription(aux.Stringid(9980581,0))
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9980581) e1:SetCountLimit(1,9980581)
e1:SetCondition(c9980581.condition) e1:SetCondition(c9980581.condition)
e1:SetCost(c9980581.cost) e1:SetCost(c9980581.cost)
e1:SetOperation(c9980581.operation) e1:SetOperation(c9980581.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--add to hand --add to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9980581,1)) e2:SetDescription(aux.Stringid(9980581,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c9980581.thcon) e2:SetCondition(c9980581.thcon)
e2:SetTarget(c9980581.thtg) e2:SetTarget(c9980581.thtg)
e2:SetOperation(c9980581.thop) e2:SetOperation(c9980581.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9980581.spcon(e,c) function c9980581.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9980581,2)) end
end function c9980581.condition(e,tp,eg,ep,ev,re,r,rp)
function c9980581.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end
end function c9980581.cfilter(c)
function c9980581.cfilter(c) return c:IsRace(RACE_WARRIOR) and c:IsAbleToRemoveAsCost()
return c:IsRace(RACE_WARRIOR) and c:IsAbleToRemoveAsCost() end
end function c9980581.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c9980581.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c9980581.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c9980581.cfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,c9980581.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c9980581.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(g,POS_FACEUP,REASON_COST) end
end function c9980581.operation(e,tp,eg,ep,ev,re,r,rp)
function c9980581.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler()
local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000)
e1:SetValue(1000) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) c:RegisterEffect(e1)
c:RegisterEffect(e1) local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_BATTLED)
e2:SetCode(EVENT_BATTLED) e2:SetOperation(c9980581.rmop)
e2:SetOperation(c9980581.rmop) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) c:RegisterEffect(e2)
c:RegisterEffect(e2) end
end end
end function c9980581.rmop(e,tp,eg,ep,ev,re,r,rp)
function c9980581.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetBattleTarget()
local tc=e:GetHandler():GetBattleTarget() if tc then
if tc then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end
end end
end function c9980581.thcon(e,tp,eg,ep,ev,re,r,rp)
function c9980581.thcon(e,tp,eg,ep,ev,re,r,rp) return bit.band(r,REASON_DESTROY)>0
return bit.band(r,REASON_DESTROY)>0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():GetPreviousControler()==tp
and e:GetHandler():GetPreviousControler()==tp end
end function c9980581.filter(c)
function c9980581.filter(c) return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end
end function c9980581.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c9980581.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c9980581.filter(chkc) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c9980581.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c9980581.filter,tp,LOCATION_REMOVED,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c9980581.filter,tp,LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,c9980581.filter,tp,LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectTarget(tp,c9980581.filter,tp,LOCATION_REMOVED,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) end
end function c9980581.thop(e,tp,eg,ep,ev,re,r,rp)
function c9980581.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget()
local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then
if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc)
Duel.ConfirmCards(1-tp,tc) end
end end
end
--他者封印·鲜血神殿 --他者封印·鲜血神殿
function c9980705.initial_effect(c) function c9980705.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--defup --defup
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3bc1)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3bc1))
e2:SetValue(300) e2:SetValue(300)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk/def --atk/def
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c9980705.atktg) e2:SetTarget(c9980705.atktg)
e2:SetValue(-500) e2:SetValue(-500)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--disable --disable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c9980705.discon) e2:SetCondition(c9980705.discon)
e2:SetOperation(c9980705.disop) e2:SetOperation(c9980705.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(9980705,1)) e6:SetDescription(aux.Stringid(9980705,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION) e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_FZONE) e6:SetRange(LOCATION_FZONE)
e6:SetCountLimit(1) e6:SetCountLimit(1)
e6:SetTarget(c9980705.sptg) e6:SetTarget(c9980705.sptg)
e6:SetOperation(c9980705.spop) e6:SetOperation(c9980705.spop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
c9980705.card_code_list={9980706} c9980705.card_code_list={9980706}
function c9980705.atktg(e,c) function c9980705.atktg(e,c)
return not c:IsSetCard(0x3bc1) return not c:IsSetCard(0x3bc1)
end end
function c9980705.discon(e,tp,eg,ep,ev,re,r,rp) function c9980705.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local atk=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_ATTACK) local atk=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_ATTACK)
local def=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_DEFENSE) local def=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_DEFENSE)
return re:IsActiveType(TYPE_MONSTER) and (atk==0 or def==0) and not c:IsRace(RACE_REPTILE) return re:IsActiveType(TYPE_MONSTER) and (atk==0 or def==0) and not re:IsSetCard(0x3bc1)
end end
function c9980705.disop(e,tp,eg,ep,ev,re,r,rp) function c9980705.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
function c9980705.spfilter(c,e,tp) function c9980705.spfilter(c,e,tp)
return c:IsSetCard(0x3bc1) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3bc1) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c9980705.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c9980705.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9980705.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c9980705.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end end
function c9980705.spop(e,tp,eg,ep,ev,re,r,rp) function c9980705.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9980705.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c9980705.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
--克律萨俄耳 --克律萨俄耳
function c9980712.initial_effect(c) function c9980712.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c9980712.eqtg) e1:SetTarget(c9980712.eqtg)
e1:SetOperation(c9980712.eqop) e1:SetOperation(c9980712.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Equip limit --Equip limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c9980712.effcon) e2:SetValue(c9980712.effcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk & def --atk & def
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3bc1)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3bc1))
e2:SetValue(300) e2:SetValue(300)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION) e1:SetCategory(CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetTarget(c9980712.pstg) e1:SetTarget(c9980712.pstg)
e1:SetOperation(c9980712.psop) e1:SetOperation(c9980712.psop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9980712,2)) e4:SetDescription(aux.Stringid(9980712,2))
e4:SetCategory(CATEGORY_TOHAND) e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,9980712) e4:SetCountLimit(1,9980712)
e4:SetCost(c9980712.thcost) e4:SetCost(c9980712.thcost)
e4:SetTarget(c9980712.thtg) e4:SetTarget(c9980712.thtg)
e4:SetOperation(c9980712.thop) e4:SetOperation(c9980712.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c9980712.card_code_list={9980706} c9980712.card_code_list={9980706}
function c9980712.effcon(e,c) function c9980712.effcon(e,c)
return c:IsSetCard(0x3bc1) return c:IsSetCard(0x3bc1)
end end
function c9980712.eqfilter(c) function c9980712.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3bc1) return c:IsFaceup() and c:IsSetCard(0x3bc1)
end end
function c9980712.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9980712.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c9980712.eqfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c9980712.eqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9980712.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c9980712.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c9980712.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c9980712.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c9980712.eqop(e,tp,eg,ep,ev,re,r,rp) function c9980712.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
end end
end end
function c9980712.psfilter(c) function c9980712.psfilter(c)
return c:IsFaceup() and c:IsCanTurnSet() return c:IsFaceup() and c:IsCanTurnSet()
end end
function c9980712.pstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9980712.pstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c9980712.psfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c9980712.psfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9980712.psfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c9980712.psfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c9980712.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c9980712.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end end
function c9980712.psop(e,tp,eg,ep,ev,re,r,rp) function c9980712.psop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end end
end end
function c9980712.cfilter(c,tp) function c9980712.cfilter(c,tp)
return (aux.IsCodeListed(c,9980706) or c:IsSetCard(0x3bc1)) and c:IsAbleToRemoveAsCost() return (aux.IsCodeListed(c,9980706) or c:IsSetCard(0x3bc1)) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(c9980712.thfilter,tp,LOCATION_GRAVE,0,1,c) and Duel.IsExistingTarget(c9980712.thfilter,tp,LOCATION_GRAVE,0,1,c)
end end
function c9980712.thfilter(c) function c9980712.thfilter(c)
return aux.IsCodeListed(c,9980706) and c:IsAbleToHand() return aux.IsCodeListed(c,9980706) and c:IsAbleToHand()
end end
function c9980712.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9980712.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c9980712.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end and Duel.IsExistingMatchingCard(c9980712.cfilter,tp,LOCATION_GRAVE,0,1,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9980712.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp) local g=Duel.SelectMatchingCard(tp,c9980712.cfilter,tp,LOCATION_GRAVE,0,1,1,c,tp)
g:AddCard(c) g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c9980712.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9980712.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9980712.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9980712.thfilter(chkc) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c9980712.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c9980712.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c9980712.thop(e,tp,eg,ep,ev,re,r,rp) function c9980712.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local c=e:GetHandler()
if tc:IsRelateToEffect(e) then local tc=Duel.GetFirstTarget()
Duel.SendtoHand(tc,nil,REASON_EFFECT) if tc:IsRelateToEffect(e) then
end Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment