Commit 6169ac18 authored by VanillaSalt's avatar VanillaSalt

fix

parent 7c3b7fb2
--U.A. Powered Jersey --U.A. Powered Jersey
function c35884610.initial_effect(c) function c35884610.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(c35884610.target) e1:SetTarget(c35884610.target)
e1:SetOperation(c35884610.operation) e1:SetOperation(c35884610.operation)
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(c35884610.equiplimit) e2:SetValue(c35884610.eqlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Atk Def up --Atk Def up
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1000) e3:SetValue(1000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.Clone(e3) local e4=Effect.Clone(e3)
e4:SetCode(EFFECT_UPDATE_DEFENCE) e4:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--damage double --damage double
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCode(EVENT_PRE_BATTLE_DAMAGE) e5:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e5:SetCondition(c35884610.damcon) e5:SetCondition(c35884610.damcon)
e5:SetOperation(c35884610.damop) e5:SetOperation(c35884610.damop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--chain atk --chain atk
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(35884610,0)) e6:SetDescription(aux.Stringid(35884610,0))
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetRange(LOCATION_SZONE) e6:SetRange(LOCATION_SZONE)
e6:SetCode(EVENT_BATTLED) e6:SetCode(EVENT_BATTLED)
e6:SetCondition(c35884610.atcon) e6:SetCondition(c35884610.atcon)
e6:SetOperation(c35884610.atop) e6:SetOperation(c35884610.atop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--remove --remove
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_REMOVE) e7:SetCategory(CATEGORY_REMOVE)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetRange(LOCATION_SZONE) e7:SetRange(LOCATION_SZONE)
e7:SetCode(EVENT_PHASE+PHASE_STANDBY) e7:SetCode(EVENT_PHASE+PHASE_STANDBY)
e7:SetCountLimit(1) e7:SetCountLimit(1)
e7:SetCondition(c35884610.rmcon) e7:SetCondition(c35884610.rmcon)
e7:SetTarget(c35884610.rmtg) e7:SetTarget(c35884610.rmtg)
e7:SetOperation(c35884610.rmop) e7:SetOperation(c35884610.rmop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
--to hand --to hand
local e8=Effect.CreateEffect(c) local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(35884610,1)) e8:SetDescription(aux.Stringid(35884610,1))
e8:SetCategory(CATEGORY_TOHAND) e8:SetCategory(CATEGORY_TOHAND)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetProperty(EFFECT_FLAG_DELAY) e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCode(EVENT_TO_GRAVE) e8:SetCode(EVENT_TO_GRAVE)
e8:SetCondition(c35884610.thcon) e8:SetCondition(c35884610.thcon)
e8:SetTarget(c35884610.thtg) e8:SetTarget(c35884610.thtg)
e8:SetOperation(c35884610.thop) e8:SetOperation(c35884610.thop)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
function c35884610.equiplimit(e,c) function c35884610.eqlimit(e,c)
return c:IsSetCard(0xb2) return c:IsSetCard(0xb2)
end end
function c35884610.filter(c) function c35884610.filter(c)
return c:IsFaceup() and c:IsSetCard(0xb2) return c:IsFaceup() and c:IsSetCard(0xb2)
end end
function c35884610.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c35884610.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c35884610.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c35884610.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c35884610.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c35884610.filter,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,c35884610.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c35884610.filter,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 c35884610.operation(e,tp,eg,ep,ev,re,r,rp) function c35884610.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc) Duel.Equip(tp,e:GetHandler(),tc)
end end
end end
function c35884610.damcon(e,tp,eg,ep,ev,re,r,rp) function c35884610.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler():GetEquipTarget() and ep~=tp and eg:GetFirst():GetBattleTarget()~=nil return eg:GetFirst()==e:GetHandler():GetEquipTarget() and ep~=tp and eg:GetFirst():GetBattleTarget()~=nil
end end
function c35884610.damop(e,tp,eg,ep,ev,re,r,rp) function c35884610.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(ep,ev*2)
end end
function c35884610.atcon(e,tp,eg,ep,ev,re,r,rp) function c35884610.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler():GetEquipTarget() local c=e:GetHandler():GetEquipTarget()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable() return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
end end
function c35884610.atop(e,tp,eg,ep,ev,re,r,rp) function c35884610.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
end end
function c35884610.rmcon(e,tp,eg,ep,ev,re,r,rp) function c35884610.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function c35884610.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c35884610.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipTarget():IsAbleToRemove() end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler():GetEquipTarget(),1,0,0)
end end
function c35884610.rmop(e,tp,eg,ep,ev,re,r,rp) function c35884610.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
if c then if ec then
Duel.Remove(c,POS_FACEUP,REASON_EFFECT) Duel.Remove(ec,POS_FACEUP,REASON_EFFECT)
end end
end end
function c35884610.thcon(e,tp,eg,ep,ev,re,r,rp) function c35884610.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_LOST_TARGET) and c:GetPreviousEquipTarget():IsLocation(LOCATION_HAND) return c:IsReason(REASON_LOST_TARGET) and c:GetPreviousEquipTarget():IsLocation(LOCATION_HAND)
end end
function c35884610.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c35884610.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end end
function c35884610.thop(e,tp,eg,ep,ev,re,r,rp) function c35884610.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
--Fire Lake of the Burning Abyss --Fire Lake of the Burning Abyss
function c36006208.initial_effect(c) function c36006208.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,0x1e0) e1:SetHintTiming(0,0x1e0)
e1:SetCost(c36006208.cost) e1:SetCost(c36006208.cost)
e1:SetTarget(c36006208.target) e1:SetTarget(c36006208.target)
e1:SetOperation(c36006208.activate) e1:SetOperation(c36006208.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c36006208.filter(c) function c36006208.filter(c)
return c:IsSetCard(0xb1) and c:IsFaceup() and c:IsAbleToGrave() return c:IsFaceup() and c:IsSetCard(0xb1) and c:IsAbleToGraveAsCost()
end end
function c36006208.costfilter(c,rg,dg) function c36006208.costfilter(c,rg,dg)
if not rg:IsContains(c) then return false end local a=0
local a=0 if dg:IsContains(c) then a=1 end
if dg:IsContains(c) then a=1 end if c:GetEquipCount()==0 then return rg:IsExists(c36006208.costfilter2,1,c,a,dg) end
if c:GetEquipCount()==0 then return rg:IsExists(c36006208.costfilter2,1,c,a,dg) end local eg=c:GetEquipGroup()
local eg=c:GetEquipGroup() local tc=eg:GetFirst()
local tc=eg:GetFirst() while tc do
while tc do if dg:IsContains(tc) then a=a+1 end
if dg:IsContains(tc) then a=a+1 end tc=eg:GetNext()
tc=eg:GetNext() end
end return rg:IsExists(c36006208.costfilter2,1,c,a,dg)
return rg:IsExists(c36006208.costfilter2,1,c,a,dg)
end end
function c36006208.costfilter2(c,a,dg) function c36006208.costfilter2(c,a,dg)
if dg:IsContains(c) then a=a+1 end if dg:IsContains(c) then a=a+1 end
if c:GetEquipCount()==0 then return dg:GetCount()-a>=1 end if c:GetEquipCount()==0 then return dg:GetCount()-a>=1 end
local eg=c:GetEquipGroup() local eg=c:GetEquipGroup()
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
if dg:IsContains(tc) then a=a+1 end if dg:IsContains(tc) then a=a+1 end
tc=eg:GetNext() tc=eg:GetNext()
end end
return dg:GetCount()-a>=1 return dg:GetCount()-a>=1
end end
function c36006208.tgfilter(c,e) function c36006208.tgfilter(c,e)
return c:IsDestructable() and c:IsCanBeEffectTarget(e) return c:IsDestructable() and c:IsCanBeEffectTarget(e)
end end
function c36006208.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c36006208.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
return true return true
end end
function c36006208.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36006208.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end if chk==0 then
if e:GetLabel()==1 then if e:GetLabel()==1 then
e:SetLabel(0) e:SetLabel(0)
local rg=Duel.GetMatchingGroup(c36006208.filter,tp,LOCATION_MZONE,0,nil) local rg=Duel.GetMatchingGroup(c36006208.filter,tp,LOCATION_MZONE,0,nil)
local dg=Duel.GetMatchingGroup(c36006208.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) local dg=Duel.GetMatchingGroup(c36006208.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e)
return Duel.IsExistingMatchingCard(c36006208.costfilter,tp,LOCATION_MZONE,0,2,nil,rg,dg) return rg:IsExists(c36006208.costfilter,2,nil,rg,dg)
else else
return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
end end
end end
if e:GetLabel()==1 then if e:GetLabel()==1 then
e:SetLabel(0) e:SetLabel(0)
local rg=Duel.GetMatchingGroup(c36006208.filter,tp,LOCATION_MZONE,0,nil) local rg=Duel.GetMatchingGroup(c36006208.filter,tp,LOCATION_MZONE,0,nil)
local dg=Duel.GetMatchingGroup(c36006208.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e) local dg=Duel.GetMatchingGroup(c36006208.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,c36006208.costfilter,tp,LOCATION_MZONE,0,2,2,nil,rg,dg) local sg=rg:FilterSelect(tp,c36006208.costfilter,2,2,nil,rg,dg)
Duel.SendtoGrave(sg,REASON_COST) Duel.SendtoGrave(sg,REASON_COST)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,3,e:GetHandler()) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c36006208.activate(e,tp,eg,ep,ev,re,r,rp) function c36006208.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
--Alich, Malebranche of the Burning Abyss --Alich, Malebranche of the Burning Abyss
function c47728740.initial_effect(c) function c47728740.initial_effect(c)
--self destroy --self destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SELF_DESTROY) e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c47728740.sdcon) e1:SetCondition(c47728740.sdcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Special Summon --Special Summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47728740,0)) e2:SetDescription(aux.Stringid(47728740,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,47728740) e2:SetCountLimit(1,47728740)
e2:SetCondition(c47728740.sscon) e2:SetCondition(c47728740.sscon)
e2:SetTarget(c47728740.sstg) e2:SetTarget(c47728740.sstg)
e2:SetOperation(c47728740.ssop) e2:SetOperation(c47728740.ssop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--disable --disable
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(47728740,1)) e3:SetDescription(aux.Stringid(47728740,1))
e3:SetCategory(CATEGORY_DISABLE) e3:SetCategory(CATEGORY_DISABLE)
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_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,47728740) e3:SetCountLimit(1,47728740)
e3:SetCondition(c47728740.discon) e3:SetCondition(c47728740.discon)
e3:SetTarget(c47728740.distg) e3:SetTarget(c47728740.distg)
e3:SetOperation(c47728740.disop) e3:SetOperation(c47728740.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c47728740.sdfilter(c) function c47728740.sdfilter(c)
return not c:IsFaceup() or not c:IsSetCard(0xb1) return not c:IsFaceup() or not c:IsSetCard(0xb1)
end end
function c47728740.sdcon(e) function c47728740.sdcon(e)
return Duel.IsExistingMatchingCard(c47728740.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c47728740.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c47728740.filter(c) function c47728740.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c47728740.sscon(e,tp,eg,ep,ev,re,r,rp) function c47728740.sscon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c47728740.filter,tp,LOCATION_ONFIELD,0,1,nil) return not Duel.IsExistingMatchingCard(c47728740.filter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c47728740.sstg(e,tp,eg,ep,ev,re,r,rp,chk) function c47728740.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c47728740.ssop(e,tp,eg,ep,ev,re,r,rp) function c47728740.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c47728740.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end if Duel.IsExistingMatchingCard(c47728740.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c47728740.discon(e,tp,eg,ep,ev,re,r,rp) function c47728740.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN) return not e:GetHandler():IsReason(REASON_RETURN)
end end
function c47728740.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47728740.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c47728740.disop(e,tp,eg,ep,ev,re,r,rp) function c47728740.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() then if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
\ No newline at end of file
--Lancephorhynchus --Lancephorhynchus
function c48940337.initial_effect(c) function c48940337.initial_effect(c)
--pendulum summon --pendulum summon
aux.AddPendulumProcedure(c) aux.AddPendulumProcedure(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)
--pierce --pierce
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PIERCE) e2:SetCode(EFFECT_PIERCE)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c48940337.target) e2:SetTarget(c48940337.target)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c48940337.target(e,c) function c48940337.target(e,c)
return c:IsType(TYPE_NORMAL) return c:IsType(TYPE_NORMAL)
end end
--Virgil, Rockstar of the Burning Abyss --Virgil, Rockstar of the Burning Abyss
function c601193.initial_effect(c) function c601193.initial_effect(c)
--synchro summon c:SetUniqueOnField(1,0,601193)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) --synchro summon
c:EnableReviveLimit() aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:SetUniqueOnField(1,0,601193) c:EnableReviveLimit()
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(601193,0)) e1:SetDescription(aux.Stringid(601193,0))
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_TODECK)
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_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c601193.tdcos) e1:SetCost(c601193.tdcost)
e1:SetTarget(c601193.tdtg) e1:SetTarget(c601193.tdtg)
e1:SetOperation(c601193.tdop) e1:SetOperation(c601193.tdop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(601193,1)) e2:SetDescription(aux.Stringid(601193,1))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,601193) e2:SetCountLimit(1,601193)
e2:SetCondition(c601193.drcon) e2:SetCondition(c601193.drcon)
e2:SetTarget(c601193.drtg) e2:SetTarget(c601193.drtg)
e2:SetOperation(c601193.drop) e2:SetOperation(c601193.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c601193.filter(c) function c601193.filter(c)
return c:IsSetCard(0xb1) and c:IsDiscardable() return c:IsSetCard(0xb1) and c:IsDiscardable()
end end
function c601193.tdcos(e,tp,eg,ep,ev,re,r,rp,chk) function c601193.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c601193.filter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c601193.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c601193.filter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,c601193.filter,1,1,REASON_COST+REASON_DISCARD)
end end
function c601193.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c601193.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end end
function c601193.tdop(e,tp,eg,ep,ev,re,r,rp) function c601193.tdop(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.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tc:GetControler()) end
end
end end
function c601193.drcon(e,tp,eg,ep,ev,re,r,rp) function c601193.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function c601193.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c601193.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c601193.drop(e,tp,eg,ep,ev,re,r,rp) function c601193.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
--U.A. Midfielder --U.A. Midfielder
function c72491806.initial_effect(c) function c72491806.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,72491806) e1:SetCountLimit(1,72491806)
e1:SetCondition(c72491806.spcon) e1:SetCondition(c72491806.spcon)
e1:SetOperation(c72491806.spop) e1:SetOperation(c72491806.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand and spsummon --to hand and spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(72491806,0)) e2:SetDescription(aux.Stringid(72491806,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,72491807) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c72491806.tstg) e2:SetCountLimit(1,72491807)
e2:SetOperation(c72491806.tsop) e2:SetTarget(c72491806.tstg)
c:RegisterEffect(e2) e2:SetOperation(c72491806.tsop)
c:RegisterEffect(e2)
end end
function c72491806.spfilter(c) function c72491806.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(72491806) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(72491806) and c:IsAbleToHandAsCost()
end end
function c72491806.spcon(e,c) function c72491806.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c72491806.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c72491806.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end end
function c72491806.spop(e,tp,eg,ep,ev,re,r,rp,c) function c72491806.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c72491806.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c72491806.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c72491806.thfilter(c,e) function c72491806.thfilter(c,e,tp)
return c:IsSetCard(0xb2) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) return c:IsFaceup() and c:IsSetCard(0xb2) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c72491806.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode())
end end
function c72491806.thfilter2(c,code) function c72491806.spfilter2(c,e,tp,code)
return not c:IsCode(code) return c:IsSetCard(0xb2) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c72491806.spfilter2(c,e,tp,g)
return c:IsSetCard(0xb2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and g:IsExists(c72491806.thfilter2,1,e:GetHandler(),c:GetCode())
end end
function c72491806.tstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c72491806.tstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c72491806.thfilter,tp,LOCATION_MZONE,0,nil,e) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c72491806.thfilter(chkc,e,tp) end
if chkc then return chkc:IsFaceup() and chkc:IsAbleToHand() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
if chk==0 then return g:GetCount()>0 and Duel.IsExistingMatchingCard(c72491806.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp,g) and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 end and Duel.IsExistingTarget(c72491806.thfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=Duel.SelectTarget(tp,c72491806.thfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e) local g=Duel.SelectTarget(tp,c72491806.thfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,tg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c72491806.tsop(e,tp,eg,ep,ev,re,r,rp) function c72491806.tsop(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) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local og=Duel.GetOperatedGroup() local sg=Duel.SelectMatchingCard(tp,c72491806.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp,tc:GetCode())
if og:GetCount()>0 and Duel.IsExistingMatchingCard(c72491806.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp,og) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
sg=Duel.SelectMatchingCard(tp,c72491806.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp,og) end
if sg:GetCount()>0 then end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end end
--Calcab, Malebranche of the Burning Abyss --Calcab, Malebranche of the Burning Abyss
function c73213494.initial_effect(c) function c73213494.initial_effect(c)
--self destroy --self destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SELF_DESTROY) e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c73213494.sdcon) e1:SetCondition(c73213494.sdcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Special Summon --Special Summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(73213494,0)) e2:SetDescription(aux.Stringid(73213494,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,73213494) e2:SetCountLimit(1,73213494)
e2:SetCondition(c73213494.sscon) e2:SetCondition(c73213494.sscon)
e2:SetTarget(c73213494.sstg) e2:SetTarget(c73213494.sstg)
e2:SetOperation(c73213494.ssop) e2:SetOperation(c73213494.ssop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(73213494,1)) e3:SetDescription(aux.Stringid(73213494,1))
e3:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_TOHAND)
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_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,73213494) e3:SetCountLimit(1,73213494)
e3:SetCondition(c73213494.thcon) e3:SetCondition(c73213494.thcon)
e3:SetTarget(c73213494.thtg) e3:SetTarget(c73213494.thtg)
e3:SetOperation(c73213494.thop) e3:SetOperation(c73213494.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c73213494.sdfilter(c) function c73213494.sdfilter(c)
return not c:IsFaceup() or not c:IsSetCard(0xb1) return not c:IsFaceup() or not c:IsSetCard(0xb1)
end end
function c73213494.sdcon(e) function c73213494.sdcon(e)
return Duel.IsExistingMatchingCard(c73213494.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c73213494.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c73213494.filter(c) function c73213494.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c73213494.sscon(e,tp,eg,ep,ev,re,r,rp) function c73213494.sscon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c73213494.filter,tp,LOCATION_ONFIELD,0,1,nil) return not Duel.IsExistingMatchingCard(c73213494.filter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c73213494.sstg(e,tp,eg,ep,ev,re,r,rp,chk) function c73213494.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c73213494.ssop(e,tp,eg,ep,ev,re,r,rp) function c73213494.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c73213494.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end if Duel.IsExistingMatchingCard(c73213494.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c73213494.thfilter(c) function c73213494.thfilter(c)
return c:IsFacedown() and c:IsAbleToHand() return c:IsFacedown() and c:IsAbleToHand()
end end
function c73213494.thcon(e,tp,eg,ep,ev,re,r,rp) function c73213494.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN) return not e:GetHandler():IsReason(REASON_RETURN)
end end
function c73213494.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c73213494.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c73213494.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and c73213494.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c73213494.thfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c73213494.thfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c73213494.thfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) local g=Duel.SelectTarget(tp,c73213494.thfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c73213494.thop(e,tp,eg,ep,ev,re,r,rp) function c73213494.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then if tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
--Rubic, Malebranche of the Burning Abyss --Rubic, Malebranche of the Burning Abyss
function c734741.initial_effect(c) function c734741.initial_effect(c)
--self destroy --self destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SELF_DESTROY) e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(c734741.sdcon) e1:SetCondition(c734741.sdcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Special Summon --Special Summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(734741,0)) e2:SetDescription(aux.Stringid(734741,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,734741) e2:SetCountLimit(1,734741)
e2:SetCondition(c734741.sscon) e2:SetCondition(c734741.sscon)
e2:SetTarget(c734741.sstg) e2:SetTarget(c734741.sstg)
e2:SetOperation(c734741.ssop) e2:SetOperation(c734741.ssop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(c734741.synlimit) e3:SetValue(c734741.synlimit)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c734741.synlimit(e,c) function c734741.synlimit(e,c)
if not c then return false end if not c then return false end
return not c:IsSetCard(0xb1) return not c:IsSetCard(0xb1)
end end
function c734741.sdfilter(c) function c734741.sdfilter(c)
return not c:IsFaceup() or not c:IsSetCard(0xb1) return not c:IsFaceup() or not c:IsSetCard(0xb1)
end end
function c734741.sdcon(e) function c734741.sdcon(e)
return Duel.IsExistingMatchingCard(c734741.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c734741.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c734741.filter(c) function c734741.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c734741.sscon(e,tp,eg,ep,ev,re,r,rp) function c734741.sscon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c734741.filter,tp,LOCATION_ONFIELD,0,1,nil) return not Duel.IsExistingMatchingCard(c734741.filter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c734741.sstg(e,tp,eg,ep,ev,re,r,rp,chk) function c734741.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c734741.ssop(e,tp,eg,ep,ev,re,r,rp) function c734741.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c734741.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end if Duel.IsExistingMatchingCard(c734741.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
end end
--Fusion Substitute --Fusion Substitute
function c74335036.initial_effect(c) function c74335036.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74335036.target) e1:SetTarget(c74335036.target)
e1:SetOperation(c74335036.activate) e1:SetOperation(c74335036.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to deck --to deck
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetDescription(aux.Stringid(74335036,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetDescription(aux.Stringid(74335036,0)) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c74335036.tdcost) e2:SetCost(c74335036.tdcost)
e2:SetTarget(c74335036.tdtg) e2:SetTarget(c74335036.tdtg)
e2:SetOperation(c74335036.tdop) e2:SetOperation(c74335036.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c74335036.filter1(c,e) function c74335036.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c74335036.filter2(c,e,tp,m,f,chkf) function c74335036.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c74335036.target(e,tp,eg,ep,ev,re,r,rp,chk) function c74335036.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c74335036.filter1,tp,LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c74335036.filter1,tp,LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c74335036.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c74335036.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c74335036.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) res=Duel.IsExistingMatchingCard(c74335036.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res return res
end end
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 c74335036.activate(e,tp,eg,ep,ev,re,r,rp) function c74335036.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c74335036.filter1,tp,LOCATION_MZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(c74335036.filter1,tp,LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c74335036.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c74335036.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c74335036.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) sg2=Duel.GetMatchingGroup(c74335036.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
function c74335036.tdfilter(c) function c74335036.tdfilter(c)
return c:IsType(TYPE_FUSION) and c:IsAbleToDeck() return c:IsType(TYPE_FUSION) and c:IsAbleToExtra()
end end
function c74335036.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function c74335036.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c74335036.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74335036.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74335036.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74335036.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c74335036.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c74335036.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c74335036.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c74335036.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c74335036.tdop(e,tp,eg,ep,ev,re,r,rp) function c74335036.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
\ No newline at end of file
--U.A. Goalkeeper --U.A. Goalkeeper
function c9485511.initial_effect(c) function c9485511.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,9485511) e1:SetCountLimit(1,9485511)
e1:SetCondition(c9485511.spcon) e1:SetCondition(c9485511.spcon)
e1:SetOperation(c9485511.spop) e1:SetOperation(c9485511.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --indes
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9485511,0)) e2:SetDescription(aux.Stringid(9485511,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c9485511.con) e2:SetCondition(c9485511.indcon)
e2:SetTarget(c9485511.tg) e2:SetTarget(c9485511.indtg)
e2:SetOperation(c9485511.op) e2:SetOperation(c9485511.indop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9485511.spfilter(c) function c9485511.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(9485511) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(9485511) and c:IsAbleToHandAsCost()
end end
function c9485511.spcon(e,c) function c9485511.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c9485511.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c9485511.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end end
function c9485511.spop(e,tp,eg,ep,ev,re,r,rp,c) function c9485511.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c9485511.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c9485511.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c9485511.filter(c) function c9485511.filter(c)
return c:IsSetCard(0xb2) and c:IsFaceup() return c:IsFaceup() and c:IsSetCard(0xb2)
end end
function c9485511.con(e,tp,eg,ep,ev,re,r,rp) function c9485511.indcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return Duel.GetTurnPlayer()~=tp
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return Duel.GetTurnPlayer()~=tp
end end
function c9485511.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9485511.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and c9485511.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9485511.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9485511.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c9485511.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9485511.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c9485511.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c9485511.op(e,tp,eg,ep,ev,re,r,rp) function c9485511.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetValue(c9485511.valcon) e1:SetValue(c9485511.valcon)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function c9485511.valcon(e,re,r,rp) function c9485511.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
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