Commit ecb179cb authored by POLYMER's avatar POLYMER

fix

parent bc4e89ea
...@@ -52,7 +52,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSendtoGrave(1-tp) then tg:Remove(Card.IsControler,nil,1-tp) end if not Duel.IsPlayerCanSendtoGrave(1-tp) then tg:Remove(Card.IsControler,nil,1-tp) end
if #tg>0 then if #tg>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoGrave(sg,REASON_RULE,1-tp) Duel.SendtoGrave(tg,REASON_RULE,1-tp)
end end
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -95,7 +95,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,7 +95,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x3f50) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x3f50) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsFaceupEx()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end
......
...@@ -95,7 +95,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,7 +95,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x3f50) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x3f50) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and c:IsFaceupEx()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and chkc:IsControler(tp) and s.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and chkc:IsControler(tp) and s.thfilter(chkc) end
......
...@@ -49,7 +49,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp) function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
return at and at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(0x3f50) return at and at:IsFaceupEx() and at:IsControler(tp) and at:IsSetCard(0x3f50)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -89,17 +89,22 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,17 +89,22 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and chkc:IsSetCard(0x3f50) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and chkc:IsSetCard(0x3f50) and chkc:IsFaceup() end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,nil,0x3f50) end and Duel.IsExistingTarget(s.thfilter2,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,1,nil,0x3f50) local g=Duel.SelectTarget(tp,s.thfilter2,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function s.thfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x3f50) and c:IsAbleToHand()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -63,24 +63,24 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,24 +63,24 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.target_filter(c)
return c:IsFaceup() and c:IsSetCard(0x3f50)
end
function s.thfilter(c,type_mask) function s.thfilter(c,type_mask)
if c:IsType(type_mask) then return false end if c:IsType(type_mask) then return false end
return (c:IsSetCard(0x3f50) or aux.IsCodeListed(c,17337400)) and c:IsAbleToHand() return (c:IsSetCard(0x3f50) or aux.IsCodeListed(c,17337400)) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and chkc:IsSetCard(0x3f50) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s.target_filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,nil,0x3f50) end if chk==0 then return Duel.IsExistingTarget(s.target_filter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,1,nil,0x3f50) local g=Duel.SelectTarget(tp,s.target_filter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc and tc:IsRelateToEffect(e)) then return end if not (tc and tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
local type_mask = tc:GetType()&(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
local type_mask = tc:GetType()&(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,type_mask) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,type_mask)
if #g>0 then if #g>0 then
......
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