Commit ef7053b6 authored by VanillaSalt's avatar VanillaSalt

Merge pull request #721 from sidschingis/patch-2

fix
parents d7b922e4 b192e5c3
......@@ -36,6 +36,12 @@ function c32919136.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c32919136.eqlimit)
c:RegisterEffect(e4)
--control
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_SET_CONTROL)
e5:SetValue(c32919136.val)
c:RegisterEffect(e5)
end
function c32919136.filter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
......@@ -58,12 +64,6 @@ function c32919136.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(tp)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
end
function c32919136.damcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -86,3 +86,6 @@ end
function c32919136.descon(e)
return not Duel.IsExistingMatchingCard(c32919136.desfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function c32919136.val(e)
return e:GetHandler():GetControler()
end
\ No newline at end of file
......@@ -11,6 +11,11 @@ function c45247637.initial_effect(c)
e1:SetOperation(c45247637.operation)
c:RegisterEffect(e1)
--control
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_SET_CONTROL)
e4:SetValue(c45247637.val)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45247637,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
......@@ -19,12 +24,12 @@ function c45247637.initial_effect(c)
e2:SetCountLimit(1)
e2:SetCondition(c45247637.ccon)
e2:SetOperation(c45247637.cop1)
e2:SetLabelObject(e1)
e2:SetLabelObject(e4)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetOperation(c45247637.cop2)
e3:SetLabelObject(e1)
e3:SetLabelObject(e4)
c:RegisterEffect(e3)
end
function c45247637.costfilter(c)
......@@ -64,23 +69,19 @@ function c45247637.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c45247637.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(tp)
e2:SetReset(RESET_EVENT+0x1fc0000)
c:RegisterEffect(e2)
e:SetLabelObject(e2)
end
end
function c45247637.ccon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c45247637.cop1(e,tp,eg,ep,ev,re,r,rp)
local ce=e:GetLabelObject():GetLabelObject()
local ce=e:GetLabelObject()
if ce then ce:SetValue(tp) end
end
function c45247637.cop2(e,tp,eg,ep,ev,re,r,rp)
local ce=e:GetLabelObject():GetLabelObject()
local ce=e:GetLabelObject()
if ce then ce:SetValue(1-tp) end
end
function c45247637.val(e)
return e:GetHandler():GetControler()
end
\ No newline at end of file
......@@ -28,6 +28,12 @@ function c45986603.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c45986603.eqlimit)
c:RegisterEffect(e3)
--control
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_SET_CONTROL)
e4:SetValue(c45986603.val)
c:RegisterEffect(e4)
end
function c45986603.filter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
......@@ -49,12 +55,6 @@ function c45986603.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(tp)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
end
function c45986603.reccon(e,tp,eg,ep,ev,re,r,rp)
......@@ -71,3 +71,6 @@ function c45986603.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c45986603.val(e)
return e:GetHandler():GetControler()
end
\ No newline at end of file
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