Commit 9d137108 authored by Nemo Ma's avatar Nemo Ma

240714 wd

parent 65c6dae9
......@@ -1676,6 +1676,7 @@
74500000 0
89390010 0
98941049 0
89390012 0
#Semi-Wild 1003
31409200 0
31409201 0
......
No preview for this file type
......@@ -51,9 +51,9 @@ function c46250007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
if ft>-1 then
g=Duel.GetMatchingGroup(c46250007.desfilter,tp,LOCATION_ONFIELD,0,c)
g=Duel.GetMatchingGroup(c46250007.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
else
g=Duel.GetMatchingGroup(c46250007.desfilter,tp,LOCATION_MZONE,0,c)
g=Duel.GetMatchingGroup(c46250007.desfilter,tp,LOCATION_MZONE,0,nil)
end
if chk==0 then return ft>-2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and g:GetCount()>=2
......@@ -68,9 +68,9 @@ function c46250007.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
if ft>-1 then
g=Duel.GetMatchingGroup(c46250007.desfilter,tp,LOCATION_ONFIELD,0,c)
g=Duel.GetMatchingGroup(c46250007.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
else
g=Duel.GetMatchingGroup(c46250007.desfilter2,tp,LOCATION_MZONE,0,c)
g=Duel.GetMatchingGroup(c46250007.desfilter,tp,LOCATION_MZONE,0,nil)
end
if g:GetCount()<2 then return end
local g1=nil
......
......@@ -18,11 +18,10 @@ function c46250008.initial_effect(c)
e2:SetOperation(c46250008.spop)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(46250008,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY+CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetTarget(c46250008.tsptg)
e4:SetOperation(c46250008.tspop)
c:RegisterEffect(e4)
......@@ -30,7 +29,6 @@ function c46250008.initial_effect(c)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(46250008,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
......@@ -46,7 +44,7 @@ end
function c46250008.spcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return a and a:IsControler(tp) and a:IsSetCard(0xfc0) or d and d:IsControler(tp) and d:IsSetCard(0xfc0)
return a and a:IsSetCard(0xfc0) or d and d:IsSetCard(0xfc0)
end
function c46250008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -61,22 +59,47 @@ function c46250008.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c46250008.spfilter(c,atk)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAttackBelow(atk) and c:IsDestructable() and c:IsAbleToRemove()
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:GetAttack()<atk and c:IsDestructable() and c:IsAbleToRemove()
end
function c46250008.mzfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5
end
function c46250008.tsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46250008.spfilter,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE+LOCATION_EXTRA,1,nil,e:GetHandler():GetAttack()) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.IsExistingMatchingCard(c46250008.spfilter,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE+LOCATION_EXTRA,1,nil,e:GetHandler():GetAttack())
and Duel.IsPlayerCanSpecialSummonMonster(tp,46250001,0x1fc0,0x4011,1000,0,3,RACE_WYRM,ATTRIBUTE_DARK)end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c46250008.tspop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local n=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),2)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local n=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then n=1 end
local g=Duel.SelectMatchingCard(tp,c46250008.spfilter,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE+LOCATION_EXTRA,1,n,nil,e:GetHandler():GetAttack())
local g=Duel.GetMatchingGroup(c46250008.spfilter,tp,LOCATION_MZONE+LOCATION_EXTRA,LOCATION_MZONE+LOCATION_EXTRA,nil,e:GetHandler():GetAttack())
if not g then return end
n=math.min(Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED),n)
local dg=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
if ft==1 then
dg=g:Select(tp,1,1,nil)
local tc=dg:GetFirst()
if n==2 and g:IsExists(c46250008.mzfilter,1,tc,tp)
and Duel.SelectYesNo(tp,aux.Stringid(46250008,0)) then
if c46250008.mzfilter(tc,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg2=g:Select(tp,1,1,tc)
dg:Merge(dg2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg2=g:FilterSelect(tp,c46250008.mzfilter,1,1,tc)
dg:Merge(dg2)
end
end
elseif ft==0 then
dg=g:FilterSelect(tp,c46250008.mzfilter,1,n,nil)
else
dg=g:Select(tp,1,n,nil)
end
n=Duel.Destroy(dg,REASON_EFFECT,LOCATION_REMOVED)
if n>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,46250001,0x1fc0,0x4011,1000,0,3,RACE_WYRM,ATTRIBUTE_DARK) then
Duel.BreakEffect()
for i=1,n do
......
......@@ -85,7 +85,7 @@ function c46250012.negcon(e,tp,eg,ep,ev,re,r,rp)
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:IsAbleToDeckAsCost()
end
function c46250012.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -30,10 +30,10 @@ function c46250013.initial_effect(c)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(46250013,1))
e6:SetCountLimit(1)
e6:SetCategory(CATEGORY_TOHAND)
e6:SetCategory(CATEGORY_NEGATE+CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(c46250013.negcon)
e6:SetCost(c46250013.negcost)
......@@ -112,35 +112,31 @@ function c46250013.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c46250013.thfilter(c)
return c:IsSetCard(0xfc0) and c:IsFaceup() and c:IsAbleToHand()
end
function c46250013.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
local eg=e:GetHandler():GetEquipGroup()
return g and g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) and eg and eg:IsExists(Card.IsSetCard,1,nil,0x1fc0)
return g and g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) and eg and eg:IsExists(Card.IsSetCard,1,nil,0x1fc0) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(c46250013.thfilter,tp,LOCATION_REMOVED,0,1,nil)
end
function c46250013.rfilter(c)
return c:IsSetCard(0xfc0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
return c:IsSetCard(0xfc0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function c46250013.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c46250013.rfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c46250013.rfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c46250013.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xfc0) and c:IsFaceup() and c:IsAbleToHand()
end
function c46250013.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(Card.IsLocation,nil,LOCATION_MZONE):Filter(Card.IsAbleToHand,nil)
if chk==0 then return g:GetCount()>0 and Duel.IsExistingMatchingCard(c46250013.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,LOCATION_REMOVED)
end
function c46250013.negop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(Card.IsLocation,nil,LOCATION_MZONE):Filter(Card.IsAbleToHand,nil)
if not g then return end
if g and Duel.SendtoHand(g,nil,REASON_EFFECT) then
if Duel.NegateActivation(ev) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=Duel.SelectMatchingCard(tp,c46250013.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
......
--英龙骑-雪虎
function c46250015.initial_effect(c)
c:SetSPSummonOnce(46250015)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c46250015.lfilter,2)
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(c46250015.sumcon)
e1:SetTarget(c46250015.sumtg)
e1:SetOperation(c46250015.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(c46250015.atkval)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c46250015.spcon)
e5:SetCost(c46250015.spcost)
e5:SetTarget(c46250015.sptg)
e5:SetOperation(c46250015.spop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(c46250015.limcon)
e6:SetOperation(c46250015.limop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetRange(LOCATION_MZONE)
e8:SetCode(EVENT_CHAIN_END)
e8:SetOperation(c46250015.limop2)
c:RegisterEffect(e8)
c:SetSPSummonOnce(46250015)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c46250015.lfilter,2)
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(c46250015.sumcon)
e1:SetTarget(c46250015.sumtg)
e1:SetOperation(c46250015.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(c46250015.atkval)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c46250015.spcon)
e5:SetCost(c46250015.spcost)
e5:SetTarget(c46250015.sptg)
e5:SetOperation(c46250015.spop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(c46250015.limcon)
e6:SetOperation(c46250015.limop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetRange(LOCATION_MZONE)
e8:SetCode(EVENT_CHAIN_END)
e8:SetOperation(c46250015.limop2)
c:RegisterEffect(e8)
end
function c46250015.lfilter(c)
return c:IsLinkSetCard(0xfc0)
return c:IsLinkSetCard(0xfc0)
end
function c46250015.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 c46250015.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 c46250015.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c46250015.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(c46250015.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function c46250015.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,c46250015.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(c46250015.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(c46250015.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,c46250015.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(c46250015.eqlimit)
tc:RegisterEffect(e1)
end
end
function c46250015.eqlimit(e,c)
return e:GetOwner()==c
end
function c46250015.matval(e,c,mg)
return c:IsRace(RACE_WYRM) and c:IsControler(e:GetHandlerPlayer())
return e:GetOwner()==c
end
function c46250015.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 c46250015.spcon(e,tp,eg,ep,ev,re,r,rp)
local eg=e:GetHandler():GetEquipGroup()
return eg and eg:IsExists(Card.IsSetCard,1,nil,0x1fc0) and Duel.IsExistingMatchingCard(Card.IsSummonable,tp,LOCATION_HAND,0,1,nil,true,nil)
local eg=e:GetHandler():GetEquipGroup()
return eg and eg:IsExists(Card.IsSetCard,1,nil,0x1fc0) and Duel.IsExistingMatchingCard(Card.IsSummonable,tp,LOCATION_HAND,0,1,nil,true,nil)
end
function c46250015.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
local g=c:GetEquipGroup()
g:KeepAlive()
e:SetLabelObject(g)
Duel.Release(c,REASON_COST)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
local g=c:GetEquipGroup()
g:KeepAlive()
e:SetLabelObject(g)
Duel.Release(c,REASON_COST)
end
function c46250015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return true end
end
function c46250015.spop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject():Filter(Card.IsLocation,nil,LOCATION_GRAVE)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
if Duel.IsExistingMatchingCard(Card.IsSummonable,tp,LOCATION_HAND,0,1,nil,true,nil) then
local tg=Duel.SelectMatchingCard(tp,Card.IsSummonable,tp,LOCATION_HAND,0,1,1,nil,true,nil)
Duel.BreakEffect()
Duel.Summon(tp,tg:GetFirst(),true,nil)
else
Duel.ConfirmCards(1-tp,Duel.GetFieldGroup(tp,LOCATION_HAND,0))
end
end
local g=e:GetLabelObject():Filter(Card.IsLocation,nil,LOCATION_GRAVE)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
if Duel.IsExistingMatchingCard(Card.IsSummonable,tp,LOCATION_HAND,0,1,nil,true,nil) then
local tg=Duel.SelectMatchingCard(tp,Card.IsSummonable,tp,LOCATION_HAND,0,1,1,nil,true,nil)
Duel.BreakEffect()
Duel.Summon(tp,tg:GetFirst(),true,nil)
else
Duel.ConfirmCards(1-tp,Duel.GetFieldGroup(tp,LOCATION_HAND,0))
end
end
end
function c46250015.limcon(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 c46250015.limop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(c46250015.chainlm)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(46250015,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(c46250015.chainlm)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(46250015,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function c46250015.limop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetOverlayCount()>0 and e:GetHandler():GetFlagEffect(46250015)~=0 then
Duel.SetChainLimitTillChainEnd(c46250015.chainlm)
end
e:GetHandler():ResetFlagEffect(46250015)
if e:GetHandler():GetFlagEffect(46250015)~=0 then
Duel.SetChainLimitTillChainEnd(c46250015.chainlm)
end
e:GetHandler():ResetFlagEffect(46250015)
end
function c46250015.chainlm(e,rp,tp)
return tp==rp
return tp==rp
end
......@@ -86,22 +86,11 @@ function c46250016.sumop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46250016.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(c46250016.matval)
tc:RegisterEffect(e2)
end
end
function c46250016.eqlimit(e,c)
return e:GetOwner()==c
end
function c46250016.matval(e,c,mg)
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)
end
......
This diff is collapsed.
--星装命令
function c46250018.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,46250018+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c46250018.spcost)
e1:SetTarget(c46250018.sptg)
e1:SetOperation(c46250018.spop)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,46250018+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c46250018.spcost)
e1:SetTarget(c46250018.sptg)
e1:SetOperation(c46250018.spop)
c:RegisterEffect(e1)
end
function c46250018.rfilter(c)
return c:IsSetCard(0x1fc0) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
return c:IsSetCard(0x1fc0) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c46250018.subgfilter(g,ft)
return g:GetSum(Card.GetLevel)<=ft*3
end
function c46250018.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46250018.rfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c46250018.rfilter,tp,LOCATION_HAND,0,1,99,nil)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(g:GetSum(Card.GetLevel))
local g=Duel.GetMatchingGroup(c46250018.rfilter,tp,LOCATION_HAND,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if chk==0 then return g:CheckSubGroup(c46250018.subgfilter,1,#g,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,c46250018.subgfilter,false,1,#g,ft)
Duel.SendtoGrave(sg,REASON_COST)
e:SetLabel(sg:GetSum(Card.GetLevel))
end
function c46250018.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,46250001,0x1fc0,0x4011,1000,0,3,RACE_WYRM,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,46250001,0x1fc0,0x4011,1000,0,3,RACE_WYRM,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c46250018.spop(e,tp,eg,ep,ev,re,r,rp)
local n=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),math.ceil(e:GetLabel()/3))
if n>=2 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if n>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,46250001,0x1fc0,0x4011,1000,0,3,RACE_WYRM,ATTRIBUTE_DARK) then
for i=1,n do
Duel.SpecialSummonStep(Duel.CreateToken(tp,46250001),0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c46250018.sumlimit)
Duel.RegisterEffect(e1,tp)
local n=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),math.ceil(e:GetLabel()/3))
if n>=2 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if n>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,46250001,0x1fc0,0x4011,1000,0,3,RACE_WYRM,ATTRIBUTE_DARK) then
for i=1,n do
Duel.SpecialSummonStep(Duel.CreateToken(tp,46250001),0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c46250018.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function c46250018.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xfc0)
return not c:IsSetCard(0xfc0)
end
......@@ -24,7 +24,7 @@ function c46250019.initial_effect(c)
c:RegisterEffect(e3)
end
function c46250019.lkfilter0(c,e,tp)
return c:IsFaceup() and c46250019.lkfilter2(c) and Duel.IsExistingMatchingCard(c46250019.lkfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
return c:IsFaceup() and c:IsSetCard(0x1fc0) and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c46250019.lkfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c46250019.lkfilter(c,e,tp,mc)
return c:IsSetCard(0x2fc0) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,true,true) and c:GetLink()>=2 and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and Duel.IsExistingMatchingCard(c46250019.lkfilter2,tp,LOCATION_DECK,0,c:GetLink()-1,nil)
......@@ -34,9 +34,11 @@ function c46250019.lkfilter2(c)
end
function c46250019.lktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c46250019.lkfilter0,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c46250019.lkfilter0,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,e:GetHandler():GetLink(),tp,LOCATION_MZONE+LOCATION_DECK)
if chk==0 then return Duel.IsExistingTarget(c46250019.lkfilter0,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c46250019.lkfilter0,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,g,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c46250019.lkop(e,tp,eg,ep,ev,re,r,rp)
......@@ -52,9 +54,9 @@ function c46250019.lkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,c46250019.lkfilter2,tp,LOCATION_DECK,0,tc:GetLink()-1,tc:GetLink()-1,nil)
if not tg then return end
tg:AddCard(fc)
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==tg:GetCount() then
if Duel.SendtoGrave(fc,REASON_SPSUMMON+REASON_MATERIAL)>0 and Duel.Remove(tg,POS_FACEUP,REASON_SPSUMMON+REASON_MATERIAL)==tg:GetCount() then
Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,true,true,POS_FACEUP)
tg:AddCard(fc)
tc:SetMaterial(tg)
tc:CompleteProcedure()
end
......
--星装怨
function c46250021.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c46250021.spcost1)
e2:SetTarget(c46250021.sptg1)
e2:SetOperation(c46250021.spop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c46250021.sptg)
e3:SetOperation(c46250021.spop)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c46250021.spcost1)
e2:SetTarget(c46250021.sptg1)
e2:SetOperation(c46250021.spop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c46250021.sptg)
e3:SetOperation(c46250021.spop)
c:RegisterEffect(e3)
end
function c46250021.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3b)
return c:IsFaceup() and c:IsSetCard(0x3b)
end
function c46250021.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c46250021.spfilter1(c,e,tp)
return c:IsSetCard(0x2fc0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x2fc0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c46250021.eqfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1fc0) and not c:IsForbidden() and c:IsLevelBelow(4)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1fc0) and not c:IsForbidden() and c:IsLevelBelow(4)
end
function c46250021.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46250021.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c46250021.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c46250021.eqfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c46250021.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,1-tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46250021.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c46250021.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c46250021.eqfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c46250021.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function c46250021.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c46250021.eqfilter,tp,LOCATION_DECK,0,1,1,nil)
if not g then return end
local ec=g:GetFirst()
if not Duel.Equip(tp,ec,tc,true) then return end
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46250021.eqlimit)
ec:RegisterEffect(e1)
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
local sc=g:GetFirst()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(-tc:GetAttack())
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c46250021.eqfilter,tp,LOCATION_DECK,0,1,1,nil)
if not g then return end
local ec=g:GetFirst()
if not Duel.Equip(tp,ec,tc,true) then return end
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c46250021.eqlimit)
ec:RegisterEffect(e1)
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
local sc=g:GetFirst()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(-tc:GetAttack())
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
end
end
function c46250021.eqlimit(e,c)
return e:GetOwner()==c
return e:GetOwner()==c
end
function c46250021.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,46250001,0x1fc0,0x4011,1000,0,3,RACE_WYRM,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,46250001,0x1fc0,0x4011,1000,0,3,RACE_WYRM,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c46250021.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.SpecialSummon(Duel.CreateToken(tp,46250001),0,tp,tp,false,false,POS_FACEUP)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.SpecialSummon(Duel.CreateToken(tp,46250001),0,tp,tp,false,false,POS_FACEUP)
end
--骸星装-端杯
function c46250022.initial_effect(c)
aux.AddCodeList(c,46250022)
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,46250022,LOCATION_MZONE)
c:SetUniqueOnField(1,0,46250022)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(46250022,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
......@@ -24,7 +25,7 @@ function c46250022.initial_effect(c)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,46250022)
e5:SetTarget(c46250022.tgtg)
......@@ -118,14 +119,15 @@ function c46250022.lvop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
function c46250022.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(Card.IsAbleToRemove,nil)
if chk==0 then return not eg:IsContains(e:GetHandler()) and g and g:GetCount()>0 and Duel.CheckReleaseGroup(tp,aux.TRUE,1,g) end
local g=eg:Filter(Card.IsAbleToRemove,e:GetHandler())
if chk==0 then return #g>0 and Duel.CheckReleaseGroup(tp,aux.TRUE,1,g) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c46250022.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsAbleToRemove,e:GetHandler())
if not g or g:GetCount()==0 then return end
if #g==0 then return end
local tg=Duel.SelectReleaseGroup(tp,aux.TRUE,1,1,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
Duel.Release(tg,REASON_EFFECT)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
......
--骸星装-端铠
function c46250023.initial_effect(c)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,46250023,LOCATION_MZONE)
c:SetUniqueOnField(1,0,46250023)
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),aux.NOT(aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK)),true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGrave,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST+REASON_MATERIAL)
aux.AddContactFusionProcedure(c,Card.IsAbleToGrave,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_SPSUMMON+REASON_MATERIAL)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
......@@ -67,7 +67,7 @@ function c46250023.op(e,tp,eg,ep,ev,re,r,rp)
end
function c46250023.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_MZONE+LOCATION_SZONE,LOCATION_MZONE+LOCATION_SZONE,1,c) end
if chk==0 then return c:IsReleasable() and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_MZONE+LOCATION_SZONE,LOCATION_MZONE+LOCATION_SZONE,1,1,c)
g:AddCard(c)
......@@ -90,7 +90,11 @@ function c46250023.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(c46250023.tgval)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
function c46250023.tgval(e,re,rp)
......
--骸星装-端枪
function c46250024.initial_effect(c)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,46250024,LOCATION_MZONE)
c:SetUniqueOnField(1,0,46250024)
aux.AddSynchroMixProcedure(c,c46250024.matfilter1,nil,nil,aux.NonTuner(nil),1,99)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -37,11 +37,11 @@ function c46250024.chainop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=c:GetAttack()
if re:GetHandler():IsSetCard(0xfc0) then
Duel.SetChainLimit(function(e,rp,np) return tp==rp or e:GetHandler():GetBaseAttack()>atk end)
Duel.SetChainLimit(function(e,rp,np) return tp==rp or e:GetHandler():GetBaseAttack()>=atk end)
end
end
function c46250024.attg(e,c)
return e:GetHandler():IsAttackAbove(c:GetBaseAttack())
return e:GetHandler():GetAttack()>c:GetBaseAttack()
end
function c46250024.atlimit(e,c)
return c~=e:GetHandler()
......@@ -50,7 +50,7 @@ function c46250024.tgfilter(c)
return bit.band(c:GetSummonLocation(),LOCATION_EXTRA)==LOCATION_EXTRA
end
function c46250024.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c46250024.tgfilter,1,nil)
return eg:IsExists(c46250024.tgfilter,1,e:GetHandler())
end
function c46250024.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -58,7 +58,7 @@ function c46250024.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(c,REASON_COST)
end
function c46250024.spfilter(c,e,tp)
return c:IsSetCard(0x1fc0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsLevel(6)
return c:IsSetCard(0x1fc0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c46250024.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -117,7 +117,11 @@ function c46250024.tgop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
end
e1:SetLabelObject(sg1)
e1:SetTargetRange(1,0)
e1:SetTarget(c46250024.sumlimit)
......@@ -126,7 +130,11 @@ function c46250024.tgop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY then
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
else
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
end
e2:SetLabelObject(sg1)
e2:SetTargetRange(1,0)
e2:SetValue(c46250024.tgval)
......
--永恒幽灵
local m=89390012
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,Card.IsTuner,cm.ffilter,true)
aux.AddContactFusionProcedure(c,cm.mfilter,LOCATION_HAND+LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(cm.immcon)
e2:SetCost(cm.cost)
e2:SetOperation(cm.immop)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
cm[0]={}
cm[1]={}
cm[2]={}
cm[3]={}
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_CHAIN_NEGATED)
ge2:SetOperation(cm.regop2)
Duel.RegisterEffect(ge2,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge4:SetOperation(cm.clearop)
Duel.RegisterEffect(ge4,0)
end
end
function cm.ffilter(c)
return not c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsFusionType(TYPE_FUSION)
end
function cm.mfilter(c)
local tp=c:GetControler()
local rc=c:GetFusionCode()
return not cm[tp][rc] and cm[tp+2][rc] and c:IsAbleToRemoveAsCost()
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:GetMaterial() then return end
c:GetMaterial():ForEach(cm.regmf,c)
end
function cm.regmf(c,tc)
if c:IsRace(RACE_PSYCHO+RACE_MACHINE) then
tc:CopyEffect(c:GetOriginalCode(),RESET_EVENT+0x1fe0000)
end
end
function cm.immcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function cm.costfilter(c,rc)
return c:IsType(rc:GetType()) and c:IsAbleToRemoveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,re:GetHandler()) end
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c,re:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(cm.efilter)
e1:SetLabel(re:GetHandler():GetCode())
c:RegisterEffect(e1)
end
end
function cm.efilter(e,te)
return te:GetHandler():IsCode(e:GetLabel())
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_MONSTER) then
local rc=re:GetHandler():GetCode()
if cm[rp][rc] then cm[rp][rc]=cm[rp][rc]+1 else cm[rp][rc]=1 end
if cm[rp+2][rc] then cm[rp+2][rc]=cm[rp+2][rc]+1 else cm[rp+2][rc]=1 end
end
end
function cm.regop2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler():GetCode()
if cm[rp][rc] then cm[rp][rc]=cm[rp][rc]-1 else cm[rp][rc]=nil end
if cm[rp+2][rc] then cm[rp+2][rc]=cm[rp+2][rc]-1 else cm[rp+2][rc]=nil end
end
function cm.clearop(e,tp,eg,ep,ev,re,r,rp)
cm[0]={}
cm[1]={}
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