Commit 6b9a04d5 authored by mercury233's avatar mercury233

update scripts

parent 822c928b
...@@ -57,7 +57,7 @@ end ...@@ -57,7 +57,7 @@ end
function c100227032.xop(e,tp,eg,ep,ev,re,r,rp) function c100227032.xop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
if mg:GetCount()>0 then Duel.Overlay(tc,mg) end if mg:GetCount()>0 then Duel.Overlay(tc,mg) end
Duel.Overlay(tc,Group.FromCards(c)) Duel.Overlay(tc,Group.FromCards(c))
......
...@@ -35,7 +35,7 @@ function c100228001.initial_effect(c) ...@@ -35,7 +35,7 @@ function c100228001.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100228001.ffilter(c,fc,sub,mg,sg) function c100228001.ffilter(c,fc,sub,mg,sg)
return c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and (sg==nil or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())) return c:IsControler(fc:GetControler()) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end end
function c100228001.cfilter(c,fc) function c100228001.cfilter(c,fc)
return c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(fc) return c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(fc)
......
--アストラグールズ
--Astra Ghouls
--Script by nekrozar
function c100231007.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100231007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c100231007.sptg)
e1:SetOperation(c100231007.spop)
c:RegisterEffect(e1)
--dice
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100231007,1))
e2:SetCategory(CATEGORY_DICE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c100231007.dctg)
e2:SetOperation(c100231007.dcop)
c:RegisterEffect(e2)
end
function c100231007.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100231007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100231007.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100231007.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100231007.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100231007.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_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(100231007,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c100231007.rmcon)
e3:SetOperation(c100231007.rmop)
Duel.RegisterEffect(e3,tp)
end
Duel.SpecialSummonComplete()
end
function c100231007.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(100231007)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c100231007.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetLabelObject(),POS_FACEUP,REASON_EFFECT)
end
function c100231007.dcfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end
function c100231007.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100231007.dcfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c100231007.dcop(e,tp,eg,ep,ev,re,r,rp)
local dc=Duel.TossDice(tp,1)
local g=Duel.GetMatchingGroup(c100231007.dcfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL)
e1:SetValue(dc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--レイン・ボーズ
--Rain Bozu
--Script by nekrozar
function c100231008.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100231008,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCondition(c100231008.atkcon1)
e1:SetTarget(c100231008.atktg1)
e1:SetOperation(c100231008.atkop1)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100231008.atkcon2)
e2:SetValue(c100231008.atkval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetCondition(c100231008.defcon)
c:RegisterEffect(e3)
--to defense
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c100231008.poscon)
e4:SetOperation(c100231008.posop)
c:RegisterEffect(e4)
--pendulum
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(100231008,2))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED)
e5:SetCondition(c100231008.pencon)
e5:SetTarget(c100231008.pentg)
e5:SetOperation(c100231008.penop)
c:RegisterEffect(e5)
end
function c100231008.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return math.abs(Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA))>0
end
function c100231008.atktg1(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 c100231008.atkop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
local atk=math.abs(Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA))
if tc:IsFaceup() and tc:IsRelateToEffect(e) and atk>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk*100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c100231008.atkcon2(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
function c100231008.atkval(e,c)
local tp=c:GetControler()
return math.abs(Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA))*200
end
function c100231008.defcon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end
function c100231008.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttackedCount()>0
end
function c100231008.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsAttackPos() then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end
end
function c100231008.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c100231008.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c100231008.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--ベルキャットファイター
--Script by nekrozar
function c100231009.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,3,c100231009.lcheck)
c:EnableReviveLimit()
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100231009,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(aux.bdocon)
e1:SetTarget(c100231009.tktg)
e1:SetOperation(c100231009.tkop)
c:RegisterEffect(e1)
end
function c100231009.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_TOKEN)
end
function c100231009.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,100231109,0,0x4011,2000,2000,4,RACE_MACHINE,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c100231009.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,100231109,0,0x4011,2000,2000,4,RACE_MACHINE,ATTRIBUTE_WIND) then return end
local token=Duel.CreateToken(tp,100231109)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
--リンク・パーティー
--Link Party
--Script by nekrozar
function c100231010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER+CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100231010+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100231010.target)
e1:SetOperation(c100231010.activate)
c:RegisterEffect(e1)
end
function c100231010.filter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c100231010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100231010.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c100231010.spfilter(c,e,tp)
return c:IsAttackAbove(2500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100231010.desfilter(c)
return c:IsFaceup() and c:IsAttackBelow(3000)
end
function c100231010.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroup(c100231010.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetAttribute)
local g1=Duel.GetMatchingGroup(c100231010.filter,tp,LOCATION_MZONE,0,nil)
if ct==1 and g1:GetCount()>0 then
local tc1=g1:GetFirst()
while tc1 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1)
tc1=g1:GetNext()
end
end
local g2=Duel.GetMatchingGroup(c100231010.filter,tp,0,LOCATION_MZONE,nil)
if ct==2 and g2:GetCount()>0 then
Duel.BreakEffect()
local tc2=g2:GetFirst()
while tc2 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)
tc2:RegisterEffect(e1)
tc2=g2:GetNext()
end
end
if ct==3 then
Duel.BreakEffect()
Duel.Recover(tp,1500,REASON_EFFECT)
end
if ct==4 then
Duel.BreakEffect()
Duel.Damage(1-tp,2000,REASON_EFFECT)
end
local g3=Duel.GetMatchingGroup(c100231010.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if ct==5 and g3:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g3:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local g4=Duel.GetMatchingGroup(c100231010.desfilter,tp,0,LOCATION_MZONE,nil)
if ct==6 and g4:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(g4,REASON_EFFECT)
end
end
--ペア・ルック
--Script by nekrozar
function c100231011.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100231011.target)
e1:SetOperation(c100231011.activate)
c:RegisterEffect(e1)
end
function c100231011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g1=Duel.GetDecktopGroup(tp,1)
local tc1=g1:GetFirst()
local g2=Duel.GetDecktopGroup(1-tp,1)
local tc2=g2:GetFirst()
return tc1 and tc2 and tc1:IsAbleToRemove() and tc2:IsAbleToRemove() and tc1:IsAbleToHand() and tc2:IsAbleToHand()
end
end
function c100231011.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 or Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end
Duel.ConfirmDecktop(tp,1)
Duel.ConfirmDecktop(1-tp,1)
local g1=Duel.GetDecktopGroup(tp,1)
local tc1=g1:GetFirst()
local g2=Duel.GetDecktopGroup(1-tp,1)
local tc2=g2:GetFirst()
if bit.band(tc1:GetType(),0x7)==bit.band(tc2:GetType(),0x7) then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc1,nil,REASON_EFFECT)
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
else
Duel.DisableShuffleCheck()
Duel.Remove(tc1,POS_FACEUP,REASON_EFFECT)
Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)
end
end
...@@ -55,7 +55,7 @@ function c100334041.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c100334041.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100334041.atkcon) e2:SetCondition(c100334041.atkcon)
e2:SetValue(-400) e2:SetValue(-400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
......
--サイバネティック・レボリューション
--Cybernetic Revolution
--Script by dest
function c100409016.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100409016+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100409016.cost)
e1:SetTarget(c100409016.target)
e1:SetOperation(c100409016.activate)
c:RegisterEffect(e1)
end
function c100409016.cfilter(c,tp)
return c:IsCode(70095154) and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
function c100409016.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100409016.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c100409016.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c100409016.filter(c,e,tp)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0x1093) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100409016.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100409016.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100409016.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c100409016.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
tc:RegisterFlagEffect(100409016,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCondition(c100409016.descon)
e2:SetOperation(c100409016.desop)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetCountLimit(1)
e2:SetLabel(Duel.GetTurnCount())
e2:SetLabelObject(tc)
Duel.RegisterEffect(e2,tp)
Duel.SpecialSummonComplete()
end
end
function c100409016.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(100409016)~=0
end
function c100409016.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
...@@ -72,6 +72,7 @@ function c100409024.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,6 +72,7 @@ function c100409024.sumop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOperation(c100409024.tgop) e1:SetOperation(c100409024.tgop)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect() Duel.BreakEffect()
--summon --summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
--ブラック・バード・クローズ
--Black Bird Close
--Script by dest
function c100409027.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c100409027.condition)
e1:SetCost(c100409027.cost)
e1:SetTarget(c100409027.target)
e1:SetOperation(c100409027.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c100409027.handcon)
c:RegisterEffect(e2)
end
function c100409027.condition(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep~=tp and loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c100409027.discfilter(c)
return c:IsFaceup() and c:IsSetCard(0x33) and c:IsAbleToGraveAsCost()
end
function c100409027.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100409027.discfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100409027.discfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c100409027.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 c100409027.sfilter(c,e,tp)
return c:IsCode(9012916) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100409027.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)
and Duel.Destroy(eg,REASON_EFFECT)~=0 then
local sc=Duel.GetFirstMatchingCard(c100409027.sfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if sc and Duel.GetLocationCountFromEx(tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(100409027,0)) then
Duel.BreakEffect()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c100409027.cfilter(c)
return c:IsFaceup() and ((c:IsSetCard(0x33) and c:IsType(TYPE_SYNCHRO)) or c:IsCode(9012916))
end
function c100409027.handcon(e)
return Duel.IsExistingMatchingCard(c100409027.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
...@@ -36,7 +36,7 @@ function c100409038.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,7 +36,7 @@ function c100409038.target(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c100409038.descon) e1:SetCondition(c100409038.descon)
e1:SetOperation(c100409038.desop) e1:SetOperation(c100409038.desop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
c:SetTurnCounter(0) c:SetTurnCounter(0)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if c100409038.effcost(e,tp,eg,ep,ev,re,r,rp,0) if c100409038.effcost(e,tp,eg,ep,ev,re,r,rp,0)
...@@ -61,23 +61,23 @@ function c100409038.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,23 +61,23 @@ function c100409038.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c100409038.effcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100409038.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(100409038)==0 end if chk==0 then return e:GetHandler():GetFlagEffect(100409038)==0 end
e:GetHandler():RegisterFlagEffect(100409038,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(100409038,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
function c100409038.costfilter1(c,e,tp) function c100409038.costfilter1(c,e,tp)
return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and Duel.GetMZoneCount(tp,c)>0 return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c100409038.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalCode()) and Duel.IsExistingMatchingCard(c100409038.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalCode())
end end
function c100409038.spfilter1(c,e,tp,code) function c100409038.spfilter1(c,e,tp,code)
return c:IsSetCard(0x55) and c:GetOriginalCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x55) and c:GetOriginalCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c100409038.costfilter2(c) function c100409038.costfilter2(c)
return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsAbleToGraveAsCost()
end end
function c100409038.thfilter(c) function c100409038.thfilter(c)
return c:IsSetCard(0x55) and not c:IsCode(100409038) and c:IsAbleToHand() return c:IsSetCard(0x55) and not c:IsCode(100409038) and c:IsAbleToHand()
end end
function c100409038.costfilter3(c,e,tp) function c100409038.costfilter3(c,e,tp)
return c:IsFaceup() and c:IsCode(93717133) and Duel.GetMZoneCount(tp,c)>0 return c:IsFaceup() and c:IsCode(93717133) and Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c100409038.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalCode()) and Duel.IsExistingMatchingCard(c100409038.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalCode())
end end
function c100409038.spfilter2(c,e,tp,code) function c100409038.spfilter2(c,e,tp,code)
......
...@@ -58,7 +58,7 @@ function c101004087.spcon(e,c) ...@@ -58,7 +58,7 @@ function c101004087.spcon(e,c)
local tp=c:GetControler() local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or Duel.IsExistingMatchingCard(c101004087.spfilter1,tp,LOCATION_MZONE,0,1,nil) then return false end or Duel.IsExistingMatchingCard(c101004087.spfilter1,tp,LOCATION_MZONE,0,1,nil) then return false end
return Duel.IsExistingMatchingCard(c101004087.spfilter2,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c101004087.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function c101004087.atkval(e,c) function c101004087.atkval(e,c)
return c:GetLevel()*300 return c:GetLevel()*300
...@@ -75,7 +75,7 @@ function c101004087.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function c101004087.lvop(e,tp,eg,ep,ev,re,r,rp)
e4:SetValue(1) e4:SetValue(1)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetReset(RESET_EVENT+0x1ff0000) e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
end end
...@@ -94,7 +94,7 @@ function c101004087.rdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,7 +94,7 @@ function c101004087.rdop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-3) e1:SetValue(-3)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
......
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