Commit afb3a995 authored by sidschingis's avatar sidschingis

DRLG/CPL2

Rest of the cards
SetCodes used:
!setcode 0xa2 Stardust
Counter used:
!counter 0x95 Utopia Counter
cards not included:
Wiretap 34507039
Mound of the Bound Creator 269012
parent 38ccb7b4
--プロミネンス・ハンド
function c21414674.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c21414674.spcon)
c:RegisterEffect(e1)
end
function c21414674.filter(c)
return c:IsFaceup() and (
c:GetCode()==22530212 or
c:GetCode()==68535320 or
c:GetCode()==95929069 or
)
end
function c21414674.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c21414674.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
--RUM-クイック・カオス
function c33252803.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c33252803.target)
e1:SetOperation(c33252803.activate)
c:RegisterEffect(e1)
end
function c33252803.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048)
and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank(),c.xyz_number)
end
function c33252803.filter2(c,e,tp,rank,no)
return c:GetRank()==rank and c:IsSetCard(0x1048) and c.xyz_number==no
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c33252803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33252803.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c33252803.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp)end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c33252803.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c33252803.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33252803.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetRank(),tc.xyz_number)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--工作列車シグナル・レッド
function c34475451.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(34475451,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(c34475451.condition)
e1:SetTarget(c34475451.target)
e1:SetOperation(c34475451.operation)
c:RegisterEffect(e1)
--battle indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c34475451.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
function c34475451.target(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 c34475451.operation(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) then
local a=Duel.GetAttacker()
if a:IsOnField() and a:IsFaceup() then
Duel.CalculateDamage(a,c)
end
end
end
\ No newline at end of file
--機関連結
function c1200843.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c1200843.cost)
e1:SetTarget(c1200843.target)
e1:SetOperation(c1200843.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(c1200843.eqlimit)
c:RegisterEffect(e2)
--Atk Change
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_SET_ATTACK)
e3:SetValue(c22046459.value)
c:RegisterEffect(e3)
--Pierce
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4)
--cannot attack
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_ATTACK)
e5:SetProperty(EFFECT_FLAG_OATH)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(c22046459.ftarget)
c:RegisterEffect(e5)
end
function c1200843.eqlimit(e,c)
return c:IsRelateToCard(e:GetHandler())
end
function c1200843.filter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c1200843.rmfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsLevelAbove(10) and c:IsAbleToRemoveAsCost()
end
function c1200843.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200843.rmfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1200843.rmfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c1200843.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1200843.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200843.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c1200843.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c1200843.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
tc:CreateRelation(c,RESET_EVENT+0x1fe0000)
Duel.Equip(tp,c,tc)
end
end
function c22046459.value(e,c)
return c:GetBaseAttack()*2
end
function c22046459.ftarget(e,c)
return e:GetHandler():GetEquipTarget():GetFieldID()~=c:GetFieldID()
end
\ No newline at end of file
--ファイヤー・ハンド
function c68535320.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68535320,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c68535320.condition)
e1:SetTarget(c68535320.target)
e1:SetOperation(c68535320.operation)
c:RegisterEffect(e1)
end
function c68535320.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY+REASON_BATTLE) and rp~=tp
end
function c68535320.dfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDestructable()
end
function c68535320.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c68535320.dfilter(chkc) end
if chk==0 then return
Duel.IsExistingTarget(c68535320.dfilter,tp,0,LOCATION_ONFIELD,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c68535320.dfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c68535320.spfilter(c)
return c:GetCode()==95929069 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c68535320.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c68535320.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.Destroy(tc,REASON_EFFECT)
and Duel.SelectYesNo(tp,aux.Stringid(68535320,1))
and g:GetCount()>0
then
g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--オボミ
function c68812773.initial_effect(c)
--summon,flip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c68812773.sptg)
e1:SetOperation(c68812773.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(68812773,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c68812773.spcost1)
e3:SetTarget(c68812773.sptg1)
e3:SetOperation(c68812773.spop1)
c:RegisterEffect(e3)
end
function c68812773.filter(c,e,tp)
return c:IsCode(71071546) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c68812773.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71175527.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c68812773.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c68812773.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c68812773.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_ATTACK+POS_FACEDOWN_DEFENCE)
end
end
function c68812773.costfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c68812773.spfilter(c,e,tp)
return (c:IsSetCard(0x7b)or c:IsSetCard(0x55)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c68812773.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c68812773.costfilter,1,nil) end
local ct1=Duel.GetMatchingGroupCount(c68812773.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMST_RELEASE)
local rg=Duel.SelectReleaseGroupEx(tp,c68812773.costfilter,1,ct1,nil)
e:SetLabel(rg:GetCount())
Duel.Release(rg,REASON_COST)
end
function c68812773.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c68812773.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
local ct=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,0,0)
end
function c68812773.spop1(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local ct1=Duel.GetMatchingGroupCount(c68812773.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if ct1<ct then ct=ct1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local dg=Duel.SelectMatchingCard(tp,c68812773.spfilter,tp,LOCATION_HAND,0,ct,ct,nil,e,tp)
if dg:GetCount()>0 then
Duel.SpecialSummon(dg,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--CNo.5亡朧龍カオス・キマイラ・ドラゴン
function c69757518.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,7),3)
c:EnableReviveLimit()
--atk
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(c69757518.atkval)
c:RegisterEffect(e1)
--chain attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69757518,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetCondition(c69757518.atcon)
e2:SetCost(c69757518.atcost)
e2:SetOperation(c69757518.atop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c69757518.cost)
e3:SetTarget(c69757518.target)
e3:SetOperation(c69757518.activate)
c:RegisterEffect(e3)
end
c69757518.xyz_number=5
function c69757518.atkval(e,c)
return c:GetOverlayCount()*1000
end
function c69757518.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and c:IsChainAttackable()
end
function c69757518.atcost(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 c69757518.atop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToBattle() then
Duel.ChainAttack()
end
end
function c69757518.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c69757518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0)
end
function c69757518.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg1=sg:Select(tp,1,1,nil)
local c=e:GetHandler()
if Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT) and c:IsRelateToEffect(e)then
sg:Sub(sg1)
Duel.Overlay(c,sg)
end
end
end
\ No newline at end of file
--ホープ剣スラッシュ
function c94807487.initial_effect(c)
c:EnableCounterPermit(0x95)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c94807487.target)
e1:SetOperation(c94807487.operation)
c:RegisterEffect(e1)
--Untargetable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c94807487.eqlimit)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_ATTACK_DISABLED)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(c94807487.regop)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetValue(c94807487.value)
c:RegisterEffect(e5)
--remove overlay replace
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(94807487,0))
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE)
e6:SetRange(LOCATION_SZONE)
e6:SetCondition(c94807487.rcon)
e6:SetOperation(c94807487.rop)
c:RegisterEffect(e6)
end
function c94807487.eqlimit(e,c)
return c:IsSetCard(0x7f)
end
function c94807487.tglimit(e,re,rp)
return rp~=e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP+TYPE_MONSTER)
end
function c94807487.filter(c)
return c:IsFaceup() and c:IsSetCard(0x7f)
end
function c94807487.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c94807487.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c94807487.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c94807487.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c94807487.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 c94807487.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x95,1)
end
function c94807487.value(e,c)
return e:GetHandler():GetCounter(0x95)*500
end
function c94807487.rcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:GetHandler():IsType(TYPE_XYZ)
and ep==e:GetOwnerPlayer() and e:GetHandler():GetEquipTarget()==re:GetHandler() and re:GetHandler():GetOverlayCount()>=ev-1
end
function c94807487.rop(e,tp,eg,ep,ev,re,r,rp)
local ct=bit.band(ev,0xffff)
if ct==1 then
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
else
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST)
end
end
\ No newline at end of file
--アイス・ハンド
function c95929069.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95929069,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c95929069.condition)
e1:SetTarget(c95929069.target)
e1:SetOperation(c95929069.operation)
c:RegisterEffect(e1)
end
function c95929069.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY+REASON_BATTLE) and rp~=tp
end
function c95929069.dfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c95929069.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c95929069.dfilter(chkc) end
if chk==0 then return
Duel.IsExistingTarget(c95929069.dfilter,tp,0,LOCATION_ONFIELD,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c95929069.dfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c95929069.spfilter(c)
return c:GetCode()==68535320 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c95929069.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c95929069.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.Destroy(tc,REASON_EFFECT)
and Duel.SelectYesNo(tp,aux.Stringid(95929069,1))
and g:GetCount()>0
then
g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--RUM-千死蛮巧
function c96142517.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c96142517.cost)
e1:SetTarget(c96142517.target)
e1:SetOperation(c96142517.activate)
c:RegisterEffect(e1)
end
function c96142517.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) 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(c96142517.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function c96142517.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetHandler()~=se:GetHandler()
end
function c96142517.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c96142517.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank()+1)
end
function c96142517.filter2(c,e,tp,rank)
return c:GetRank()==rank and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c96142517.filter3(c,e,tp,rank)
return c:GetRank()==rank and c:IsType(TYPE_XYZ)
end
function c96142517.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c96142517.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c96142517.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp)end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=Duel.SelectTarget(tp,c96142517.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
e:SetLabel(tg:GetFirst():GetRank())
local g=Duel.GetMatchingGroup(c96142517.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,tg:GetFirst(),e,tp,tg:GetFirst():GetRank())
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96142517,1)) then
g=g:Select(tp,1,99,nil)
tg:Merge(g)
local tc=g:GetFirst()
while tc do
Duel.SetTargetCard(tc)
tc=g:GetNext()
end
end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tg,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c96142517.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
local rank=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c96142517.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rank+1)
local sc=g:GetFirst()
if sc then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Overlay(sc,g)
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--CNo.73激瀧瀑神アビス・スープラ
function c96864105.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,6),3)
c:EnableReviveLimit()
--atk up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96864105,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(TIMING_DAMAGE_CAL)
e1:SetCondition(c96864105.atkcon)
e1:SetCost(c96864105.atkcost)
e1:SetOperation(c96864105.atkop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c96864105.indescon)
e2:SetValue(1)
c:RegisterEffect(e2)
end
c96864105.xyz_number=73
function c96864105.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local at=Duel.GetAttacker()
local bt=Duel.GetAttackTarget()
return (at and at:GetControler()==tp or bt and bt:GetControler()==tp)
and Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and not Duel.IsDamageCalculated()
end
function c96864105.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(96864105)==0 end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
c:RegisterFlagEffect(96864105,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c96864105.atkop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not a:IsRelateToBattle() or not d:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetOwnerPlayer(tp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE_CAL)
if a:GetControler()==tp then
e1:SetValue(d:GetAttack())
a:RegisterEffect(e1)
else
e1:SetValue(a:GetAttack())
d:RegisterEffect(e1)
end
end
function c96864105.indescon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,36076683)
end
\ No newline at end of file
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