Commit f393f0bd authored by tsubaki's avatar tsubaki

1.999zz23 fix1

parent bae763b3
--水中的人鱼✿若鹭姬
function c29053.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29053)
e1:SetCondition(c29053.condition1)
e1:SetTarget(c29053.target1)
e1:SetOperation(c29053.operation1)
c:RegisterEffect(e1)
--Add to Hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,29054)
e2:SetCondition(c29053.condition2)
e2:SetTarget(c29053.target2)
e2:SetOperation(c29053.operation2)
c:RegisterEffect(e2)
--Return to Hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c29053.cost3)
e3:SetTarget(c29053.target3)
e3:SetOperation(c29053.operation3)
c:RegisterEffect(e3)
end
c29053.DescSetName=0x826
--Effect 1
--效果条件:其它卡的效果将这张卡加入手卡
function c29053.condition1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW) and re:GetHandler()~=e:GetHandler()
end
--效果对象:这张卡
function c29053.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
--发动操作:特殊召唤这张卡
function c29053.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--Effect 2
--效果条件:这张卡从场上被送去墓地
function c29053.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
--效果对象:1只下降攻击力的怪兽
function c29053.filter2(c)
local code=c:GetOriginalCode()
local mt=_G["c" .. code]
return mt and mt.DescSetName==0x826 and c:IsAbleToHand()
end
function c29053.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29053.filter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
--发动操作:将一只下降攻击力的怪兽加入手卡
function c29053.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29053.filter2,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--Effect 3
--花费:将这张卡的攻击力下降至0
function c29053.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttack()>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(-e:GetHandler():GetAttack())
e:GetHandler():RegisterEffect(e1)
end
--效果条件:攻击表示的对方怪兽
function c29053.filter3(c)
return c:IsAttackPos()
end
function c29053.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c29053.filter3(chkc) end
if chk==0 then return Duel.IsExistingTarget(c29053.filter3,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c29053.filter3,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
--发动操作:将对方怪兽回到手卡
function c29053.operation3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--岸上的人鱼✿若鹭姬
function c29056.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29056)
e1:SetCondition(c29056.condition1)
e1:SetTarget(c29056.target1)
e1:SetOperation(c29056.operation1)
c:RegisterEffect(e1)
--Add to Hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,29054)
e2:SetCondition(c29056.condition2)
e2:SetTarget(c29056.target2)
e2:SetOperation(c29056.operation2)
c:RegisterEffect(e2)
--Return to Hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c29056.cost3)
e3:SetTarget(c29056.target3)
e3:SetOperation(c29056.operation3)
c:RegisterEffect(e3)
end
c29056.DescSetName=0x826
--Effect 1
--效果条件:其它卡的效果将这张卡加入手卡
function c29056.condition1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW) and re:GetHandler()~=e:GetHandler()
end
--效果对象:这张卡
function c29056.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
--发动操作:特殊召唤这张卡
function c29056.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--Effect 2
--效果条件:这张卡从场上被送去墓地
function c29056.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
--效果对象:1只下降攻击力的怪兽
function c29056.filter2(c)
return c:IsSetCard(0x9432)
end
function c29056.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29056.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
--发动操作:将一只下降攻击力的怪兽加入手卡
function c29056.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29056.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--Effect 3
--花费:将这张卡的攻击力下降至0
function c29056.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttack()>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(-e:GetHandler():GetAttack())
e:GetHandler():RegisterEffect(e1)
end
function c29056.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsLocation(LOCATION_MZONE) and re:GetHandler():IsControler(1-tp) end
Duel.SetTargetCard(re:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_MZONE)
end
--发动操作:将对方怪兽回到手卡
function c29056.operation3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
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