Commit 428123aa authored by Tachibana's avatar Tachibana

clean useless

parent ebc42bf8
...@@ -81,7 +81,7 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12808000,0,TYPES_TOKEN_MONSTER,0,0,4,RACE_WARRIOR,ATTRIBUTE_WATER) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) and Duel.IsPlayerCanSpecialSummonMonster(tp,12808000,0,TYPES_TOKEN_MONSTER,0,0,4,RACE_WARRIOR,ATTRIBUTE_WATER) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil)
then then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local token=Duel.CreateToken(tp,12808000) local token=Duel.CreateToken(tp,12808000)
......
...@@ -29,9 +29,9 @@ function cm.initial_effect(c) ...@@ -29,9 +29,9 @@ function cm.initial_effect(c)
e2:SetOperation(cm.operation) e2:SetOperation(cm.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCondition(cm.condition2) e3:SetCondition(cm.condition2)
e3:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,4)) e4:SetDescription(aux.Stringid(m,4))
......
...@@ -62,7 +62,7 @@ function cm.o2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -62,7 +62,7 @@ function cm.o2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(tc,nil,REASON_EFFECT)~=0 then if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,cm.tf22,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tf22,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
......
...@@ -53,6 +53,9 @@ function cm.initial_effect(c) ...@@ -53,6 +53,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
--e2 --e2
function cm.eqfilter(c)
return c:GetFlagEffect(m)~=0
end
function cm.tf2(c) function cm.tf2(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x301) or c:IsAttribute(ATTRIBUTE_EARTH) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x301) or c:IsAttribute(ATTRIBUTE_EARTH)
end end
...@@ -60,18 +63,31 @@ function cm.tf22(c) ...@@ -60,18 +63,31 @@ function cm.tf22(c)
return c:IsSetCard(0x301) and c:IsAbleToHand() return c:IsSetCard(0x301) and c:IsAbleToHand()
end end
function cm.t2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.t2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and c41578483.eqfilter(chkc) end local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c41578483.eqfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end and Duel.IsExistingTarget(cm.tf2,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c41578483.eqfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,cm.tf2,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end end
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
function cm.o2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.o2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
cm.equip_monster(c,tp,tc) if not Duel.Equip(tp,tc,c,false) then return end
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
--Add Equip limit
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(cm.eqlimit)
tc:RegisterEffect(e1)
end end
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