Commit 86a6ca03 authored by VanillaSalt's avatar VanillaSalt

fix

parent a36a378c
--Odd-Eyes Advent
--オッドアイズ・アドベント
function c16494704.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16494704)
e1:SetTarget(c16494704.RPGTarget(filter))
e1:SetOperation(c16494704.RPGOperation(filter))
e1:SetCountLimit(1,16494704+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c16494704.target)
e1:SetOperation(c16494704.operation)
c:RegisterEffect(e1)
end
function c16494704.pfilter(c)
return c:IsType(TYPE_PENDULUM)
function c16494704.pfilter(c,rc)
return c:IsType(TYPE_PENDULUM) and c:IsCanBeRitualMaterial(rc)
end
function c16494704.exfilter0(c)
return c:IsSetCard(0x99) and c:GetLevel()>=1 and c:IsAbleToGrave()
end
function c16494704.RPGFilter(c,filter,e,tp,m)
if (filter and not filter(c)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) or not c:IsRace(RACE_DRAGON)
or not c:IsType(TYPE_RITUAL) then return false end
local result=false
if m:IsContains(c) then
m:RemoveCard(c)
result=m:CheckWithSumGreater(Card.GetRitualLevel,c:GetOriginalLevel(),c)
m:AddCard(c)
else
result=m:CheckWithSumGreater(Card.GetRitualLevel,c:GetOriginalLevel(),c)
function c16494704.filter(c,e,tp,m)
if not c:IsRace(RACE_DRAGON) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(c16494704.pfilter,c,c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
end
function c16494704.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then
local sg=Duel.GetMatchingGroup(c16494704.exfilter0,tp,LOCATION_EXTRA,0,nil)
mg:Merge(sg)
end
return Duel.IsExistingMatchingCard(c16494704.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg)
end
return result
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c16494704.RPGTarget(filter)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(c16494704.pfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then
local sg=Duel.GetMatchingGroup(c16494704.exfilter0,tp,LOCATION_EXTRA,0,nil)
mg:Merge(sg)
end
return Duel.IsExistingMatchingCard(c16494704.RPGFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,filter,e,tp,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c16494704.operation(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then
local sg=Duel.GetMatchingGroup(c16494704.exfilter0,tp,LOCATION_EXTRA,0,nil)
mg:Merge(sg)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c16494704.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(c16494704.pfilter,tc,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
tc:SetMaterial(mat)
local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
mat:Sub(mat2)
Duel.ReleaseRitualMaterial(mat)
Duel.SendtoGrave(mat2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c16494704.RPGOperation(filter)
return function(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(c16494704.pfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then
local sg=Duel.GetMatchingGroup(c16494704.exfilter0,tp,LOCATION_EXTRA,0,nil)
mg:Merge(sg)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c16494704.RPGFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,filter,e,tp,mg)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
mg:RemoveCard(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetOriginalLevel(),tc)
tc:SetMaterial(mat)
if tc:IsLocation(LOCATION_MZONE) then
Duel.ReleaseRitualMaterial(mat)
else
Duel.SendtoGrave(mat,REASON_EFFECT)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
\ No newline at end of file
--Performapal Raingoat
--EMレインゴート
function c16617334.initial_effect(c)
--negate
--no damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16617334,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
......@@ -12,16 +11,15 @@ function c16617334.initial_effect(c)
e1:SetCost(c16617334.effcost)
e1:SetOperation(c16617334.operation)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16617334,1))
e2:SetCategory(CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCost(c16617334.effcost)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c16617334.condition2)
e2:SetCost(c16617334.effcost)
e2:SetTarget(c16617334.target2)
e2:SetOperation(c16617334.operation2)
c:RegisterEffect(e2)
......@@ -44,28 +42,27 @@ function c16617334.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetLabel(cid)
e1:SetValue(c16617334.refcon)
e1:SetValue(c16617334.damcon)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
end
function c16617334.refcon(e,re,val,r,rp,rc)
function c16617334.damcon(e,re,val,r,rp,rc)
local cc=Duel.GetCurrentChain()
if cc==0 or bit.band(r,REASON_EFFECT)==0 then return end
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if cid==e:GetLabel() then return 0 end
return val
end
function c16617334.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c16617334.filter(c)
return c:IsSetCard(0x9f) or c:IsSetCard(0x99)
return c:IsFaceup() and (c:IsSetCard(0x9f) or c:IsSetCard(0x99))
end
function c16617334.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD) and c16617334.filter(chkc) end
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and c16617334.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16617334.filter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPDEFENCE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c16617334.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
end
function c16617334.operation2(e,tp,eg,ep,ev,re,r,rp)
......@@ -73,8 +70,6 @@ function c16617334.operation2(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_ONFIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
......
--Performapal Monkeyboard
--EMモンキーボード
function c17330916.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -21,12 +21,13 @@ function c17330916.initial_effect(c)
local e3=e2:Clone()
e3:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e3)
--lvdown
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(17330916,1))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1)
e4:SetCost(c17330916.cost)
e4:SetCost(c17330916.lvcost)
e4:SetTarget(c17330916.lvtg)
e4:SetOperation(c17330916.lvop)
c:RegisterEffect(e4)
......@@ -36,41 +37,39 @@ function c17330916.sccon(e)
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq)
return not tc or not tc:IsSetCard(0x9f)
end
function c17330916.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,17330916)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c17330916.destg)
e1:SetOperation(c17330916.desop)
e1:SetTarget(c17330916.thtg)
e1:SetOperation(c17330916.thop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c17330916.filter1(c)
function c17330916.thfilter(c)
return c:IsLevelBelow(4) and c:IsSetCard(0x9f) and c:IsAbleToHand()
end
function c17330916.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c17330916.filter1,tp,LOCATION_DECK,0,1,nil) end
function c17330916.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c17330916.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c17330916.desop(e,tp,eg,ep,ev,re,r,rp)
function c17330916.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c17330916.filter1,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c17330916.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 c17330916.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c17330916.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD)
end
function c17330916.filter(c)
return c:IsSetCard(0x9f) or c:IsSetCard(0x99) and c:IsType(TYPE_MONSTER)
return (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and c:IsType(TYPE_MONSTER)
end
function c17330916.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c17330916.filter,tp,LOCATION_HAND,0,1,nil) end
......@@ -80,8 +79,11 @@ function c17330916.afilter(c,code)
end
function c17330916.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,c17330916.filter,tp,LOCATION_HAND,0,1,1,nil)
local hg=Duel.GetMatchingGroup(c17330916.afilter,tp,LOCATION_HAND,0,nil,tc:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c17330916.filter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
local hg=Duel.GetMatchingGroup(c17330916.afilter,tp,LOCATION_HAND,0,nil,g:GetFirst():GetCode())
local tc=hg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
......
-- Hi-Speedroid Mach Hagoita
--HSRマッハゴー・イータ
function c21516908.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
......@@ -9,9 +9,9 @@ function c21516908.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c21516908.lcost)
e1:SetTarget(c21516908.ltg)
e1:SetOperation(c21516908.lpop)
e1:SetCost(c21516908.lvcost)
e1:SetTarget(c21516908.lvtg)
e1:SetOperation(c21516908.lvop)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
......@@ -24,19 +24,18 @@ function c21516908.initial_effect(c)
e2:SetTarget(c21516908.sptg)
e2:SetOperation(c21516908.spop)
c:RegisterEffect(e2)
end
function c21516908.lcost(e,tp,eg,ep,ev,re,r,rp,chk)
function c21516908.lvcost(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 c21516908.filter(c)
return c:IsFaceup()
return c:IsFaceup() and c:GetLevel()>0
end
function c21516908.ltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21516908.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
function c21516908.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21516908.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
end
function c21516908.lpop(e,tp,eg,ep,ev,re,r,rp)
function c21516908.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c21516908.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
......@@ -65,6 +64,9 @@ function c21516908.splimit(e,c,sump,sumtype,sumpos,targetp,se)
end
function c21516908.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
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......@@ -73,7 +75,4 @@ function c21516908.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(c21516908.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--Dynaster Pendulum, the Powerful Dracoslayer
--剛竜剣士ダイナスターP
function c22638495.initial_effect(c)
--fusion material
c:EnableReviveLimit()
--special summon rule
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c22638495.spcon)
e1:SetOperation(c22638495.spop)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c22638495.splimit)
c:RegisterEffect(e1)
--Other effects
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c22638495.sptg)
e2:SetOperation(c22638495.spop2)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c22638495.spcon)
e2:SetOperation(c22638495.spop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE+LOCATION_SZONE,0)
e3:SetTarget(c22638495.indtg)
e3:SetValue(1)
e3:SetCountLimit(1)
e3:SetTarget(c22638495.sptg)
e3:SetOperation(c22638495.spop2)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE+LOCATION_SZONE,0)
e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetTarget(c22638495.indtg)
e4:SetValue(aux.tgoval)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_ONFIELD,0)
e5:SetTarget(c22638495.indtg)
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
end
function c22638495.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c22638495.spfilter1(c,tp)
return ((c:IsSetCard(0xc7) and c:IsType(TYPE_PENDULUM) and c:IsCanBeFusionMaterial()) or c:IsCode(92746535))
return c:IsSetCard(0xc7) and c:IsType(TYPE_PENDULUM) and c:IsCanBeFusionMaterial()
and Duel.CheckReleaseGroup(tp,c22638495.spfilter2,1,c)
end
function c22638495.spfilter2(c)
......@@ -59,20 +68,18 @@ function c22638495.spop(e,tp,eg,ep,ev,re,r,rp,c)
c:SetMaterial(g1)
Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c22638495.pspfilter(c,e,tp)
return c:IsSetCard(0xc7) and c:IsType(TYPE_PENDULUM)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c22638495.spfilter(c,e,tp)
return c:IsSetCard(0xc7) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22638495.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22638495.pspfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c22638495.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 c22638495.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,c22638495.pspfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c22638495.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......@@ -84,7 +91,6 @@ function c22638495.spop2(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
function c22638495.indtg(e,c)
return c:IsType(TYPE_PENDULUM) and (c:GetLocation(LOCATION_MZONE) or (c:GetSequence()==6 or c:GetSequence()==7))
return c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_MZONE) or (c:GetSequence()==6 or c:GetSequence()==7))
end
--Odd-Eyes Gravity Dragon
--オッドアイズ・グラビティ・ドラゴン
function c23851033.initial_effect(c)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81896370,0))
e1:SetDescription(aux.Stringid(23851033,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -17,7 +18,6 @@ function c23851033.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetTarget(c23851033.actarget)
e2:SetCost(c23851033.costchk)
e2:SetOperation(c23851033.costop)
c:RegisterEffect(e2)
......@@ -38,16 +38,9 @@ function c23851033.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c23851033.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
function c23851033.actarget(e,te,tp)
return te:GetHandler():GetControler()~=e:GetHandler():GetControler()
end
function c23851033.costchk(e,te_or_c,tp)
return Duel.CheckLPCost(tp,500)
end
function c23851033.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,500)
end
\ No newline at end of file
end
--Deskbot 008
--ブンボーグ008
function c24573625.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -17,6 +17,7 @@ function c24573625.initial_effect(c)
e2:SetCondition(c24573625.splimcon)
e2:SetTarget(c24573625.splimit)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -24,17 +25,18 @@ function c24573625.initial_effect(c)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c24573625.value)
c:RegisterEffect(e3)
--attack twice
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e5:SetCondition(c24573625.dircon)
c:RegisterEffect(e5)
......@@ -42,6 +44,7 @@ function c24573625.initial_effect(c)
e6:SetCode(EFFECT_CANNOT_ATTACK)
e6:SetCondition(c24573625.atkcon2)
c:RegisterEffect(e6)
--cannot be target
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetRange(LOCATION_MZONE)
......@@ -66,7 +69,6 @@ end
function c24573625.atkcon2(e)
return e:GetHandler():IsDirectAttacked()
end
function c24573625.tglimit(e,re,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and c~=e:GetHandler() and c:IsSetCard(0xab)
return c:IsLocation(LOCATION_MZONE) and c~=e:GetHandler() and c:IsSetCard(0xab)
end
--Painful Decision
--イルミラージュ
function c25795273.initial_effect(c)
--atk down
local e1=Effect.CreateEffect(c)
......@@ -8,7 +8,7 @@ function c25795273.initial_effect(c)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(c25795273.val)
c:RegisterEffect(e1)
--atk down
--def down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_DEFENCE)
......
--Destruction Sword – Wizard Buster Blade
--破壊剣-ウィザードバスターブレード
function c2602411.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
......@@ -9,6 +9,7 @@ function c2602411.initial_effect(c)
e1:SetTarget(c2602411.eqtg)
e1:SetOperation(c2602411.eqop)
c:RegisterEffect(e1)
--cannot activate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -17,9 +18,19 @@ function c2602411.initial_effect(c)
e2:SetTargetRange(0,1)
e2:SetValue(c2602411.aclimit)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCost(c2602411.thcost)
e3:SetTarget(c2602411.thtg)
e3:SetOperation(c2602411.thop)
c:RegisterEffect(e3)
end
function c2602411.filter(c)
return c:IsFaceup() and (c:GetCode()==86240887 or c:GetCode()==3428069 or c:GetCode()==78193831)
return c:IsFaceup() and c:IsCode(78193831)
end
function c2602411.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c2602411.filter(chkc) end
......@@ -33,7 +44,7 @@ function c2602411.eqop(e,tp,eg,ep,ev,re,r,rp)
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
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
......@@ -45,15 +56,6 @@ function c2602411.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c2602411.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCost(c2602411.descost)
e1:SetTarget(c2602411.target)
e1:SetOperation(c2602411.activate)
c:RegisterEffect(e1)
end
function c2602411.eqlimit(e,c)
return c==e:GetLabelObject()
......@@ -62,22 +64,21 @@ function c2602411.aclimit(e,re,tp)
local loc=re:GetActivateLocation()
return loc==LOCATION_GRAVE and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
end
function c2602411.descost(e,tp,eg,ep,ev,re,r,rp,chk)
function c2602411.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c2602411.rfilter(c)
return (c:IsSetCard(0x1e7) and c:IsType(TYPE_MONSTER)) and c:IsAbleToHand()
function c2602411.thfilter(c)
return c:IsSetCard(0xd6) and c:IsType(TYPE_MONSTER) and not c:IsCode(2602411) and c:IsAbleToHand()
end
function c2602411.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c2602411.rfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2602411.rfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
function c2602411.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c2602411.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2602411.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c2602411.rfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
local g=Duel.SelectTarget(tp,c2602411.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c2602411.activate(e,tp,eg,ep,ev,re,r,rp)
function c2602411.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
--Forbidden Tome
--禁断の異本
function c3211439.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c3211439.target)
e1:SetOperation(c3211439.operation)
e1:SetOperation(c3211439.activate)
c:RegisterEffect(e1)
end
function c3211439.filter(c,tpe)
return c:IsFaceup() and c:IsType(tpe)
end
function c3211439.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil,TYPE_FUSION) or
Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil,TYPE_SYNCHRO) or
Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil,TYPE_XYZ) end
local b1=Duel.IsExistingMatchingCard(c3211439.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil,TYPE_FUSION)
local b2=Duel.IsExistingMatchingCard(c3211439.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil,TYPE_SYNCHRO)
local b3=Duel.IsExistingMatchingCard(c3211439.filter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil,TYPE_XYZ)
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(3211439,0)
opval[off-1]=TYPE_FUSION
off=off+1
end
if b2 then
ops[off]=aux.Stringid(3211439,1)
opval[off-1]=TYPE_SYNCHRO
off=off+1
end
if b3 then
ops[off]=aux.Stringid(3211439,2)
opval[off-1]=TYPE_XYZ
off=off+1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local op=Duel.SelectOption(tp,aux.Stringid(73988674,0),aux.Stringid(73988674,1),aux.Stringid(73988674,2))
e:SetLabel(op)
local op=Duel.SelectOption(tp,table.unpack(ops))
e:SetLabel(opval[op])
end
function c3211439.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
local sg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_FUSION)
Duel.Destroy(sg,REASON_EFFECT)
elseif e:GetLabel()==1 then
local sg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_SYNCHRO)
Duel.Destroy(sg,REASON_EFFECT)
else
local sg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_XYZ)
Duel.Destroy(sg,REASON_EFFECT) end
function c3211439.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c3211439.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel())
if g:GetCount()>1 then
Duel.SendtoGrave(g,REASON_RULE)
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