Commit a87f701a authored by mercury233's avatar mercury233

fix

parent 273a5e95
......@@ -30,7 +30,7 @@ function c100243002.initial_effect(c)
end
function c100243002.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return true end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,0,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
......@@ -53,9 +53,7 @@ function c100243002.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c100243002.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Select(tp,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
......@@ -53,13 +53,16 @@ end
function c100243003.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100243003.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100243003.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c100243003.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanRemove,tp,0,LOCATION_GRAVE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c100243003.rmfilter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function c100243003.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=Duel.SelectMatchingCard(tp,Card.IsCanRemove,tp,0,LOCATION_GRAVE,1,1,nil):GetFirst()
local rc=Duel.SelectMatchingCard(tp,c100243003.rmfilter,tp,0,LOCATION_GRAVE,1,1,nil):GetFirst()
if rc then
if Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.BreakEffect()
......
......@@ -47,6 +47,13 @@ function c100243005.initial_effect(c)
e6:SetCondition(c100243005.rdcon)
e6:SetOperation(c100243005.rdop)
c:RegisterEffect(e6)
--eqlimit
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_EQUIP_LIMIT)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetValue(c100243005.eqlimit)
c:RegisterEffect(e7)
end
function c100243005.filter(c)
local ct1,ct2=c:GetUnionCount()
......@@ -106,3 +113,6 @@ function c100243005.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,Duel.GetBattleDamage(ep)/2)
end
end
function c100243005.eqlimit(e,c)
return c:IsRace(RACE_FAIRY) or e:GetHandler():GetEquipTarget()==c
end
......@@ -38,8 +38,7 @@ function c100243006.spop(e,tp,eg,ep,ev,re,r,rp)
local sg=Group.CreateGroup()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
local tc=g:Select(tp,1,1,nil):GetFirst()
sg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft-1
......@@ -80,7 +79,7 @@ function c100243006.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c100243006.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetFirstMatchingCard(c100243006.thfilter,tp,LOCATION_DECK,0,nil)
local g=Duel.SelectMatchingCard(tp,c100243006.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -67,5 +67,6 @@ function c100243009.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(tp,g)
else
Duel.SendtoHand(g,1-tp,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
end
......@@ -79,17 +79,17 @@ function c100243014.repfilter(c,tp)
and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
end
function c100243014.rmfilter(c)
return c:IsSetCard(0x2b) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true)
return c:IsSetCard(0x2b) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c100243014.repval(e,c)
return c100243014.repfilter(c,e:GetHandlerPlayer())
end
function c100243014.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c100243014.repfilter,1,nil,tp) and
Duel.IsExistingMatchingCard(c100243014.rmfilter,tp,LOCATION_GRAVE,0,1,eg) end
Duel.IsExistingMatchingCard(c100243014.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local tg=Duel.SelectMatchingCard(tp,c100243014.rmfilter,tp,LOCATION_GRAVE,0,1,1,eg)
local tg=Duel.SelectMatchingCard(tp,c100243014.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil)
e:SetLabelObject(tg:GetFirst())
return true
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