Commit 04158f45 authored by mercury233's avatar mercury233

new cards 19PP

parent b4bb4dfb
--バイバイダメージ
function c20735371.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCountLimit(1,20735371)
e1:SetCondition(c20735371.condition)
e1:SetOperation(c20735371.activate)
c:RegisterEffect(e1)
end
function c20735371.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=a:GetBattleTarget()
e:SetLabelObject(d)
return a:IsControler(1-tp) and d and d:IsControler(tp)
end
function c20735371.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if not tc:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetOperation(c20735371.damop)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e2,tp)
end
function c20735371.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,ev*2,REASON_EFFECT)
end
--No.XX インフィニティ・ダークホープ
function c21858819.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,10,2,nil,nil,99)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21858819,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,21858819)
e1:SetCost(c21858819.cost)
e1:SetTarget(c21858819.target)
e1:SetOperation(c21858819.activate)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(21858819,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,21858820)
e2:SetTarget(c21858819.rectg)
e2:SetOperation(c21858819.recop)
c:RegisterEffect(e2)
end
function c21858819.cost(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 c21858819.filter(c,e,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c21858819.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=eg:Filter(c21858819.filter,nil,e,tp)
e:SetLabelObject(g:GetFirst())
return g:GetCount()~=0
end
Duel.SetTargetCard(e:GetLabelObject())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetLabelObject(),1,0,0)
end
function c21858819.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c21858819.recfilter(c)
return c:IsFaceup() and c:GetBaseAttack()>0 and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c21858819.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc~=c and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c21858819.recfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c21858819.recfilter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c21858819.recfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetBaseAttack())
end
function c21858819.recop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetBaseAttack()>0 then
Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT)
end
end
--スターヴ・ヴェネミー・リーサルドーズ・ドラゴン
function c22070401.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c22070401.ffilter,3,false)
aux.EnablePendulumAttribute(c,false)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22070401,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c22070401.cttg)
e1:SetOperation(c22070401.ctop)
c:RegisterEffect(e1)
--atkdown
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c22070401.atktg)
e2:SetValue(c22070401.atkval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetRange(LOCATION_MZONE)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetRange(LOCATION_MZONE)
e4:SetOperation(c22070401.counter)
c:RegisterEffect(e4)
--disable all
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22070401,1))
e5:SetCategory(CATEGORY_DISABLE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c22070401.target)
e5:SetOperation(c22070401.operation)
c:RegisterEffect(e5)
--pendulum
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22070401,2))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_DESTROYED)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCondition(c22070401.pencon)
e6:SetTarget(c22070401.pentg)
e6:SetOperation(c22070401.penop)
c:RegisterEffect(e6)
end
function c22070401.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsFusionType(TYPE_PENDULUM)
end
function c22070401.ctfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x104f,1)
end
function c22070401.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22070401.ctfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x104f)
end
function c22070401.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c22070401.ctfilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0x104f,1)
tc=g:GetNext()
end
end
function c22070401.atktg(e,c)
return not (c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK))
end
function c22070401.atkval(e,c)
return Duel.GetCounter(0,1,1,0x104f)*-200
end
function c22070401.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c22070401.counter(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c22070401.cfilter,nil)
if ct>0 then
e:GetHandler():AddCounter(0x104f,ct)
end
end
function c22070401.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c22070401.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,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_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c22070401.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c22070401.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c22070401.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--SRヘキサソーサー
function c23792058.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to extra
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(23792058,0))
e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,23792058)
e1:SetTarget(c23792058.tdtg)
e1:SetOperation(c23792058.tdop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetOperation(c23792058.damop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c23792058.spcon)
e3:SetTarget(c23792058.sptg)
e3:SetOperation(c23792058.spop)
c:RegisterEffect(e3)
end
function c23792058.tdfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_SYNCHRO) and c:IsAbleToExtra()
and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c23792058.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c23792058.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c23792058.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c23792058.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c23792058.tdop(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 c23792058.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,math.ceil(ev/2),false)
Duel.ChangeBattleDamage(1-ep,math.ceil(ev/2),false)
end
function c23792058.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_PZONE)
end
function c23792058.spfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x2016)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c23792058.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c23792058.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c23792058.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c23792058.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if Duel.GetLocationCountFromEx(tp)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--閻魔の裁き
function c32120116.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c32120116.target)
e1:SetOperation(c32120116.activate)
c:RegisterEffect(e1)
end
function c32120116.filter(c,tp)
return c:GetSummonPlayer()==tp
end
function c32120116.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return eg:IsExists(c32120116.filter,1,nil,1-tp) end
Duel.SetTargetCard(eg)
local g=eg:Filter(c32120116.filter,nil,1-tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c32120116.filter2(c,e,tp)
return c:GetSummonPlayer()==tp and c:IsRelateToEffect(e)
end
function c32120116.rmfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemove()
end
function c32120116.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsLevelAbove(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c32120116.activate(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c32120116.filter2,nil,e,1-tp)
if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then
local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(c32120116.rmfilter),tp,LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(c32120116.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
if #g1>4 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(32120116,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g1:Select(tp,5,5,nil)
if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)==5 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g2:Select(tp,1,1,nil)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
--超重武者カカ-C
function c33918636.initial_effect(c)
c:EnableReviveLimit()
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x9a),1,1)
--cannot be link material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
--no damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c33918636.condition)
e2:SetValue(1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33918636,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,33918636)
e3:SetCondition(c33918636.condition)
e3:SetCost(c33918636.spcost)
e3:SetTarget(c33918636.sptg)
e3:SetOperation(c33918636.spop)
c:RegisterEffect(e3)
end
function c33918636.condition(e)
return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_SPELL+TYPE_TRAP)==0
end
function c33918636.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c33918636.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33918636.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c33918636.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c33918636.spfilter(c,e,tp,zone)
return c:IsSetCard(0x9a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone)
end
function c33918636.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c33918636.spfilter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c33918636.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c33918636.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c33918636.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE,zone)
end
end
--おジャマ・エンペラー
function c34031284.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_BEAST),3,3,c34031284.lcheck)
c:EnableReviveLimit()
--atk & indes
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:SetCondition(c34031284.condition)
e1:SetValue(3000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
c:RegisterEffect(e2)
--reflect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e3:SetCondition(c34031284.refcon)
e3:SetValue(1)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(34031284,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,34031284)
e4:SetTarget(c34031284.target)
e4:SetOperation(c34031284.operation)
c:RegisterEffect(e4)
end
function c34031284.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xf)
end
function c34031284.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(90011152)
end
function c34031284.refcon(e)
return Duel.GetAttackTarget()==e:GetHandler()
end
function c34031284.filter(c,e,tp)
return c:IsSetCard(0xf) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c34031284.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c34031284.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c34031284.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c34031284.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c34031284.operation(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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c34031284.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c34031284.splimit(e,c)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
--シンクロ・トランセンド
function c57246528.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,57246528+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c57246528.target)
e1:SetOperation(c57246528.activate)
c:RegisterEffect(e1)
end
function c57246528.opfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(c57246528.tpfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetLevel(),e,tp)
end
function c57246528.tpfilter(c,lv,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c57246528.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c57246528.opfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingTarget(c57246528.opfilter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c57246528.opfilter,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c57246528.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp)<=0 or not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c57246528.tpfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetLevel(),e,tp):GetFirst()
if sg and Duel.SpecialSummonStep(sg,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(57246528,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sg:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
--デンジャラス・デストーイ・ナイトメアリー
function c58468105.initial_effect(c)
aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xc3),aux.FilterBoolFunction(Card.IsFusionSetCard,0xa9),2,99,false)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c58468105.value)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(c58468105.tgcon)
e2:SetTarget(c58468105.tgtg)
e2:SetOperation(c58468105.tgop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c58468105.discon)
e3:SetCost(c58468105.discost)
e3:SetTarget(c58468105.distg)
e3:SetOperation(c58468105.disop)
c:RegisterEffect(e3)
end
function c58468105.atkfilter(c)
return c:IsRace(RACE_FAIRY+RACE_FIEND)
end
function c58468105.value(e,c)
local tp=c:GetControler()
if Duel.GetTurnPlayer()~=tp then return 0 end
return Duel.GetMatchingGroupCount(c58468105.atkfilter,tp,LOCATION_GRAVE,0,nil)*500
end
function c58468105.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and aux.bdocon(e,tp,eg,ep,ev,re,r,rp)
end
function c58468105.tgfilter(c)
return (c:IsSetCard(0xc3) or c:IsSetCard(0xa9) or c:IsSetCard(0xad)) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c58468105.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget()
local lv=bc:GetLevel()
e:SetLabel(lv)
if chk==0 then return Duel.IsExistingMatchingCard(c58468105.tgfilter,tp,LOCATION_DECK,lv,lv,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c58468105.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local lv=e:GetLabel()
local g=Duel.SelectMatchingCard(tp,c58468105.tgfilter,tp,LOCATION_DECK,0,lv,lv,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c58468105.costfilter(c)
return c:IsSetCard(0xad) and c:IsAbleToRemoveAsCost()
end
function c58468105.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c58468105.costfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c58468105.costfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c58468105.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not rp==1-tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsContains(c) and Duel.IsChainDisablable(ev)
end
function c58468105.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)
end
function c58468105.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--決闘竜 デュエル・リンク・ドラゴン
function c60025883.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,c60025883.lcheck)
c:EnableReviveLimit()
--duel dragon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60025883,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60025883)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCondition(c60025883.spcon)
e1:SetCost(c60025883.spcost)
e1:SetTarget(c60025883.sptg)
e1:SetOperation(c60025883.spop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c60025883.tgcon)
e2:SetValue(aux.imval1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
end
function c60025883.lcheck(g,lc)
return g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO)
end
function c60025883.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c60025883.costfilter(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost()
and c:IsSetCard(0xc2) or (c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)))
and Duel.IsPlayerCanSpecialSummonMonster(tp,60025884,0,0x4011,c:GetAttack(),c:GetDefense(),c:GetLevel(),c:GetRace(),c:GetAttribute())
end
function c60025883.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60025883.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c60025883.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function c60025883.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and zone~=0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function c60025883.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=bit.band(c:GetLinkedZone(tp),0x1f)
local tc=e:GetLabelObject()
local atk=tc:GetTextAttack()
local def=tc:GetTextDefense()
local lv=tc:GetOriginalLevel()
local race=tc:GetOriginalRace()
local att=tc:GetOriginalAttribute()
if Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,60025884,0,0x4011,atk,def,lv,race,att) then return end
local token=Duel.CreateToken(tp,60025884)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP,zone)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(def)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(att)
token:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_LEVEL)
e4:SetValue(lv)
token:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_RACE)
e5:SetValue(race)
token:RegisterEffect(e5)
Duel.SpecialSummonComplete()
end
function c60025883.tgfilter(c)
return c:GetOriginalCode()==60025884
end
function c60025883.tgcon(e)
return Duel.IsExistingMatchingCard(c60025883.tgfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
--転生炎獣アルミラージ
function c60303245.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c60303245.matfilter,1,1)
--immunity
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60303245,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c60303245.immcost)
e1:SetTarget(c60303245.immtg)
e1:SetOperation(c60303245.immop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60303245)
e2:SetCondition(c60303245.spcon)
e2:SetTarget(c60303245.sptg)
e2:SetOperation(c60303245.spop)
c:RegisterEffect(e2)
end
function c60303245.matfilter(c)
return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsAttackBelow(1000)
end
function c60303245.immcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
function c60303245.immtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil)
end
function c60303245.immop(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:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.indoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c60303245.spcfilter(c,tp)
return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:GetPreviousControler()==tp
end
function c60303245.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c60303245.spcfilter,1,nil,tp)
end
function c60303245.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 c60303245.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
--EMクリボーダー
function c69181753.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69181753,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c69181753.hspcon)
e1:SetTarget(c69181753.hsptg)
e1:SetOperation(c69181753.hspop)
c:RegisterEffect(e1)
end
function c69181753.hspcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil
end
function c69181753.hsptg(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 c69181753.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local a=Duel.GetAttacker()
if a:IsAttackable() and not a:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_REVERSE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetValue(c69181753.rev)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
Duel.CalculateDamage(a,c)
end
end
end
function c69181753.rev(e,re,r,rp,rc)
return bit.band(r,REASON_BATTLE)~=0 and e:GetHandler()==Duel.GetAttackTarget()
end
--天啓の薔薇の鐘
function c80196387.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(80196387,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,80196387)
e1:SetTarget(c80196387.target)
e1:SetOperation(c80196387.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(80196387,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,80196387)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c80196387.sptg)
e2:SetOperation(c80196387.spop)
c:RegisterEffect(e2)
end
function c80196387.filter(c)
return c:IsAttackAbove(2400) and c:IsRace(RACE_PLANT) and c:IsAbleToHand()
end
function c80196387.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c80196387.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c80196387.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c80196387.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c80196387.spfilter(c,e,tp)
return c:IsAttackAbove(2400) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c80196387.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c80196387.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c80196387.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,c80196387.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--希望の記憶
function c84731222.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,84731222+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c84731222.target)
e1:SetOperation(c84731222.activate)
c:RegisterEffect(e1)
end
function c84731222.filter(c)
return c:IsFaceup() and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ)
end
function c84731222.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c84731222.filter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c84731222.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(c84731222.filter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
Duel.Draw(p,ct,REASON_EFFECT)
end
--幻魔帝トリロジーグ
function c95463814.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsLevel,10),3,false)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95463814,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,95463814)
e1:SetTarget(c95463814.target)
e1:SetOperation(c95463814.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c95463814.contition2)
c:RegisterEffect(e2)
end
function c95463814.filter(c)
return c:IsFaceup() and c:GetBaseAttack()>0
end
function c95463814.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c95463814.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c95463814.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c95463814.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,math.ceil(g:GetFirst():GetBaseAttack()/2))
end
function c95463814.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Damage(1-tp,math.ceil(tc:GetBaseAttack()/2),REASON_EFFECT)
end
end
function c95463814.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsControler(tp)
end
function c95463814.contition2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not eg:IsContains(c) and eg:IsExists(c95463814.cfilter,1,nil,tp)
end
--ダーク・アンセリオン・ドラゴン
function c95685352.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95685352,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c95685352.atktg1)
e1:SetOperation(c95685352.atkop1)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(95685352,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCountLimit(1)
e2:SetCondition(c95685352.atkcon2)
e2:SetCost(c95685352.atkcost2)
e2:SetTarget(c95685352.atktg2)
e2:SetOperation(c95685352.atkop2)
c:RegisterEffect(e2)
--pendulum
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c95685352.pencon)
e3:SetTarget(c95685352.pentg)
e3:SetOperation(c95685352.penop)
c:RegisterEffect(e3)
end
c95685352.pendulum_level=7
function c95685352.atktg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c95685352.atkop1(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
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetBaseAttack()/2)
tc:RegisterEffect(e1)
end
end
function c95685352.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c95685352.atkcost2(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 c95685352.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.nzatk(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.nzatk,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil)
end
function c95685352.atkop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local atk=tc:GetAttack()
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(math.ceil(atk/2))
tc:RegisterEffect(e1)
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(math.ceil(atk/2))
c:RegisterEffect(e2)
end
end
end
function c95685352.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c95685352.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c95685352.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--SRビーダマシーン
function c96708940.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--on attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCondition(c96708940.condition)
e1:SetTarget(c96708940.target)
e1:SetOperation(c96708940.opetation)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(96708940,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,96708940)
e2:SetTarget(c96708940.thtg)
e2:SetOperation(c96708940.thop)
c:RegisterEffect(e2)
end
function c96708940.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at and at:IsControler(tp) and at:IsPosition(POS_DEFENSE)
end
function c96708940.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.GetAttackTarget():CreateEffectRelation(e)
end
function c96708940.opetation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local at=Duel.GetAttackTarget()
if at:IsRelateToEffect(e) then
Duel.ChangePosition(at,POS_FACEUP_ATTACK)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
at:RegisterEffect(e1)
end
end
function c96708940.thfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c96708940.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96708940.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c96708940.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c96708940.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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c96708940.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c96708940.splimit(e,c,tp,sumtp,sumpos)
return c:GetAttribute()~=ATTRIBUTE_WIND
end
--ギミック・パペット-キメラ・ドール
function c97520532.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2,2)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(97520532,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,97520532)
e1:SetCondition(c97520532.thcon)
e1:SetTarget(c97520532.thtg)
e1:SetOperation(c97520532.thop)
c:RegisterEffect(e1)
end
function c97520532.thcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c97520532.thfilter(c)
return c:IsSetCard(0x83) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c97520532.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c97520532.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c97520532.cfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x83)
end
function c97520532.spfilter(c,e,tp)
return c:IsSetCard(0x83) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c97520532.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(97520532,1))
local g1=Duel.SelectMatchingCard(tp,c97520532.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()>0 then
local tc=g1:GetFirst()
local res=false
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
res=true
end
else
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
res=true
end
end
local g2=Duel.GetMatchingGroup(c97520532.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if res and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and not Duel.IsExistingMatchingCard(c97520532.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(97520532,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g2:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c97520532.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c97520532.splimit(e,c)
return not (c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ)) and c:IsLocation(LOCATION_EXTRA)
end
--魂のさまよう墓場
function c98596596.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c98596596.spcon1)
e2:SetTarget(c98596596.sptg1)
e2:SetOperation(c98596596.spop1)
c:RegisterEffect(e2)
--token
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,98596596)
e3:SetCondition(c98596596.spcon2)
e3:SetTarget(c98596596.sptg2)
e3:SetOperation(c98596596.spop2)
c:RegisterEffect(e3)
end
function c98596596.cfilter1(c,tp)
return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp
end
function c98596596.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c98596596.cfilter1,1,nil,tp) and e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED)
end
function c98596596.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,98596597,0,0x4011,100,100,1,RACE_PYRO,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c98596596.spop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,98596597,0,0x4011,100,100,1,RACE_PYRO,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,98596597)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function c98596596.cfilter2(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsLocation(LOCATION_GRAVE)
and (c:GetPreviousLocation()==LOCATION_HAND or c:GetPreviousLocation()&LOCATION_ONFIELD>0)
and c:GetPreviousControler()==tp and c:GetReasonPlayer()==1-tp
end
function c98596596.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c98596596.cfilter2,1,nil,tp) and e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED)
end
function c98596596.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,98596597,0,0x4011,100,100,1,RACE_PYRO,ATTRIBUTE_FIRE) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0)
end
function c98596596.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if not e:GetHandler():IsRelateToEffect(e) or ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,98596597,0,0x4011,100,100,1,RACE_PYRO,ATTRIBUTE_FIRE) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
for i=1,ft do
local token=Duel.CreateToken(tp,98596597)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
--剛炎の剣士
function c98642179.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c98642179.lcheck)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR))
e1:SetValue(500)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98642179,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,98642179)
e2:SetCondition(c98642179.spcon)
e2:SetTarget(c98642179.sptg)
e2:SetOperation(c98642179.spop)
c:RegisterEffect(e2)
end
function c98642179.lcheck(g,lc)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function c98642179.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c98642179.spfilter(c,e,tp)
return c:IsRace(RACE_WARRIOR) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98642179.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98642179.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98642179.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98642179.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98642179.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment