Commit 71ca6bb9 authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

use Card.IsExtraDeckMonster (#1600)

parent 4c0b25e8
...@@ -71,7 +71,7 @@ end ...@@ -71,7 +71,7 @@ end
function c10406322.tdop(e,tp,eg,ep,ev,re,r,rp) function c10406322.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) if tc:IsExtraDeckMonster()
or Duel.SelectOption(tp,aux.Stringid(10406322,2),aux.Stringid(10406322,3))==0 then or Duel.SelectOption(tp,aux.Stringid(10406322,2),aux.Stringid(10406322,3))==0 then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
else else
......
...@@ -59,8 +59,7 @@ function c12081875.effop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,8 +59,7 @@ function c12081875.effop(e,tp,eg,ep,ev,re,r,rp,chk)
local op=te:GetOperation() local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end if op then op(e,tp,eg,ep,ev,re,r,rp) end
Duel.BreakEffect() Duel.BreakEffect()
local opt=Duel.SelectOption(tp,aux.Stringid(12081875,1),aux.Stringid(12081875,2)) if tc:IsExtraDeckMonster() or Duel.SelectOption(tp,aux.Stringid(12081875,1),aux.Stringid(12081875,2))==0 then
if opt==0 then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
else else
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
......
...@@ -52,7 +52,11 @@ function c30126992.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,11 @@ function c30126992.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFacedown() then if tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.ConfirmCards(tp,tc) Duel.ConfirmCards(tp,tc)
local opt=Duel.SelectOption(tp,aux.Stringid(30126992,1),aux.Stringid(30126992,2)) if tc:IsExtraDeckMonster()
Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) or Duel.SelectOption(tp,aux.Stringid(30126992,1),aux.Stringid(30126992,2))==0 then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
else
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
end
end end
end end
...@@ -112,7 +112,11 @@ end ...@@ -112,7 +112,11 @@ end
function c55591586.tdop(e,tp,eg,ep,ev,re,r,rp) function c55591586.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local opt=Duel.SelectOption(tp,aux.Stringid(55591586,4),aux.Stringid(55591586,5)) if tc:IsExtraDeckMonster()
Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) or Duel.SelectOption(tp,aux.Stringid(55591586,4),aux.Stringid(55591586,5))==0 then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
else
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
end
end end
end end
...@@ -50,8 +50,8 @@ function c58165765.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,8 +50,8 @@ function c58165765.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(tp,tc) Duel.ConfirmCards(tp,tc)
Duel.BreakEffect() Duel.BreakEffect()
if tc:IsAbleToDeck() then if tc:IsAbleToDeck() then
local opt=Duel.SelectOption(tp,aux.Stringid(58165765,1),aux.Stringid(58165765,2)) if tc:IsExtraDeckMonster()
if opt==0 then or Duel.SelectOption(tp,aux.Stringid(58165765,1),aux.Stringid(58165765,2))==0 then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
else else
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
......
...@@ -115,7 +115,7 @@ end ...@@ -115,7 +115,7 @@ end
function c67030233.spop(e,tp,eg,ep,ev,re,r,rp) function c67030233.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local c=e:GetHandler() local c=e:GetHandler()
if bit.band(c:GetOriginalType(),0x802040)~=0 and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 if c:IsRelateToEffect(e) and c:IsExtraDeckMonster() and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_EXTRA) and tc and tc:IsRelateToEffect(e) then and c:IsLocation(LOCATION_EXTRA) and tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -92,7 +92,7 @@ end ...@@ -92,7 +92,7 @@ end
function c71978434.tdop(e,tp,eg,ep,ev,re,r,rp) function c71978434.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) if tc:IsExtraDeckMonster()
or Duel.SelectOption(tp,aux.Stringid(71978434,2),aux.Stringid(71978434,3))==0 then or Duel.SelectOption(tp,aux.Stringid(71978434,2),aux.Stringid(71978434,3))==0 then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
else else
......
...@@ -127,7 +127,7 @@ end ...@@ -127,7 +127,7 @@ end
function c7841112.spop(e,tp,eg,ep,ev,re,r,rp) function c7841112.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and bit.band(c:GetOriginalType(),0x802040)~=0 and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 if c:IsRelateToEffect(e) and c:IsExtraDeckMonster() and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_EXTRA) and tc and tc:IsRelateToEffect(e) then and c:IsLocation(LOCATION_EXTRA) and tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -25,7 +25,11 @@ end ...@@ -25,7 +25,11 @@ end
function c81028112.operation(e,tp,eg,ep,ev,re,r,rp) function c81028112.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local opt=Duel.SelectOption(tp,aux.Stringid(81028112,1),aux.Stringid(81028112,2)) if tc:IsExtraDeckMonster()
Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) or Duel.SelectOption(tp,aux.Stringid(81028112,1),aux.Stringid(81028112,2))==0 then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
else
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
end
end end
end end
...@@ -33,7 +33,7 @@ end ...@@ -33,7 +33,7 @@ end
function c88409165.operation(e,tp,eg,ep,ev,re,r,rp) function c88409165.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
if tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) if tc:IsExtraDeckMonster()
or Duel.SelectOption(tp,aux.Stringid(88409165,1),aux.Stringid(88409165,2))==0 then or Duel.SelectOption(tp,aux.Stringid(88409165,1),aux.Stringid(88409165,2))==0 then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
else else
......
...@@ -55,7 +55,7 @@ function c91650245.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c91650245.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function c91650245.tdop(e,tp,eg,ep,ev,re,r,rp) function c91650245.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) if c:IsExtraDeckMonster()
or Duel.SelectOption(tp,aux.Stringid(91650245,0),aux.Stringid(91650245,1))==0 then or Duel.SelectOption(tp,aux.Stringid(91650245,0),aux.Stringid(91650245,1))==0 then
Duel.SendtoDeck(c,nil,0,REASON_EFFECT) Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
else else
......
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