Commit 552fc848 authored by mercury233's avatar mercury233

update scripts

parent 39389f8b
--ローグ・オブ・エンディミオン
--
--Script by mercury233
function c100200160.initial_effect(c)
c:EnableCounterPermit(0x1)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200160,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100200160)
e1:SetTarget(c100200160.addct)
e1:SetOperation(c100200160.addc)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100200160,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100200160+100)
e3:SetCost(c100200160.setcost)
e3:SetTarget(c100200160.settg)
e3:SetOperation(c100200160.setop)
c:RegisterEffect(e3)
end
function c100200160.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x1)
end
function c100200160.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x1,1)
end
end
function c100200160.costfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsDiscardable()
end
function c100200160.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1,1,REASON_COST)
and Duel.IsExistingMatchingCard(c100200160.costfilter,tp,LOCATION_HAND,0,1,nil) end
e:GetHandler():RemoveCounter(tp,0x1,1,REASON_COST)
Duel.DiscardHand(tp,c100200160.costfilter,1,1,REASON_DISCARD+REASON_COST)
end
function c100200160.filter(c)
return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsSSetable()
end
function c100200160.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200160.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c100200160.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c100200160.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c100200160.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c100200160.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
--V・HERO インクリース
--
--Script by mercury233
function c100248007.initial_effect(c)
--to field
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100248007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,100248007)
e1:SetCondition(c100248007.condition)
e1:SetTarget(c100248007.target)
e1:SetOperation(c100248007.operation)
c:RegisterEffect(e1)
--spsummon from szone
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100248007,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,100248007+100)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCondition(c100248007.spcon1)
e2:SetCost(c100248007.spcost1)
e2:SetTarget(c100248007.sptg1)
e2:SetOperation(c100248007.spop1)
c:RegisterEffect(e2)
--special summon from deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100248007,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,100248007+200)
e3:SetCondition(c100248007.spcon2)
e3:SetTarget(c100248007.sptg2)
e3:SetOperation(c100248007.spop2)
c:RegisterEffect(e3)
end
function c100248007.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c100248007.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c100248007.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
function c100248007.spcon1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and e:GetHandler():GetType()==TYPE_TRAP+TYPE_CONTINUOUS
end
function c100248007.cfilter1(c,tp)
return c:IsSetCard(0x8) and Duel.GetMZoneCount(tp,c)>0
end
function c100248007.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100248007.cfilter1,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c100248007.cfilter1,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c100248007.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,100248007,0x5008,0x21,900,1100,3,RACE_WARRIOR,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100248007.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c100248007.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()<5
end
function c100248007.spfilter2(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x5008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100248007.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100248007.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100248007.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100248007.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--占い魔女 ヒカリちゃん
--
--Script by mercury233
function c100248017.initial_effect(c)
--special summon from hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100248017,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_DRAW)
e1:SetCountLimit(1,100248017)
e1:SetCost(c100248017.spcost1)
e1:SetTarget(c100248017.sptg1)
e1:SetOperation(c100248017.spop1)
c:RegisterEffect(e1)
--special summon from deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100248017,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100248017+100)
e2:SetCondition(c100248017.spcon2)
e2:SetTarget(c100248017.sptg2)
e2:SetOperation(c100248017.spop2)
c:RegisterEffect(e2)
end
function c100248017.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c100248017.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100248017.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c100248017.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c100248017.tgfilter2(c,tp)
return c:IsAbleToGrave() and Duel.GetMZoneCount(tp,c)>0
end
function c100248017.spfilter2(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100248017.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100248017.tgfilter2(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100248017.tgfilter2,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.IsExistingMatchingCard(c100248017.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c100248017.tgfilter2,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100248017.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100248017.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--TG ギア・ゾンビ
--
--Script by mercury233
function c100248026.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100248026,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100248026)
e1:SetTarget(c100248026.sptg)
e1:SetOperation(c100248026.spop)
c:RegisterEffect(e1)
end
function c100248026.cfilter(c)
return c:IsSetCard(0x27) and c:IsFaceup()
end
function c100248026.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c100248026.cfilter(chkc) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100248026.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100248026.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100248026.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-1000)
tc:RegisterEffect(e1)
end
end
end
--No.97 龍影神ドラッグラビオン
--
--Script by mercury233
function c100248033.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100248033,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100248033)
e2:SetCost(c100248033.spcost)
e2:SetTarget(c100248033.sptg)
e2:SetOperation(c100248033.spop)
c:RegisterEffect(e2)
end
c100248033.xyz_number=97
function c100248033.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100248033.cfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsSetCard(0x48) and not c:IsCode(100248033)
end
function c100248033.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsSetCard(0x48) and not c:IsCode(100248033)
and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp)>0
or c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
and Duel.IsExistingMatchingCard(c100248033.cfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,c)
end
function c100248033.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100248033.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function c100248033.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100248033.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
local fid=0
if tc then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100248033,1))
local g2=Duel.SelectMatchingCard(tp,c100248033.cfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,tc)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(tc,g2)
fid=tc:GetFieldID()
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:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c100248033.ftarget)
e2:SetLabel(fid)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c100248033.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
--B・F-早撃ちのアルバレスト
--
--Script by mercury233
function c100248038.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100248038,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c100248038.sumtg)
e1:SetOperation(c100248038.sumop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100248038,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,100248038)
e2:SetCondition(c100248038.spcon)
e2:SetTarget(c100248038.sptg)
e2:SetOperation(c100248038.spop)
c:RegisterEffect(e2)
end
function c100248038.spfilter1(c,e,tp)
return c:IsLevelBelow(3) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100248038.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100248038.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c100248038.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100248038.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100248038.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c100248038.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetPreviousControler()==tp
end
function c100248038.spfilter2(c,e,tp)
return c:IsSetCard(0x22c) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100248038.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100248038.spfilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c100248038.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100248038.spfilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--B・F-降魔弓のハマ
--
--Script by mercury233 and JoyJ
function c100248041.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--extra attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetCondition(c100248041.condition)
e1:SetValue(1)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100248041,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCountLimit(1,100248041)
e2:SetCondition(c100248041.atkcon)
e2:SetTarget(c100248041.atktg)
e2:SetOperation(c100248041.atkop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100248041+100)
e3:SetCondition(c100248041.damcon)
e3:SetTarget(c100248041.damtg)
e3:SetOperation(c100248041.damop)
c:RegisterEffect(e3)
--
if not c100248041.global_check then
c100248041.global_check=true
c100248041[0]=-1
c100248041[1]=-1
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLE_DAMAGE)
ge1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetOperation(c100248041.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c100248041.mfilter(c)
return c:IsType(TYPE_SYNCHRO)
end
function c100248041.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetMaterial()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and mg:GetCount()>0 and mg:IsExists(c100248041.mfilter,1,nil)
end
function c100248041.atkcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c100248041.atkfilter(c)
return c:IsFaceup() and (c:IsAttackAbove(0) or c:IsDefenseAbove(0)) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c100248041.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100248041.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
end
function c100248041.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100248041.atkfilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c100248041.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()>c100248041[1-tp]
end
function c100248041.damfilter(c)
return c:IsSetCard(0x22c) and c:IsType(TYPE_MONSTER)
end
function c100248041.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100248041.damfilter,tp,LOCATION_GRAVE,0,1,nil) end
local val=Duel.GetMatchingGroupCount(c100248041.damfilter,tp,LOCATION_GRAVE,0,nil)*300
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(val)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,val)
end
function c100248041.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local val=Duel.GetMatchingGroupCount(c100248041.damfilter,tp,LOCATION_GRAVE,0,nil)*300
Duel.Damage(p,val,REASON_EFFECT)
end
function c100248041.checkop(e,tp,eg,ep,ev,re,r,rp)
c100248041[ep]=Duel.GetTurnCount()
end
--一斉蜂起
--
--Script by mercury233
function c100248043.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100248043+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100248043.spcost)
e1:SetTarget(c100248043.sptg)
e1:SetOperation(c100248043.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(100248043,ACTIVITY_SPSUMMON,c100248043.counterfilter)
end
function c100248043.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsRace(RACE_INSECT)
end
function c100248043.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100248043,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(c100248043.splimit)
Duel.RegisterEffect(e1,tp)
end
function c100248043.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_INSECT)
end
function c100248043.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x22c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100248043.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100248043.filter(chkc,e,tp) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if chk==0 then return ft>0 and ct>0 and Duel.IsExistingTarget(c100248043.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ct=math.min(ft,ct)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100248043.filter,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end
function c100248043.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil)
end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
--フリップ・フローズン
--
--Script by mercury233
function c100319001.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c100319001.postg)
e1:SetOperation(c100319001.posop)
c:RegisterEffect(e1)
end
function c100319001.filter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c100319001.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100319001.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c100319001.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c100319001.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100319001.filter,tp,0,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
--ドライブレイブ
--
--Script by mercury233
function c100319002.initial_effect(c)
--pierce
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100319002,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c100319002.atkcon)
e1:SetCost(c100319002.atkcost)
e1:SetTarget(c100319002.atktg)
e1:SetOperation(c100319002.atkop)
c:RegisterEffect(e1)
end
function c100319002.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
return a:IsControler(tp) and a:IsRace(RACE_CYBERSE)
end
function c100319002.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c100319002.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100319002.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c100319002.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c100319002.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.GetAttacker():CreateEffectRelation(e)
end
function c100319002.atkop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if a:IsRelateToEffect(e) and a:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
a:RegisterEffect(e1)
end
end
--リビルディア
--
--Script by mercury233
function c100319003.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100319003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(aux.bdocon)
e1:SetTarget(c100319003.sptg)
e1:SetOperation(c100319003.spop)
c:RegisterEffect(e1)
end
function c100319003.spfilter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsAttackBelow(1500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100319003.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100319003.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c100319003.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100319003.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100319003.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--スレッショルド・ボーグ
--
--Script by mercury233
function c100319004.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c100319004.spcon)
e1:SetOperation(c100319004.spop)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(-500)
c:RegisterEffect(e2)
end
function c100319004.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_CYBERSE) and c:IsDiscardable()
end
function c100319004.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.IsExistingMatchingCard(c100319004.cfilter,tp,LOCATION_HAND,0,1,c)
end
function c100319004.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c100319004.cfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
--サイバネット・クロスワイプ
--
--Script by mercury233
function c100319021.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c100319021.cost)
e1:SetTarget(c100319021.target)
e1:SetOperation(c100319021.activate)
c:RegisterEffect(e1)
end
function c100319021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c100319021.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c100319021.costfilter(c,ec,tp)
return c:IsRace(RACE_CYBERSE) and Duel.IsExistingTarget(c100319021.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c,ec)
end
function c100319021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c100319021.costfilter,1,c,c,tp)
else
return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c100319021.costfilter,1,1,c,c,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100319021.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--サイバネット・クロスワイプ
--
--Script by mercury233
function c100319033.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c100319033.target)
e1:SetOperation(c100319033.activate)
c:RegisterEffect(e1)
end
function c100319033.cfilter(c)
return c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c100319033.spfilter(c,e,tp,g)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and g and g:IsContains(c)
end
function c100319033.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lc=eg:Filter(c100319033.cfilter,nil):GetFirst()
if chkc then return chkc:IsControler(tp) and c100319033.spfilter(chkc,e,tp,lc:GetMaterial()) end
if chk==0 then return lc and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100319033.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,lc:GetMaterial()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100319033.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,lc:GetMaterial())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100319033.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
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