Commit 5379db5c authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/master' into master

parents 752d3be7 728ea03b
......@@ -29,12 +29,7 @@ function c10024317.initial_effect(c)
end
function c10024317.desfilter(c,tp)
if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c10024317.filter,tp,LOCATION_DECK,0,1,nil,true)
else
return Duel.IsExistingMatchingCard(c10024317.filter,tp,LOCATION_DECK,0,1,nil,false)
end
return Duel.GetSZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c10024317.filter,tp,LOCATION_DECK,0,1,nil,true)
end
function c10024317.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
......
......@@ -28,12 +28,7 @@ function c18716735.initial_effect(c)
end
function c18716735.desfilter(c,tp)
if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c18716735.filter,tp,LOCATION_DECK,0,1,nil,true)
else
return Duel.IsExistingMatchingCard(c18716735.filter,tp,LOCATION_DECK,0,1,nil,false)
end
return Duel.GetSZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c18716735.filter,tp,LOCATION_DECK,0,1,nil,true)
end
function c18716735.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
......
......@@ -82,7 +82,7 @@ function c27946124.setfilter(c)
end
function c27946124.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c27946124.setfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1
if chk==0 then return Duel.GetSZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingTarget(c27946124.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectTarget(tp,c27946124.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
......
......@@ -24,33 +24,19 @@ end
function c29223325.filter(c)
return c:IsSetCard(0x97) and c:IsType(TYPE_MONSTER) and c:IsSSetable(true)
end
function c29223325.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c29223325.desfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetSequence()<5
function c29223325.desfilter(c,tp,ft)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and Duel.GetSZoneCount(tp,c)>ft
end
function c29223325.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c29223325.desfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then
if not Duel.IsExistingMatchingCard(c29223325.filter,tp,LOCATION_DECK,0,1,nil) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:GetHandler():IsLocation(LOCATION_HAND) then ft=ft-1 end
if ft<0 then return false
elseif ft>0 then
return Duel.IsExistingTarget(c29223325.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
else
return Duel.IsExistingTarget(c29223325.desfilter2,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
local ft=0
if e:GetHandler():IsLocation(LOCATION_HAND) then ft=1 end
return Duel.IsExistingTarget(c29223325.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),tp,ft)
end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
if ft>0 then
g=Duel.SelectTarget(tp,c29223325.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
else
g=Duel.SelectTarget(tp,c29223325.desfilter2,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
end
local g=Duel.SelectTarget(tp,c29223325.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),tp,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c29223325.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -16,12 +16,7 @@ function c33256280.initial_effect(c)
end
function c33256280.desfilter(c,tp)
if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c33256280.filter,tp,LOCATION_DECK,0,1,nil,true)
else
return Duel.IsExistingMatchingCard(c33256280.filter,tp,LOCATION_DECK,0,1,nil,false)
end
return Duel.GetSZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c33256280.filter,tp,LOCATION_DECK,0,1,nil,true)
end
function c33256280.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
......
......@@ -36,7 +36,7 @@ function c33773528.actcon(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer() and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c33773528.filter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:GetEquipTarget() and c:IsAbleToGraveAsCost()
return c:IsFaceup() and c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:GetEquipTarget() and c:IsAbleToGraveAsCost() and Duel.GetSZoneCount(tp,c)>0
and Duel.IsExistingTarget(c33773528.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,c:GetCode())
end
function c33773528.setfilter(c,code)
......
......@@ -94,5 +94,6 @@ function c33814281.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33814281.thfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
......@@ -69,6 +69,7 @@ function c35622739.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c35622739.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
......@@ -37,7 +37,8 @@ function c36346532.efilter(e,re)
return re:IsActiveType(TYPE_MONSTER) and re:GetOwner()~=e:GetOwner()
end
function c36346532.cfilter(c,tp)
return c:GetSequence()<5 and c:IsFacedown() and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c36346532.setfilter,tp,LOCATION_DECK,0,1,nil,c,tp)
return c:GetSequence()<5 and c:IsFacedown() and c:IsAbleToGrave() and Duel.GetSZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c36346532.setfilter,tp,LOCATION_DECK,0,1,nil,c,tp)
end
function c36346532.setfilter(c,mc,tp)
if not (c:IsSetCard(0xd4) and c:IsType(TYPE_TRAP)) then return false end
......
......@@ -7,7 +7,7 @@ function c38491199.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCondition(c38491199.negcon)
e1:SetCost(c38491199.negcost)
......@@ -20,7 +20,7 @@ function c38491199.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c38491199.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp)
end
function c38491199.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -36,29 +36,37 @@ end
function c40456412.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(c40456412.desfilter,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(c40456412.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp)
local b1=Duel.GetFlagEffect(tp,40456412+1)==0
local b1=(Duel.GetFlagEffect(tp,40456412+1)==0 or not e:IsCostChecked())
and g1:GetCount()>0 and g2:GetCount()>0
local b2=Duel.GetFlagEffect(tp,40456412+2)==0
local b2=(Duel.GetFlagEffect(tp,40456412+2)==0 or not e:IsCostChecked())
and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c40456412.psfilter,tp,LOCATION_EXTRA,0,1,nil)
local b3=Duel.GetFlagEffect(tp,40456412+3)==0
local b3=(Duel.GetFlagEffect(tp,40456412+3)==0 or not e:IsCostChecked())
and Duel.IsExistingMatchingCard(c40456412.ssfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(40456412,1)},
{b2,aux.Stringid(40456412,2)},
{b3,aux.Stringid(40456412,3)})
Duel.RegisterFlagEffect(tp,40456412+op,RESET_PHASE+PHASE_END,0,1)
if e:IsCostChecked() then
Duel.RegisterFlagEffect(tp,40456412+op,RESET_PHASE+PHASE_END,0,1)
end
if op==1 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
if e:IsCostChecked() then
e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
end
e:SetOperation(c40456412.spop)
elseif op==2 then
e:SetCategory(0)
if e:IsCostChecked() then
e:SetCategory(0)
end
e:SetOperation(c40456412.psop)
else
e:SetCategory(0)
if e:IsCostChecked() then
e:SetCategory(0)
end
e:SetOperation(c40456412.ssop)
end
end
......
......@@ -71,8 +71,9 @@ function c47408488.plcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c47408488.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=e:GetHandler():GetCounter(0x6)
return ct>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>=-1+ct
local c=e:GetHandler()
local ct=c:GetCounter(0x6)
return ct>0 and Duel.GetSZoneCount(tp,c)>=ct
and Duel.IsExistingMatchingCard(c47408488.plfilter,tp,LOCATION_DECK,0,ct,nil)
end
end
......
......@@ -22,7 +22,8 @@ function c51124303.initial_effect(c)
c:RegisterEffect(e2)
end
function c51124303.spfilter(c,e,tp,mc)
return c:IsSetCard(0xb4) and bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc,tp))
local mg=Group.FromCards(mc)
return c:IsSetCard(0xb4) and bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc,tp)) and (not c.mat_group_check or c.mat_group_check(mg,tp))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
and mc:IsCanBeRitualMaterial(c)
end
......
......@@ -41,7 +41,7 @@ function c52518793.atkval(e,c)
return e:GetHandler():GetCounter(0x7)*100
end
function c52518793.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK)
return c:IsSummonLocation(LOCATION_DECK) and c:GetOriginalType()&TYPE_MONSTER~=0
end
function c52518793.accon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c52518793.cfilter,1,nil,tp)
......
......@@ -55,7 +55,7 @@ function c53701259.initial_effect(c)
--remove
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e7:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e7:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e7:SetRange(LOCATION_SZONE)
e7:SetValue(LOCATION_REMOVED)
......
......@@ -31,9 +31,9 @@ function c54895237.initial_effect(c)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c54895237.costfilter(c,tp,sft)
function c54895237.costfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost()
and Duel.GetMZoneCount(tp,c)>0 and (sft>0 or c:IsLocation(LOCATION_SZONE) and sft>-1)
and Duel.GetMZoneCount(tp,c)>0 and Duel.GetSZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c54895237.setfilter,tp,LOCATION_HAND,0,1,nil,c,tp)
end
function c54895237.setfilter(c,cc,tp)
......@@ -41,10 +41,9 @@ function c54895237.setfilter(c,cc,tp)
and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc)
end
function c54895237.gspcost(e,tp,eg,ep,ev,re,r,rp,chk)
local sft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c54895237.costfilter,tp,LOCATION_ONFIELD,0,1,nil,tp,sft) end
if chk==0 then return Duel.IsExistingMatchingCard(c54895237.costfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c54895237.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp,sft)
local g=Duel.SelectMatchingCard(tp,c54895237.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c54895237.gsptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -19,24 +19,28 @@ function s.dfilter(c,tp)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.dfilter(chkc,tp) end
local b1=Duel.GetFlagEffect(tp,id)==0
local b1=(Duel.GetFlagEffect(tp,id)==0 or not e:IsCostChecked())
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.GetFlagEffect(tp,id+o)==0
local b2=(Duel.GetFlagEffect(tp,id+o)==0 or not e:IsCostChecked())
and Duel.IsExistingTarget(s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(id,0)},{b2,aux.Stringid(id,1)})
if op==1 then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e:SetProperty(0)
if e:IsCostChecked() then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e:SetProperty(0)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
e:SetOperation(s.sop)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else
e:SetCategory(CATEGORY_DAMAGE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
if e:IsCostChecked() then
e:SetCategory(CATEGORY_DAMAGE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
end
e:SetOperation(s.dop)
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectTarget(tp,s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp):GetFirst()
local atk=tc:GetBaseAttack()
......
......@@ -16,12 +16,7 @@ function c60473572.initial_effect(c)
end
function c60473572.desfilter(c,tp)
if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c60473572.filter,tp,LOCATION_DECK,0,1,nil,true)
else
return Duel.IsExistingMatchingCard(c60473572.filter,tp,LOCATION_DECK,0,1,nil,false)
end
return Duel.GetSZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c60473572.filter,tp,LOCATION_DECK,0,1,nil,true)
end
function c60473572.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
......
......@@ -17,8 +17,7 @@ function c63086455.tgfilter(c,e,tp)
end
function c63086455.setfilter(c,cc,e,tp)
local b1=Duel.GetMZoneCount(1-tp,cc,tp)>0
local st=Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)
local b2=st>0 or cc:IsLocation(LOCATION_SZONE) and cc:GetSequence()<5 and st>-1
local b2=Duel.GetSZoneCount(1-tp,cc,tp)>0
return b1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)
or (b2 or c:IsType(TYPE_FIELD)) and c:IsSSetable(true)
end
......
......@@ -27,7 +27,7 @@ function c66722103.initial_effect(c)
c:RegisterEffect(e2)
end
function c66722103.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c66722103.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -16,12 +16,7 @@ function c69351984.initial_effect(c)
end
function c69351984.desfilter(c,tp)
if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c69351984.filter,tp,LOCATION_DECK,0,1,nil,true)
else
return Duel.IsExistingMatchingCard(c69351984.filter,tp,LOCATION_DECK,0,1,nil,false)
end
return Duel.GetSZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c69351984.filter,tp,LOCATION_DECK,0,1,nil,true)
end
function c69351984.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
......
......@@ -16,12 +16,7 @@ function c7868571.initial_effect(c)
end
function c7868571.desfilter(c,tp)
if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c7868571.filter,tp,LOCATION_DECK,0,1,nil,true)
else
return Duel.IsExistingMatchingCard(c7868571.filter,tp,LOCATION_DECK,0,1,nil,false)
end
return Duel.GetSZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c7868571.filter,tp,LOCATION_DECK,0,1,nil,true)
end
function c7868571.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
......
......@@ -31,7 +31,7 @@ function c91299846.initial_effect(c)
c:RegisterEffect(e3)
end
function c91299846.cfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost()
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() and Duel.GetSZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c91299846.tffilter,tp,LOCATION_DECK,0,1,nil,c,tp)
end
function c91299846.tffilter(c,cc,tp)
......
......@@ -81,6 +81,7 @@ function c92607427.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c92607427.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
......@@ -23,7 +23,7 @@ function c94187078.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c94187078.splimit)
e1:SetTarget(Auxiliary.DrytronSpSummonLimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
......@@ -35,9 +35,6 @@ function c94187078.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c94187078.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
function c94187078.filter(c,e,tp)
return c:IsSetCard(0x154) and c:IsCanBeSpecialSummoned(e,0,tp,false,aux.DrytronSpSummonType(c))
end
......
......@@ -1052,7 +1052,7 @@ function Auxiliary.DrytronSpSummonCost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function Auxiliary.DrytronSpSummonLimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
return c:IsSummonableCard() and c:GetOriginalType()&(TYPE_SPELL|TYPE_TRAP|TYPE_TRAPMONSTER)==0
end
function Auxiliary.DrytronSpSummonTarget(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
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