Commit 8cb68155 authored by POLYMER's avatar POLYMER

fix

parent 8e619411
...@@ -106,7 +106,6 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -106,7 +106,6 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Debug.Message(Duel.GetFlagEffect(tp,11451731))
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsSetCard(0x6977) and c:IsAbleToHand() and not c:IsCode(m) return c:IsSetCard(0x6977) and c:IsAbleToHand() and not c:IsCode(m)
......
...@@ -71,8 +71,8 @@ end ...@@ -71,8 +71,8 @@ end
function cm.sp1filter(c,e,tp) function cm.sp1filter(c,e,tp)
return c:IsCode(15004106) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) return c:IsCode(15004106) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end end
function cm.sp2filter(c,e,tp) function cm.sp2filter(c,e,tp,chk)
return c:IsCode(15004107) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and Duel.IsExistingMatchingCard(cm.bugfilter,tp,LOCATION_MZONE,0,1,aux.ExceptThisCard(e)) return c:IsCode(15004107) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and ((chk==0 and Duel.IsExistingMatchingCard(cm.bugfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())) or (chk~=0 and Duel.IsExistingMatchingCard(cm.bugfilter,tp,LOCATION_MZONE,0,1,aux.ExceptThisCard(e))))
end end
function cm.bugfilter(c) function cm.bugfilter(c)
return c:IsRace(RACE_INSECT) and c:IsFaceup() return c:IsRace(RACE_INSECT) and c:IsFaceup()
...@@ -80,7 +80,7 @@ end ...@@ -80,7 +80,7 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToDeck() if chk==0 then return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToDeck()
and (Duel.IsExistingMatchingCard(cm.sp1filter,tp,LOCATION_DECK,0,1,nil,e,tp) or Duel.IsExistingMatchingCard(cm.sp2filter,tp,LOCATION_DECK,0,1,nil,e,tp)) end and (Duel.IsExistingMatchingCard(cm.sp1filter,tp,LOCATION_DECK,0,1,nil,e,tp) or Duel.IsExistingMatchingCard(cm.sp2filter,tp,LOCATION_DECK,0,1,nil,e,tp,0)) 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.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -88,7 +88,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +88,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not c:IsAbleToDeck() then return end if not c:IsAbleToDeck() then return end
local b1=Duel.IsExistingMatchingCard(cm.sp1filter,tp,LOCATION_DECK,0,1,nil,e,tp) local b1=Duel.IsExistingMatchingCard(cm.sp1filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.sp2filter,tp,LOCATION_DECK,0,1,nil,e,tp) local b2=Duel.IsExistingMatchingCard(cm.sp2filter,tp,LOCATION_DECK,0,1,nil,e,tp,1)
local op=0 local op=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1)) if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
...@@ -110,7 +110,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,7 +110,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then if Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
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.sp2filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.sp2filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_LV,tp,tp,true,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_VALUE_LV,tp,tp,true,true,POS_FACEUP)
......
if not require and dofile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=dofile(str)
else
require_list[str]=dofile(str..".lua")
end
end
return require_list[str]
end
end
if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end
local m=15005050 local m=15005050
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="异闻鸣星-支原体" cm.name="异闻鸣星-伊奥"
function cm.initial_effect(c) function cm.initial_effect(c)
--flip --flip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
if not require and dofile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=dofile(str)
else
require_list[str]=dofile(str..".lua")
end
end
return require_list[str]
end
end
if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end
local m=15005052 local m=15005052
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="异闻鸣星-衣原体" cm.name="异闻鸣星-欧罗巴"
function cm.initial_effect(c) function cm.initial_effect(c)
--flip --flip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
if not require and dofile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=dofile(str)
else
require_list[str]=dofile(str..".lua")
end
end
return require_list[str]
end
end
if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end
local m=15005054 local m=15005054
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="异闻鸣星-立克次氏体" cm.name="异闻鸣星-盖尼米得"
function cm.initial_effect(c) function cm.initial_effect(c)
--flip --flip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
if not require and dofile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=dofile(str)
else
require_list[str]=dofile(str..".lua")
end
end
return require_list[str]
end
end
if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end
local m=15005056 local m=15005056
local cm=_G["c"..m] local cm=_G["c"..m]
......
if not require and dofile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=dofile(str)
else
require_list[str]=dofile(str..".lua")
end
end
return require_list[str]
end
end
if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end
local m=15005063 local m=15005063
local cm=_G["c"..m] local cm=_G["c"..m]
......
if not require and dofile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=dofile(str)
else
require_list[str]=dofile(str..".lua")
end
end
return require_list[str]
end
end
if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end
local m=15005064 local m=15005064
local cm=_G["c"..m] local cm=_G["c"..m]
......
if not require and dofile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=dofile(str)
else
require_list[str]=dofile(str..".lua")
end
end
return require_list[str]
end
end
if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end if not pcall(function() require("expansions/script/c15000000") end) then require("script/c15000000") end
local m=15005067 local m=15005067
local cm=_G["c"..m] local cm=_G["c"..m]
......
...@@ -3,6 +3,7 @@ local m=40009023 ...@@ -3,6 +3,7 @@ local m=40009023
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_MobileAerialTeam=1 cm.named_with_MobileAerialTeam=1
function cm.MobileAerialTeam(c) function cm.MobileAerialTeam(c)
if c:IsSetCard(0xf13) then return true end
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_MobileAerialTeam return m and m.named_with_MobileAerialTeam
end end
......
...@@ -86,6 +86,7 @@ function c40009037.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,6 +86,7 @@ function c40009037.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_EQUIP)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -716,8 +716,11 @@ end ...@@ -716,8 +716,11 @@ end
function cm.imuval(e,c) function cm.imuval(e,c)
return e:GetHandler():GetFlagEffectLabel(m+50) or 0 return e:GetHandler():GetFlagEffectLabel(m+50) or 0
end end
function cm.imufilter(c,e)
return not c:IsImmuneToEffect(e) and c:IsSummonLocation(LOCATION_SZONE)
end
function cm.imuct(e,tp,eg,ep,ev,re,r,rp) function cm.imuct(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NOT(Card.IsImmuneToEffect),tp,LOCATION_MZONE,0,nil,e:GetLabelObject()) local g=Duel.GetMatchingGroup(cm.imufilter,tp,LOCATION_MZONE,0,nil,e:GetLabelObject())
local re=e:GetLabelObject():GetLabelObject() local re=e:GetLabelObject():GetLabelObject()
for tc in aux.Next(g) do for tc in aux.Next(g) do
local pe={Duel.IsPlayerAffectedByEffect(tp,m)} local pe={Duel.IsPlayerAffectedByEffect(tp,m)}
...@@ -740,7 +743,7 @@ function cm.imuct(e,tp,eg,ep,ev,re,r,rp) ...@@ -740,7 +743,7 @@ function cm.imuct(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.efilter(e,te,c) function cm.efilter(e,te,c)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
if not te:IsActivated() then return false end if te:GetOwnerPlayer()==tp or not te:IsActivated() or te:GetActivateLocation()&LOCATION_ONFIELD==0 then return false end
if Akanekosan_Say_No then if Akanekosan_Say_No then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -751,7 +754,6 @@ function cm.efilter(e,te,c) ...@@ -751,7 +754,6 @@ function cm.efilter(e,te,c)
return false return false
end end
c:ResetEffect(53766006,RESET_CODE) c:ResetEffect(53766006,RESET_CODE)
--if te:GetHandlerPlayer()==tp or not te:IsActivated() or te:GetActivateLocation()&LOCATION_ONFIELD==0 then return false end
local re=e:GetLabelObject() local re=e:GetLabelObject()
local ct=0 local ct=0
local pe={Duel.IsPlayerAffectedByEffect(tp,m)} local pe={Duel.IsPlayerAffectedByEffect(tp,m)}
......
...@@ -3,164 +3,164 @@ local cm = _G["c" .. m] ...@@ -3,164 +3,164 @@ local cm = _G["c" .. m]
cm.name = "圣兽装骑·蜂-枪型" cm.name = "圣兽装骑·蜂-枪型"
function cm.initial_effect(c) function cm.initial_effect(c)
--Equip --Equip
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1, m) e1:SetCountLimit(1, m)
e1:SetTarget(cm.tg1) e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1) e1:SetOperation(cm.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2 = e1:Clone() local e2 = e1:Clone()
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1, m) e2:SetCountLimit(1, m)
e2:SetTarget(cm.tg2) e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2) e2:SetOperation(cm.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Unequip --Unequip
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
e3:SetReset(RESET_EVENT + RESETS_STANDARD) e3:SetReset(RESET_EVENT + RESETS_STANDARD)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.filter1(c) function cm.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() return c:IsType(TYPE_MONSTER) and c:IsFaceup()
end end
function cm.tg1(e, tp, eg, ep, ev, re, r, rp, chk, chkc) function cm.tg1(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1 - tp) and cm.filter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1 - tp) and cm.filter1(chkc) 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(cm.filter1, tp, 0, LOCATION_MZONE, 1, e:GetHandler()) and Duel.IsExistingTarget(cm.filter1, tp, 0, LOCATION_MZONE, 1, e:GetHandler())
end end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
Duel.SelectTarget(tp, cm.filter1, tp, 0, LOCATION_MZONE, 1, 1, e:GetHandler()) Duel.SelectTarget(tp, cm.filter1, tp, 0, LOCATION_MZONE, 1, 1, e:GetHandler())
end end
function cm.op1(e, tp, eg, ep, ev, re, r, rp) function cm.op1(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc = Duel.GetFirstTarget() local tc = Duel.GetFirstTarget()
if Duel.GetLocationCount(tp, LOCATION_SZONE) <= 0 or tc:GetControler() ~= 1 - tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then if Duel.GetLocationCount(tp, LOCATION_SZONE) <= 0 or tc:GetControler() ~= 1 - tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) 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(cm.eqlimit) e1:SetValue(cm.eqlimit)
e1:SetLabelObject(tc) e1:SetLabelObject(tc)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--unequip --unequip
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
e2:SetReset(RESET_EVENT + RESETS_STANDARD) e2:SetReset(RESET_EVENT + RESETS_STANDARD)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT)
e3:SetTargetRange(1, 0) e3:SetTargetRange(1, 0)
e3:SetTarget(cm.splimit) e3:SetTarget(cm.splimit)
e3:SetReset(RESET_PHASE + PHASE_END) e3:SetReset(RESET_PHASE + PHASE_END)
Duel.RegisterEffect(e3, tp) --Duel.RegisterEffect(e3, tp)
end end
function cm.tg2(e, tp, eg, ep, ev, re, r, rp, chk, chkc) function cm.tg2(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:IsControler(1 - tp) and cm.filter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1 - tp) and cm.filter1(chkc) 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(cm.filter1, tp, 0, LOCATION_MZONE, 1, e:GetHandler()) and Duel.IsExistingTarget(cm.filter1, tp, 0, LOCATION_MZONE, 1, e:GetHandler())
and not Duel.IsPlayerAffectedByEffect(tp, m) and not Duel.IsPlayerAffectedByEffect(tp, m)
end end
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(m) e2:SetCode(m)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_CANNOT_DISABLE)
e2:SetTargetRange(1, 0) e2:SetTargetRange(1, 0)
Duel.RegisterEffect(e2, tp) Duel.RegisterEffect(e2, tp)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
Duel.SelectTarget(tp, cm.filter1, tp, 0, LOCATION_MZONE, 1, 1, e:GetHandler()) Duel.SelectTarget(tp, cm.filter1, tp, 0, LOCATION_MZONE, 1, 1, e:GetHandler())
end end
function cm.op2(e, tp, eg, ep, ev, re, r, rp) function cm.op2(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc = Duel.GetFirstTarget() local tc = Duel.GetFirstTarget()
if Duel.GetLocationCount(tp, LOCATION_SZONE) <= 0 or tc:GetControler() ~= 1 - tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then if Duel.GetLocationCount(tp, LOCATION_SZONE) <= 0 or tc:GetControler() ~= 1 - tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) 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(cm.eqlimit) e1:SetValue(cm.eqlimit)
e1:SetLabelObject(tc) e1:SetLabelObject(tc)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--unequip --unequip
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
e2:SetReset(RESET_EVENT + RESETS_STANDARD) e2:SetReset(RESET_EVENT + RESETS_STANDARD)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT)
e3:SetTargetRange(1, 0) e3:SetTargetRange(1, 0)
e3:SetTarget(cm.splimit) e3:SetTarget(cm.splimit)
e3:SetReset(RESET_PHASE + PHASE_END) e3:SetReset(RESET_PHASE + PHASE_END)
Duel.RegisterEffect(e3, tp) --Duel.RegisterEffect(e3, tp)
end end
function cm.splimit(e, c) function cm.splimit(e, c)
return not c:IsAttribute(ATTRIBUTE_WATER) return not c:IsAttribute(ATTRIBUTE_WATER)
end end
function cm.eqlimit(e, c) function cm.eqlimit(e, c)
return c == e:GetLabelObject() return c == e:GetLabelObject()
end end
function cm.sptg(e, tp, eg, ep, ev, re, r, rp, chk) function cm.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return e:GetHandler():GetFlagEffect(93108839) == 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 if chk == 0 then return e:GetHandler():GetFlagEffect(93108839) == 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, true, false) and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, true, false)
end end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
e:GetHandler():RegisterFlagEffect(93108839, RESET_EVENT + 0x7e0000 + RESET_PHASE + PHASE_END, 0, 1) e:GetHandler():RegisterFlagEffect(93108839, RESET_EVENT + 0x7e0000 + RESET_PHASE + PHASE_END, 0, 1)
end end
function cm.spop(e, tp, eg, ep, ev, re, r, rp) function cm.spop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc = c:GetEquipTarget() local tc = c:GetEquipTarget()
if Duel.SpecialSummon(c, 0, tp, tp, true, false, POS_FACEUP) ~= 0 then if Duel.SpecialSummon(c, 0, tp, tp, true, false, POS_FACEUP) ~= 0 then
Duel.SendtoGrave(tc, REASON_EFFECT) Duel.SendtoGrave(tc, REASON_EFFECT)
end end
end end
function cm.filter3(c, e, tp) function cm.filter3(c, e, tp)
return c:IsSetCard(0x62e) and c:IsType(TYPE_MONSTER) and c:IsFaceup() return c:IsSetCard(0x62e) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
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