Commit d580cb64 authored by mercury233's avatar mercury233

new cards VP17+SJMP

parent beeb3b74
--リローダー・ドラゴン
function c15627227.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x102),2,2)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15627227,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,15627227)
e1:SetTarget(c15627227.sptg)
e1:SetOperation(c15627227.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15627227,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c15627227.thcon)
e2:SetTarget(c15627227.thtg)
e2:SetOperation(c15627227.thop)
c:RegisterEffect(e2)
end
function c15627227.spfilter1(c,e,tp)
if c:IsFaceup() and c:IsType(TYPE_LINK) then
local zone=c:GetLinkedZone()
return zone~=0 and Duel.IsExistingMatchingCard(c15627227.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp,zone)
else return false end
end
function c15627227.spfilter2(c,e,tp,zone)
return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c15627227.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c15627227.spfilter1(chkc,e,tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c15627227.spfilter1,tp,LOCATION_MZONE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c15627227.spfilter1,tp,LOCATION_MZONE,0,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c15627227.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lc=Duel.GetFirstTarget()
if lc:IsRelateToEffect(e) and lc:IsFaceup() then
local zone=lc:GetLinkedZone()
if zone==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c15627227.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP,zone) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(15627227,RESET_EVENT+0x1fe0000,0,1,fid)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabel(fid)
e2:SetLabelObject(tc)
e2:SetCondition(c15627227.descon)
e2:SetOperation(c15627227.desop)
Duel.RegisterEffect(e2,tp)
end
Duel.SpecialSummonComplete()
end
end
function c15627227.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(15627227)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c15627227.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
function c15627227.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and bit.band(r,0x21)==0x21
end
function c15627227.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x102) and c:IsAbleToHand()
end
function c15627227.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c15627227.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c15627227.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c15627227.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c15627227.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--リンクリボー
function c41999284.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c41999284.matfilter,1)
--atk to 0
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c41999284.atkcon)
e1:SetCost(c41999284.atkcost)
e1:SetOperation(c41999284.atkop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,41999284)
e2:SetCost(c41999284.spcost)
e2:SetTarget(c41999284.sptg)
e2:SetOperation(c41999284.spop)
c:RegisterEffect(e2)
end
function c41999284.matfilter(c)
return c:GetLevel()==1
end
function c41999284.atkcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and aux.nzatk(Duel.GetAttacker())
end
function c41999284.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c41999284.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToBattle() and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c41999284.cfilter(c,ft,tp)
return c:GetLevel()==1 and c:IsControler(tp)
and (ft>0 or c:GetSequence()<5)
end
function c41999284.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,c41999284.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(tp,c41999284.cfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function c41999284.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c41999284.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--トリックスター・ブラッディマリー
function c51011872.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfb),2,2)
c:EnableReviveLimit()
--recover
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c51011872.reccon)
e1:SetOperation(c51011872.recop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(51011872,0))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,51011872)
e3:SetCost(c51011872.drcost)
e3:SetTarget(c51011872.drtg)
e3:SetOperation(c51011872.drop)
c:RegisterEffect(e3)
end
function c51011872.cfilter(c,g)
return c:IsSetCard(0xfb) and g:IsContains(c)
end
function c51011872.reccon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return lg and eg:IsExists(c51011872.cfilter,1,nil,lg)
end
function c51011872.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,51011872)
Duel.Recover(tp,200,REASON_EFFECT)
end
function c51011872.costfilter(c)
return c:IsDiscardable() and c:IsSetCard(0xfb)
end
function c51011872.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c51011872.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c51011872.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c51011872.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=1
if Duel.GetLP(tp)>=Duel.GetLP(1-tp)+2000 then ct=2 end
if chk==0 then return Duel.IsPlayerCanDraw(tp,ct)
and Duel.IsPlayerCanDraw(1-tp,1) end
e:SetLabel(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c51011872.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,e:GetLabel(),REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
--剛鬼デストロイ・オーガ
function c88406570.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfc),2)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c88406570.indtg)
e1:SetValue(c88406570.indct)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88406570,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,88406570)
e2:SetTarget(c88406570.sptg)
e2:SetOperation(c88406570.spop)
c:RegisterEffect(e2)
end
function c88406570.indtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c88406570.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
function c88406570.spfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c88406570.spfilter2(c,e,tp,zone)
return c:IsSetCard(0xfc) and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c88406570.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local zone=e:GetHandler():GetLinkedZone()
return zone~=0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,1-tp)>0
and Duel.IsExistingMatchingCard(c88406570.spfilter1,1-tp,LOCATION_GRAVE,0,1,nil,e,1-tp)
and Duel.IsExistingMatchingCard(c88406570.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,PLAYER_ALL,LOCATION_GRAVE)
end
function c88406570.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE,1-tp)
if ft>0 then
if Duel.IsPlayerAffectedByEffect(1-tp,59822133) then ft=1 end
if ft>1 then ft=2 end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(1-tp,aux.NecroValleyFilter(c88406570.spfilter1),1-tp,LOCATION_GRAVE,0,1,ft,nil,e,1-tp)
if g1:GetCount()>0 then
local ct=Duel.SpecialSummon(g1,0,1-tp,1-tp,false,false,POS_FACEUP)
local zone=c:GetLinkedZone()
ct=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone),ct)
if ct>0 and c:IsRelateToEffect(e) then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c88406570.spfilter2),tp,LOCATION_GRAVE,0,1,ct,nil,e,tp,zone)
if g2:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c88406570.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c88406570.splimit(e,c)
return not c:IsSetCard(0xfc)
end
--サイバース・アクセラレーター
function c89238128.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.NOT(aux.FilterBoolFunction(Card.IsLinkType,TYPE_TOKEN)),2)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(89238128,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,89238128)
e1:SetCondition(c89238128.atkcon)
e1:SetCost(c89238128.cost)
e1:SetTarget(c89238128.atktg)
e1:SetOperation(c89238128.atkop)
c:RegisterEffect(e1)
--extra attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(89238128,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,89238128)
e2:SetCondition(c89238128.excon)
e2:SetCost(c89238128.cost)
e2:SetTarget(c89238128.extg)
e2:SetOperation(c89238128.exop)
c:RegisterEffect(e2)
end
function c89238128.atkcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function c89238128.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c89238128.atkfilter(c,lg)
return c:IsFaceup() and c:IsRace(RACE_CYBERS) and lg and lg:IsContains(c)
end
function c89238128.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c89238128.atkfilter(chkc,lg) end
if chk==0 then return Duel.IsExistingTarget(c89238128.atkfilter,tp,LOCATION_MZONE,0,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c89238128.atkfilter,tp,LOCATION_MZONE,0,1,1,nil,lg)
end
function c89238128.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
function c89238128.excon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c89238128.exfilter(c,lg)
return c:IsFaceup() and c:IsRace(RACE_CYBERS) and c:GetEffectCount(EFFECT_EXTRA_ATTACK_MONSTER)==0 and lg and lg:IsContains(c)
end
function c89238128.extg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c89238128.exfilter(chkc,lg) end
if chk==0 then return Duel.IsExistingTarget(c89238128.exfilter,tp,LOCATION_MZONE,0,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c89238128.exfilter,tp,LOCATION_MZONE,0,1,1,nil,lg)
end
function c89238128.exop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
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