Commit ca8be720 authored by POLYMER's avatar POLYMER

fix

parent dda07e4b
--驚楽園の大使 <Bufo>
function c30829071.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30829071,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c30829071.eqtg1)
e1:SetOperation(c30829071.eqop1)
c:RegisterEffect(e1)
--equip change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30829071,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,30829071)
e2:SetTarget(c30829071.eqtg2)
e2:SetOperation(c30829071.eqop2)
c:RegisterEffect(e2)
end
function c30829071.eqfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSetCard(0x15c)
end
function c30829071.eqtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c30829071.eqfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g1=Duel.SelectTarget(tp,c30829071.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,1,0,0)
end
function c30829071.eqop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local ec=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc==ec then tc=g:GetNext() end
if ec:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Equip(tp,ec,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c30829071.eqlimit)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1)
end
end
function c30829071.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c30829071.eqfilter1(c,tp)
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsFaceup() and c:GetEquipTarget()
and Duel.IsExistingMatchingCard(c30829071.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),tp)
end
function c30829071.eqfilter2(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x15b) or not c:IsControler(tp))
end
function c30829071.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c30829071.eqfilter1,tp,LOCATION_SZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c30829071.eqop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c30829071.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc:GetEquipTarget(),tp)
local ec=g:GetFirst()
if ec then
Duel.HintSelection(g)
Duel.Equip(tp,tc,ec)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c30829071.eqlimit)
e1:SetLabelObject(ec)
tc:RegisterEffect(e1)
end
end
end
...@@ -55,15 +55,15 @@ function s.initial_effect(c) ...@@ -55,15 +55,15 @@ function s.initial_effect(c)
e6:SetCondition(s.con) e6:SetCondition(s.con)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--tohand --tohand
local e6=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,1)) e7:SetDescription(aux.Stringid(id,1))
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e7:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY) e7:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_TO_GRAVE) e7:SetCode(EVENT_TO_GRAVE)
e6:SetTarget(s.thtg) e7:SetTarget(s.thtg)
e6:SetOperation(s.thop) e7:SetOperation(s.thop)
c:RegisterEffect(e6) c:RegisterEffect(e7)
end end
function s.lcheck(g) function s.lcheck(g)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_CYBERSE) return g:IsExists(Card.IsLinkRace,1,nil,RACE_CYBERSE)
......
...@@ -25,6 +25,7 @@ function s.initial_effect(c) ...@@ -25,6 +25,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1) e2:SetCountLimit(1,id+1)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
......
...@@ -25,6 +25,7 @@ function s.initial_effect(c) ...@@ -25,6 +25,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1) e2:SetCountLimit(1,id+1)
e2:SetCondition(s.thcon) e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
......
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