Commit e2964cfb authored by mercury233's avatar mercury233

add scripts

parent eac1e2ed
--深海のコレペティ
--
--Script by JustFish
function c100200199.initial_effect(c)
aux.AddMaterialCodeList(c,78868119)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,78868119),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200199,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetCost(c100200199.atkcost)
e1:SetOperation(c100200199.atkop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200199,1))
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,100200199)
e2:SetCondition(c100200199.spcon)
e2:SetTarget(c100200199.sptg)
e2:SetOperation(c100200199.spop)
c:RegisterEffect(e2)
end
if Auxiliary.AddMaterialCodeList==nil then
function Auxiliary.AddMaterialCodeList(c,...)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mat={}
for _,code in ipairs{...} do
mat[code]=true
end
if c.material==nil then
local mt=getmetatable(c)
mt.material=mat
end
for index,_ in pairs(mat) do
Auxiliary.AddCodeList(c,index)
end
end
end
function c100200199.costfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelBelow(4) and c:IsDiscardable()
end
function c100200199.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200199.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c100200199.costfilter,1,1,REASON_DISCARD+REASON_COST)
end
function c100200199.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c100200199.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c100200199.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelAbove(5) and not c:IsCode(100200199)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100200199.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100200199.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100200199.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100200199.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100200199.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c100200199.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100200199.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
--聖騎士の盾持ち
--Script by XyLeN
function c100278017.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278017,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100278017)
e1:SetCost(c100278017.drcost)
e1:SetTarget(c100278017.drtg)
e1:SetOperation(c100278017.drop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278017,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE+LOCATION_HAND)
e3:SetCountLimit(1,100278017)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c100278017.thtg)
e3:SetOperation(c100278017.thop)
c:RegisterEffect(e3)
end
function c100278017.cfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost()
end
function c100278017.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278017.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100278017.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100278017.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 c100278017.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
function c100278017.thfilter(c)
return c:IsLevelBelow(6) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_BEAST) and c:IsAbleToHand()
end
function c100278017.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278017.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100278017.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100278017.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
--花騎士団の駿馬
--Script by XyLeN
function c100278018.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278018,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100278018)
e1:SetTarget(c100278018.thtg)
e1:SetOperation(c100278018.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278018,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c100278018.fustg)
e3:SetOperation(c100278018.fusop)
c:RegisterEffect(e3)
end
function c100278018.thfilter(c)
return c:IsSetCard(0x107a) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end
function c100278018.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278018.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100278018.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100278018.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 c100278018.filter1(c,e)
return c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and not c:IsImmuneToEffect(e)
end
function c100278018.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function c100278018.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c100278018.filter1,nil,e)
local res=Duel.IsExistingMatchingCard(c100278018.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c100278018.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100278018.fusop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c100278018.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c100278018.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c100278018.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,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()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
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,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--聖騎士の槍持ち
--
--Script by JustFish
function c100278019.initial_effect(c)
--tuner
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278019,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100278019)
e1:SetTarget(c100278019.cntg)
e1:SetOperation(c100278019.cnop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278019,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100278019+100)
e3:SetCost(c100278019.cost)
e3:SetTarget(c100278019.target)
e3:SetOperation(c100278019.operation)
c:RegisterEffect(e3)
end
function c100278019.cnfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8) and not (c:IsCode(19642774) and c:IsType(TYPE_TUNER))
end
function c100278019.cntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100278019.cnfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100278019.cnfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100278019.cnfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100278019.cnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(19642774)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_TUNER)
tc:RegisterEffect(e2)
end
end
function c100278019.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c100278019.filter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c100278019.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278019.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100278019.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100278019.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
--ケンタウルミナ
--Script by XyLeN
function c100278020.initial_effect(c)
--fusion procedure
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c100278020.matfilter1,c100278020.matfilter2,true)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100278020)
e1:SetTarget(c100278020.sptg)
e1:SetOperation(c100278020.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278020,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,100278020+100)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100278020.negcon)
e2:SetTarget(c100278020.negtg)
e2:SetOperation(c100278020.negop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278020,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(c100278020.descon)
e3:SetTarget(c100278020.destg)
e3:SetOperation(c100278020.desop)
c:RegisterEffect(e3)
end
function c100278020.matfilter1(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR)
end
function c100278020.matfilter2(c)
return c:IsRace(RACE_BEAST)
end
function c100278020.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100278020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c100278020.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c100278020.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,aux.NecroValleyFilter(c100278020.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100278020.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return Duel.GetTurnPlayer()==tp and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c100278020.negtg(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)
end
function c100278020.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not Duel.NegateActivation(ev) then return end
if rc:IsRelateToEffect(re) and rc:IsRelateToEffect(re) and rc:IsCanTurnSet() then
rc:CancelToGrave()
Duel.ChangePosition(rc,POS_FACEDOWN)
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c100278020.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsAttribute(ATTRIBUTE_WIND) and c:GetReasonCard():IsRace(RACE_WARRIOR)
end
function c100278020.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100278020.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--エコール・ド・ゾーン
--Script by XyLeN
function c100278021.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278021,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1,100278021)
e1:SetCondition(c100278021.tkcon)
e1:SetTarget(c100278021.tktg)
e1:SetOperation(c100278021.tkop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278021,1))
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c100278021.desop)
c:RegisterEffect(e2)
end
function c100278021.tkcon(e,tp,eg,ep,ev,re,r,rp)
if #eg~=1 then return false end
local tc=eg:GetFirst()
return tc:IsSummonPlayer(Duel.GetTurnPlayer())
end
function c100278021.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=eg:GetFirst()
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c100278021.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
local p=tc:GetControler()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0
and Duel.GetLocationCount(p,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(p,100278121,0,0x4011,-2,-2,1,RACE_SPELLCASTER,ATTRIBUTE_DARK) then
local atk=tc:GetAttack()
local def=tc:GetDefense()
local token=Duel.CreateToken(tp,100278121)
Duel.SpecialSummonStep(token,0,p,p,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(def)
token:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3,true)
end
Duel.SpecialSummonComplete()
end
function c100278021.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,LOCATION_MZONE,0,nil,100278121)
Duel.Destroy(g,REASON_EFFECT)
end
--魂縛門
--Scripted by mallu11
function c100278022.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCondition(c100278022.condition)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278022,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_FZONE)
e1:SetCondition(c100278022.descon)
e1:SetTarget(c100278022.destg)
e1:SetOperation(c100278022.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
if not c100278022.global_check then
c100278022.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetOperation(c100278022.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c100278022.filter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and c:GetPreviousTypeOnField()&(TYPE_SPELL+TYPE_TRAP)~=0
and c:IsReason(REASON_EFFECT)
end
function c100278022.regop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c100278022.filter,nil)
local tc=g:GetFirst()
while tc do
if Duel.GetFlagEffect(tc:GetPreviousControler(),100278022)==0 then
Duel.RegisterFlagEffect(tc:GetPreviousControler(),100278022,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(0,100278022)>0 and Duel.GetFlagEffect(1,100278022)>0 then
break
end
tc=g:GetNext()
end
end
function c100278022.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,100278022)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c100278022.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if not (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) then return false end
if eg:GetCount()>1 then return false end
local tc=eg:GetFirst()
if not tc then return false end
e:SetLabelObject(tc)
return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:GetAttack()<Duel.GetLP(tp)
end
function c100278022.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject()
if chk==0 then return tc end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,800)
end
function c100278022.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.Damage(tp,800,REASON_EFFECT)~=0 and Duel.GetLP(tp)>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,800,REASON_EFFECT)
end
end
--ZW-天風精靈翼
--Script by XyLeN
function c100278025.initial_effect(c)
c:SetUniqueOnField(1,0,100278025)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278025,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCondition(c100278025.eqcon)
e1:SetTarget(c100278025.eqtg)
e1:SetOperation(c100278025.eqop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278025,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c100278025.atkcon)
e2:SetOperation(c100278025.atkop)
c:RegisterEffect(e2)
--remove overlay replace
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278025,2))
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c100278025.repcon)
e3:SetOperation(c100278025.repop)
c:RegisterEffect(e3)
end
function c100278025.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():CheckUniqueOnField(tp)
end
function c100278025.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107f)
end
function c100278025.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100278025.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c100278025.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c100278025.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100278025.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
c100278025.zw_equip_monster(c,tp,tc)
end
function c100278025.zw_equip_monster(c,tp,tc)
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c100278025.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
function c100278025.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c100278025.cfilter(c,tp)
return c:IsSummonPlayer(1-tp) and Duel.GetCurrentChain()>0
end
function c100278025.atkcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c100278025.cfilter,1,nil,tp)
end
function c100278025.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c100278025.repcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and re:GetHandler():GetOverlayCount()>=ev-1
and e:GetHandler():GetEquipTarget()==re:GetHandler() and e:GetHandler():IsAbleToGraveAsCost() and ep==e:GetOwnerPlayer()
end
function c100278025.repop(e,tp,eg,ep,ev,re,r,rp)
return Duel.SendtoGrave(e:GetHandler(),POS_FACEUP,REASON_COST)
end
--ZS-双頭龍賢者
--Script by XyLeN
function c100278026.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278026,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c100278026.sptg)
e1:SetOperation(c100278026.spop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278026,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c100278026.atkcon)
e2:SetOperation(c100278026.atkop)
c:RegisterEffect(e2)
end
function c100278026.spfilter(c,e,tp)
return not c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100278026.eqfilter(c)
return c:IsSetCard(0x107f) and c:IsType(TYPE_MONSTER)
end
function c100278026.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100278026.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c100278026.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_MZONE)
end
function c100278026.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100278026.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 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)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,c100278026.eqfilter,tp,LOCATION_MZONE,0,1,1,tc)
local ec=sg:GetFirst()
if ec then
c100278026.equip_monster(c,c,tp,tc)
c100278026.equip_monster(c,ec,tp,tc)
c:RegisterFlagEffect(100278026,RESET_EVENT+RESETS_STANDARD,1,0)
end
end
Duel.SpecialSummonComplete()
--cannot attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(c100278026.atklimitcon)
e3:SetTarget(c100278026.atklimittg)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
--check
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetOperation(c100278026.checkop)
e4:SetLabelObject(e3)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
function c100278026.equip_monster(c,ec,tp,tc)
if not Duel.Equip(tp,ec,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c100278026.eqlimit)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1700)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e2)
end
function c100278026.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c100278026.atklimitcon(e)
return e:GetLabel()~=0
end
function c100278026.atklimittg(e,c)
return c:GetFieldID()~=e:GetLabel()
end
function c100278026.checkop(e,tp,eg,ep,ev,re,r,rp)
local fid=eg:GetFirst():GetFieldID()
e:GetLabelObject():SetLabel(fid)
end
function c100278026.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(100278026)~=0
and Duel.GetAttacker()==c:GetEquipTarget()
end
function c100278026.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetAttack()*2)
tc:RegisterEffect(e1)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(100278026,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabel(fid)
e2:SetLabelObject(tc)
e2:SetCondition(c100278026.descon)
e2:SetOperation(c100278026.desop)
Duel.RegisterEffect(e2,tp)
end
function c100278026.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(100278026)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c100278026.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
--獣装合体 ライオ・ホープレイ
--Script by XyLeN
function c100278027.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278027,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetCountLimit(1)
e1:SetCost(c100278027.eqcost)
e1:SetTarget(c100278027.eqtg)
e1:SetOperation(c100278027.eqop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278027,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c100278027.discon)
e2:SetTarget(c100278027.distg)
e2:SetOperation(c100278027.disop)
c:RegisterEffect(e2)
end
c100278027.xyz_number=39
function c100278027.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100278027.eqfilter(c,tp)
return c:IsSetCard(0x107e) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function c100278027.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c100278027.eqfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_EXTRA+LOCATION_DECK)
end
function c100278027.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c100278027.eqfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if not tc then return end
local mt=_G["c"..tc:GetCode()]
mt.zw_equip_monster(tc,tp,c)
end
end
function c100278027.discon(e)
local c=e:GetHandler()
local eg=c:GetEquipGroup()
return #eg>0 and eg:IsExists(Card.IsSetCard,1,nil,0x107e)
end
function c100278027.disfilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT) and c:GetAttack()>0
end
function c100278027.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c100278027.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100278027.disfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c100278027.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c100278027.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() and tc:IsControler(1-tp) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local atk=tc:GetAttack()
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:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(math.ceil(atk/2))
tc:RegisterEffect(e3)
end
end
--ゼアル・カタパルト
--
--Script by mercury233
function c100278028.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278028,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100278028)
e1:SetTarget(c100278028.target)
e1:SetOperation(c100278028.activate)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278028,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100278028+100)
e2:SetCondition(aux.exccon)
e2:SetCost(c100278028.descost)
e2:SetTarget(c100278028.destg)
e2:SetOperation(c100278028.desop)
c:RegisterEffect(e2)
end
function c100278028.filter(c,e,tp)
return c:IsSetCard(0x107e,0x207e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100278028.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100278028.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100278028.lvfilter(c)
return c:IsFaceup() and c:IsLevelAbove(0) and (not c:IsLevel(4) or not c:IsLevel(5))
end
function c100278028.activate(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 sg=Duel.SelectMatchingCard(tp,c100278028.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if sg:GetCount()>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0
and Duel.IsExistingMatchingCard(c100278028.lvfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100278028,2)) then
local g=Duel.GetMatchingGroup(c100278028.lvfilter,tp,LOCATION_MZONE,0,nil)
local lv=0
if g:FilterCount(Card.IsLevel,1,nil,5)==#g then lv=4 end
if g:FilterCount(Card.IsLevel,1,nil,4)==#g then lv=5 end
if lv==0 then lv=Duel.AnnounceNumber(tp,4,5) end
local lc=g:GetFirst()
while lc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
lc:RegisterEffect(e1)
lc=g:GetNext()
end
end
end
function c100278028.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x107e,0x207e) and c:IsAbleToRemoveAsCost()
end
function c100278028.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c100278028.costfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100278028.costfilter,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100278028.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100278028.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--アタッチメント・サイバーン
--Script by XyLeN
function c100341001.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100341001,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCondition(c100341001.eqcon)
e1:SetTarget(c100341001.eqtg)
e1:SetOperation(c100341001.eqop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(600)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100341001,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,100341001)
e3:SetCondition(c100341001.spcon)
e3:SetTarget(c100341001.sptg)
e3:SetOperation(c100341001.spop)
c:RegisterEffect(e3)
end
function c100341001.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():CheckUniqueOnField(tp)
end
function c100341001.filter(c)
return c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsRace(RACE_MACHINE) and c:IsSetCard(0x93))
end
function c100341001.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100341001.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c100341001.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c100341001.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100341001.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
c100341001.equip_cyber_monster(c,tp,tc)
end
function c100341001.equip_cyber_monster(c,tp,tc)
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c100341001.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
function c100341001.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c100341001.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET)
end
function c100341001.spfilter(c,e,tp)
return (c:IsRace(RACE_DRAGON) or c:IsRace(RACE_MACHINE) and c:IsSetCard(0x93)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100341001.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c100341001.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100341001.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100341001.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100341001.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--エターナル・サイバー
--Script by XyLeN
function c100341022.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100341022)
e1:SetTarget(c100341022.target)
e1:SetOperation(c100341022.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100341022+100)
e2:SetTarget(c100341022.reptg)
e2:SetValue(c100341022.repval)
e2:SetOperation(c100341022.repop)
c:RegisterEffect(e2)
end
function c100341022.spfilter(c,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsSetCard(0x93) and c:IsType(TYPE_FUSION)
and (c:IsAbleToExtra() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false)))
end
function c100341022.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100341022.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c100341022.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100341022.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
end
function c100341022.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if tc:IsRelateToEffect(e) then
if aux.NecroValleyNegateCheck(tc) then return end
if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,true,false)
and (not tc:IsAbleToExtra() or Duel.SelectOption(tp,aux.Stringid(100341022,0),1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
else
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
function c100341022.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x93) and c:IsType(TYPE_FUSION)
and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c100341022.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c100341022.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c100341022.repval(e,c)
return c100341022.repfilter(c,e:GetHandlerPlayer())
end
function c100341022.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
--時花の賢者-フルール・ド・サージュ
--Script by XyLeN
function c100425020.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100425020,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100425020)
e1:SetTarget(c100425020.destg)
e1:SetOperation(c100425020.desop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425020,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,100425020+100)
e2:SetCondition(c100425020.thcon)
e2:SetTarget(c100425020.thtg)
e2:SetOperation(c100425020.thop)
c:RegisterEffect(e2)
end
function c100425020.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.GetMatchingGroupCount(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)>1
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100425020.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g:GetCount()>0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c100425020.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c100425020.thfilter(c)
return c:IsLevel(1) and c:IsRace(RACE_PLANT) and c:IsAbleToHand()
end
function c100425020.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c100425020.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425020.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100425020.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c100425020.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100425020.tdfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c100425020.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100425020.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--花騎士団の白馬
--Script by XyLeN
function c100425021.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,100425021+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100425021.spcon)
c:RegisterEffect(e1)
--negate attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425021,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100425021)
e2:SetCondition(c100425021.negcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100425021.negtg)
e2:SetOperation(c100425021.negop)
c:RegisterEffect(e2)
end
function c100425021.spfilter(c)
return c:IsFaceup() and c:IsLevelBelow(2)
end
function c100425021.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c100425021.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c100425021.negcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp
end
function c100425021.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and aux.TRUE(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100425021.negop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.NegateAttack() and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--ネクロ・シンクロン
--Script by XyLeN
function c100425022.initial_effect(c)
--code
aux.EnableChangeCode(c,19642774,LOCATION_MZONE+LOCATION_GRAVE)
--lv up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100425022,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100425022)
e1:SetTarget(c100425022.lvltg)
e1:SetOperation(c100425022.lvlop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425022,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,100425022+100)
e2:SetCondition(c100425022.spcon)
e2:SetTarget(c100425022.sptg)
e2:SetOperation(c100425022.spop)
c:RegisterEffect(e2)
end
function c100425022.lvltg(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,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
end
function c100425022.lvlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(2)
tc:RegisterEffect(e1)
end
end
function c100425022.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsAttribute(ATTRIBUTE_WIND)
end
function c100425022.spfilter(c,e,tp)
return c:IsLevel(1) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100425022.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100425022.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100425022.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100425022.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
--フルール・ド・バロネス
--Script by XyLeN
function c100425023.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100425023,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c100425023.destg)
e1:SetOperation(c100425023.desop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425023,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100425023)
e2:SetCondition(c100425023.discon)
e2:SetTarget(c100425023.distg)
e2:SetOperation(c100425023.disop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c100425023.sptg)
e3:SetOperation(c100425023.spop)
c:RegisterEffect(e3)
end
function c100425023.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100425023.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c100425023.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c100425023.distg(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 c100425023.disop(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 c100425023.spfilter(c,e,tp)
return c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100425023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c100425023.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100425023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and e:GetHandler():IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100425023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function c100425023.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--フルール・ド・フルーレ
--Script by XyLeN
function c100425024.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100425024+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100425024.target)
e1:SetOperation(c100425024.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c100425024.desop)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(700)
c:RegisterEffect(e3)
--equip
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,100425024)
e4:SetCondition(c100425024.eqcon)
e4:SetTarget(c100425024.eqtg)
e4:SetOperation(c100425024.eqop)
c:RegisterEffect(e4)
end
function c100425024.filter(c,e,tp)
return c:IsLevelBelow(2) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100425024.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425024.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100425024.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100425024.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c100425024.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
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=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
Duel.Equip(tp,c,tc)
--equip limit
local e3=Effect.CreateEffect(tc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(c100425024.eqlimit)
c:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
end
function c100425024.eqlimit(e,c)
return e:GetOwner()==c
end
function c100425024.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c100425024.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end
function c100425024.eqfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end
function c100425024.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c100425024.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c100425024.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c100425024.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc and tc:IsFaceup() and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
--equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c100425024.eqlimit)
c:RegisterEffect(e1)
end
end
--シンクロ・ディレンマ
--Script by XyLeN
function c100425025.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100425025,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,100425025)
e1:SetCost(c100425025.spcost)
e1:SetTarget(c100425025.sptg1)
e1:SetOperation(c100425025.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425025,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100425025)
e2:SetTarget(c100425025.sptg2)
e2:SetOperation(c100425025.spop2)
c:RegisterEffect(e2)
end
function c100425025.costfilter(c)
return c:IsSetCard(0x1017) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToGraveAsCost()
end
function c100425025.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100425025.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100425025.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c100425025.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100425025.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100425025.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100425025.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100425025.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 c100425025.checkfilter(c,e,tp)
local code=c:GetOriginalCode()
return c:IsFaceup() and code and Duel.IsExistingMatchingCard(c100425025.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,code,e,tp)
end
function c100425025.spfilter2(c,code,e,tp)
return not c:IsCode(code) and c:IsSetCard(0x1017) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100425025.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c100425025.checkfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100425025.checkfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100425025.checkfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c100425025.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c100425025.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tc:GetOriginalCode(),e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--LL-ベリル・カナリー
--Scripted by mallu11
function c100425034.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100425034,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100425034)
e1:SetTarget(c100425034.sptg)
e1:SetOperation(c100425034.spop)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c100425034.efcon)
e2:SetOperation(c100425034.efop)
c:RegisterEffect(e2)
end
function c100425034.spfilter(c,e,tp)
return c:IsSetCard(0xf7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100425034.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425034.spfilter(chkc,e,tp) end
if chk==0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return false end
if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end
return Duel.IsExistingTarget(c100425034.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100425034.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function c100425034.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local g=Group.FromCards(c,tc)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c100425034.splimit)
Duel.RegisterEffect(e1,tp)
end
function c100425034.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
end
function c100425034.efcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_XYZ and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetReasonCard():IsAttribute(ATTRIBUTE_WIND)
end
function c100425034.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(100425034,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(rc)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
rc:RegisterEffect(e2,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+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
end
--LL-セレスト・ワグテイル
--Scripted by mallu11
function c100425035.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100425035,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100425035)
e1:SetTarget(c100425035.thtg)
e1:SetOperation(c100425035.thop)
c:RegisterEffect(e1)
--overlay
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425035,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100425135)
e2:SetTarget(c100425035.ovtg)
e2:SetOperation(c100425035.ovop)
c:RegisterEffect(e2)
end
function c100425035.thfilter(c)
return c:IsSetCard(0xf7) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100425035.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c100425035.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100425035.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100425035.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 c100425035.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf7) and c:IsType(TYPE_XYZ)
end
function c100425035.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100425035.ovfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100425035.ovfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100425035.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c100425035.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
--LL-アンサンブルー・ロビン
--Lyrilusc – Ensembl(u)e Robin
--Script by TheOnePharaoh
function c100425036.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,1,2,nil,nil,99)
--ATK Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c100425036.atkval)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425036,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c100425036.thcost)
e2:SetTarget(c100425036.thtg)
e2:SetOperation(c100425036.thop)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100425036,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCondition(c100425036.recon)
e3:SetTarget(c100425036.retg)
e3:SetOperation(c100425036.reop)
c:RegisterEffect(e3)
end
function c100425036.atkval(e,c)
return c:GetOverlayCount()*500
end
function c100425036.filter1(c,e,tp)
return c:IsSummonPlayer(1-tp) and c:IsLocation(LOCATION_MZONE) and c:IsCanBeEffectTarget(e)
and c:IsAbleToHand()
end
function c100425036.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100425036.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return eg and eg:IsExists(c100425036.filter1,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=eg:FilterSelect(tp,c100425036.filter1,1,1,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100425036.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c100425036.recon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp)
end
function c100425036.filter2(c)
return c:IsSetCard(0xf7) and c:IsAbleToHand()
end
function c100425036.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425036.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100425036.filter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c100425036.filter2,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100425036.reop(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
--LL-プロム・スラッシュ
--Lyrilusc - Prom Thrush
--Script by TheOnePharaoh
function c100425037.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,1,2,nil,nil,99)
--ATK Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c100425037.atkval)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425037,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c100425037.descost)
e2:SetTarget(c100425037.destg)
e2:SetOperation(c100425037.desop)
c:RegisterEffect(e2)
--attack up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100425037,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_START)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100425037.condition)
e3:SetCost(c100425037.cost)
e3:SetOperation(c100425037.operation)
c:RegisterEffect(e3)
end
function c100425037.atkval(e,c)
return c:GetOverlayCount()*500
end
function c100425037.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100425037.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c100425037.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c100425037.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100425037.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100425037.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c100425037.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function c100425037.condition(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a:GetControler()==tp and a~=e:GetHandler() and a:IsRelateToBattle())
or (d and d:GetControler()==tp and d~=e:GetHandler() and d:IsRelateToBattle())
end
function c100425037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local rt=c:GetOverlayCount()
local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST)
e:SetLabel(ct)
end
function c100425037.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
local ct=e:GetLabel()
if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end
if not a:IsRelateToBattle() then return end
if a==e:GetHandler() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(ct*300)
a:RegisterEffect(e1)
end
--LL-バード・サンクチュアリ
--Scripted by mallu11
function c100425039.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--overlay
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100425039,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,100425039)
e1:SetTarget(c100425039.target)
e1:SetOperation(c100425039.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425039,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100425139)
e2:SetCondition(c100425039.drcon)
e2:SetTarget(c100425039.drtg)
e2:SetOperation(c100425039.drop)
c:RegisterEffect(e2)
end
function c100425039.ovfilter(c,e)
return c:IsFaceup() and c:IsRace(RACE_WINDBEAST) and c:IsType(TYPE_XYZ) and c:IsCanBeEffectTarget(e)
end
function c100425039.fselect(g)
return g:IsExists(Card.IsCanOverlay,1,nil)
end
function c100425039.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c100425039.ovfilter,tp,LOCATION_MZONE,0,nil,e)
if chkc then return false end
if chk==0 then return g:CheckSubGroup(c100425039.fselect,2,2) end
local sg=g:SelectSubGroup(tp,c100425039.fselect,false,2,2)
Duel.SetTargetCard(sg)
end
function c100425039.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local c1=g:GetFirst()
local c2=g:GetNext()
if not c1:IsRelateToEffect(e) or not c2:IsRelateToEffect(e) then return end
if c1:IsImmuneToEffect(e) or c2:IsImmuneToEffect(e) then return end
local b1=c1:IsCanOverlay()
local b2=c2:IsCanOverlay()
if not b1 and not b2 then return end
if not (b1 and b2) then
if not b1 and b2 then
c1,c2=c2,c1
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
c1=g:Select(tp,1,1,nil):GetFirst()
c2=g:Filter(aux.TRUE,c1):GetFirst()
end
local mg=c1:GetOverlayGroup()
if mg:GetCount()>0 then Duel.Overlay(c2,mg) end
Duel.Overlay(c2,Group.FromCards(c1))
end
function c100425039.drfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>=3
end
function c100425039.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100425039.drfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100425039.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 c100425039.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
--LL-比翼の麗鳥
--Scripted by mallu11
function c100425040.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100425040,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100425040)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c100425040.target)
e1:SetOperation(c100425040.activate)
c:RegisterEffect(e1)
--change attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425040,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100425140)
e2:SetCondition(c100425040.atkcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100425040.atktg)
e2:SetOperation(c100425040.atkop)
c:RegisterEffect(e2)
end
function c100425040.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xf7) and (Duel.IsExistingMatchingCard(c100425040.atkfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) or Duel.IsExistingMatchingCard(c100425040.lvfilter,tp,0,LOCATION_MZONE,1,nil))
end
function c100425040.atkfilter(c,atk)
return c:IsFaceup() and not c:IsAttack(atk)
end
function c100425040.lvfilter(c)
return c:IsFaceup() and (c:IsLevelAbove(2) or c:IsRankAbove(2))
end
function c100425040.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100425040.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100425040.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100425040.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c100425040.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local atk=tc:GetAttack()
local g=Duel.GetMatchingGroup(c100425040.atkfilter,tp,0,LOCATION_MZONE,nil,atk)
local cc=g:GetFirst()
while cc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
cc:RegisterEffect(e1)
cc=g:GetNext()
end
end
local lg=Duel.GetMatchingGroup(c100425040.lvfilter,tp,0,LOCATION_MZONE,nil)
local lc=lg:GetFirst()
while lc do
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
if lc:IsLevelAbove(2) then
e2:SetCode(EFFECT_CHANGE_LEVEL)
end
if lc:IsRankAbove(2) then
e2:SetCode(EFFECT_CHANGE_RANK)
end
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
lc:RegisterEffect(e2)
lc=lg:GetNext()
end
end
function c100425040.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local b=Duel.GetAttackTarget()
if not b then return false end
e:SetLabelObject(b)
return b:IsFaceup() and b:IsControler(tp) and b:IsSetCard(0xf7) and a:IsControler(1-tp)
end
function c100425040.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
local b=e:GetLabelObject()
if chk==0 then return b and b:GetAttack()~=a:GetAttack() end
end
function c100425040.atkop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local b=e:GetLabelObject()
if b and b:IsRelateToBattle() and a:IsRelateToBattle() and b:IsFaceup() and b:IsControler(tp) and a:IsFaceup() and a:IsControler(1-tp) and b:GetAttack()~=a:GetAttack() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(a:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
b:RegisterEffect(e1)
end
end
--黒衣竜アルビオン
--Scripted by mallu11
function c101105008.initial_effect(c)
--change name
aux.EnableChangeCode(c,68468459,LOCATION_MZONE+LOCATION_GRAVE)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105008,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,101105008)
e1:SetTarget(c101105008.target)
e1:SetOperation(c101105008.operation)
c:RegisterEffect(e1)
end
function c101105008.costfilter(c)
return (c:IsCode(68468459) or c:IsSetCard(0x15d) and c:IsType(TYPE_SPELL+TYPE_TRAP)) and c:IsAbleToGraveAsCost()
end
function c101105008.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c101105008.costfilter,tp,LOCATION_HAND,0,1,c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
local b2=Duel.IsExistingMatchingCard(c101105008.costfilter,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToDeck() and (c:IsLocation(LOCATION_GRAVE) or Duel.IsPlayerCanDraw(tp,1))
if chk==0 then return b1 or b2 end
local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c101105008.costfilter,tp,LOCATION_HAND,0,c)
local g2=Duel.GetMatchingGroup(c101105008.costfilter,tp,LOCATION_DECK,0,nil)
if b1 then
g:Merge(g1)
end
if b2 then
g:Merge(g2)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_HAND) then
e:SetLabel(1)
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
if tc:IsLocation(LOCATION_DECK) and c:IsLocation(LOCATION_HAND) then
e:SetLabel(2)
e:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if tc:IsLocation(LOCATION_DECK) and c:IsLocation(LOCATION_GRAVE) then
e:SetLabel(3)
e:SetCategory(CATEGORY_TODECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
Duel.SendtoGrave(tc,REASON_COST)
end
function c101105008.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local label=e:GetLabel()
if label==1 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
if label==2 then
if Duel.SendtoDeck(c,nil,1,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
if label==3 then
Duel.SendtoDeck(c,nil,1,REASON_EFFECT)
end
end
--妖眼の相剣師
--Scripted by mallu11
function c101105009.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105009,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,101105009)
e1:SetCondition(c101105009.spcon)
e1:SetTarget(c101105009.sptg)
e1:SetOperation(c101105009.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105009,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101105109)
e2:SetCondition(c101105009.descon)
e2:SetTarget(c101105009.destg)
e2:SetOperation(c101105009.desop)
c:RegisterEffect(e2)
end
function c101105009.cfilter(c)
return c:IsFaceup() and c:IsDisabled()
end
function c101105009.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
and Duel.IsExistingMatchingCard(c101105009.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c101105009.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 c101105009.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101105009.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end
function c101105009.desfilter(c,tp)
return c:IsSummonPlayer(1-tp) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsLocation(LOCATION_MZONE)
end
function c101105009.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=eg:IsExists(Card.IsSummonLocation,1,nil,LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e,0,tp,false,false)
local b2=eg:IsExists(Card.IsSummonLocation,1,nil,LOCATION_DECK) and Duel.IsPlayerCanDraw(tp,2)
local b3=eg:IsExists(Card.IsSummonLocation,1,nil,LOCATION_EXTRA)
if chk==0 then return b1 or b2 or b3 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(101105009,2)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(101105009,3)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(101105009,4)
opval[off-1]=3
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
e:SetLabel(opval[op])
if opval[op]==1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
elseif opval[op]==2 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
else
e:SetCategory(CATEGORY_DESTROY)
local g=eg:Filter(c101105009.desfilter,nil,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function c101105009.desop(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
if sel==1 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,e,0,tp,false,false)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
elseif sel==2 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
else
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e):Filter(Card.IsSummonLocation,nil,LOCATION_EXTRA)
if g:GetCount()>0 then
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=g:Select(tp,1,1,nil)
end
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
--先史遺産メガラ・グローヴ
--
--Script by JustFish
function c101105013.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101105013)
e1:SetCost(c101105013.spcost)
e1:SetTarget(c101105013.sptg)
e1:SetOperation(c101105013.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101105013+100)
e2:SetCondition(aux.exccon)
e2:SetCost(c101105013.thcost)
e2:SetTarget(c101105013.thtg)
e2:SetOperation(c101105013.thop)
c:RegisterEffect(e2)
end
function c101105013.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101105013.spfilter(c,e,tp)
return c:IsSetCard(0x70) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(101105013)
end
function c101105013.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c101105013.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101105013.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,c101105013.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
function c101105013.thcfilter(c)
return c:IsSetCard(0x70) and c:IsAbleToRemoveAsCost() and not c:IsCode(101105013)
end
function c101105013.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101105013.thcfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101105013.thcfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101105013.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c101105013.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--先史遺産アカンバロの土偶
--
--Script by JustFish
function c101105014.initial_effect(c)
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(c101105014.reptg)
e1:SetValue(c101105014.repval)
e1:SetOperation(c101105014.repop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105014,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101105014)
e2:SetCost(c101105014.spcost)
e2:SetTarget(c101105014.sptg)
e2:SetOperation(c101105014.spop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(101105014,ACTIVITY_SPSUMMON,c101105014.counterfilter)
end
function c101105014.counterfilter(c)
return c:IsSetCard(0x70)
end
function c101105014.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x70)
and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) and not c:IsReason(REASON_REPLACE)
end
function c101105014.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c101105014.filter,1,c,tp)
and c:IsDiscardable() and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c101105014.repval(e,c)
return c101105014.filter(c,e:GetHandlerPlayer())
end
function c101105014.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD)
end
function c101105014.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) and Duel.GetCustomActivityCount(101105014,tp,ACTIVITY_SPSUMMON)==0 end
Duel.PayLPCost(tp,1000)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c101105014.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101105014.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x70)
end
function c101105014.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,tp,LOCATION_GRAVE)
end
function c101105014.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local fid=c:GetFieldID()
c:RegisterFlagEffect(101105014,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetCondition(c101105014.thcon)
e1:SetOperation(c101105014.thop)
Duel.RegisterEffect(e1,tp)
end
end
function c101105014.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(101105014)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c101105014.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
\ No newline at end of file
--ガスタ・ヴェズル
--Scripted by mallu11
function c101105019.initial_effect(c)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101105019,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_CUSTOM+101105019)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,101105019)
e3:SetCondition(c101105019.spcon)
e3:SetTarget(c101105019.sptg)
e3:SetOperation(c101105019.spop)
c:RegisterEffect(e3)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101105019,1))
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,101105119)
e4:SetTarget(c101105019.tgtg)
e4:SetOperation(c101105019.tgop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
if not c101105019.global_check then
c101105019.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLE_DESTROYED)
ge1:SetCondition(c101105019.regcon)
ge1:SetOperation(c101105019.regop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_TO_GRAVE)
ge2:SetCondition(c101105019.regcon2)
Duel.RegisterEffect(ge2,0)
end
end
function c101105019.cfilter(c)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x10)
end
function c101105019.regcon(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c101105019.cfilter,1,nil) then
e:SetLabel(PLAYER_ALL)
return true
end
e:SetLabel(PLAYER_NONE)
return false
end
function c101105019.cfilter2(c,p)
return not c:IsReason(REASON_BATTLE) and c:IsControler(p) and c101105019.cfilter(c)
end
function c101105019.regcon2(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c101105019.cfilter2,1,nil,0) then v=v+1 end
if eg:IsExists(c101105019.cfilter2,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c101105019.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+101105019,re,r,rp,ep,e:GetLabel())
end
function c101105019.spcon(e,tp,eg,ep,ev,re,r,rp)
return ev==tp or ev==PLAYER_ALL
end
function c101105019.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101105019.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101105019.tgfilter(c)
return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c101105019.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101105019.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101105019.spfilter(c,e,tp)
return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105019.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101105019.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101105019.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(101105019,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c101105019.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--人攻智能ME-PSY-YA
--Scripted by mallu11
function c101105024.initial_effect(c)
aux.EnablePendulumAttribute(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(c101105024.rmtarget)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
--check for Jowgen the Spiritualist
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(81674782)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_PZONE)
e0:SetTargetRange(0xff,0xff)
e0:SetTarget(aux.TRUE)
c:RegisterEffect(e0)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105024,0))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,101105024)
e2:SetCost(c101105024.spcost)
e2:SetTarget(c101105024.sptg)
e2:SetOperation(c101105024.spop)
c:RegisterEffect(e2)
--to graveyard
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101105024.tgcon)
e3:SetTarget(c101105024.tgtg)
e3:SetOperation(c101105024.tgop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function c101105024.rmtarget(e,c)
return c:GetOriginalType()&TYPE_MONSTER==0
end
function c101105024.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c101105024.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsAbleToExtra()
end
function c101105024.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c101105024.tefilter,tp,LOCATION_HAND+LOCATION_PZONE,0,1,c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_HAND+LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101105024.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101105024,2))
local g=Duel.SelectMatchingCard(tp,c101105024.tefilter,tp,LOCATION_HAND+LOCATION_PZONE,0,1,1,c)
local tc=g:GetFirst()
if tc and Duel.SendtoExtraP(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101105024.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler())
end
function c101105024.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=eg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
Duel.SetTargetCard(g)
end
function c101105024.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e):Filter(aux.NOT(Card.IsImmuneToEffect),nil,e)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(101105024,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=g:GetNext()
end
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabelObject(g)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c101105024.descon)
e1:SetOperation(c101105024.desop)
Duel.RegisterEffect(e1,tp)
end
end
function c101105024.desfilter(c)
return c:GetFlagEffect(101105024)~=0
end
function c101105024.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():IsExists(c101105024.desfilter,1,nil)
end
function c101105024.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c101105024.desfilter,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
g:DeleteGroup()
end
--守護天霊ロガエス
--Scripted by mallu11
function c101105025.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e0:SetCode(EVENT_CHAIN_SOLVED)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c101105025.regcon)
e0:SetOperation(c101105025.regop)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105025,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+101105025)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101105025)
e1:SetTarget(c101105025.sptg)
e1:SetOperation(c101105025.spop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105025,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101105125)
e2:SetTarget(c101105025.rmtg)
e2:SetOperation(c101105025.rmop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101105025,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCondition(c101105025.indcon)
e3:SetTarget(c101105025.indtg)
e3:SetOperation(c101105025.indop)
c:RegisterEffect(e3)
end
function c101105025.regcon(e,tp,eg,ep,ev,re,r,rp)
local loc,race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_RACE)
return rp==tp and re:IsActiveType(TYPE_MONSTER) and loc&LOCATION_MZONE~=0 and race&RACE_FAIRY~=0
end
function c101105025.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+101105025,re,0,0,0,0)
end
function c101105025.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 c101105025.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101105025.rmfilter(c)
return c:IsFaceup() and c:IsAbleToRemove()
end
function c101105025.posfilter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c101105025.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101105025.rmfilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingTarget(c101105025.posfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,c101105025.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
e:SetLabelObject(g1:GetFirst())
local g2=Duel.SelectTarget(tp,c101105025.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g2,1,0,0)
end
function c101105025.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local lc=tg:GetFirst()
if lc==tc then lc=tg:GetNext() end
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) and lc:IsRelateToEffect(e) and lc:IsControler(tp) then
Duel.ChangePosition(lc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE)
end
end
function c101105025.indcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c101105025.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c101105025.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
--修士号ディプロマン
--
--Script by mercury233
function c101105026.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105026,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c101105026.eqcon)
e1:SetTarget(c101105026.eqtg)
e1:SetOperation(c101105026.eqop)
c:RegisterEffect(e1)
--cannot act
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(c101105026.aclimit)
c:RegisterEffect(e2)
end
function c101105026.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c101105026.eqfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c101105026.tgfilter(c)
return c:IsFaceup()
end
function c101105026.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101105026.eqfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(c101105026.tgfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g1=Duel.SelectTarget(tp,c101105026.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,c101105026.tgfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g1,1,0,0)
end
function c101105026.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc1=g:Filter(Card.IsControler,nil,tp):GetFirst()
local tc2=g:Filter(Card.IsControler,nil,1-tp):GetFirst()
if tc1 and tc2 and tc2:IsFaceup() then
local atk=tc1:GetAttack()
if not Duel.Equip(tp,tc1,tc2,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc2)
e1:SetValue(c101105026.eqlimit)
tc1:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(-atk)
tc1:RegisterEffect(e2)
end
end
function c101105026.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c101105026.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetEquipGroup():IsExists(Card.IsControler,1,nil,e:GetHandlerPlayer())
end
--死眼の伝霊-プシュコポンポス
--Script by XyLeN
function c101105028.initial_effect(c)
--banish
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105028,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101105028)
e1:SetCondition(c101105028.rmcon)
e1:SetTarget(c101105028.rmtg)
e1:SetOperation(c101105028.rmop)
c:RegisterEffect(e1)
--handle the e1
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_REMOVE)
e2:SetOperation(c101105028.regop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101105028,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,101105028)
e3:SetCondition(c101105028.tgcon)
e3:SetTarget(c101105028.tgtg)
e3:SetOperation(c101105028.tgop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101105028,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_REMOVED)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1,101105028+100)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c101105028.spcon)
e4:SetTarget(c101105028.sptg)
e4:SetOperation(c101105028.spop)
c:RegisterEffect(e4)
--workaround
if not Card.IsMonster then
function Card.IsMonster(c)
return c:IsType(TYPE_MONSTER)
end
end
if not Card.IsSpellTrap then
function Card.IsSpellTrap(c)
return c:IsType(TYPE_SPELL|TYPE_TRAP)
end
end
end
function c101105028.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsMonster,tp,0,LOCATION_GRAVE,nil)>Duel.GetMatchingGroupCount(Card.IsSpellTrap,tp,0,LOCATION_GRAVE,nil)
end
function c101105028.rmfilter(c)
return c:IsMonster() and c:IsAbleToRemove()
end
function c101105028.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101105028.rmfilter,tp,0,LOCATION_GRAVE,nil)
if chk==0 then return e:GetHandler():IsAbleToRemove() and g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c101105028.rmop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101105028.rmfilter),tp,0,LOCATION_GRAVE,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
end
function c101105028.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsSpellTrap,tp,0,LOCATION_GRAVE,nil)>Duel.GetMatchingGroupCount(Card.IsMonster,tp,0,LOCATION_GRAVE,nil)
end
function c101105028.tgfilter(c)
return c:IsMonster() and c:IsAbleToGrave()
end
function c101105028.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101105028.tgfilter,tp,0,LOCATION_MZONE,nil)
if chk==0 then return e:GetHandler():IsAbleToGrave() and g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c101105028.tgop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(c101105028.tgfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
function c101105028.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(101105028,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
function c101105028.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetTurnID()~=Duel.GetTurnCount() and c:GetFlagEffect(101105028)>0
end
function c101105028.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 c101105028.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--スロワースワロー
--Slower Swallow
--Script by TheOnePharaoh
function c101105029.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,101105029+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101105029.spcon)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105029,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c101105029.cost)
e2:SetOperation(c101105029.operation)
c:RegisterEffect(e2)
end
function c101105029.spfilter1(c)
return c:IsFaceup() and c:IsLevelAbove(0)
and Duel.IsExistingMatchingCard(c101105029.spfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetLevel())
end
function c101105029.spfilter2(c,lv)
return c:IsFaceup() and c:IsLevel(lv)
end
function c101105029.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101105029.spfilter1,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c101105029.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101105029.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
e1:SetValue(2)
Duel.RegisterEffect(e1,tp)
end
--ダイガスタ・ラプラムピリカ
--Scripted by mallu11
function c101105040.initial_effect(c)
c:SetSPSummonOnce(101105040)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x10),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105040,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c101105040.spcon)
e1:SetTarget(c101105040.sptg)
e1:SetOperation(c101105040.spop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c101105040.imval)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
end
function c101105040.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c101105040.spfilter(c,e,tp)
return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105040.fselect(g,tp)
return g:GetClassCount(Card.GetLocation)==#g and Duel.IsExistingMatchingCard(c101105040.synfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
function c101105040.synfilter(c,g)
return c:IsSetCard(0x10) and c:IsSynchroSummonable(nil,g)
end
function c101105040.chkfilter(c,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x10) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c101105040.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return false end
local cg=Duel.GetMatchingGroup(c101105040.chkfilter,tp,LOCATION_EXTRA,0,nil,tp)
if #cg==0 then return false end
local g=Duel.GetMatchingGroup(c101105040.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
return g:CheckSubGroup(c101105040.fselect,2,2,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101105040.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanSpecialSummonCount(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local cg=Duel.GetMatchingGroup(c101105040.chkfilter,tp,LOCATION_EXTRA,0,nil,tp)
if #cg>0 then
local g=Duel.GetMatchingGroup(c101105040.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c101105040.fselect,false,2,2,tp)
if sg then
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
local og=Duel.GetOperatedGroup()
local tg=Duel.GetMatchingGroup(c101105040.synfilter,tp,LOCATION_EXTRA,0,nil,og)
if og:GetCount()==sg:GetCount() and tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,rg:GetFirst(),nil,og)
end
end
end
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTargetRange(1,0)
e3:SetTarget(c101105040.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c101105040.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WIND)
end
function c101105040.imval(e,c)
return c~=e:GetHandler() and c:IsSetCard(0x10) and c:IsType(TYPE_SYNCHRO)
end
--甲纏竜ガイアーム
--Scripted by mallu11
function c101105042.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--to extra
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105042,0))
e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101105042)
e1:SetCost(c101105042.tecost)
e1:SetTarget(c101105042.tetg)
e1:SetOperation(c101105042.teop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105042,1))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101105142)
e2:SetTarget(c101105042.eqtg)
e2:SetOperation(c101105042.eqop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101105042,2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101105242)
e3:SetCondition(c101105042.drcon)
e3:SetTarget(c101105042.drtg)
e3:SetOperation(c101105042.drop)
c:RegisterEffect(e3)
end
function c101105042.tecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101105042.tefilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsAbleToExtra()
end
function c101105042.tetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101105042.tefilter,tp,LOCATION_GRAVE,0,3,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c101105042.tefilter,tp,LOCATION_GRAVE,0,3,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,3,0,0)
end
function c101105042.teop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function c101105042.eqfilter(c)
return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA)
end
function c101105042.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101105042.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101105042.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101105042.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c101105042.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101105042.eqlimit)
c:RegisterEffect(e1)
end
function c101105042.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c101105042.drcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and (Duel.GetAttacker()==ec or Duel.GetAttackTarget()==ec)
end
function c101105042.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 c101105042.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
--先史遺産ヴィマナ
--
--Script by JustFish
function c101105044.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,2)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105044,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c101105044.atktg)
e1:SetOperation(c101105044.atkop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105044,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c101105044.discon)
e2:SetCost(c101105044.discost)
e2:SetTarget(c101105044.distg)
e2:SetOperation(c101105044.disop)
c:RegisterEffect(e2)
end
function c101105044.atkfilter(c)
return (c:IsSetCard(0x70) or c:IsType(TYPE_XYZ)) and c:IsType(TYPE_MONSTER) and c:GetAttack()>0
end
function c101105044.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingTarget(c101105044.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
e:SetLabelObject(g:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101105044.atkfilter,tp,LOCATION_GRAVE,0,1,1,nil)
end
function c101105044.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sc=g:GetFirst()
if sc==tc then sc=g:GetNext() end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not sc:IsRelateToEffect(e) then return end
local ac=e:GetLabelObject()
if tc==ac then tc=sc end
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(math.ceil(atk/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
if e:GetHandler():IsRelateToEffect(e) then
Duel.Overlay(e:GetHandler(),tc)
end
end
function c101105044.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER)
end
function c101105044.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c101105044.distg(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)
end
function c101105044.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
\ No newline at end of file
--グランドレミコード・ミューゼシア
--Grandoremichord Musesea
--Script by TheOnePharaoh
function c101105048.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_PENDULUM),2,2)
--to extra and hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105048,0))
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101105048)
e1:SetTarget(c101105048.tetg)
e1:SetOperation(c101105048.teop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105048,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101105048)
e2:SetCondition(c101105048.thcon)
e2:SetTarget(c101105048.thtg)
e2:SetOperation(c101105048.thop)
c:RegisterEffect(e2)
end
function c101105048.tefilter(c)
return c:GetOriginalType()&TYPE_PENDULUM~=0
end
function c101105048.chkfilter(c,odevity)
return c:GetCurrentScale()%2==odevity
end
function c101105048.thfilter(c,e,tp,odevity)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:GetCurrentScale()%2==odevity
and c:IsAbleToHand()
end
function c101105048.chkcon(g,e,tp,odevity)
return g:IsExists(c101105048.chkfilter,1,nil,odevity) and Duel.IsExistingMatchingCard(c101105048.thfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,odevity)
end
function c101105048.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101105048.tefilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return c101105048.chkcon(g,e,tp,0) or c101105048.chkcon(g,e,tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c101105048.teop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101105048,3))
local g=Duel.SelectMatchingCard(tp,c101105048.tefilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoExtraP(g,tp,REASON_EFFECT)
local odevity=g:GetFirst():GetCurrentScale()%2
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101105048.thfilter,tp,LOCATION_EXTRA,0,1,1,nil,odevity)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c101105048.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x162) and c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c101105048.tgfilter(c,tp,g)
return g:IsContains(c) and Duel.IsExistingMatchingCard(c101105048.adfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c101105048.adfilter(c,scale)
return c:IsSetCard(0x162) and c:IsType(TYPE_MONSTER) and not c:GetLevel()==scale and c:IsAbleToHand()
end
function c101105048.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and eg:IsExists(c101105048.cfilter,1,nil,tp)
end
function c101105048.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c101105048.cfilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101105048.tgfilter(chkc,tp,g) end
if chk==0 then return Duel.IsExistingTarget(c101105048.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp,g) end
if g:GetCount()==1 then
Duel.SetTargetCard(g)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101105048.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp,g)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101105048.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local scale=tc:GetCurrentScale()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101105048.adfilter,tp,LOCATION_DECK,0,1,1,nil,scale)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--激撮ディスパラッチ
--
--Script by mercury233
function c101105049.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2)
c:EnableReviveLimit()
--change target
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105049,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101105049)
e1:SetCondition(c101105049.cbcon)
e1:SetOperation(c101105049.cbop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105049,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetCountLimit(1,101105049+100)
e2:SetTarget(c101105049.target)
e2:SetOperation(c101105049.operation)
c:RegisterEffect(e2)
end
function c101105049.cbcon(e,tp,eg,ep,ev,re,r,rp)
local bt=eg:GetFirst()
return r~=REASON_REPLACE and bt~=e:GetHandler() and bt:IsControler(tp)
end
function c101105049.cbop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local at=Duel.GetAttacker()
if at:IsAttackable() and not at:IsImmuneToEffect(e) and not c:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,c)
end
end
end
function c101105049.target(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget()
if chk==0 then return bc:IsRelateToBattle() and bc:IsControler(1-tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,math.ceil(bc:GetBaseAttack()/2))
end
function c101105049.operation(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)>0 and bc:GetBaseAttack()>0 then
Duel.Recover(tp,math.ceil(bc:GetBaseAttack()/2),REASON_EFFECT)
end
end
--烙印の絆
--Scripted by mallu11
function c101105055.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105055,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101105055)
e1:SetTarget(c101105055.target)
e1:SetOperation(c101105055.activate)
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:SetCondition(c101105055.regcon)
e2:SetOperation(c101105055.regop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101105055,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,101105155)
e3:SetCondition(c101105055.setcon)
e3:SetTarget(c101105055.settg)
e3:SetOperation(c101105055.setop)
c:RegisterEffect(e3)
end
function c101105055.spfilter(c,e,tp)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND+LOCATION_GRAVE)) and c:IsCode(68468459) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105055.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101105055.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c101105055.activate(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,aux.NecroValleyFilter(c101105055.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101105055.regcon(e,tp,eg,ep,ev,re,r,rp)
local code1,code2=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2)
return e:GetHandler():IsReason(REASON_COST) and re and re:IsActivated() and (code1==68468459 or code2==68468459)
end
function c101105055.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(101105055,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c101105055.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(101105055)>0
end
function c101105055.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c101105055.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
end
end
--先史遺産驚神殿-トリリトン
--
--Script by JustFish
function c101105059.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105059,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101105059)
e2:SetCost(c101105059.sumcost)
e2:SetCondition(c101105059.sumcon)
e2:SetTarget(c101105059.sumtg)
e2:SetOperation(c101105059.sumop)
c:RegisterEffect(e2)
--remove overlay replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101105059+100)
e3:SetCondition(c101105059.rcon)
e3:SetOperation(c101105059.rop)
c:RegisterEffect(e3)
end
function c101105059.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c101105059.cfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x70)
end
function c101105059.sumcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101105059.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101105059.sumfilter(c)
return c:IsSetCard(0x70) and c:IsSummonable(true,nil)
end
function c101105059.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101105059.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,LOCATION_HAND)
end
function c101105059.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c101105059.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function c101105059.rcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return bit.band(r,REASON_COST)~=0 and re:IsActivated() and re:IsActiveType(TYPE_XYZ)
and rc:GetOverlayCount()>=ev-1 and (rc:IsSetCard(0x70) or rc:IsSetCard(0x48)) and e:GetHandler():IsAbleToGraveAsCost() and ep==e:GetOwnerPlayer()
end
function c101105059.rop(e,tp,eg,ep,ev,re,r,rp)
return Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
\ No newline at end of file
--ガスタへの追風
--Scripted by mallu11
function c101105061.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101105061.target)
e1:SetOperation(c101105061.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c101105061.eqlimit)
c:RegisterEffect(e2)
--indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(aux.indoval)
c:RegisterEffect(e3)
--spsummon1
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101105061,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,101105061)
e4:SetCondition(c101105061.spcon1)
e4:SetTarget(c101105061.sptg1)
e4:SetOperation(c101105061.spop1)
c:RegisterEffect(e4)
--spsummon2
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101105061,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,101105061)
e5:SetCondition(c101105061.spcon2)
e5:SetTarget(c101105061.sptg2)
e5:SetOperation(c101105061.spop2)
c:RegisterEffect(e5)
--to hand
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(101105061,2))
e6:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,101105161)
e6:SetCost(c101105061.thcost)
e6:SetTarget(c101105061.thtg)
e6:SetOperation(c101105061.thop)
c:RegisterEffect(e6)
end
function c101105061.eqlimit(e,c)
return c:IsSetCard(0x10)
end
function c101105061.filter(c)
return c:IsFaceup() and c:IsSetCard(0x10)
end
function c101105061.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101105061.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101105061.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101105061.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101105061.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c101105061.spcon1(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and (ec:IsLevelBelow(4) or ec:IsRankBelow(4))
end
function c101105061.spfilter1(c,e,tp,race)
return not c:IsRace(race) and c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105061.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101105061.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp,ec:GetRace()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101105061.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if ec and ec:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101105061.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp,ec:GetRace())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c101105061.spcon2(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and (ec:IsLevelAbove(5) or ec:IsRankAbove(5))
end
function c101105061.spfilter2(c,e,tp)
return c:IsLevel(1) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105061.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101105061.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101105061.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101105061.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101105061.costfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsDiscardable()
end
function c101105061.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c101105061.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.DiscardHand(tp,c101105061.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c101105061.thfilter(c)
return c:IsSetCard(0x10) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101105061.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101105061.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101105061.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101105061.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
--Live☆Twin トラブルサン
--
--Script by JustFish
function c101105062.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101105062+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c101105062.activate)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c101105062.reccon)
e2:SetOperation(c101105062.recop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c101105062.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1151) and c:IsAbleToHand()
end
function c101105062.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c101105062.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101105062,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c101105062.cfilter(c,tp)
return c:IsSummonPlayer(tp)
end
function c101105062.etfilter(c)
return c:IsFaceup() and c:IsSetCard(0x2151)
end
function c101105062.reccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101105062.cfilter,1,nil,1-tp) and Duel.IsExistingMatchingCard(c101105062.etfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101105062.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,101105062)
Duel.Recover(tp,200,REASON_EFFECT)
Duel.Damage(1-tp,200,REASON_EFFECT)
end
--シンクロ・オーバーテイク
--Scripted by mallu11
function c101105067.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101105067+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101105067.cost)
e1:SetTarget(c101105067.target)
e1:SetOperation(c101105067.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(101105067,ACTIVITY_SPSUMMON,c101105067.counterfilter)
end
function c101105067.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_SYNCHRO)
end
function c101105067.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(101105067,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c101105067.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101105067.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO)
end
function c101105067.ffilter(c,e,tp,ft)
return c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(c101105067.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c,e,tp,ft)
end
function c101105067.spfilter(c,fc,e,tp,ft)
return aux.IsMaterialListCode(fc,c:GetCode()) and (c:IsAbleToHand() or ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c101105067.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c101105067.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,ft) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c101105067.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,c101105067.ffilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,ft):GetFirst()
if tc then
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101105067.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc,e,tp,ft)
local cc=g:GetFirst()
if cc then
if cc:IsAbleToHand() and (not cc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(cc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,cc)
else
Duel.SpecialSummon(cc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--信用取引
--
--Script by mercury233
function c101105069.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105069,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101105069+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101105069.target)
e1:SetOperation(c101105069.activate)
c:RegisterEffect(e1)
end
function c101105069.filter(c,p)
return c:IsAbleToHand(p)
end
function c101105069.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101105069.filter,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.IsExistingMatchingCard(c101105069.filter,tp,0,LOCATION_DECK,1,nil,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,PLAYER_ALL,LOCATION_DECK)
end
function c101105069.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsChainDisablable(0)
and Duel.SelectYesNo(1-tp,aux.Stringid(101105069,1)) then
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
Duel.NegateEffect(0)
return
end
local d1=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local d2=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
if #d1==0 or #d2==0 then return end
Duel.ConfirmCards(tp,d2)
Duel.ConfirmCards(1-tp,d1)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101105069,2))
local g2=Duel.SelectMatchingCard(tp,c101105069.filter,tp,0,LOCATION_DECK,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(101105069,2))
local g1=Duel.SelectMatchingCard(1-tp,c101105069.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.BreakEffect()
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(tp,g2)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
--スプリガンズ・インタールーダー
--Scripted by mallu11
function c101105071.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--to extra
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105071,0))
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,101105071)
e1:SetCondition(c101105071.condition)
e1:SetTarget(c101105071.target)
e1:SetOperation(c101105071.activate)
c:RegisterEffect(e1)
--attack down
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105071,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101105171)
e2:SetCondition(c101105071.atkcon)
e2:SetTarget(c101105071.atktg)
e2:SetOperation(c101105071.atkop)
c:RegisterEffect(e2)
end
function c101105071.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c101105071.spfilter(c,e,tp)
return c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105071.spsfilter(c,e,tp,solve)
if solve then
return aux.NecroValleyFilter(c101105071.spfilter)(c,e,tp)
else
return c101105071.spfilter(c,e,tp)
end
end
function c101105071.tefilter(c,e,tp,ev,solve1,solve2)
return c:IsFaceup() and c:IsSetCard(0x155) and c:IsType(TYPE_XYZ) and c:IsAbleToExtra()
and (solve1 or (Duel.IsChainDisablable(ev) or Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c101105071.spsfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,solve2)))
end
function c101105071.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101105071.tefilter,tp,LOCATION_MZONE,0,1,nil,e,tp,ev) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c101105071.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,c101105071.tefilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,ev,false,true):GetFirst()
if not tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
tc=Duel.SelectMatchingCard(tp,c101105071.tefilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,ev,true,true):GetFirst()
end
if tc and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then
if not Duel.IsChainDisablable(ev) and not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101105071.spsfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,true)) then
return
end
Duel.BreakEffect()
if Duel.IsChainDisablable(ev) and (Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsExistingMatchingCard(c101105071.spsfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,true)
or Duel.SelectOption(tp,aux.Stringid(101105071,2),1152)==0) then
Duel.NegateEffect(ev)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c101105071.spsfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,true)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c101105071.atkfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousTypeOnField()&TYPE_XYZ~=0
and c:IsReason(REASON_EFFECT)
end
function c101105071.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101105071.atkfilter,1,nil,tp)
end
function c101105071.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c101105071.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(-1000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--先史遺産石紋
--
--Script by JustFish
function c101105075.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1,101105075+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101105075.condition)
e1:SetTarget(c101105075.target)
e1:SetOperation(c101105075.activate)
c:RegisterEffect(e1)
end
function c101105075.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c101105075.tgfilter(c,e,tp)
if not c:IsType(TYPE_XYZ) or c:IsFacedown() or not c:IsCanBeEffectTarget(e) then return false end
local mg=Duel.GetMatchingGroup(c101105075.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp,c:GetRank())
return Duel.IsExistingMatchingCard(c101105075.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg)
end
function c101105075.spfilter(c,e,tp,rk)
return c:IsLevel(rk+1) and c:IsSetCard(0x70) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105075.xyzfilter(c,e,tp,mg)
return c:IsSetCard(0x70) and c:IsXyzSummonable(mg,2,2) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c101105075.mfilter1(c,mg,exg)
return mg:IsExists(c101105075.mfilter2,1,c,c,exg)
end
function c101105075.mfilter2(c,mc,exg)
return exg:IsExists(Card.IsXyzSummonable,1,nil,Group.FromCards(c,mc))
end
function c101105075.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and c101105075.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingTarget(c101105075.tgfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101105075.tgfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_HAND)
end
function c101105075.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local mg=Duel.GetMatchingGroup(c101105075.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp,tc:GetRank())
local exg=Duel.GetMatchingGroup(c101105075.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=mg:FilterSelect(tp,c101105075.mfilter1,1,1,nil,mg,exg)
local tc1=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=mg:FilterSelect(tp,c101105075.mfilter2,1,1,tc1,tc1,exg)
g1:Merge(g2)
if g1:GetCount()<2 then return end
local tc=g1:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
tc=g1:GetNext()
end
Duel.SpecialSummonComplete()
local xyzg=Duel.GetMatchingGroup(c101105075.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp,g1)
if #xyzg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g1)
end
end
\ No newline at end of file
--モンスターアソート
--Scripted by mallu11
function c101105077.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101105077+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101105077.target)
e1:SetOperation(c101105077.activate)
c:RegisterEffect(e1)
end
function c101105077.filter(c,g)
return g:IsExists(c101105077.filter2,1,c,c) and c:IsType(TYPE_NORMAL)
end
function c101105077.filter2(c,cc)
return c:IsRace(cc:GetRace()) and c:IsAttribute(cc:GetAttribute()) and c:IsLevel(cc:GetLevel()) and c:IsType(TYPE_EFFECT)
end
function c101105077.fselect(g)
return g:IsExists(c101105077.filter,1,nil,g)
end
function c101105077.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101105077.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101105077.thfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:CheckSubGroup(c101105077.fselect,2,2) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101105077.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101105077.thfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,c101105077.fselect,false,2,2)
if sg and #sg==2 then
Duel.ConfirmCards(1-tp,sg)
local tg=sg:RandomSelect(1-tp,1)
Duel.ShuffleDeck(tp)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
--獣王無塵
--Scripted by mallu11
function c101105078.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e0:SetHintTiming(TIMING_DAMAGE_STEP)
e0:SetTarget(c101105078.target)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105078,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c101105078.thcon)
e1:SetTarget(c101105078.thtg)
e1:SetOperation(c101105078.thop)
c:RegisterEffect(e1)
end
function c101105078.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetCurrentPhase()~=PHASE_DAMAGE
local b2=Duel.CheckEvent(EVENT_BATTLE_START) and c101105078.thcon(e,tp,eg,ep,ev,re,r,rp) and c101105078.thtg(e,tp,eg,ep,ev,re,r,rp,0)
if chk==0 then return b1 or b2 end
if b2 then
e:SetCategory(CATEGORY_TOHAND)
e:SetOperation(c101105078.thop)
c101105078.thtg(e,tp,eg,ep,ev,re,r,rp,1)
else
e:SetCategory(0)
e:SetOperation(nil)
end
end
function c101105078.thcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local b=Duel.GetAttackTarget()
if not b then return false end
if not a:IsControler(tp) then a,b=b,a end
local lg=a:GetColumnGroup()
if not lg:IsContains(b) then return false end
e:SetLabelObject(a)
return a:IsControler(tp) and a:IsRelateToBattle() and b:IsControler(1-tp) and b:IsRelateToBattle()
end
function c101105078.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=e:GetLabelObject()
local c=e:GetHandler()
if chk==0 then return a and a:IsAbleToHand() and Duel.GetFlagEffect(tp,101105078)==0 and c:GetFlagEffect(101105178)==0 end
Duel.RegisterFlagEffect(tp,101105078,RESET_CHAIN,0,1)
c:RegisterFlagEffect(101105178,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local g=a:GetColumnGroup():Filter(Card.IsAbleToHand,nil)
g:AddCard(a)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0)
end
function c101105078.thop(e,tp,eg,ep,ev,re,r,rp)
local a=e:GetLabelObject()
if a and a:IsRelateToBattle() and a:IsControler(tp) then
local g=a:GetColumnGroup()
g:AddCard(a)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
--ストールターン
--Scripted by mallu11
function c101105079.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c101105079.condition)
e1:SetCost(c101105079.cost)
e1:SetTarget(c101105079.target)
e1:SetOperation(c101105079.activate)
c:RegisterEffect(e1)
end
function c101105079.condition(e,tp,eg,ep,ev,re,r,rp)
if not (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(TYPE_SPELL+TYPE_TRAP)) then return false end
if not Duel.IsChainNegatable(ev) then return false end
return re:IsHasCategory(CATEGORY_DISABLE_SUMMON) or re:IsHasCategory(CATEGORY_NEGATE) and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c101105079.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==3 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function c101105079.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return Duel.IsPlayerCanSendtoDeck(tp) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if rc:IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function c101105079.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then
rc:CancelToGrave()
Duel.SendtoDeck(rc,nil,2,REASON_EFFECT)
end
end
--謙虚な瓶
--Scripted by mallu11
function c101105080.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c101105080.target)
e1:SetOperation(c101105080.activate)
c:RegisterEffect(e1)
end
function c101105080.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c101105080.activate(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
local opt=Duel.SelectOption(tp,aux.Stringid(101105080,0),aux.Stringid(101105080,1))
if opt==0 then
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
else
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
end
...@@ -11,13 +11,7 @@ function c101105201.initial_effect(c) ...@@ -11,13 +11,7 @@ function c101105201.initial_effect(c)
e0:SetValue(c101105201.synlimit) e0:SetValue(c101105201.synlimit)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--change name --change name
local e1=Effect.CreateEffect(c) aux.EnableChangeCode(c,21159309,LOCATION_MZONE+LOCATION_GRAVE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(21159309)
c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105201,0)) e2:SetDescription(aux.Stringid(101105201,0))
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
--Scripted by mallu11 --Scripted by mallu11
function c101105204.initial_effect(c) function c101105204.initial_effect(c)
aux.AddMaterialCodeList(c,21159309)
aux.AddCodeList(c,44508094) aux.AddCodeList(c,44508094)
--synchro summon --synchro summon
aux.AddSynchroMixProcedure(c,c101105204.mfilter,nil,nil,aux.NonTuner(nil),1,99,c101105204.gfilter) aux.AddSynchroMixProcedure(c,c101105204.mfilter,nil,nil,aux.NonTuner(nil),1,99,c101105204.gfilter)
...@@ -46,6 +47,22 @@ function c101105204.initial_effect(c) ...@@ -46,6 +47,22 @@ function c101105204.initial_effect(c)
e4:SetOperation(c101105204.negop) e4:SetOperation(c101105204.negop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
if Auxiliary.AddMaterialCodeList==nil then
function Auxiliary.AddMaterialCodeList(c,...)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mat={}
for _,code in ipairs{...} do
mat[code]=true
end
if c.material==nil then
local mt=getmetatable(c)
mt.material=mat
end
for index,_ in pairs(mat) do
Auxiliary.AddCodeList(c,index)
end
end
end
c101105204.material_type=TYPE_SYNCHRO c101105204.material_type=TYPE_SYNCHRO
function c101105204.mfilter(c) function c101105204.mfilter(c)
return c:IsCode(21159309) and c:IsSynchroType(TYPE_TUNER) return c:IsCode(21159309) and c:IsSynchroType(TYPE_TUNER)
......
--インスタント・ネオスペース
function c11913700.initial_effect(c)
aux.AddCodeList(c,89943723)
--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+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c11913700.target)
e1:SetOperation(c11913700.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c11913700.eqlimit)
c:RegisterEffect(e2)
--equip effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(42015635)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11913700,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c11913700.spcon)
e4:SetTarget(c11913700.sptg)
e4:SetOperation(c11913700.spop)
c:RegisterEffect(e4)
end
function c11913700.eqlimit(e,c)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,89943723)
end
function c11913700.filter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,89943723)
end
function c11913700.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c11913700.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11913700.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c11913700.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c11913700.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 c11913700.spcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetPreviousEquipTarget()
return e:GetHandler():IsReason(REASON_LOST_TARGET) and not ec:IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY)
end
function c11913700.spfilter(c,e,tp)
return c:IsCode(89943723) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11913700.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11913700.spfilter,tp,0x13,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13)
end
function c11913700.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,aux.NecroValleyFilter(c11913700.spfilter),tp,0x13,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--ワンショット・キャノン
function c13574687.initial_effect(c)
aux.AddMaterialCodeList(c,6142213)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,6142213),aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--destroy & damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13574687,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c13574687.target)
e1:SetOperation(c13574687.operation)
c:RegisterEffect(e1)
end
if Auxiliary.AddMaterialCodeList==nil then
function Auxiliary.AddMaterialCodeList(c,...)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mat={}
for _,code in ipairs{...} do
mat[code]=true
end
if c.material==nil then
local mt=getmetatable(c)
mt.material=mat
end
for index,_ in pairs(mat) do
Auxiliary.AddCodeList(c,index)
end
end
end
function c13574687.filter(c)
return c:IsFaceup()
end
function c13574687.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c13574687.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13574687.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c13574687.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,g:GetFirst():GetControler(),math.floor(g:GetFirst():GetAttack()/2))
end
function c13574687.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local dam=math.floor(tc:GetAttack()/2)
local p=tc:GetControler()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(p,dam,REASON_EFFECT)
end
end
end
--ネオス・フュージョン
function c14088859.initial_effect(c)
aux.AddCodeList(c,89943723)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14088859,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c14088859.target)
e1:SetOperation(c14088859.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c14088859.reptg)
e2:SetValue(c14088859.repval)
e2:SetOperation(c14088859.repop)
c:RegisterEffect(e2)
--return replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_SEND_REPLACE)
e3:SetRange(LOCATION_GRAVE)
e3:SetTarget(c14088859.reptg2)
e3:SetOperation(c14088859.repop2)
e3:SetValue(c14088859.repval2)
c:RegisterEffect(e3)
end
function c14088859.filter1(c,e)
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c14088859.filter2(c,e,tp,m,chkf)
return c.neos_fusion and aux.IsMaterialListCode(c,89943723)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf,true)
end
function c14088859.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp|0x200
local mg=Duel.GetMatchingGroup(c14088859.filter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK,0,nil,e)
return Duel.IsExistingMatchingCard(c14088859.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,chkf)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c14088859.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp|0x200
local mg=Duel.GetMatchingGroup(c14088859.filter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK,0,nil,e)
local sg=Duel.GetMatchingGroup(c14088859.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,chkf)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf,true)
Duel.SendtoGrave(mat,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
end
function c14088859.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_FUSION)
and aux.IsMaterialListCode(c,89943723) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c14088859.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c14088859.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c14088859.repval(e,c)
return c14088859.repfilter(c,e:GetHandlerPlayer())
end
function c14088859.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
function c14088859.repfilter2(c,tp,re)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and aux.IsMaterialListCode(c,89943723) and c:IsType(TYPE_FUSION)
and c:GetDestination()==LOCATION_DECK and re:GetOwner()==c
end
function c14088859.reptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and re
and e:GetHandler():IsAbleToRemove() and eg:IsExists(c14088859.repfilter2,1,nil,tp,re) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(14088859,1)) then
return true
else return false end
end
function c14088859.repop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
function c14088859.repval2(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and aux.IsMaterialListCode(c,89943723) and c:IsType(TYPE_FUSION)
end
--破壊剣一閃
function c15155568.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c15155568.condition)
e1:SetTarget(c15155568.target)
e1:SetOperation(c15155568.activate)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c15155568.discon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c15155568.distg)
e2:SetOperation(c15155568.disop)
c:RegisterEffect(e2)
end
function c15155568.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,78193831)
end
function c15155568.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c15155568.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c15155568.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c15155568.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c15155568.tgfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsSetCard(0xd7)
end
function c15155568.discon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c15155568.tgfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c15155568.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,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 c15155568.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--融合徴兵
function c17194258.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,17194258+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c17194258.target)
e1:SetOperation(c17194258.activate)
c:RegisterEffect(e1)
end
function c17194258.filter1(c,tp)
return c:IsType(TYPE_FUSION) and Duel.IsExistingMatchingCard(c17194258.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c)
end
function c17194258.filter2(c,fc)
return aux.IsMaterialListCode(fc,c:GetCode()) and c:IsAbleToHand()
end
function c17194258.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c17194258.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c17194258.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c17194258.filter1,tp,LOCATION_EXTRA,0,1,1,nil,tp)
if cg:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,cg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c17194258.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,cg:GetFirst())
local tc=g:GetFirst()
if not tc then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c17194258.sumlimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetValue(c17194258.aclimit)
Duel.RegisterEffect(e4,tp)
end
end
function c17194258.sumlimit(e,c)
return c:IsCode(e:GetLabel())
end
function c17194258.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER)
end
--A・ジェネクス・トライアーム
function c17760003.initial_effect(c)
aux.AddMaterialCodeList(c,68505803)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,68505803),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--mat check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c17760003.valcheck)
c:RegisterEffect(e1)
--synchro success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c17760003.regcon)
e2:SetOperation(c17760003.regop)
c:RegisterEffect(e2)
e2:SetLabelObject(e1)
end
if Auxiliary.AddMaterialCodeList==nil then
function Auxiliary.AddMaterialCodeList(c,...)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mat={}
for _,code in ipairs{...} do
mat[code]=true
end
if c.material==nil then
local mt=getmetatable(c)
mt.material=mat
end
for index,_ in pairs(mat) do
Auxiliary.AddCodeList(c,index)
end
end
end
function c17760003.valcheck(e,c)
local g=c:GetMaterial()
local att=0
local tc=g:GetFirst()
while tc do
if not tc:IsCode(68505803) or not tc:IsType(TYPE_TUNER) then
att=bit.bor(att,tc:GetAttribute())
end
tc=g:GetNext()
end
att=bit.band(att,0x2a)
e:SetLabel(att)
end
function c17760003.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
and e:GetLabelObject():GetLabel()~=0
end
function c17760003.regop(e,tp,eg,ep,ev,re,r,rp)
local att=e:GetLabelObject():GetLabel()
local c=e:GetHandler()
if bit.band(att,ATTRIBUTE_WIND)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17760003,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCost(c17760003.cost)
e1:SetTarget(c17760003.target1)
e1:SetOperation(c17760003.operation1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(17760003,3))
end
if bit.band(att,ATTRIBUTE_WATER)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17760003,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCost(c17760003.cost)
e1:SetTarget(c17760003.target2)
e1:SetOperation(c17760003.operation2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(17760003,4))
end
if bit.band(att,ATTRIBUTE_DARK)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17760003,2))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCost(c17760003.cost)
e1:SetTarget(c17760003.target3)
e1:SetOperation(c17760003.operation3)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(17760003,5))
end
end
function c17760003.cost(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 c17760003.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND)
end
function c17760003.operation1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
function c17760003.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c17760003.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c17760003.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c17760003.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c17760003.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c17760003.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c17760003.filter3(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c17760003.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c17760003.filter3(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c17760003.filter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c17760003.filter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c17760003.operation3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--ティマイオスの眼
function c1784686.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1784686+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c1784686.target)
e1:SetOperation(c1784686.activate)
c:RegisterEffect(e1)
--add code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_ADD_CODE)
e2:SetValue(10000050)
c:RegisterEffect(e2)
end
function c1784686.tgfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x10a2) and c:IsCanBeFusionMaterial()
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(c1784686.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c1784686.spfilter(c,e,tp,tc)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,tc:GetCode())
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c1784686.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1784686.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c1784686.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c1784686.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1784686.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_FMATERIAL) then return end
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c1784686.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=sg:GetFirst()
if sc then
sc:SetMaterial(Group.FromCards(tc))
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--ネオスペース
function c42015635.initial_effect(c)
aux.AddCodeList(c,89943723)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c42015635.atktg)
e2:SetValue(500)
c:RegisterEffect(e2)
--may not return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(42015635)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
c:RegisterEffect(e3)
end
function c42015635.atktg(e,c)
return c:IsCode(89943723) or c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,89943723)
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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