Commit b2b7c9ce authored by TanakaKotoha's avatar TanakaKotoha

Suit

parent 8104a6f4
--热核污染病毒-Ð
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,cm.matfilter,2,2)
aux.AddLinkProcedure(c,rccv.IsLinkSet,2,2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK)
......@@ -14,105 +15,72 @@ 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:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetCode(EVENT_PHASE+PHASE_END)
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:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
e2:SetCountLimit(1)
e2:SetCondition(cm.discon)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
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)
local e6=rsef.QO(c,nil,{m,2},{1,33341010},"sp",nil,LOCATION_GRAVE+LOCATION_REMOVED,nil,rscost.cost(cm.thfilter,"th",LOCATION_ONFIELD,LOCATION_ONFIELD),rsop.target(rscf.spfilter(),"sp"),cm.spop)
end
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.thfilter2(c)
return c.setcard=="Rcore" and c:IsAbleToHand() and c:IsFaceup()
cm.rssetcode="Thermonuclear"
function cm.tdfilter(c)
return c:IsAbleToDeck() and rccv.IsSet(c)
end
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)
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_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
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)
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_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,1-tp,0,REASON_EFFECT)
end
end
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.thcfilter(c,tp)
return c.setcard=="Rcore"
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
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)
function cm.cfilter(c)
return not c:IsPublic() and rccv.IsSet(c)
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
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())
end
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())
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
end
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)
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)
end
end
function cm.matfilter(c)
return c.setcard=="Rcore"
function cm.thfilter(c)
return c:IsFaceup() and rccv.IsSet(c) and c:IsAbleToHandAsCost()
end
function cm.spop(e,tp)
local c=rscf.GetRelationThisCard(e)
if c then rssf.SpecialSummon(c) end
end
\ No newline at end of file
......@@ -38,7 +38,7 @@ function c65071030.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
else
local sg=Duel.GetMatchingGroup(c65071030.tgfil,0,LOCATION_MZONE,e:GetLabel())
local sg=Duel.GetMatchingGroup(c65071030.tgfil,tp,0,LOCATION_MZONE,nil,e:GetLabel())
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
end
......
......@@ -4,7 +4,6 @@ function c66915002.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,66915002)
e1:SetTarget(c66915002.target)
e1:SetOperation(c66915002.activate)
......@@ -29,18 +28,14 @@ function c66915002.filter(c)
return ((c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS or c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS)and c:IsSetCard(0x374)) and c:IsSSetable() or c:IsCode(66915001)
end
function c66915002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_DECK) and chkc:IsControler(tp) and c66915002.filter(chkc) end
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ct=ct-1 end
if chk==0 then return ct>0 and Duel.IsExistingTarget(c66915002.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c66915002.filter,tp,LOCATION_DECK,0,1,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c66915002.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c66915002.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c66915002.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......@@ -74,4 +69,4 @@ function c66915002.activates(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
......@@ -33,7 +33,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e111)
end
function cm.seqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)
return c:IsFaceup() and c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and cm.seqfilter(chkc) end
......@@ -52,10 +52,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
function cm.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x374) and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) and c:IsType(TYPE_TRAP+TYPE_SPELL)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
end
function cm.spfilter(c,e,tp,code)
return c:IsSetCard(0x374) and not c:IsCode(code) and c:IsType(TYPE_TRAP+TYPE_SPELL)
return c:IsSetCard(0x374) and not c:IsCode(code) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
end
function cm.targets(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and cm.filter(chkc,e,tp) end
......
......@@ -27,15 +27,23 @@ function cm.initial_effect(c)
e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
--cannot be link material
local e33=Effect.CreateEffect(c)
e33:SetType(EFFECT_TYPE_SINGLE)
e33:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e33:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e33:SetValue(1)
c:RegisterEffect(e33)
end
function cm.spfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() and c:IsSetCard(0x374) and c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)
return c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() and c:IsSetCard(0x374) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetControl()
local tp=e:GetHandler():GetControler()
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tp=e:GetHandler():GetControler()
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
......@@ -43,18 +51,14 @@ function cm.filter(c)
return ((c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS or c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS)and c:IsSetCard(0x374)) and c:IsSSetable() or c:IsCode(66915001)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_DECK) and chkc:IsControler(tp) and cm.filter(chkc) end
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ct=ct-1 end
if chk==0 then return ct>0 and Duel.IsExistingTarget(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......@@ -62,4 +66,4 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
end
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