Commit 1deb885b authored by mallu11's avatar mallu11 Committed by GitHub

fix 驚楽園の大使 <Bufo> and 驚楽園の案内人 <Comica> (#1541)

* fix 驚楽園の大使 <Bufo>

* fix 驚楽園の案内人 <Comica>
parent 9f560b82
--驚楽園の大使 <Bufo --驚楽園の大使 <Bufo
function c30829071.initial_effect(c) function c30829071.initial_effect(c)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -43,7 +43,7 @@ function c30829071.eqop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c30829071.eqop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc==ec then tc=g:GetNext() end if tc==ec then tc=g:GetNext() end
if ec:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then if ec:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Equip(tp,ec,tc) 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)
...@@ -60,37 +60,35 @@ function c30829071.eqlimit(e,c) ...@@ -60,37 +60,35 @@ function c30829071.eqlimit(e,c)
end end
function c30829071.eqfilter1(c,tp) function c30829071.eqfilter1(c,tp)
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsFaceup() and c:GetEquipTarget() return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsFaceup() and c:GetEquipTarget()
and Duel.IsExistingTarget(c30829071.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),tp) and Duel.IsExistingMatchingCard(c30829071.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),tp)
end end
function c30829071.eqfilter2(c,tp) function c30829071.eqfilter2(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x15b) or not c:IsControler(tp)) return c:IsFaceup() and (c:IsSetCard(0x15b) or not c:IsControler(tp))
end end
function c30829071.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c30829071.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c30829071.eqfilter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c30829071.eqfilter1,tp,LOCATION_SZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(c30829071.eqfilter1,tp,LOCATION_SZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c30829071.eqfilter1,tp,LOCATION_SZONE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c30829071.eqfilter1,tp,LOCATION_SZONE,0,1,1,nil,tp)
local tc=g1:GetFirst() Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
e:SetLabelObject(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=Duel.SelectTarget(tp,c30829071.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc:GetEquipTarget(),tp)
end end
function c30829071.eqop2(e,tp,eg,ep,ev,re,r,rp) function c30829071.eqop2(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject() local tc=Duel.GetFirstTarget()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local tc=g:GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
if tc==ec then tc=g:GetNext() end local g=Duel.SelectMatchingCard(tp,c30829071.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc:GetEquipTarget(),tp)
if ec:IsFaceup() and ec:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then local ec=g:GetFirst()
Duel.Equip(tp,ec,tc) if ec then
local e1=Effect.CreateEffect(e:GetHandler()) Duel.HintSelection(g)
e1:SetType(EFFECT_TYPE_SINGLE) Duel.Equip(tp,tc,ec)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c30829071.eqlimit2) e1:SetCode(EFFECT_EQUIP_LIMIT)
ec:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c30829071.eqlimit)
e1:SetLabelObject(ec)
tc:RegisterEffect(e1)
end
end end
end end
function c30829071.eqlimit2(e,c)
return c:IsSetCard(0x15b) or c:IsControler(1-e:GetHandlerPlayer())
end
...@@ -35,37 +35,38 @@ function c67314110.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,37 +35,38 @@ function c67314110.setop(e,tp,eg,ep,ev,re,r,rp)
end end
function c67314110.eqfilter1(c,tp) function c67314110.eqfilter1(c,tp)
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsFaceup() and c:GetEquipTarget() return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsFaceup() and c:GetEquipTarget()
and Duel.IsExistingTarget(c67314110.eqfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),tp) and Duel.IsExistingMatchingCard(c67314110.eqfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),tp)
end end
function c67314110.eqfilter2(c,tp) function c67314110.eqfilter2(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x15b) or not c:IsControler(tp)) return c:IsFaceup() and (c:IsSetCard(0x15b) or not c:IsControler(tp))
end end
function c67314110.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c67314110.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c67314110.eqfilter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c67314110.eqfilter1,tp,LOCATION_SZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(c67314110.eqfilter1,tp,LOCATION_SZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c67314110.eqfilter1,tp,LOCATION_SZONE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c67314110.eqfilter1,tp,LOCATION_SZONE,0,1,1,nil,tp)
local tc=g1:GetFirst() Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
e:SetLabelObject(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=Duel.SelectTarget(tp,c67314110.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc:GetEquipTarget(),tp)
end end
function c67314110.eqop(e,tp,eg,ep,ev,re,r,rp) function c67314110.eqop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject() local tc=Duel.GetFirstTarget()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local tc=g:GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
if tc==ec then tc=g:GetNext() end local g=Duel.SelectMatchingCard(tp,c67314110.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc:GetEquipTarget(),tp)
if ec:IsFaceup() and ec:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then local ec=g:GetFirst()
Duel.Equip(tp,ec,tc) if ec then
local e1=Effect.CreateEffect(e:GetHandler()) Duel.HintSelection(g)
e1:SetType(EFFECT_TYPE_SINGLE) Duel.Equip(tp,tc,ec)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c67314110.eqlimit) e1:SetCode(EFFECT_EQUIP_LIMIT)
ec:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c67314110.eqlimit)
e1:SetLabelObject(ec)
tc:RegisterEffect(e1)
end
end end
end end
function c67314110.eqlimit(e,c) function c67314110.eqlimit(e,c)
return c:IsSetCard(0x15b) or c:IsControler(1-e:GetHandlerPlayer()) return c==e:GetLabelObject()
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