Commit 52f7c5de authored by POLYMER's avatar POLYMER

fix

parent a5f309ed
...@@ -80,20 +80,24 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,20 +80,24 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsLevelAbove(1) return ec and ec:IsLevelAbove(1) and not ec:IsLevel(10)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e3=Effect.CreateEffect(c) local tc=c:GetEquipTarget()
e3:SetType(EFFECT_TYPE_EQUIP) if tc and tc:IsLocation(LOCATION_MZONE) and not tc:IsLevel(10) then
e3:SetCode(EFFECT_CHANGE_LEVEL) local e1=Effect.CreateEffect(c)
e3:SetValue(10) e1:SetType(EFFECT_TYPE_SINGLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
c:RegisterEffect(e3) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(10)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
--direct attack --direct attack
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK) e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2) tc:RegisterEffect(e2)
end
end end
...@@ -80,21 +80,25 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,21 +80,25 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsLevelAbove(1) return ec and ec:IsLevelAbove(1) and not ec:IsLevel(10)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e3=Effect.CreateEffect(c) local tc=c:GetEquipTarget()
e3:SetType(EFFECT_TYPE_EQUIP) if tc and tc:IsLocation(LOCATION_MZONE) and not tc:IsLevel(10) then
e3:SetCode(EFFECT_CHANGE_LEVEL) local e1=Effect.CreateEffect(c)
e3:SetValue(10) e1:SetType(EFFECT_TYPE_SINGLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
c:RegisterEffect(e3) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(10)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
--indestructable --indestructable
local e5=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetValue(1) e2:SetValue(1)
e5:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e5) tc:RegisterEffect(e2)
end
end end
...@@ -3,7 +3,7 @@ local s,id=GetID() ...@@ -3,7 +3,7 @@ local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--spsummon --spsummon
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0)) e0:SetDescription(aux.Stringid(id,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) e0:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e0:SetType(EFFECT_TYPE_IGNITION) e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND) e0:SetRange(LOCATION_HAND)
...@@ -29,7 +29,6 @@ function s.initial_effect(c) ...@@ -29,7 +29,6 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id+20000) e2:SetCountLimit(1,id+20000)
e2:SetCondition(s.con) e2:SetCondition(s.con)
e2:SetTarget(s.seqtg)
e2:SetOperation(s.seqop) e2:SetOperation(s.seqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -81,22 +80,20 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,22 +80,20 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.con(e,tp,eg,ep,ev,re,r,rp) function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec end return ec and ec:IsLevelAbove(1) and not ec:IsLevel(10)
end end
function s.seqop(e,tp,eg,ep,ev,re,r,rp) function s.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetFirstCardTarget() local tc=c:GetEquipTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then if tc and tc:IsLocation(LOCATION_MZONE) and not tc:IsLevel(10) then
local e3=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(10) e1:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(10)
tc:RegisterEffect(e3) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
--cannot be target --cannot be target
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE) e7:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -3,7 +3,7 @@ local s,id=GetID() ...@@ -3,7 +3,7 @@ local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -16,16 +16,13 @@ function s.filter(c,e,tp) ...@@ -16,16 +16,13 @@ function s.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c)
end end
function s.eqfilter(c,tc) function s.eqfilter(c,tc)
return not c:IsRace(tc:GetRace()) and not c:IsAttribute(tc:GetAttribute()) and c:IsSetCard(0x412) return not c:IsRace(tc:GetRace()) and not c:IsAttribute(tc:GetAttribute()) and c:IsSetCard(0x412) and c:IsType(TYPE_MONSTER)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function s.filter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.actcfilter(c) function s.actcfilter(c)
return c:IsSetCard(0x412) and c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsSetCard(0x412) and c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
...@@ -33,13 +30,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,13 +30,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tc) then if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tc) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eqg=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc) local eqg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc)
local eqc=eqg:GetFirst() local eqc=eqg:GetFirst()
if not Duel.Equip(tp,eqc,tc) then return end if not Duel.Equip(tp,eqc,tc) then return end
--equip limit --equip limit
......
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