Commit aeba5971 authored by mercury233's avatar mercury233

update scripts

parent 45ee2de1
--ハーピィ・コンダクター
--Harpie Conductor
--Script by nekrozar
function c100235006.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_WIND),2,2)
c:EnableReviveLimit()
--change name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(76812113)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100235006)
e2:SetTarget(c100235006.desreptg)
e2:SetValue(c100235006.desrepval)
e2:SetOperation(c100235006.desrepop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100235006,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_HAND)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100235106)
e3:SetCondition(c100235006.thcon)
e3:SetTarget(c100235006.thtg)
e3:SetOperation(c100235006.thop)
c:RegisterEffect(e3)
end
function c100235006.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x64)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and not c:IsReason(REASON_REPLACE)
end
function c100235006.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsType(TYPE_SPELL+TYPE_TRAP)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end
function c100235006.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c100235006.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c100235006.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c100235006.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
end
return false
end
function c100235006.desrepval(e,c)
return c100235006.repfilter(c,e:GetHandlerPlayer())
end
function c100235006.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end
function c100235006.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsControler(tp) and c:IsSetCard(0x64)
end
function c100235006.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100235006.cfilter,1,nil,tp)
end
function c100235006.thfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToHand()
end
function c100235006.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c100235006.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100235006.thfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c100235006.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100235006.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
--サラマングレイト・レイジ
--Salamangreat Rage
--Script by nekrozar
function c100335032.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100335032.target)
e1:SetOperation(c100335032.activate)
c:RegisterEffect(e1)
end
function c100335032.costfilter(c,mc,tp)
return c:IsSetCard(0x119) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost()
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,mc))
end
function c100335032.filter(c)
if not c:IsSummonType(SUMMON_TYPE_LINK) then return false end
local mat=c:GetMaterial()
return c:IsFaceup() and c:IsSetCard(0x119) and mat:IsExists(Card.IsLinkCode,1,nil,c:GetCode())
end
function c100335032.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
local b1=Duel.IsExistingMatchingCard(c100335032.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e:GetHandler(),tp)
local b2=Duel.IsExistingTarget(c100335032.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(100335032,0),aux.Stringid(100335032,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(100335032,0))
else
op=Duel.SelectOption(tp,aux.Stringid(100335032,1))+1
end
e:SetLabel(op)
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100335032.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100335032.filter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetProperty(0)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function c100335032.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
else
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,tc:GetLink(),nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
......@@ -33,7 +33,7 @@ function c100411004.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c100411004.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)==0 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
......
......@@ -44,13 +44,13 @@ function c100411005.spfilter3(c,e,tp,code1,code2)
and c:GetOriginalCode()~=code1 and c:GetOriginalCode()~=code2
end
function c100411005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100411005.tdfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c100411005.tdfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c100411005.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=Duel.SelectMatchingCard(tp,c100411005.tdfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,g)
local dg=Duel.SelectMatchingCard(tp,c100411005.tdfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp,g)
if #dg>0 and Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingMatchingCard(c100411005.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp)
......@@ -63,14 +63,16 @@ function c100411005.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
Duel.SpecialSummon(sg1,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c100411005.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c100411005.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c100411005.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WIND)
......@@ -83,7 +85,7 @@ function c100411005.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x64) and c:IsAbleToHand()
end
function c100411005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100411005.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100411005.thop(e,tp,eg,ep,ev,re,r,rp)
......
--荘厳なる機械天使
--Majestic Machine Angel
--Script by nekrozar
function c100411016.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100411016+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c100411016.condition)
e1:SetCost(c100411016.cost)
e1:SetTarget(c100411016.target)
e1:SetOperation(c100411016.activate)
c:RegisterEffect(e1)
end
function c100411016.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c100411016.cfilter(c)
return c:IsSetCard(0x2093) and c:IsType(TYPE_RITUAL) and c:IsLevelAbove(1)
and Duel.IsExistingTarget(c100411016.filter,tp,LOCATION_MZONE,0,1,c)
end
function c100411016.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY)
end
function c100411016.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c100411016.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroupEx(tp,c100411016.cfilter,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetLevel())
Duel.Release(g,REASON_COST)
end
function c100411016.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100411016.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100411016.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100411016.activate(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(lv*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetOperation(c100411016.disop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_BE_BATTLE_TARGET)
sc:RegisterEffect(e4)
end
end
function c100411016.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
bc:RegisterEffect(e2)
end
end
--月光舞剣虎姫
--Script by nekrozar
function c100411045.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xdf),3,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--atkup
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:SetValue(c100411045.atkval)
c:RegisterEffect(e2)
--cannot be targeted
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100411045,0))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,100411045)
e4:SetCondition(aux.exccon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c100411045.atktg)
e4:SetOperation(c100411045.atkop)
c:RegisterEffect(e4)
end
function c100411045.atkfilter1(c)
return c:IsRace(RACE_BEASTWARRIOR) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c100411045.atkval(e,c)
return Duel.GetMatchingGroupCount(c100411045.atkfilter1,c:GetControler(),LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil)*200
end
function c100411045.atkfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function c100411045.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100411045.atkfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100411045.atkfilter2,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100411045.atkfilter2,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100411045.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_UPDATE_ATTACK)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--月光翠鳥
--Script by nekrozar
function c100411046.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100411046,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100411046)
e1:SetTarget(c100411046.drtg)
e1:SetOperation(c100411046.drop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special suumon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100411046,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,100411146)
e3:SetCondition(c100411046.spcon)
e3:SetTarget(c100411046.sptg)
e3:SetOperation(c100411046.spop)
c:RegisterEffect(e3)
end
function c100411046.tgfilter(c)
return c:IsSetCard(0xdf) and c:IsAbleToGrave()
end
function c100411046.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingMatchingCard(c100411046.tgfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c100411046.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100411046.tgfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c100411046.spfilter(c,e,tp)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsLevelBelow(4) and c:IsSetCard(0xdf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(100411046)
end
function c100411046.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c100411046.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c100411046.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100411046.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100411046.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100411046.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)
end
Duel.SpecialSummonComplete()
end
--月光黄鼬
--Script by nekrozar
function c100411047.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100411047,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,100411047)
e1:SetTarget(c100411047.sptg)
e1:SetOperation(c100411047.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100411047,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100411147)
e2:SetCondition(c100411047.thcon)
e2:SetTarget(c100411047.thtg)
e2:SetOperation(c100411047.thop)
c:RegisterEffect(e2)
end
function c100411047.thfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0xdf) and not c:IsCode(100411047) and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)
end
function c100411047.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c100411047.thfilter1(chkc,tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and Duel.IsExistingTarget(c100411047.thfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c100411047.thfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100411047.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
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+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
function c100411047.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c100411047.thfilter2(c)
return c:IsSetCard(0xdf) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100411047.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100411047.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100411047.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100411047.thfilter2,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
--月光融合
--Script by nekrozar
function c100411048.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100411048+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100411048.target)
e1:SetOperation(c100411048.activate)
c:RegisterEffect(e1)
end
function c100411048.filter0(c)
return c:IsSetCard(0xdf) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c100411048.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c100411048.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xdf) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c100411048.cfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c100411048.fcheck(tp,sg,fc)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)<=1
end
function c100411048.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
if Duel.IsExistingMatchingCard(c100411048.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local mg2=Duel.GetMatchingGroup(c100411048.filter0,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
Auxiliary.FCheckAdditional=c100411048.fcheck
end
end
local res=Duel.IsExistingMatchingCard(c100411048.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c100411048.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100411048.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c100411048.filter1,nil,e)
local exmat=false
if Duel.IsExistingMatchingCard(c100411048.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local mg2=Duel.GetMatchingGroup(c100411048.filter0,tp,LOCATION_DECK,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
exmat=true
end
end
if exmat then Auxiliary.FCheckAdditional=c100411048.fcheck end
local sg1=Duel.GetMatchingGroup(c100411048.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c100411048.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
mg1:RemoveCard(tc)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if exmat then Auxiliary.FCheckAdditional=c100411048.fcheck end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--月光小夜曲舞踊
--Script by nekrozar
function c100411049.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100411049,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100411049,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetTarget(c100411049.tktg)
e2:SetOperation(c100411049.tkop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_SZONE)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100411049,2))
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_GRAVE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1,100411049)
e4:SetCondition(c100411049.spcon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c100411049.sptg)
e4:SetOperation(c100411049.spop)
c:RegisterEffect(e4)
end
function c100411049.atkfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsControler(tp) and c:IsCanBeEffectTarget(e)
end
function c100411049.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c100411049.atkfilter(chkc,e,tp) end
if chk==0 then return eg:IsExists(c100411049.atkfilter,1,nil,e,tp)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,100411149,0xdf,0x4011,0,0,1,RACE_BEASTWARRIOR,ATTRIBUTE_DARK,POS_FACEUP,1-tp) end
if eg:GetCount()==1 then
Duel.SetTargetCard(eg)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=eg:FilterSelect(tp,c100411049.atkfilter,1,1,nil,e,tp)
Duel.SetTargetCard(g)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
end
function c100411049.tkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,100411149,0xdf,0x4011,0,0,1,RACE_BEASTWARRIOR,ATTRIBUTE_DARK,POS_FACEUP,1-tp) then
local token=Duel.CreateToken(tp,100411149)
Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP)
end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c100411049.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c100411049.spfilter(c,e,tp)
return c:IsSetCard(0xdf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100411049.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c100411049.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100411049.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100411049.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
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