Commit 5b0da437 authored by Nemo Ma's avatar Nemo Ma

fix

parent 6fd925de
......@@ -88,7 +88,7 @@ function c117837139.sumfilter(c,e,tp)
end
function c117837139.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCountFromEx(1-tp)>0 and Duel.IsExistingMatchingCard(c117837139.sumfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,1-tp,true,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCountFromEx(1-tp,tp,nil,c)>0 and Duel.IsExistingMatchingCard(c117837139.sumfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,1-tp,true,false) end
end
function c117837139.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
--英龙骑-赤枪龙
function c46250010.initial_effect(c)
c:SetSPSummonOnce(46250010)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c46250010.lfilter,1,1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c46250010.sumcon)
e1:SetTarget(c46250010.sumtg)
e1:SetOperation(c46250010.sumop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c46250010.atkval)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c46250010.spcon)
e5:SetCost(c46250010.spcost)
e5:SetTarget(c46250010.sptg)
e5:SetOperation(c46250010.spop)
c:RegisterEffect(e5)
c:SetSPSummonOnce(46250010)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c46250010.lfilter,1,1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c46250010.sumcon)
e1:SetTarget(c46250010.sumtg)
e1:SetOperation(c46250010.sumop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c46250010.atkval)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c46250010.spcon)
e5:SetCost(c46250010.spcost)
e5:SetTarget(c46250010.sptg)
e5:SetOperation(c46250010.spop)
c:RegisterEffect(e5)
end
function c46250010.lfilter(c)
return c:IsLinkSetCard(0x1fc0)
return c:IsLinkSetCard(0x1fc0)
end
function c46250010.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c46250010.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetMaterial():GetFirst()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsLocation(LOCATION_GRAVE) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,tc,1,0,0)
local tc=e:GetHandler():GetMaterial():GetFirst()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsLocation(LOCATION_GRAVE) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,tc,1,0,0)
end
function c46250010.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
local c=e:GetHandler()
local tc=c:GetMaterial():GetFirst()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsLocation(LOCATION_GRAVE) then
if not Duel.Equip(tp,tc,c,true) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46250010.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c46250010.matval)
tc:RegisterEffect(e2)
end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
local c=e:GetHandler()
local tc=c:GetMaterial():GetFirst()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsLocation(LOCATION_GRAVE) then
if not Duel.Equip(tp,tc,c,true) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46250010.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c46250010.matval)
tc:RegisterEffect(e2)
end
end
function c46250010.eqlimit(e,c)
return e:GetOwner()==c
return e:GetOwner()==c
end
function c46250010.matval(e,c,mg)
return c:IsRace(RACE_WYRM)
return c:IsRace(RACE_WYRM) and c:IsControler(e:GetHandlerPlayer())
end
function c46250010.atkval(e,c)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
end
function c46250010.spcon(e,tp,eg,ep,ev,re,r,rp)
local eg=e:GetHandler():GetEquipGroup()
return eg and eg:IsExists(Card.IsSetCard,1,nil,0x1fc0)
local eg=e:GetHandler():GetEquipGroup()
return eg and eg:IsExists(Card.IsSetCard,1,nil,0x1fc0)
end
function c46250010.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c46250010.thfilter(c)
return c:IsSetCard(0x1fc0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0x1fc0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c46250010.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46250010.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(c46250010.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,LOCATION_DECK)
end
function c46250010.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c46250010.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c46250010.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--英龙骑-炎谷
function c46250011.initial_effect(c)
c:SetSPSummonOnce(46250011)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c46250011.lfilter,1,1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c46250011.sumcon)
e1:SetTarget(c46250011.sumtg)
e1:SetOperation(c46250011.sumop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c46250011.atkval)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c46250011.spcon)
e5:SetCost(c46250011.spcost)
e5:SetTarget(c46250011.sptg)
e5:SetOperation(c46250011.spop)
c:RegisterEffect(e5)
c:SetSPSummonOnce(46250011)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c46250011.lfilter,1,1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c46250011.sumcon)
e1:SetTarget(c46250011.sumtg)
e1:SetOperation(c46250011.sumop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c46250011.atkval)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c46250011.spcon)
e5:SetCost(c46250011.spcost)
e5:SetTarget(c46250011.sptg)
e5:SetOperation(c46250011.spop)
c:RegisterEffect(e5)
end
function c46250011.lfilter(c)
return c:IsLinkSetCard(0xfc0)
return c:IsLinkSetCard(0xfc0)
end
function c46250011.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c46250011.eqfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1fc0) and not c:IsForbidden()
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1fc0) and not c:IsForbidden()
end
function c46250011.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c46250011.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c46250011.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function c46250011.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c46250011.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if not g then return end
local tc=g:GetFirst()
if not Duel.Equip(tp,tc,c,true) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46250011.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c46250011.matval)
tc:RegisterEffect(e2)
end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c46250011.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if not g then return end
local tc=g:GetFirst()
if not Duel.Equip(tp,tc,c,true) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46250011.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c46250011.matval)
tc:RegisterEffect(e2)
end
end
function c46250011.eqlimit(e,c)
return e:GetOwner()==c
return e:GetOwner()==c
end
function c46250011.matval(e,c,mg)
return c:IsRace(RACE_WYRM)
return c:IsRace(RACE_WYRM) and c:IsControler(e:GetHandlerPlayer())
end
function c46250011.atkval(e,c)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
end
function c46250011.spcon(e,tp,eg,ep,ev,re,r,rp)
local eg=e:GetHandler():GetEquipGroup()
return eg and eg:IsExists(Card.IsSetCard,1,nil,0x1fc0)
local eg=e:GetHandler():GetEquipGroup()
return eg and eg:IsExists(Card.IsSetCard,1,nil,0x1fc0)
end
function c46250011.rfilter(c)
return c:IsSetCard(0xfc0) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
return c:IsSetCard(0xfc0) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c46250011.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c46250011.rfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c46250011.rfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c46250011.rfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c46250011.rfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c46250011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c46250011.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if not g then return end
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if not g then return end
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
--英龙骑-人鱼风灵
function c46250012.initial_effect(c)
c:SetSPSummonOnce(46250012)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c46250012.lfilter,1,1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c46250012.sumcon)
e1:SetTarget(c46250012.sumtg)
e1:SetOperation(c46250012.sumop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c46250012.atkval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCountLimit(1)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c46250012.negcon)
e3:SetCost(c46250012.negcost)
e3:SetTarget(c46250012.negtg)
e3:SetOperation(c46250012.negop)
c:RegisterEffect(e3)
c:SetSPSummonOnce(46250012)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c46250012.lfilter,1,1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c46250012.sumcon)
e1:SetTarget(c46250012.sumtg)
e1:SetOperation(c46250012.sumop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c46250012.atkval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCountLimit(1)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c46250012.negcon)
e3:SetCost(c46250012.negcost)
e3:SetTarget(c46250012.negtg)
e3:SetOperation(c46250012.negop)
c:RegisterEffect(e3)
end
function c46250012.lfilter(c)
return c:IsLinkSetCard(0x1fc0)
return c:IsLinkSetCard(0x1fc0)
end
function c46250012.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c46250012.eqfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1fc0) and not c:IsForbidden()
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1fc0) and not c:IsForbidden()
end
function c46250012.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c46250012.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c46250012.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function c46250012.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c46250012.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if not g then return end
local tc=g:GetFirst()
if not Duel.Equip(tp,tc,c,true) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46250012.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c46250012.matval)
tc:RegisterEffect(e2)
end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c46250012.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if not g then return end
local tc=g:GetFirst()
if not Duel.Equip(tp,tc,c,true) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46250012.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c46250012.matval)
tc:RegisterEffect(e2)
end
end
function c46250012.eqlimit(e,c)
return e:GetOwner()==c
return e:GetOwner()==c
end
function c46250012.matval(e,c,mg)
return c:IsRace(RACE_WYRM)
return c:IsRace(RACE_WYRM) and c:IsControler(e:GetHandlerPlayer())
end
function c46250012.atkval(e,c)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
end
function c46250012.negcon(e,tp,eg,ep,ev,re,r,rp)
local eg=e:GetHandler():GetEquipGroup()
return eg and eg:IsExists(Card.IsSetCard,1,nil,0x1fc0) and re:GetActivateLocation()==LOCATION_GRAVE and Duel.IsChainNegatable(ev)
local eg=e:GetHandler():GetEquipGroup()
return eg and eg:IsExists(Card.IsSetCard,1,nil,0x1fc0) and re:GetActivateLocation()==LOCATION_GRAVE and Duel.IsChainNegatable(ev)
end
function c46250012.rfilter(c)
return c:IsSetCard(0xfc0) and c:IsAbleToDeckOrExtraAsCost()
return c:IsSetCard(0xfc0) and c:IsAbleToDeckOrExtraAsCost()
end
function c46250012.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c46250012.rfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c46250012.rfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c46250012.rfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c46250012.rfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c46250012.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function c46250012.negop(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
ec:CancelToGrave()
Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)
end
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
ec:CancelToGrave()
Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)
end
end
......@@ -82,7 +82,7 @@ function c46250013.eqlimit(e,c)
return e:GetOwner()==c
end
function c46250013.matval(e,c,mg)
return c:IsRace(RACE_WYRM)
return c:IsRace(RACE_WYRM) and c:IsControler(e:GetHandlerPlayer())
end
function c46250013.atkval(e,c)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
......
......@@ -88,7 +88,7 @@ function c46250014.eqlimit(e,c)
return e:GetOwner()==c
end
function c46250014.matval(e,c,mg)
return c:IsRace(RACE_WYRM)
return c:IsRace(RACE_WYRM) and c:IsControler(e:GetHandlerPlayer())
end
function c46250014.atkval(e,c)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
......
......@@ -89,7 +89,7 @@ function c46250015.eqlimit(e,c)
return e:GetOwner()==c
end
function c46250015.matval(e,c,mg)
return c:IsRace(RACE_WYRM)
return c:IsRace(RACE_WYRM) and c:IsControler(e:GetHandlerPlayer())
end
function c46250015.atkval(e,c)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
......
......@@ -100,7 +100,7 @@ function c46250016.eqlimit(e,c)
return e:GetOwner()==c
end
function c46250016.matval(e,c,mg)
return c:IsRace(RACE_WYRM)
return c:IsRace(RACE_WYRM) and c:IsControler(e:GetHandlerPlayer())
end
function c46250016.atkval(e,c)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
......
......@@ -96,7 +96,7 @@ function c46250017.eqlimit(e,c)
return e:GetOwner()==c
end
function c46250017.matval(e,c,mg)
return c:IsRace(RACE_WYRM)
return c:IsRace(RACE_WYRM) and c:IsControler(e:GetHandlerPlayer())
end
function c46250017.atkval(e,c)
return Group.GetSum(c:GetEquipGroup():Filter(Card.IsSetCard,nil,0x1fc0),Card.GetTextAttack)
......
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