Commit 44ff25aa authored by Satty's avatar Satty

fix

parent 562fbd01
Pipeline #36712 failed with stages
in 21 minutes and 6 seconds
...@@ -1668,7 +1668,6 @@ ...@@ -1668,7 +1668,6 @@
36700322 0 ---黑刃猎刀·狄克推多 36700322 0 ---黑刃猎刀·狄克推多
#370 #370
37000005 0 --现界的魂灵 耀
37000022 0 --往世的教皇 赫 37000022 0 --往世的教皇 赫
37000100 0 --两世之黎明 曦 37000100 0 --两世之黎明 曦
37000005 1 --现界的魂灵 耀 37000005 1 --现界的魂灵 耀
......
...@@ -46,7 +46,7 @@ function c33200734.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function c33200734.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c33200734.thfilter(c) function c33200734.thfilter(c)
return c:IsSetCard(0xc32a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsFaceup() and c:IsSetCard(0xc32a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c33200734.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33200734.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200734.thfilter,tp,LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c33200734.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
......
...@@ -62,7 +62,8 @@ function c33200740.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,8 @@ function c33200740.spop(e,tp,eg,ep,ev,re,r,rp)
local count=tc:GetLink() local count=tc:GetLink()
if tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,tc)>0 and Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x32a,count,REASON_EFFECT) then if tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,tc)>0 and Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x32a,count,REASON_EFFECT) then
if Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x32a,count,REASON_EFFECT) then if Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x32a,count,REASON_EFFECT) then
Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP) tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)>0 then tc:CompleteProcedure() end
end end
end end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -89,7 +90,7 @@ function c33200740.counttg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,7 +90,7 @@ function c33200740.counttg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(33200740,1)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(33200740,1))
end end
function c33200740.cfilter(c) function c33200740.cfilter(c)
return c:IsSetCard(0xc32a) and c:IsAbleToDeck() return c:IsFaceup() and c:IsSetCard(0xc32a) and c:IsAbleToDeck()
end end
function c33200740.counter(e,tp,eg,ep,ev,re,r,rp) function c33200740.counter(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
local s,id=GetID() local s,id=GetID()
function s.todeck(c) function s.todeck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg) e1:SetTarget(s.tdtg)
e1:SetOperation(s.spop) e1:SetOperation(s.tdop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.tdfilter(c,e) function s.tdfilter(c,e)
return (c:IsRace(RACE_WYRM) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x5ca0))) and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck() return (c:IsRace(RACE_WYRM) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x5ca0))) and c:IsFaceupEx() and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck()
end end
function s.thfilter(c,g) function s.thfilter(c,g)
return g:IsExists(Card.IsCode,1,nil,c:GetCode()) and c:IsAbleToHand() return g:IsExists(Card.IsCode,1,nil,c:GetCode()) and c:IsAbleToHand()
...@@ -20,7 +20,7 @@ end ...@@ -20,7 +20,7 @@ end
function s.slcheck(sg,tp) function s.slcheck(sg,tp)
return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,sg) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,sg)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e) local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
if chk==0 then return #g>3 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,g) end if chk==0 then return #g>3 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,g) end
...@@ -30,7 +30,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -30,7 +30,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #tg>0 then if #tg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -48,7 +48,7 @@ function s.spsummon(c) ...@@ -48,7 +48,7 @@ function s.spsummon(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
......
...@@ -42,7 +42,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,47320210) then return false end if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,47320210) then return false end
return eg:IsExists(Card.IsSummonPlayer,1,e:GetHandler(),1-tp) return eg:IsExists(Card.IsSummonPlayer,1,e:GetHandler(),1-tp)
end end
function s.desfilter(c) function s.desfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsType(TYPE_MONSTER)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -74,9 +74,9 @@ function s.tdfilter(c) ...@@ -74,9 +74,9 @@ function s.tdfilter(c)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tdfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tdfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingTarget(s.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=Duel.SelectTarget(tp,s.tdfilter,tp,0,LOCATION_GRAVE,1,1,nil) local tg=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local atk=tg:GetFirst():GetAttack() local atk=tg:GetFirst():GetAttack()
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,0,0)
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
......
...@@ -71,17 +71,31 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,17 +71,31 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetOperation(s.retop) e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_REMOVED,0,nil) local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_REMOVED,0,nil)
local ct2=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_REMOVED,nil) local ct2=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_REMOVED,nil)
if ct1<ct2 then if ct1<ct2 then
local e2=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0) e4:SetTargetRange(1,0)
e2:SetValue(s.aclimit) e4:SetValue(s.aclimit)
e2:SetReset(RESET_PHASE+PHASE_END,2) e4:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e4,tp)
elseif ct1>ct2 then elseif ct1>ct2 then
local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_REMOVED,0,nil) local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_REMOVED,0,nil)
local tohand=tg:Filter(Card.IsAbleToHand,nil) local tohand=tg:Filter(Card.IsAbleToHand,nil)
...@@ -103,7 +117,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,7 +117,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function s.aclimit(e,re,tp) function s.aclimit(e,re,tp)
local rc=re:GetHandler() local rc=re:GetHandler()
return not s.MoJin return not rc.MoJin
end end
function s.retop(e,tp,eg,ep,ev,re,r,rp) function s.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
......
...@@ -111,17 +111,18 @@ function c60151125.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,17 +111,18 @@ function c60151125.disop(e,tp,eg,ep,ev,re,r,rp)
if res==1 then if res==1 then
local rc=re:GetHandler() local rc=re:GetHandler()
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
if rc:IsRelateToEffect(re) and not rc:IsImmuneToEffect(e) then if not rc:IsImmuneToEffect(e) then
if rc:IsType(TYPE_MONSTER) then if rc:IsType(TYPE_XYZ) then
local og=rc:GetOverlayGroup() local og=rc:GetOverlayGroup()
if og:GetCount()>0 then if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoGrave(og,REASON_RULE)
end end
Duel.Overlay(e:GetHandler(),Group.FromCards(rc)) Duel.Overlay(e:GetHandler(),Group.FromCards(rc))
end elseif rc:IsType(TYPE_SPELL+TYPE_TRAP) then
if rc:IsType(TYPE_SPELL+TYPE_TRAP) then
rc:CancelToGrave() rc:CancelToGrave()
Duel.Overlay(e:GetHandler(),Group.FromCards(rc)) Duel.Overlay(e:GetHandler(),Group.FromCards(rc))
else
return false
end end
end end
end end
......
...@@ -27,6 +27,7 @@ function cm.initial_effect(c) ...@@ -27,6 +27,7 @@ function cm.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m+10000000) e3:SetCountLimit(1,m+10000000)
e3:SetTarget(cm.target) e3:SetTarget(cm.target)
e3:SetOperation(cm.operation) e3:SetOperation(cm.operation)
......
...@@ -21,6 +21,7 @@ function cm.initial_effect(c) ...@@ -21,6 +21,7 @@ function cm.initial_effect(c)
e4:SetCategory(CATEGORY_CONTROL) e4:SetCategory(CATEGORY_CONTROL)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetRange(LOCATION_PZONE) e4:SetRange(LOCATION_PZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCost(xiaoye.PendulumEffectCost) e4:SetCost(xiaoye.PendulumEffectCost)
......
...@@ -46,7 +46,8 @@ end ...@@ -46,7 +46,8 @@ end
function c67200960.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c67200960.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp)
and chkc:IsFaceup() and chkc:IsSetCard(0x67a) end and chkc:IsFaceup() and chkc:IsSetCard(0x67a) end
if chk==0 then return Duel.IsExistingTarget(c67200960.tgfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c67200960.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c67200960.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c67200960.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
local s,id=GetID() --寄生兽 Ⅰ型
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
...@@ -23,60 +24,58 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,60 +24,58 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function s.filter(c)
return c:IsFaceup()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
if c:IsLocation(LOCATION_HAND) then local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
e:SetCategory(CATEGORY_EQUIP) if chk==0 then return b1 or b2 end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
end
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
e:SetCategory(CATEGORY_EQUIP)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
else elseif c:IsLocation(LOCATION_SZONE) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(function(e,c) return c==tc end) e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
elseif c:IsLocation(LOCATION_SZONE) then elseif c:IsLocation(LOCATION_SZONE) then
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoHand(g,nil,REASON_EFFECT)
if #g>0 then Duel.ConfirmCards(1-tp,g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end end
end end
end end
end end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
function s.thfilter(c) function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xaf1) and c:IsAbleToHand() and not c:IsCode(id) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xaf1) and c:IsAbleToHand() and not c:IsCode(id)
end end
local s,id=GetID() --寄生兽 Ⅱ型
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
...@@ -19,60 +20,58 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,60 +20,58 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function s.filter(c)
return c:IsFaceup()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
if c:IsLocation(LOCATION_HAND) then local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
e:SetCategory(CATEGORY_EQUIP) if chk==0 then return b1 or b2 end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
end
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
e:SetCategory(CATEGORY_EQUIP)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
else elseif c:IsLocation(LOCATION_SZONE) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(function(e,c) return c==tc end) e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
elseif c:IsLocation(LOCATION_SZONE) then elseif c:IsLocation(LOCATION_SZONE) then
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) then local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoHand(g,nil,REASON_EFFECT)
if #g>0 then Duel.ConfirmCards(1-tp,g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end end
end end
end end
end end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0xaf1) and c:IsAbleToHand() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0xaf1) and c:IsAbleToHand()
end end
local s,id=GetID() --寄生兽 Ⅲ型
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
...@@ -19,59 +20,58 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,59 +20,58 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function s.filter(c)
return c:IsFaceup()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
if c:IsLocation(LOCATION_HAND) then local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
e:SetCategory(CATEGORY_EQUIP) if chk==0 then return b1 or b2 end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
end
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
e:SetCategory(CATEGORY_EQUIP)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
else elseif c:IsLocation(LOCATION_SZONE) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(function(e,c) return c==tc end) e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
elseif c:IsLocation(LOCATION_SZONE) then elseif c:IsLocation(LOCATION_SZONE) then
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) then local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SendtoHand(g,nil,REASON_EFFECT)
if #g>0 then Duel.ConfirmCards(1-tp,g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end end
end end
end end
end end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
function s.thfilter(c) function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xaf1) and c:IsAbleToHand() and not c:IsCode(id) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xaf1) and c:IsAbleToHand() and not c:IsCode(id)
end end
local s,id=GetID() --寄生兽 Ⅳ型
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
...@@ -30,59 +31,57 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,59 +31,57 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function s.filter(c)
return c:IsFaceup()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
if c:IsLocation(LOCATION_HAND) then local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
e:SetCategory(CATEGORY_EQUIP) if chk==0 then return b1 or b2 end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
end
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
e:SetCategory(CATEGORY_EQUIP)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
else elseif c:IsLocation(LOCATION_SZONE) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,0,0)
end end
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(function(e,c) return c==tc end) e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
elseif c:IsLocation(LOCATION_SZONE) then elseif c:IsLocation(LOCATION_SZONE) then
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) then local g=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end end
end end
end end
end end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:GetOriginalType()&TYPE_MONSTER>0 and c:GetType()&TYPE_EQUIP+TYPE_SPELL==TYPE_EQUIP+TYPE_SPELL return c:GetOriginalType()&TYPE_MONSTER>0 and c:GetType()&TYPE_EQUIP+TYPE_SPELL==TYPE_EQUIP+TYPE_SPELL
and c:IsFaceup() and c:IsSetCard(0xaf1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup() and c:IsSetCard(0xaf1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
--「寄生兽」超量怪兽 --寄生兽 ⅴ型
local s,id= GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,1,2,nil,nil,99) aux.AddXyzProcedure(c,nil,1,2,nil,nil,99)
...@@ -17,7 +17,7 @@ function s.initial_effect(c) ...@@ -17,7 +17,7 @@ function s.initial_effect(c)
e1:SetTarget(s.eqtg) e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop) e1:SetOperation(s.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2 = Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id, 1)) e2:SetDescription(aux.Stringid(id, 1))
e2:SetCategory(CATEGORY_EQUIP) e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
...@@ -25,9 +25,9 @@ function s.initial_effect(c) ...@@ -25,9 +25,9 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1000) e2:SetCountLimit(1,id+1000)
e2:SetCost(s.cost2) e2:SetCost(s.epcost2)
e2:SetTarget(s.target2) e2:SetTarget(s.eqtg2)
e2:SetOperation(s.operation2) e2:SetOperation(s.eqop2)
e2:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE) e2:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -40,68 +40,60 @@ function s.epcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,68 +40,60 @@ function s.epcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk == 0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function s.eqfilter(c,tp) function s.filter(c)
return c:IsFaceup() return c:IsFaceup()
and Duel.IsExistingMatchingCard(s.eqmonsterfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end end
function s.eqmonsterfilter(c,tp) function s.eqfilter(c)
return c:IsSetCard(0xaf1) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() return c:IsSetCard(0xaf1) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.eqfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
local ec=Duel.SelectMatchingCard(tp,s.eqmonsterfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
if ec then local ec=g:Select(tp,1,1,nil):GetFirst()
if not Duel.Equip(tp,ec,tc) then return end Duel.Equip(tp,ec,tc)
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_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(function(e,c) return c==tc end) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetLabelObject(tc)
ec:RegisterEffect(e1) e1:SetValue(s.eqlimit)
end ec:RegisterEffect(e1)
end
end end
function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function s.epcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end end
function s.filter2(c,tp) function s.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return c:IsFaceup() and c:IsControler(1-tp) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if chkc then return chkc:IsOnField() and s.filter2(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter2,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,s.filter2,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(), 1, 0, 0)
end end
function s.operation2(e, tp, eg, ep, ev, re, r, rp) function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(function(e,c) return c==tc end) e1:SetLabelObject(tc)
c:RegisterEffect(e1) e1:SetValue(s.eqlimit)
end c:RegisterEffect(e1)
end end
function s.eqlimit(e, c) function s.eqlimit(e,c)
return e:GetOwner() == c return c==e:GetLabelObject()
end end
function s.cval(e,c) function s.cval(e,c)
return e:GetHandlerPlayer() return e:GetHandlerPlayer()
......
-- 寄生兽的场地魔法卡 --寄生兽的栖息地
local s,id=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--寄生兽的蛰伏 --寄生兽的蛰伏
local s,id=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -24,37 +24,36 @@ function s.initial_effect(c) ...@@ -24,37 +24,36 @@ function s.initial_effect(c)
e2:SetOperation(s.tdop) e2:SetOperation(s.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.eqfilter(c,tp) function s.filter(c)
return c:IsFaceup() return c:IsFaceup()
and Duel.IsExistingMatchingCard(s.eqmonsterfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end end
function s.eqmonsterfilter(c,tp) function s.eqfilter(c)
return c:IsSetCard(0xaf1) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() return c:IsSetCard(0xaf1) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.eqfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
local ec=Duel.SelectMatchingCard(tp,s.eqmonsterfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
if ec then local ec=g:Select(tp,1,1,nil):GetFirst()
if not Duel.Equip(tp,ec,tc) then return end Duel.Equip(tp,ec,tc)
-- Equip Limit 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_EQUIP_LIMIT)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(function(e,c) return c==tc end) e1:SetLabelObject(tc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(s.eqlimit)
ec:RegisterEffect(e1) ec:RegisterEffect(e1)
end end
end function s.eqlimit(e,c)
return c==e:GetLabelObject()
end end
function s.tdfilter(c) function s.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xaf1) and c:IsAbleToDeck() return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xaf1) and c:IsAbleToDeck()
......
local s,id=GetID() --寄生兽的诞生
local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
...@@ -23,37 +24,36 @@ function s.initial_effect(c) ...@@ -23,37 +24,36 @@ function s.initial_effect(c)
e2:SetOperation(s.mtop) e2:SetOperation(s.mtop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.eqfilter(c,tp) function s.filter(c)
return c:IsFaceup() return c:IsFaceup()
and Duel.IsExistingMatchingCard(s.eqmonsterfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end end
function s.eqmonsterfilter(c,tp) function s.eqfilter(c)
return c:IsSetCard(0xaf1) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() return c:IsSetCard(0xaf1) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.eqfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
local ec=Duel.SelectMatchingCard(tp,s.eqmonsterfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
if ec then local ec=g:Select(tp,1,1,nil):GetFirst()
if not Duel.Equip(tp,ec,tc) then return end Duel.Equip(tp,ec,tc)
-- Equip Limit 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_EQUIP_LIMIT)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(function(e,c) return c==tc end) e1:SetLabelObject(tc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(s.eqlimit)
ec:RegisterEffect(e1) ec:RegisterEffect(e1)
end end
end function s.eqlimit(e,c)
return c==e:GetLabelObject()
end end
function s.filter1(c,e,tp) function s.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xaf1) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xaf1)
......
--寄生兽捕获装置 --寄生兽捕获装置
local s,id=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -30,32 +30,29 @@ function s.spcon(e,c) ...@@ -30,32 +30,29 @@ function s.spcon(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function s.eqfilter(c,tp) function s.eqfilter(c)
return c:IsSetCard(0xaf1) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() return c:IsSetCard(0xaf1) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if chk==0 then return Duel.IsExistingMatchingCard(s.eqcfilter,tp,LOCATION_DECK,0,1,nil,tp) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp) local ec=g:Select(tp,1,1,nil):GetFirst()
local tc=g:GetFirst() Duel.Equip(tp,ec,c)
if tc then local e1=Effect.CreateEffect(c)
if not Duel.Equip(tp,tc,c) then return end e1:SetType(EFFECT_TYPE_SINGLE)
local e1=Effect.CreateEffect(c) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) ec:RegisterEffect(e1)
e1:SetLabelObject(c)
e1:SetValue(s.eqlimit)
tc:RegisterEffect(e1)
end
end end
function s.eqlimit(e,c) function s.eqlimit(e,c)
return c==e:GetLabelObject() return e:GetOwner()==c
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