Commit 7783f1e7 authored by mercury233's avatar mercury233

fix

parent 3886ec1a
Pipeline #22474 passed with stages
in 44 seconds
......@@ -8,14 +8,11 @@ function c100346025.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c100346025.condition)
e1:SetCondition(aux.bpcon)
e1:SetTarget(c100346025.target)
e1:SetOperation(c100346025.activate)
c:RegisterEffect(e1)
end
function c100346025.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()<PHASE_MAIN2
end
function c100346025.filter(c)
return c:IsFaceup() and c:IsCode(70902743) and c:GetFlagEffect(100346025)==0
end
......
......@@ -9,6 +9,7 @@ function c100346032.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c100346032.target)
e1:SetOperation(c100346032.activate)
c:RegisterEffect(e1)
......@@ -26,8 +27,8 @@ function c100346032.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c100346032.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
local cg=Duel.GetMatchingGroup(c100346032.cfilter,tp,LOCATION_ONFIELD,0,nil)
e:SetLabel(cg:GetCount())
local ct=Duel.GetMatchingGroupCount(c100346032.cfilter,tp,LOCATION_ONFIELD,0,nil)
e:SetLabel(ct)
end
function c100346032.stfilter(c)
return c:IsCode(50078509) and c:IsSSetable()
......@@ -47,15 +48,13 @@ function c100346032.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabel(Duel.GetTurnCount())
Duel.RegisterEffect(e1,tp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100346032.stfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:GetLabel()>0 and g:GetCount()>0 and ft>0 and Duel.SelectYesNo(tp,aux.Stringid(100346032,0)) then
if e:GetLabel()>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100346032,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=g:Select(tp,1,1,nil)
if sc then
Duel.SSet(tp,sc)
end
end
end
end
function c100346032.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
......
--レッド・デーモンズ
--スカーレッド・デーモン
--Script by beyond
local s,id,o=GetID()
function s.initial_effect(c)
......
......@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
......
......@@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
......@@ -3,6 +3,8 @@
--Script by StupidStudiosN
local s,id,o=GetID()
function s.initial_effect(c)
--same effect send this card to grave and spsummon another card check
local e0=aux.AddThisCardInGraveAlreadyCheck(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
......@@ -14,14 +16,16 @@ function s.initial_effect(c)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--special summon and draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetLabelObject(e0)
e2:SetCondition(s.spdcon)
e2:SetTarget(s.spdtg)
e2:SetOperation(s.spdpop)
......@@ -43,10 +47,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.cfilter(c,tp)
function s.cfilter(c,tp,se)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x119) and c:IsType(TYPE_FUSION+TYPE_RITUAL+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
and (se==nil or c:GetReasonEffect()~=se)
end
function s.spdcon(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(s.cfilter,1,nil,tp,se)
end
function s.spdfilter(c,e,tp)
......@@ -56,18 +62,21 @@ function s.spdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spdfilter(chkc,e,tp) and chkc~=c end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsExistingTarget(s.spdfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spdfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.spdpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK)
and tc:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)>0 then
and tc:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)>0
and Duel.IsPlayerCanDraw(tp) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
......
......@@ -28,6 +28,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.lvtg)
e3:SetOperation(s.lvop)
c:RegisterEffect(e3)
end
......@@ -46,11 +47,15 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler()) and c:IsAttribute(ATTRIBUTE_FIRE)
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetLevel()>0 end
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() or c:IsFacedown() then return end
......
......@@ -68,7 +68,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function s.sfilter(c,e,tp)
......@@ -76,7 +76,7 @@ function s.sfilter(c,e,tp)
end
function s.dlvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.sfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return e:GetHandler():GetLevel()>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.sfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.sfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
......@@ -97,7 +97,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
......
......@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.stgt)
e1:SetOperation(s.sop)
......@@ -21,8 +21,9 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(aux.dscon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.atktg)
e2:SetOperation(s.atkop)
......
......@@ -27,11 +27,9 @@ function c100428018.initial_effect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100428018.damcon)
e2:SetTarget(c100428018.damtg)
e2:SetOperation(c100428018.damop)
e2:SetCategory(CATEGORY_DAMAGE)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
......@@ -90,6 +88,7 @@ function c100428018.damop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(1-tp,val,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(c100428018.scfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100428018,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c100428018.scfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SSet(tp,g:GetFirst())
......
......@@ -47,13 +47,13 @@ function c100428019.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c100428019.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,100428119,0,TYPES_TOKEN_MONSTER,1000,1000,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c100428019.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,100428119,0,TYPES_TOKEN_MONSTER,1000,1000,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP,1-tp) then return end
local token=Duel.CreateToken(tp,100428119)
if Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP) then
......
......@@ -4,7 +4,6 @@ function c100428020.initial_effect(c)
--to grave/set canon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100428020,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
......@@ -37,10 +36,12 @@ function c100428020.optg(e,tp,eg,ep,ev,re,r,rp,chk)
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(100428020,2))+1 end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
Duel.RegisterFlagEffect(tp,100428020,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
else
e:SetCategory(CATEGORY_REMOVE)
Duel.RegisterFlagEffect(tp,100428120,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
......
......@@ -57,7 +57,7 @@ function c100428021.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100428021.disfilter(c)
return c:IsLevel(1) and c:IsRace(RACE_PYRO)
return c:IsLevel(1) and c:IsRace(RACE_PYRO) and c:IsAbleToGrave()
end
function c100428021.desfilter(c)
return c:IsFaceup()
......@@ -75,8 +75,7 @@ end
function c100428021.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100428021.disfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
......
......@@ -14,8 +14,8 @@ function c100428024.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100428024)
e2:SetCost(c100428024.discost)
e2:SetCondition(c100428024.discon)
e2:SetCost(c100428024.discost)
e2:SetTarget(c100428024.distg)
e2:SetOperation(c100428024.disop)
c:RegisterEffect(e2)
......@@ -34,28 +34,30 @@ function c100428024.initial_effect(c)
e3:SetOperation(c100428024.tdop)
c:RegisterEffect(e3)
end
function c100428024.cfilter(c,tp)
function c100428024.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and re:GetActivateLocation()==LOCATION_MZONE
end
function c100428024.cfilter(c)
return c:IsRace(RACE_PYRO) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c100428024.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100428024.cfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c100428024.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100428024.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,c100428024.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
if g:GetFirst():IsSetCard(0x32) then e:SetLabel(1)
else e:SetLabel(0) end
end
function c100428024.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and re:GetActivateLocation()==LOCATION_MZONE
end
function c100428024.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c100428024.disop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(1-tp,500,REASON_EFFECT) and e:GetLabel()>0
if Duel.Damage(p,d,REASON_EFFECT)>0 and e:GetLabel()>0
and Duel.SelectYesNo(tp,aux.Stringid(100428024,2)) then
Duel.BreakEffect()
Duel.NegateEffect(ev)
......
......@@ -72,6 +72,7 @@ function c100428032.lgtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c100428032.lgop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100428032.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......
......@@ -71,14 +71,14 @@ end
function c100428035.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject()
if chk==0 then return tc:IsCanOverlay()
and Duel.IsExistingMatchingCard(c100428035.tgfilter,tp,LOCATION_DECK,0,1,nil) end
and Duel.IsExistingMatchingCard(c100428035.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c100428035.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100428035.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c100428035.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0
and g:GetFirst():IsLocation(LOCATION_GRAVE) then
local tc=Duel.GetFirstTarget()
......
......@@ -28,12 +28,11 @@ function s.cfilter(c,e,tp)
end
function s.filter(c,tc,e,tp)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0x1048) and c:IsRace(tc:GetRace()) and c:IsRank(tc:GetRank()+1)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......@@ -45,7 +44,7 @@ function s.sfilter(c)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToChain() or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not tc:IsRelateToChain() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,tc,e,tp):GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) then
......@@ -53,6 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local no=aux.GetXyzNumber(sc)
local g=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_DECK,0,nil)
if no and no>=101 and no<=107 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
......@@ -23,12 +23,10 @@ function c100428038.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100428038.desfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
local g=Duel.GetMatchingGroup(c100428038.desfilter,tp,LOCATION_MZONE,0,nil)
local ct=1
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
g:Merge(eg)
ct=ct+1
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100428038.spfilter(c,e,tp,code)
return c:IsSetCard(0x1084) and c:IsType(TYPE_XYZ) and not c:IsCode(code)
......
......@@ -41,7 +41,7 @@ function s.initial_effect(c)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and r&REASON_COST>0 and re:IsActivated()
and re:GetHandler():IsSetCard(0x195)
and re:GetHandler():IsSetCard(0x195) and rp==tp
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -65,6 +65,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,ct,ct,nil)
Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+id,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
......
......@@ -25,6 +25,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=g:SelectSubGroup(tp,aux.dabcheck,false,1,3)
Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+101202018,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
e:SetLabel(#sg)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
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