Commit e8809b67 authored by REIKAI's avatar REIKAI 💬

update 3.13

parent a423728b
Pipeline #20638 failed with stages
in 22 minutes and 39 seconds
No preview for this file type
...@@ -27,7 +27,7 @@ function cm.initial_effect(c) ...@@ -27,7 +27,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_EQUIP) e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m+200) e2:SetCountLimit(1,m+200)
e2:SetTarget(cm.target) e2:SetTarget(cm.target)
e2:SetOperation(cm.activate) e2:SetOperation(cm.activate)
...@@ -94,9 +94,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,9 +94,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if ft<=0 then return end if ft<=0 then return end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if g:GetCount()>ft then if g:GetCount()>=2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,ft,ft,nil) g=g:Select(tp,2,2,nil)
end end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.AdjustAll() Duel.AdjustAll()
......
...@@ -25,13 +25,13 @@ function cm.initial_effect(c) ...@@ -25,13 +25,13 @@ function cm.initial_effect(c)
--equip --equip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(EFFECT_UPDATE_LEVEL) e2:SetCategory(EFFECT_UPDATE_LEVEL+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m+200) e2:SetCountLimit(1,m+200)
e2:SetCondition(cm.con) e2:SetCondition(cm.con)
e2:SetTarget(cm.target) e2:SetTarget(cm.seqtg)
e2:SetOperation(cm.activate) e2:SetOperation(cm.seqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
...@@ -79,24 +79,30 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,24 +79,30 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget() return e:GetHandler():GetEquipTarget()
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec end
end
function cm.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_LEVEL) e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(10) e3:SetValue(10)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3) tc:RegisterEffect(e3)
--direct attack --direct attack
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DIRECT_ATTACK) e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetCondition(cm.dircon) e2:SetCondition(cm.dircon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
function cm.dircon(e) function cm.dircon(e)
return e:GetHandler():GetEquipTarget():GetControler()==e:GetHandlerPlayer() return e:GetHandler():GetEquipTarget():GetControler()==e:GetHandlerPlayer()
......
...@@ -30,8 +30,8 @@ function cm.initial_effect(c) ...@@ -30,8 +30,8 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m+200) e2:SetCountLimit(1,m+200)
e2:SetCondition(cm.con) e2:SetCondition(cm.con)
e2:SetTarget(cm.target) e2:SetTarget(cm.seqtg)
e2:SetOperation(cm.activate) e2:SetOperation(cm.seqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
...@@ -64,39 +64,45 @@ end ...@@ -64,39 +64,45 @@ end
function cm.eqlimit(e,c) function cm.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function cm.tgfilter(c) function cm.tgfilter(c,e,tp)
return c:IsSetCard(0x412) and not c:IsCode(64800182) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x412) and not c:IsCode(64800182) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp) function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
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,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget() return e:GetHandler():GetEquipTarget()
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec end
end
function cm.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_LEVEL) e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(10) e3:SetValue(10)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3) tc:RegisterEffect(e3)
--indestructable --indestructable
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP) e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetValue(1) e5:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e5) tc:RegisterEffect(e5)
end end
......
...@@ -34,14 +34,14 @@ function cm.initial_effect(c) ...@@ -34,14 +34,14 @@ function cm.initial_effect(c)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) end if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT) Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)
local ct=Duel.GetOperatedGroup():GetFirst() local ct=Duel.GetOperatedGroup():GetFirst()
if ct:IsSetCard(0x412) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if ct:IsSetCard(0x412) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
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