Commit ad76b3ba authored by Nemo Ma's avatar Nemo Ma

fix + iflist

parent dfdb07fa
......@@ -748,6 +748,13 @@
30002065 0
30010000 0
30012000 0
#220417
14010111 0
12057810 0
22520010 0
22520006 1
3000070 2
#220410
33330512 0
33701317 0
......@@ -1487,7 +1494,6 @@
79029031 0
79029438 0
79029513 0
60151421 1
79029241 1
79029374 1
79029458 1
......@@ -1594,7 +1600,7 @@
63790500 0
63790501 0
14010111 1
15000182 1
15000182 2
30005000 2
#210509
79029456 0
......
No preview for this file type
......@@ -13,7 +13,7 @@ function c10150068.initial_effect(c)
c:RegisterEffect(e1)
end
function c10150068.cfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsFaceup() and (c:IsLevelBelow(7) or c:IsRankAbove(7))
return c:IsRace(RACE_DRAGON) and c:IsFaceup() and (c:IsLevelAbove(7) or c:IsRankAbove(7))
end
function c10150068.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10150068.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -43,7 +43,9 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.filter(c,e,tp,g)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (Duel.GetLocationCountFromEx(tp,tp,g)>0 or not c:IsLocation(LOCATION_EXTRA))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_GRAVE) and Duel.GetMZoneCount(tp,g)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(cm.cfilter,nil,tp)
......@@ -53,14 +55,13 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=eg:Filter(cm.cfilter,nil,tp)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp,g)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -28,7 +28,7 @@ function c29065536.initial_effect(c)
c29065536.summon_effect=e2
end
function c29065536.cfilter(c)
return c:IsCode(29065521,29065523,29065536,15000129) and c:IsType(TYPE_MONSTER)
return c:IsCode(29065521,29065523,29065536,15000129,29065537) and c:IsType(TYPE_MONSTER)
end
function c29065536.hspcon(e,c)
if c==nil then return true end
......
......@@ -162,7 +162,7 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()==0 and g1:GetCount()>0 then
g=g1
end
if c:GetFlagEffect(m+1)==3 and g:GetCount()>0 then
if c:GetFlagEffect(m+1)>=3 and g:GetCount()>0 then
Duel.Hint(HINT_CARD,0,m)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
--终墟覆始
--终墟覆始
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rk.set(30015060,"Overuins")
function cm.initial_effect(c)
......@@ -70,12 +69,17 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
if #mg>=6 then
e:GetHandler():RegisterFlagEffect(m+2,RESET_PHASE+PHASE_END,0,0)
local flag=false
if #mg>=6 then
flag=true
end
if flag==true then
Duel.SetTargetParam(6)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if e:GetLabel()==0 then
local mg=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_REMOVED,0,nil)
if mg:GetCount()~=0 then
......@@ -89,21 +93,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
else
local mg=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_REMOVED,0,nil)
if mg:GetCount()~=0 then
if c:GetFlagEffect(m+2)>0 and mg:GetCount()~=0 then
local sg1=mg:RandomSelect(tp,1)
local tc1=sg1:GetFirst()
if tc1 then
Duel.SendtoHand(tc1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc1)
Card.ResetFlagEffect(c,m+2)
if tc1:IsLocation(LOCATION_HAND) then
local sg=mg:RandomSelect(tp,1)
local tc=sg:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
if flag>0 then
local sg1=mg:RandomSelect(tp,2)
if sg1:GetCount()~=0 then
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
else
if mg:GetCount()~=0 then
......@@ -119,11 +113,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,1-tp,POS_FACEDOWN)
and Duel.SelectYesNo(1-tp,aux.Stringid(30015500,1))
and Duel.IsPlayerCanRemove(1-tp) then
local g=Duel.GetFieldGroup(1-tp,0,LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0)
if #g>0 then
Duel.Hint(HINT_CARD,0,m)
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(1-tp,aux.NecroValleyFilter(cm.downremovefilter),1,3,nil,1-tp,POS_FACEDOWN)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
Duel.ShuffleDeck(tp)
......@@ -250,4 +244,4 @@ function cm.impop1(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(n+1)
Duel.RegisterEffect(e1,tp)
end
end
\ No newline at end of file
end
......@@ -64,8 +64,8 @@ function c33200721.thfilter(c)
return c:IsSetCard(0xc32a) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c33200721.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x32a,2,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x32a,2,REASON_COST)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x32a,2,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x32a,2,REASON_COST)
end
function c33200721.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200721.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -4,49 +4,49 @@
local s = c33701016
local id = 33701016
function s.initial_effect(c)
c:SetSPSummonOnce(id)
--Special Summon
local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(id, 0))
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetRange(LOCATION_HAND + LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
c:SetSPSummonOnce(id)
--Special Summon
local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(id, 0))
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x144e)
return c:IsFacedown() or not c:IsSetCard(0x144e)
end
function s.spcon(e, tp, eg, ep, ev, re, r, rp)
return not Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
return Duel.GetTurnPlayer()==tp and not Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler()
if chk == 0 then
return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
local c = e:GetHandler()
if chk == 0 then
return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if
c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) ~= 0 and
Duel.SelectYesNo(tp, aux.Stringid(id, 1))
then
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1, 0)
e1:SetValue(3) --1 normal draw + 2 "additional" cards
e1:SetReset(EVENT_PHASE + PHASE_STANDBY + RESET_SELF_TURN)
Duel.RegisterEffect(e1, tp)
end
local c = e:GetHandler()
if
c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) ~= 0 and
Duel.SelectYesNo(tp, aux.Stringid(id, 1))
then
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1, 0)
e1:SetValue(3) --1 normal draw + 2 "additional" cards
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
Duel.RegisterEffect(e1, tp)
end
end
function s.recon(e, tp, eg, ep, ev, re, r, rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
......@@ -64,10 +64,10 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -24,10 +24,31 @@ function cm.initial_effect(c)
local e4=e2:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit0)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit0(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function cm.ttcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 or Duel.IsExistingMatchingCard(cm.filter1,c:GetControler(),LOCATION_MZONE,0,1,nil)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 or Duel.IsExistingMatchingCard(cm.filter1,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.filter1(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
......
......@@ -11,6 +11,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(cm.remtg)
e1:SetOperation(cm.remop)
c:RegisterEffect(e1)
......
......@@ -55,9 +55,9 @@ function c35399009.op1(e,tp,eg,ep,ev,re,r,rp)
e1_1:SetValue(c35399009.efilter1_1)
if Duel.GetTurnPlayer()==tp
and Duel.GetCurrentPhase()==PHASE_END then
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_SELF_TURN,2)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_SELF_TURN)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN)
end
c:RegisterEffect(e1_1)
end
......
function c60000011.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60000011)
e1:SetCost(c60000011.cost)
e1:SetTarget(c60000011.target)
e1:SetOperation(c60000011.operation)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetCondition(c60000011.condition)
e3:SetTarget(c60000011.disable)
e3:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e3)
end
function c60000011.cfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost()
end
function c60000011.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60000011.cfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60000011.cfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c60000011.filter(c)
return c:IsSetCard(0xcf) and c:IsLevelAbove(8) and c:IsAbleToHand()
end
function c60000011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60000011.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60000011.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60000011.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c60000011.dfilter(c)
return c:IsSetCard(0xcf) and c:IsLevelAbove(8)
end
function c60000011.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c60000011.dfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c60000011.disable(e,c)
return (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0) and not c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsAttribute(ATTRIBUTE_DARK)
end
\ No newline at end of file
function c60000238.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60000238)
e1:SetTarget(c60000238.target)
e1:SetOperation(c60000238.activate)
c:RegisterEffect(e1)
end
function c60000238.filter(c)
return c:IsControlerCanBeChanged() and c:IsFaceup()
end
function c60000238.spfilter(c,e,tp,tc)
return c:IsRace(tc:GetRace()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60000238.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()==tp and c60000238.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60000238.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c60000238.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60000238.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetControl(tc,1-tp)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60000238.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc)
if g:GetCount()~=0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
......@@ -47,12 +47,13 @@ function c67200278.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c67200278.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200278.pfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200278.pfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
......@@ -48,16 +48,15 @@ function c9910052.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN)
end
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN)
e2:SetValue(1)
c:RegisterEffect(e2)
end
end
......
......@@ -74,10 +74,12 @@ end
function c9910454.filter(c,e,tp)
return c:IsSetCard(0x9950) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:GetLevel()>0 and Duel.IsCanRemoveCounter(tp,1,1,0x1950,c:GetLevel(),REASON_COST)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function c9910454.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c9910454.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 end
if chk==0 then return g:GetCount()>0 end
local lvt={}
local tc=g:GetFirst()
while tc do
......@@ -97,12 +99,12 @@ function c9910454.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c9910454.sfilter(c,lv,e,tp)
return c:IsSetCard(0x9950) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsLevel(lv)
return c:IsSetCard(0x9950) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(lv)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function c9910454.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910454.sfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,lv,e,tp)
......
......@@ -38,7 +38,7 @@ function c9910661.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(9910659,0)) and Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_EFFECT) then
and Duel.SelectYesNo(tp,aux.Stringid(9910661,0)) and Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_EFFECT) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......
......@@ -23,7 +23,7 @@ function c9910666.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_MOVE)
e3:SetCondition(c9910666.lvcon)
e3:SetTarget(c9910666.lvtg)
......
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