Commit 480a8ca9 authored by TanakaKotoha's avatar TanakaKotoha

rover

parent 3f1efc6f
--传灵 月问 --传灵 月问
function c22600104.initial_effect(c) function c22600104.initial_effect(c)
--spirit return --spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP) aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--cannot special summon --cannot special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE) e1:SetValue(aux.FALSE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--changeposition --changeposition
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_HANDES+CATEGORY_POSITION) e2:SetCategory(CATEGORY_HANDES+CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,22600104) e2:SetCountLimit(1,22600104)
e2:SetCost(c22600104.cpcost) e2:SetCost(c22600104.cpcost)
e2:SetCondition(c22600104.cpcon) e2:SetCondition(c22600104.cpcon)
e2:SetTarget(c22600104.cptg) e2:SetTarget(c22600104.cptg)
e2:SetOperation(c22600104.cpop) e2:SetOperation(c22600104.cpop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,0x1c0) e3:SetHintTiming(0,0x1c0)
e3:SetCondition(c22600104.con) e3:SetCondition(c22600104.con)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--specialsummon --specialsummon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,22600134) e4:SetCountLimit(1,22600134)
e4:SetCondition(c22600104.spcon) e4:SetCondition(c22600104.spcon)
e4:SetTarget(c22600104.sptg) e4:SetTarget(c22600104.sptg)
e4:SetOperation(c22600104.spop) e4:SetOperation(c22600104.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c22600104.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) function c22600104.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c22600104.cpfilter(c) function c22600104.cpfilter(c)
return c:IsCanTurnSet() and c:IsFaceup() and c:IsType(TYPE_MONSTER) return c:IsCanTurnSet() and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end end
function c22600104.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22600104.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,c) local g1=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,c)
local g2=Duel.GetMatchingGroup(c22600104.cpfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g2=Duel.GetMatchingGroup(c22600104.cpfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return g1:GetCount()>0 and g2:GetCount()>0 end if chk==0 then return g1:GetCount()>0 and g2:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,g1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_HANDES,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g2,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g2,1,0,0)
end end
function c22600104.cpop(e,tp,eg,ep,ev,re,r,rp) function c22600104.cpop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22600104.cpfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c22600104.cpfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil) local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil)
if ct>0 and g:GetCount()>0 then if ct>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)
end end
end end
function c22600104.cfilter(c) function c22600104.cfilter(c)
return c:IsFacedown() or not c:IsType(TYPE_SPIRIT) return c:IsFacedown() or not c:IsType(TYPE_SPIRIT)
end end
function c22600104.cpcon(e,tp,eg,ep,ev,re,r,rp) function c22600104.cpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22600104.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c22600104.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c22600104.con(e,tp,eg,ep,ev,re,r,rp) function c22600104.con(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c22600104.cfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c22600104.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c22600104.spcon(e,tp,eg,ep,ev,re,r,rp) function c22600104.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not (e:GetHandler():IsReason(REASON_COST) and re:IsHasType(0x7e0) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not (e:GetHandler():IsReason(REASON_COST) and re:IsHasType(0x7e0)
and re:GetHandler()==e:GetHandler()) and re:GetHandler()==e:GetHandler())
end end
function c22600104.filter(c) function c22600104.filter(c,e,tp)
return c:IsType(TYPE_SPIRIT) return c:IsType(TYPE_SPIRIT) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function c22600104.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c22600104.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22600104.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c22600104.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c22600104.spop(e,tp,eg,ep,ev,re,r,rp) function c22600104.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22600104.filter,tp,LOCATION_GRAVE,0,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if g:GetCount()>0 then local g=Duel.SelectMatchingCard(tp,c22600104.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if #g>0 then
local tc=Duel.SelectMatchingCard(tp,c22600104.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetRange(LOCATION_MZONE)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(c22600104.retop)
e1:SetOperation(c22600104.retop) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetCountLimit(1)
e1:SetCountLimit(1) g:GetFirst():RegisterEffect(e1,true)
tc:GetFirst():RegisterEffect(e1,true) end
end
end end
function c22600104.retop(e,tp,eg,ep,ev,re,r,rp) function c22600104.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end end
\ No newline at end of file
--热核污染病毒-Ð --热核污染病毒-Ð
if not pcall(function() require("expansions/script/c33340004") end) then require("script/c33340004") end
local m=33340010 local m=33340010
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,rccv.IsLinkSet,2,2) aux.AddLinkProcedure(c,cm.matfilter,2,2)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_TODECK)
...@@ -15,72 +14,105 @@ function cm.initial_effect(c) ...@@ -15,72 +14,105 @@ function cm.initial_effect(c)
e1:SetTarget(cm.tdtg) e1:SetTarget(cm.tdtg)
e1:SetOperation(cm.tdop) e1:SetOperation(cm.tdop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE+CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.discon) e2:SetTarget(cm.thtg)
e2:SetCost(cm.discost) e2:SetOperation(cm.thop)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e6=rsef.QO(c,nil,{m,2},{1,m},"sp",nil,LOCATION_GRAVE+LOCATION_REMOVED,nil,rscost.cost(cm.thfilter,"th",LOCATION_ONFIELD,LOCATION_ONFIELD),rsop.target(rscf.spfilter(),"sp"),cm.spop) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetTarget(cm.reptg)
e3:SetOperation(cm.repop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(cm.thcon2)
e4:SetTarget(cm.thtg2)
e4:SetOperation(cm.thop2)
c:RegisterEffect(e4)
end end
cm.rssetcode="Thermonuclear" function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
function cm.tdfilter(c) local c=e:GetHandler()
return c:IsAbleToDeck() and rccv.IsSet(c) return c:IsReason(REASON_EFFECT)
and c:IsPreviousPosition(POS_FACEUP)
end end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thfilter2(c)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end return c.setcard=="Rcore" and c:IsAbleToHand() and c:IsFaceup()
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp) function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,0x3c,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x3c)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,0x3c,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g) Duel.HintSelection(g)
Duel.SendtoDeck(g,1-tp,0,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
function cm.discon(e,tp,eg,ep,ev,re,r,rp) function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) if chk==0 then return Duel.IsExistingMatchingCard(cm.thcfilter,tp,0x2,0,1,nil) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end end
function cm.cfilter(c) function cm.thcfilter(c,tp)
return not c:IsPublic() and rccv.IsSet(c) return c.setcard=="Rcore"
end end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.repop(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g=Duel.SelectMatchingCard(tp,cm.thcfilter,tp,0x2,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,nil) Duel.SendtoHand(g,1-tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
e:SetLabelObject(g:GetFirst())
end end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetTargetCard(e:GetLabelObject())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
end end
function cm.disop(e,tp,eg,ep,ev,re,r,rp) function cm.milfilter(c)
local c=e:GetHandler() return c.setcard=="Rcore" and c:IsAbleToHand()
local tc=rscf.GetTargetCard() end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0 function cm.thop(e,tp,eg,ep,ev,re,r,rp)
and tc then if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
if g:IsExists(cm.milfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,cm.milfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
g:Sub(sg)
end
Duel.SortDecktop(tp,tp,g:GetCount())
end end
end end
function cm.thfilter(c) function cm.tdfilter(c)
return c:IsFaceup() and rccv.IsSet(c) and c:IsAbleToHandAsCost() return c:IsAbleToDeck() and c.setcard=="Rcore"
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,0x2,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,0x2)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,0x2,0,1,1,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,1-tp,0,REASON_EFFECT)
end
end end
function cm.spop(e,tp) function cm.matfilter(c)
local c=rscf.GetRelationThisCard(e) return c.setcard=="Rcore"
if c then rssf.SpecialSummon(c) end
end end
\ No newline at end of file
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