Commit 2fb0eec1 authored by mercury233's avatar mercury233

fix

parent f2847f53
......@@ -22,7 +22,7 @@ function c15187079.initial_effect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
--damage
--control
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(15187079,0))
e7:SetCategory(CATEGORY_CONTROL)
......@@ -43,16 +43,31 @@ function c15187079.sdcon(e)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
end
function c15187079.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
e:SetLabel(1)
return true
end
function c15187079.filter(c)
return c:IsFaceup() and c:IsAbleToChangeControler()
end
function c15187079.costfilter(c,tp)
return Duel.IsExistingTarget(c15187079.filter,tp,0,LOCATION_MZONE,1,c)
end
function c15187079.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c15187079.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c15187079.filter,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c15187079.costfilter,1,c,tp)
else
return Duel.IsExistingTarget(c15187079.filter,tp,0,LOCATION_MZONE,1,nil)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c15187079.costfilter,1,1,c,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c15187079.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
......
......@@ -27,19 +27,34 @@ function c89538537.initial_effect(c)
e2:SetOperation(c89538537.thop)
c:RegisterEffect(e2)
end
function c89538537.rthcfilter(c)
function c89538537.rthcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c89538537.rthcfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x103) and c:IsAbleToHandAsCost()
and Duel.IsExistingTarget(c89538537.rthtgfilter,tp,0,LOCATION_ONFIELD,1,c,c)
end
function c89538537.rthcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c89538537.rthcfilter,tp,LOCATION_ONFIELD,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c89538537.rthcfilter,tp,LOCATION_ONFIELD,0,1,1,c)
Duel.SendtoHand(g,nil,REASON_COST)
function c89538537.rthtgfilter(c,tc)
return c:IsAbleToHand() and c:GetEquipTarget()~=tc
end
function c89538537.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c89538537.rthcfilter,tp,LOCATION_ONFIELD,0,1,c,tp)
else
return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c89538537.rthcfilter,tp,LOCATION_ONFIELD,0,1,1,c,tp)
Duel.SendtoHand(g,nil,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
......
......@@ -12,13 +12,31 @@ function c99004752.initial_effect(c)
c:RegisterEffect(e1)
end
function c99004752.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
e:SetLabel(1)
return true
end
function c99004752.tgfilter(c,tc,ec)
return c:IsFaceup() and c:GetEquipTarget()~=tc and c~=ec
end
function c99004752.costfilter(c,ec,tp)
return Duel.IsExistingTarget(c99004752.tgfilter,tp,0,LOCATION_MZONE,1,c,c,ec)
end
function c99004752.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c99004752.costfilter,1,c,c,tp)
else
return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c99004752.costfilter,1,1,c,c,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
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