Commit 480a8ca9 authored by TanakaKotoha's avatar TanakaKotoha

rover

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