Commit 5b19054a authored by nanahira's avatar nanahira

prescripts

parent 8e80a301
--セキュリティ・ドラゴン
--Security Dragon
--Scripted by Eerie Code
function c100200139.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200139,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c100200139.thcon)
e1:SetCost(c100200139.thcost)
e1:SetTarget(c100200139.thtg)
e1:SetOperation(c100200139.thop)
c:RegisterEffect(e1)
end
function c100200139.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c100200139.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,100200139)==0 end
Duel.RegisterFlagEffect(tp,100200139,RESET_PHASE+PHASE_END,0,1)
end
function c100200139.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(100200139,1))
end
function c100200139.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
--幻想魔術師・ノー・フェイス
--Magical Illusionist Faceless Mage
--Scripted by Eerie Code
function c100407002.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,100407002)
e1:SetCondition(c100407002.spcon1)
e1:SetTarget(c100407002.sptg1)
e1:SetOperation(c100407002.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100407002+100)
e2:SetCondition(c100407002.spcon2)
e2:SetTarget(c100407002.sptg2)
e2:SetOperation(c100407002.spop2)
c:RegisterEffect(e2)
end
function c100407002.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and ((c:IsPreviousSetCard(0x20a) and bit.band(c:GetPreviousTypeOnField(),TYPE_FUSION)~=0)
or c:GetPreviousCodeOnField()==64631466 or c:GetPreviousCodeOnField()==63519819))
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function c100407002.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100407002.cfilter,1,nil,tp)
end
function c100407002.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100407002.spop1(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 c100407002.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c100407002.filter(c,e,tp)
return ((c:IsSetCard(0x20a) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466,63519819))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100407002.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100407002.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100407002.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100407002.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100407002.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--Samurai Destroyer
--Scripted by Eerie Code
function c101002081.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(),1)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetValue(c101002081.aclimit)
e1:SetCondition(c101002081.con)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101002081.con)
e2:SetOperation(c101002081.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101002081,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCondition(c101002081.spcon)
e4:SetTarget(c101002081.sptg)
e4:SetOperation(c101002081.spop)
c:RegisterEffect(e4)
end
function c101002081.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c101002081.con(e)
local c=e:GetHandler()
return Duel.GetAttacker()==c or Duel.GetAttackTarget()==c
end
function c101002081.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttackTarget()
if not tc then return end
if tc:IsControler(tp) then tc=Duel.GetAttacker() end
c:CreateRelation(tc,RESET_EVENT+0x1fe0000)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetCondition(c101002081.discon2)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetCondition(c101002081.discon2)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e2)
end
function c101002081.discon2(e)
return e:GetOwner():IsRelateToCard(e:GetHandler())
end
function c101002081.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp~=tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp
end
function c101002081.filter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101002081.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101002081.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101002081.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101002081.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101002081.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
--Vendread Chimera
--Scripted by Eerie Code
function c101002082.initial_effect(c)
c:EnableReviveLimit()
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101002082,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101002082)
e1:SetCondition(c101002082.condition)
e1:SetCost(c101002082.cost)
e1:SetTarget(c101002082.target)
e1:SetOperation(c101002082.operation)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101002082,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_RELEASE)
e2:SetCountLimit(1,101002082+100)
e2:SetCondition(c101002082.atkcon)
e2:SetOperation(c101002082.atkop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c101002082.condition(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end
if re:IsHasCategory(CATEGORY_NEGATE)
and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end
function c101002082.cfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost()
end
function c101002082.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101002082.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101002082.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,REASON_COST)
end
function c101002082.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c101002082.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c101002082.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_RITUAL)
end
function c101002082.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetValue(-500)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
end
--Vendread Strix
--Scripted by Eerie Code
function c101002083.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101002083)
e1:SetCost(c101002083.spcost)
e1:SetTarget(c101002083.sptg)
e1:SetOperation(c101002083.spop)
c:RegisterEffect(e1)
--gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c101002083.mtcon)
e2:SetOperation(c101002083.mtop)
c:RegisterEffect(e2)
end
function c101002083.spcfilter(c)
return c:IsSetCard(0x106) and not c:IsPublic()
end
function c101002083.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101002083.spcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c101002083.spcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp)
end
function c101002083.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101002083.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
function c101002083.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end
function c101002083.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,101002083)~=0 then return end
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x106)
local rc=g:GetFirst()
if not rc then return end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101002083,1))
e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLED)
e1:SetTarget(c101002083.drtg)
e1:SetOperation(c101002083.drop)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101002083,2))
Duel.RegisterFlagEffect(tp,101002083,RESET_PHASE+PHASE_END,0,1)
end
function c101002083.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101002083.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--Vendread Nights
--Scripted by Eerie Code
function c101002084.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101002084,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,101002084)
e2:SetCost(c101002084.thcost)
e2:SetTarget(c101002084.thtg)
e2:SetOperation(c101002084.thop)
c:RegisterEffect(e2)
--chain attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101002084,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c101002084.atcon)
e3:SetCost(c101002084.atcost)
e3:SetOperation(c101002084.atop)
c:RegisterEffect(e3)
end
function c101002084.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c101002084.thfilter(c)
return c:IsSetCard(0x106) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101002084.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101002084.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101002084.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101002084.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c101002084.atcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
local bc=ec:GetBattleTarget()
e:SetLabelObject(ec)
return bc and bc:IsType(TYPE_MONSTER) and ec:IsChainAttackable(2,true) and ec:IsStatus(STATUS_OPPO_BATTLE)
end
function c101002084.atcfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x106) and c:IsAbleToRemoveAsCost()
end
function c101002084.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101002084.atcfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101002084.atcfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101002084.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=e:GetLabelObject()
if not ec or not ec:IsRelateToBattle() then return end
Duel.ChainAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
ec:RegisterEffect(e1)
end
--Vendread Reunion
--Scripted by Eerie Code
function c101002085.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c101002085.cost)
e1:SetTarget(c101002085.target)
e1:SetOperation(c101002085.activate)
c:RegisterEffect(e1)
end
function c101002085.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c101002085.cfilter(c,e,tp,ft,bs)
if c:IsSetCard(0x106) and c:IsType(TYPE_RITUAL)
and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then
local lv=c:GetLevel()
local g=Duel.GetMatchingGroup(c101002085.filter,tp,LOCATION_REMOVED,0,nil,e,tp)
return g:GetCount()>0 and g:IsExists(c101002085.spfilter,1,nil,lv,ft,g,Group.CreateGroup(),bs)
else return false end
end
function c101002085.filter(c,e,tp)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsSetCard(0x106)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c101002085.spfilter(c,lv,ft,g,sg,bs)
if ft==0 then return false end
local sg2=sg:Clone()
sg2:AddCard(c)
local nlv=lv-c:GetLevel()
local g2=g:Clone()
g2:Remove(Card.IsCode,nil,c:GetCode())
return nlv>=0 and (nlv==0 or (not bs and g2:IsExists(c101002085.spfilter,1,nil,nlv,ft-1,g2,sg2,bs)))
end
function c101002085.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local bs=Duel.IsPlayerAffectedByEffect(tp,59822133)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return end
return Duel.IsExistingMatchingCard(c101002085.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp,ft,bs)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,c101002085.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,ft,bs):GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
e:SetLabelObject(tc)
tc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c101002085.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetLabelObject()
if not rc or not rc:IsRelateToEffect(e) or not rc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
or not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local bs=Duel.IsPlayerAffectedByEffect(tp,59822133)
local lv=rc:GetLevel()
local g=Duel.GetMatchingGroup(c101002085.filter,tp,LOCATION_REMOVED,0,nil,e,tp)
local sg=Group.CreateGroup()
while g:GetCount()>0 and ft>0 and lv>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:FilterSelect(tp,c101002085.spfilter,1,1,nil,lv,ft,g,sg,bs):GetFirst()
sg:AddCard(sc)
g:Remove(Card.IsCode,nil,sc:GetCode())
lv=lv-sc:GetLevel()
ft=ft-1
end
if sg:GetCount()==0 then return end
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)==sg:GetCount() then
local og=Duel.GetOperatedGroup()
Duel.ConfirmCards(1-tp,og)
Duel.BreakEffect()
if Duel.Release(og,REASON_EFFECT+REASON_RITUAL+REASON_MATERIAL)==og:GetCount() then
Duel.SpecialSummon(rc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
end
end
end
...@@ -58,7 +58,7 @@ function c101002086.initial_effect(c) ...@@ -58,7 +58,7 @@ function c101002086.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD) e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_TO_GRAVE) e6:SetCode(EFFECT_CANNOT_TO_GRAVE_AS_COST)
e6:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(0,LOCATION_HAND) e6:SetTargetRange(0,LOCATION_HAND)
e6:SetCondition(c101002086.excon) e6:SetCondition(c101002086.excon)
......
--ストライピング・パートナー
--Striping Panther
--Script by nekrozar
function c101003003.initial_effect(c)
c:EnableReviveLimit()
--connot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101003003,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c101003003.spcon1)
e2:SetTarget(c101003003.sptg1)
e2:SetOperation(c101003003.spop1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101003003,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c101003003.sptg2)
e3:SetOperation(c101003003.spop2)
c:RegisterEffect(e3)
end
function c101003003.spcon1(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and rp==tp
end
function c101003003.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101003003.spop1(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,true,false,POS_FACEUP)~=0 then
c:CompleteProcedure()
end
end
function c101003003.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101003003.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101003003.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101003003.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101003003.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101003003.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
--フリック・クラウン
--Flick Clown
--Script by nekrozar
function c101003004.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003004,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101003004)
e1:SetCondition(c101003004.drcon)
e1:SetCost(c101003004.drcost)
e1:SetTarget(c101003004.drtg)
e1:SetOperation(c101003004.drop)
c:RegisterEffect(e1)
end
function c101003004.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE)
end
function c101003004.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101003004.cfilter,tp,LOCATION_MZONE,0,2,e:GetHandler())
and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c101003004.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c101003004.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101003004.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--メタルヴァレット・ドラゴン
--Metalrokket Dragon
--Scripted by Eerie Code
function c101003008.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003008,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101003008)
e1:SetCondition(c101003008.descon)
e1:SetTarget(c101003008.destg)
e1:SetOperation(c101003008.desop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetOperation(c101003008.regop)
c:RegisterEffect(e2)
end
function c101003008.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsContains(c) then return false end
return re:IsActiveType(TYPE_LINK)
end
function c101003008.desfilter(c,g)
return g:IsContains(c)
end
function c101003008.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if chk==0 then return c:IsDestructable() and cg:GetCount()>0 end
cg:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c101003008.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 and cg:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(cg,REASON_EFFECT)
end
end
function c101003008.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003008,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1,101003008+100)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(c101003008.sptg)
e1:SetOperation(c101003008.spop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c101003008.spfilter(c,e,tp)
return c:IsSetCard(0x102) and not c:IsCode(101003008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101003008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101003008.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101003008.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,c101003008.spfilter,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
...@@ -2,31 +2,26 @@ ...@@ -2,31 +2,26 @@
--World Legacy - "World Shield" --World Legacy - "World Shield"
--Scripted by Eerie Code --Scripted by Eerie Code
function c101003021.initial_effect(c) function c101003021.initial_effect(c)
--Cannot activate --immune
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetValue(c101003021.immval)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(c101003021.aclimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot target --cannot be target/indestructable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetCondition(c101003021.indcon) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(c101003021.tgtg)
e2:SetValue(aux.tgoval) e2:SetValue(aux.tgoval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--indes local e3=e2:Clone()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101003021.indcon)
e3:SetValue(c101003021.indval) e3:SetValue(c101003021.indval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon --spsummon
...@@ -42,19 +37,16 @@ function c101003021.initial_effect(c) ...@@ -42,19 +37,16 @@ function c101003021.initial_effect(c)
e4:SetOperation(c101003021.spop) e4:SetOperation(c101003021.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c101003021.aclimit(e,re,tp) function c101003021.immval(e,te)
local tc=re:GetHandler() local tc=te:GetHandler()
return tc:IsLocation(LOCATION_MZONE) and tc:GetSummonLocation()==LOCATION_EXTRA and re:IsActiveType(TYPE_MONSTER) and not tc:IsImmuneToEffect(e) return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER)
end and te:IsActivated() and tc:IsSummonType(SUMMON_TYPE_SPECIAL) and tc:GetSummonLocation()==LOCATION_EXTRA
function c101003021.indfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xfe) and c:IsControler(tp)
end end
function c101003021.indcon(e) function c101003021.tgtg(e,c)
local tp=e:GetHandlerPlayer() return c:IsSetCard(0xfe) and e:GetHandler():GetColumnGroup():IsContains(c)
return e:GetHandler():GetColumnGroup():IsExists(c101003021.indfilter,1,e:GetHandler(),tp)
end end
function c101003021.indval(e,re,tp) function c101003021.indval(e,re,rp)
return tp~=e:GetHandlerPlayer() return rp~=e:GetHandlerPlayer()
end end
function c101003021.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101003021.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) end
...@@ -72,7 +64,7 @@ end ...@@ -72,7 +64,7 @@ end
function c101003021.spop(e,tp,eg,ep,ev,re,r,rp) function c101003021.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(c101003021.spfilter,1-tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101003021.spfilter),1-tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(101003021,1)) then and g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(101003021,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
--魔導獣 メデューサ
--Mythical Beast Medusa
--Script by nekrozar
function c101003024.initial_effect(c)
aux.EnablePendulumAttribute(c)
c:EnableCounterPermit(0x1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003024,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,101003024)
e1:SetCondition(c101003024.spcon)
e1:SetTarget(c101003024.sptg)
e1:SetOperation(c101003024.spop)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c101003024.acop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101003024,1))
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetHintTiming(TIMING_DAMAGE_STEP)
e4:SetCondition(c101003024.atkcon)
e4:SetCost(c101003024.atkcost)
e4:SetTarget(c101003024.atktg)
e4:SetOperation(c101003024.atkop)
c:RegisterEffect(e4)
end
function c101003024.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
end
function c101003024.spfilter(c,e,tp)
return c:IsCanAddCounter(0x1,1,false,LOCATION_MZONE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101003024.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101003024.spfilter(chkc,e,tp) end
if chk==0 then return c:IsDestructable() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101003024.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101003024.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101003024.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0
and tc:IsCanAddCounter(0x1,1) then
tc:AddCounter(0x1,1)
end
end
end
function c101003024.acop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then
e:GetHandler():AddCounter(0x1,1)
end
end
function c101003024.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 c101003024.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1,2,REASON_COST)
end
function c101003024.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c101003024.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(math.ceil(tc:GetAttack()/2))
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(math.ceil(tc:GetDefense()/2))
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
--魔導獣 バジリスク
--Mythical Beast Basilisk
--Script by nekrozar
function c101003025.initial_effect(c)
aux.EnablePendulumAttribute(c)
c:EnableCounterPermit(0x1)
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003025,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK*CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,101003025)
e1:SetTarget(c101003025.tdtg)
e1:SetOperation(c101003025.tdop)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c101003025.acop)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101003025,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,101003125)
e4:SetCost(c101003025.thcost)
e4:SetTarget(c101003025.thtg)
e4:SetOperation(c101003025.thop)
c:RegisterEffect(e4)
end
function c101003025.tdfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(101003025) and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck()
end
function c101003025.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDestructable()
and Duel.IsExistingMatchingCard(c101003025.tdfilter,tp,LOCATION_EXTRA,0,1,nil)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101003025.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101003025.tdfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c101003025.acop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then
e:GetHandler():AddCounter(0x1,1)
end
end
function c101003025.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x209) and c:IsAbleToHand()
end
function c101003025.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1,2,REASON_COST)
end
function c101003025.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101003025.thfilter,tp,LOCATION_PZONE+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_PZONE+LOCATION_EXTRA)
end
function c101003025.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c101003025.thfilter,tp,LOCATION_PZONE+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
...@@ -10,7 +10,6 @@ function c101003027.initial_effect(c) ...@@ -10,7 +10,6 @@ function c101003027.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101003027) e1:SetCountLimit(1,101003027)
e1:SetCondition(c101003027.thcon) e1:SetCondition(c101003027.thcon)
e1:SetTarget(c101003027.thtg) e1:SetTarget(c101003027.thtg)
......
--屈強の釣り師
--Angrappler
--Script by nekrozar
function c101003029.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003029,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c101003029.spcon)
e1:SetTarget(c101003029.sptg)
e1:SetOperation(c101003029.spop)
c:RegisterEffect(e1)
end
function c101003029.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetAttackTarget()==nil
end
function c101003029.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101003029.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101003029.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101003029.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101003029.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101003029.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_DEFENSE)
end
end
--雀姉妹
--Janshimatsu
--Script by nekrozar
function c101003030.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003030,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c101003030.target)
e1:SetOperation(c101003030.operation)
c:RegisterEffect(e1)
--turn set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101003030,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c101003030.postg)
e2:SetOperation(c101003030.posop)
c:RegisterEffect(e2)
end
function c101003030.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xed) and c:IsDiscardable()
end
function c101003030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c101003030.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
function c101003030.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(101003030)==0 end
c:RegisterFlagEffect(101003030,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end
function c101003030.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
end
--デスマニア・デビル
--Desmania Devil
--Scripted by Eerie Code
function c101003033.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003033,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(aux.bdocon)
e1:SetTarget(c101003033.target)
e1:SetOperation(c101003033.operation)
c:RegisterEffect(e1)
end
function c101003033.filter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_BEAST) and c:IsAbleToHand()
end
function c101003033.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101003033.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101003033.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101003033.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--インスペクト・ボーダー
--Inspect Boarder
--Script by nekrozar
function c101003035.initial_effect(c)
--summon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c101003035.sumcon)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e2)
--activate limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c101003035.aclimit1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_NEGATED)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c101003035.aclimit2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,0)
e4:SetCondition(c101003035.econ1)
e4:SetValue(c101003035.elimit)
c:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetOperation(c101003035.aclimit3)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetOperation(c101003035.aclimit4)
c:RegisterEffect(e6)
local e7=e4:Clone()
e7:SetCondition(c101003035.econ2)
e7:SetTargetRange(0,1)
c:RegisterEffect(e7)
end
function c101003035.sumcon(e)
return Duel.GetFieldGroupCount(e:GetHandler():IsControler(),LOCATION_MZONE,0)>0
end
function c101003035.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_RITUAL+TYPE_SYNCHRO+TYPE_XYZ+TYPE_PENDULUM+TYPE_LINK)
end
function c101003035.typecount(c)
return bit.band(c:GetType(),TYPE_FUSION+TYPE_RITUAL+TYPE_SYNCHRO+TYPE_XYZ+TYPE_PENDULUM+TYPE_LINK)
end
function c101003035.aclimit1(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp or not re:IsActiveType(TYPE_MONSTER) then return end
e:GetHandler():RegisterFlagEffect(101003035,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1)
end
function c101003035.aclimit2(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
e:GetHandler():ResetFlagEffect(101003035)
end
function c101003035.econ1(e)
local g=Duel.GetMatchingGroup(c101003035.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil)
local ct=g:GetClassCount(c101003035.typecount)
return e:GetHandler():GetFlagEffect(101003035)<ct
end
function c101003035.aclimit3(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not re:IsActiveType(TYPE_MONSTER) then return end
e:GetHandler():RegisterFlagEffect(101003135,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1)
end
function c101003035.aclimit4(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
e:GetHandler():ResetFlagEffect(101003135)
end
function c101003035.econ2(e)
local g=Duel.GetMatchingGroup(c101003035.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil)
local ct=g:GetClassCount(c101003035.typecount)
return e:GetHandler():GetFlagEffect(101003135)<ct
end
function c101003035.elimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
end
--オーバーテクス・ゴアトルス
--Overtex Coatls
--Script by nekrozar
function c101003036.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c101003036.sprcon)
e2:SetOperation(c101003036.sprop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101003036,0))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c101003036.negcon)
e3:SetTarget(c101003036.negtg)
e3:SetOperation(c101003036.negop)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101003036,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,101003036)
e4:SetCondition(c101003036.thcon)
e4:SetTarget(c101003036.thtg)
e4:SetOperation(c101003036.thop)
c:RegisterEffect(e4)
end
function c101003036.sprfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) not c:IsAbleToDeckOrExtraAsCost()
end
function c101003036.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101003036.sprfilter,tp,LOCATION_REMOVED,0,5,nil)
end
function c101003036.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101003036.sprfilter,tp,LOCATION_REMOVED,0,5,5,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c101003036.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c101003036.desfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_DINOSAUR)
end
function c101003036.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101003036.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c101003036.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectMatchingCard(tp,c101003036.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if g1:GetCount()>0 and Duel.Destroy(g1,REASON_EFFECT)~=0 then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
function c101003036.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c101003036.thfilter(c)
return c:IsSetCard(0x20e) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c101003036.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101003036.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101003036.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101003036.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ベクター・スケア・デーモン
--Vector Square Archfiend
--Script by nekrozar
function c101003040.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_CYBERSE),2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003040,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(aux.bdogcon)
e1:SetCost(c4709881.spcost)
e1:SetTarget(c101003040.sptg)
e1:SetOperation(c101003040.spop)
c:RegisterEffect(e1)
end
function c101003040.cfilter(c,tp,g,zone)
return g:IsContains(c) and (Duel.CheckLocation(c:GetControler(),LOCATION_MZONE,c:GetSequence(),true)
or Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0)
end
function c101003040.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
local zone=bit.rshift(c:GetLinkedZone(),16)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101003040.cfilter,1,nil,tp,lg,zone) end
local g=Duel.SelectReleaseGroup(tp,c101003040.cfilter,1,1,nil,tp,lg,zone)
Duel.Release(g,REASON_COST)
end
function c101003040.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local zone1=bit.band(c:GetLinkedZone(),0x1f)
local zone2=bit.rshift(c:GetLinkedZone(),16)
if chk==0 then return c:GetLinkedZone()~=0
and (bc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone1,true))
or (bc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp,zone2)) end
Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,0)
end
function c101003040.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:GetLinkedZone()~=0 and tc:IsRelateToEffect(e) then
local zone1=bit.band(c:GetLinkedZone(),0x1f)
local zone2=bit.rshift(c:GetLinkedZone(),16)
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone1)
and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp,zone2) or Duel.SelectYesNo(tp,aux.Stringid(101003040,1))) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone1)
else
if Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP,zone2)~=0
and c:IsRelateToBattle() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
end
end
end
end
--リカバリー・ソーサラー
--Recovery Sorcerer
--Script by nekrozar
function c101003042.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_CYBERSE),2,2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003042,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101003042)
e1:SetTarget(c101003042.sptg)
e1:SetOperation(c101003042.spop)
c:RegisterEffect(e1)
end
function c101003042.spfilter(c,e,tp,tid)
return c:GetTurnID()==tid and bit.band(c:GetReason(),REASON_DESTROY)~=0 and c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101003042.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tid=Duel.GetTurnCount()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101003042.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101003042.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101003042.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101003042.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCountLimit(1)
e3:SetCondition(c101003042.descon)
e3:SetOperation(c101003042.desop)
e3:SetLabelObject(tc)
Duel.RegisterEffect(e3,tp)
tc:RegisterFlagEffect(101003042,RESET_EVENT+0x1fe0000,0,1)
Duel.SpecialSummonComplete()
end
end
function c101003042.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(101003042)==0 then
e:Reset()
return false
end
return true
end
function c101003042.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
--セキュア・ガードナー
--Security Gardna
--Script by nekrozar
function c101003043.initial_effect(c)
c:SetUniqueOnField(1,0,101003043)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c101003043.matfilter,1,1)
--cannot link material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
--change damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c101003043.regop)
c:RegisterEffect(e2)
--damage reduce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,0)
e3:SetValue(c101003043.damval2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e4:SetCondition(c101003043.damcon)
c:RegisterEffect(e4)
end
function c101003043.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c101003043.damval1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c101003043.matfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsLinkType(TYPE_LINK)
end
function c101003043.damval1(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0
else return val end
end
function c101003043.damval2(e,re,val,r,rp,rc)
local c=e:GetHandler()
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 and c:GetFlagEffect(101003043)==0 then
c:RegisterFlagEffect(101003043,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
return 0
end
return val
end
function c101003043.damcon(e)
return e:GetHandler():GetFlagEffect(101003043)==0
end
--鎖龍蛇-スカルデット
--Skulldeat, the Chained Dracoserpent
--Script by nekrozar
function c101003048.initial_effect(c)
--link summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c101003048.lkcon)
e1:SetOperation(c101003048.lkop)
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c101003048.regcon)
e2:SetOperation(c101003048.regop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101003048,2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c101003048.drcon)
e3:SetTarget(c101003048.drtg)
e3:SetOperation(c101003048.drop)
c:RegisterEffect(e3)
end
function c101003048.matfilter(c,lc,tp)
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc)
end
function c101003048.lkcheck(c,sg)
return sg:FilterCount(c101003048.lkcheck2,c,c)+1==sg:GetCount()
end
function c101003048.lkcheck2(c,mc)
return not c:IsCode(mc:IsCode())
end
function c101003048.lkgoal(c,tp,lc,ct,sg)
return sg:GetCount()>1 and sg:CheckWithSumEqual(aux.GetLinkCount,lc:GetLink(),ct,ct)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:IsExists(c101003048.lkcheck,1,nil,sg)
end
function c101003048.lkselect(c,tp,lc,ct,mg,sg)
sg:AddCard(c)
ct=ct+1
local res=c101003048.lkgoal(c,tp,lc,ct,sg) or mg:IsExists(c101003048.lkselect,1,sg,tp,lc,ct,mg,sg)
sg:RemoveCard(c)
return res
end
function c101003048.lkcon(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c101003048.matfilter,tp,LOCATION_MZONE,0,nil,c,tp)
local sg=Group.CreateGroup()
return mg:IsExists(c101003048.lkselect,1,nil,tp,c,0,mg,sg)
end
function c101003048.lkop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c101003048.matfilter,tp,LOCATION_MZONE,0,nil,c,tp)
local sg=Group.CreateGroup()
for i=0,98 do
local cg=mg:Filter(c101003048.lkselect,sg,tp,c,i,mg,sg)
if cg:GetCount()==0 then break end
local minct=1
if c101003048.lkgoal(c,tp,c,i,sg) then
if not Duel.SelectYesNo(tp,210) then break end
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=cg:Select(tp,minct,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
end
c:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_LINK)
end
function c101003048.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c101003048.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetMaterialCount()>=2 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101003048,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c101003048.atkcon)
e1:SetOperation(c101003048.atkop)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101003048,3))
end
if c:GetMaterialCount()>=3 then
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101003048,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c101003048.sptg)
e3:SetOperation(c101003048.spop)
e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3)
c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101003048,4))
end
end
function c101003048.cfilter(c,e,g)
return c:IsFaceup() and g:IsContains(c) and (not e or c:IsRelateToEffect(e))
end
function c101003048.atkcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return lg and eg:IsExists(c101003048.cfilter,1,nil,nil,lg)
end
function c101003048.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
if not lg then return end
local g=eg:Filter(c101003048.cfilter,nil,e,g)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c101003048.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101003048.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101003048.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101003048.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,c101003048.spfilter,tp,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
function c101003048.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK) and c:GetMaterialCount()==4
end
function c101003048.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,4) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(4)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,4)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,3)
end
function c101003048.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==4 then
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:Select(p,3,3,nil)
Duel.ConfirmCards(1-p,sg)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
Duel.SortDecktop(p,p,3)
for i=1,3 do
local mg=Duel.GetDecktopGroup(p,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
--ドリトル・キメラ
--Do-Little Chimera
--Scripted by Eerie Code
function c101003050.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),2,2)
c:EnableReviveLimit()
--atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE))
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER))
e3:SetValue(-400)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101003050,0))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(1,101003050)
e5:SetCondition(c101003050.thcon)
e5:SetTarget(c101003050.thtg)
e5:SetOperation(c101003050.thop)
c:RegisterEffect(e5)
end
function c101003050.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c101003050.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c101003050.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101003050.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101003050.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101003050.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101003050.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
--リンケージ・ホール
--Linkage Hole
--Scripted by Eerie Code
function c101003051.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101003051)
e1:SetCondition(c101003051.condition)
e1:SetTarget(c101003051.target)
e1:SetOperation(c101003051.activate)
c:RegisterEffect(e1)
end
function c101003051.cfilter(c)
return c:IsFaceup() and c:IsLinkAbove(4)
end
function c101003051.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101003051.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101003051.filter(c)
return c:IsFaceup() and c:IsLinkAbove(3)
end
function c101003051.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c101003051.filter,tp,LOCATION_MZONE,0,nil)
local dg=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
if chk==0 then return ct>0 and dg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0)
end
function c101003051.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c101003051.filter,tp,LOCATION_MZONE,0,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,ct,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--リボルブート・セクター
--Revolve Boot Sector
--Scripted by Eerie Code
function c101003053.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--def up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x102))
e2:SetValue(300)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_ATTACK)
c:RegisterEffect(e3)
--special summon (hand)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101003053,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,101003053)
e4:SetTarget(c101003053.sptg1)
e4:SetOperation(c101003053.spop1)
c:RegisterEffect(e4)
--special summon (GY)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101003053,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_FZONE)
e5:SetCountLimit(1,101003053)
e5:SetCondition(c101003053.spcon)
e5:SetTarget(c101003053.sptg2)
e5:SetOperation(c101003053.spop2)
c:RegisterEffect(e5)
end
function c101003053.spfilter(c,e,tp)
return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101003053.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101003053.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101003053.spop1(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c101003053.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if ft<1 or g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode())
if ft>1 and g:GetCount()>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.SelectYesNo(tp,aux.Stringid(101003053,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=g:Select(tp,1,1,nil)
sg:AddCard(sg2:GetFirst())
end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101003053.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
end
function c101003053.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101003053.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c101003053.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101003053.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<1 or ct<1 or g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode())
if not Duel.IsPlayerAffectedByEffect(tp,59822133) then
ft=ft-1
ct=ct-1
while ft>0 and ct>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101003053,2)) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=g:Select(tp,1,1,nil)
sg:AddCard(sg2:GetFirst())
g:Remove(Card.IsCode,nil,sg2:GetFirst():GetCode())
ft=ft-1
ct=ct-1
end
end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
--ガーディアンの力
--Power of the Guardian
--Script by nekrozar
function c101003060.initial_effect(c)
c:EnableCounterPermit(0x1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c101003060.target)
e1:SetOperation(c101003060.operation)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101003060,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c101003060.ctcon)
e2:SetTarget(c101003060.cttg)
e2:SetOperation(c101003060.ctop)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c101003060.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--destroy replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetTarget(c101003060.desreptg)
e5:SetOperation(c101003060.desrepop)
c:RegisterEffect(e5)
--Equip limit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetCode(EFFECT_EQUIP_LIMIT)
e6:SetValue(1)
c:RegisterEffect(e6)
end
function c101003060.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101003060.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c101003060.ctcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
return Duel.GetAttacker()==tc or Duel.GetAttackTarget()==tc
end
function c101003060.cttg(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 c101003060.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x1,1)
end
end
function c101003060.atkval(e,c)
return e:GetHandler():GetCounter(0x1)*500
end
function c101003060.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tg=c:GetEquipTarget()
if chk==0 then return not c:IsStatus(STATUS_DESTROY_CONFIRMED)
and tg and tg:IsReason(REASON_BATTLE+REASON_EFFECT)
and Duel.IsCanRemoveCounter(tp,1,0,0x1,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c101003060.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.RemoveCounter(tp,1,0,0x1,1,REASON_EFFECT+REASON_REPLACE)
end
--局所的ハリケーン
--Localized Trunade
--Script by nekrozar
function c101003062.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101003062.target)
e1:SetOperation(c101003062.activate)
c:RegisterEffect(e1)
end
function c101003062.filter(c)
return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101003062.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c101003062.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(c101003062.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c101003062.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c101003062.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
--身分転換
--Role Reversal
--Script by nekrozar
function c101003065.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101003065.target)
e1:SetOperation(c101003065.activate)
c:RegisterEffect(e1)
end
function c101003065.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)>Duel.GetLP(1-tp) end
end
function c101003065.activate(e,tp,eg,ep,ev,re,r,rp)
local lp1=Duel.GetLP(tp)
local lp2=Duel.GetLP(1-tp)
if lp1>lp2 then
Duel.SetLP(tp,lp2)
Duel.SetLP(1-tp,lp1)
end
end
--ヴァレル・レフリジェレーション
--Borrel Refrigeration
--Scripted by Eerie Code
function c101003068.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c101003068.cost)
e1:SetTarget(c101003068.target)
e1:SetOperation(c101003068.activate)
c:RegisterEffect(e1)
end
function c101003068.cfilter(c)
return c:IsLevelBelow(3) and c:IsSetCard(0x102)
end
function c101003068.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101003068.cfilter,1,nil) end
local rg=Duel.SelectReleaseGroup(tp,c101003068.cfilter,1,1,nil)
Duel.Release(rg,REASON_COST)
end
function c101003068.filter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x20d)
end
function c101003068.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101003068.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101003068.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101003068.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101003068.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_LINK) and c:IsSetCard(0x20d)
end
function c101003068.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
c:CancelToGrave()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c101003068.eqlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101003068,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetCountLimit(1)
e2:SetTarget(c101003068.indtg)
e2:SetOperation(c101003068.intop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c101003068.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
end
function c101003068.eftg(e,c)
return e:GetHandler():GetEquipTarget()==c
end
function c101003068.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101003068.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
end
--デーモンの呼び声
--Call of the Archfiend
--Scripted by Eerie Code
function c101003075.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c101003075.target)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101003075,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c101003075.cost)
e2:SetTarget(c101003075.sptg)
e2:SetOperation(c101003075.spop)
c:RegisterEffect(e2)
end
function c101003075.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,101003075)==0 end
Duel.RegisterFlagEffect(tp,101003075,RESET_PHASE+PHASE_END,0,1)
end
function c101003075.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c101003075.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chk==0 then return true end
local b1=c101003075.cost(e,tp,eg,ep,ev,re,r,rp,0)
and c101003075.sptg(e,tp,eg,ep,ev,re,r,rp,0)
if b1 and Duel.SelectYesNo(tp,94) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(c101003075.spop)
c101003075.cost(e,tp,eg,ep,ev,re,r,rp,1)
c101003075.sptg(e,tp,eg,ep,ev,re,r,rp,1)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c101003075.spfilter(c,e,tp)
return c:IsRace(RACE_FIEND) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101003075.cfilter(c)
return c:IsRace(RACE_FIEND)
end
function c101003075.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101003075.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101003075.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c101003075.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101003075.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
end
function c101003075.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.DiscardHand(tp,c101003075.cfilter,1,1,REASON_EFFECT,nil)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not tc:IsRelateToEffect(e) then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--一撃離脱
--Parthian Shot
--Script by nekrozar
function c101003079.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_BATTLE_END)
e1:SetCondition(c101003079.condition)
e1:SetOperation(c101003079.activate)
c:RegisterEffect(e1)
end
function c101003079.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE
end
function c101003079.activate(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
--誤爆
--Script by nekrozar
function c101003080.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,0x1e0)
e1:SetTarget(c101003080.target)
e1:SetOperation(c101003080.activate)
c:RegisterEffect(e1)
end
function c101003080.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101003080.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
...@@ -54,7 +54,7 @@ function c101003102.spfilter(c,e,tp) ...@@ -54,7 +54,7 @@ function c101003102.spfilter(c,e,tp)
end end
function c101003102.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101003102.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDestructable() and Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return e:GetHandler():IsDestructable() and Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingTarget(c101003022.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingTarget(c101003102.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
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