Commit 35e84d29 authored by mercury233's avatar mercury233

update

parent 904dad57
Pipeline #6858 passed with stages
in 43 seconds
#created by ... #created by ...
#main #main
101108001
101108002
101108034
101108052
101108069
100200209 100200209
100285004 100285004
100343031 100343031
...@@ -30,6 +35,7 @@ ...@@ -30,6 +35,7 @@
100284002 100284002
100284003 100284003
#extra #extra
100426004
100285003 100285003
100343041 100343041
100343042 100343042
......
...@@ -9,6 +9,7 @@ function c100343031.initial_effect(c) ...@@ -9,6 +9,7 @@ function c100343031.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100343031) e1:SetCountLimit(1,100343031)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c100343031.spcost) e1:SetCost(c100343031.spcost)
e1:SetTarget(c100343031.sptg) e1:SetTarget(c100343031.sptg)
e1:SetOperation(c100343031.spop) e1:SetOperation(c100343031.spop)
...@@ -16,9 +17,11 @@ function c100343031.initial_effect(c) ...@@ -16,9 +17,11 @@ function c100343031.initial_effect(c)
--to hand --to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,100343031) e2:SetCountLimit(1,100343031)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c100343031.thtg) e2:SetTarget(c100343031.thtg)
......
--CX-N·As·Ch Knight
--
--Script by Trishula9
function c100426004.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3,c100426004.ovfilter,aux.Stringid(100426004,0))
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--xyz spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100426004)
e2:SetCost(c100426004.spcost)
e2:SetTarget(c100426004.sptg)
e2:SetOperation(c100426004.spop)
c:RegisterEffect(e2)
end
function c100426004.ovfilter(c)
return c:IsCode(100426003) and c:IsFaceup()
end
function c100426004.spcost(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 c100426004.spfilter(c,e,tp,mc)
local m=_G["c"..c:GetCode()]
if not m then return false end
local no=m.xyz_number
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c100426004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c100426004.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100426004.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100426004.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)~=0 then
sc:CompleteProcedure()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabelObject(sc)
e1:SetCondition(c100426004.descon)
e1:SetOperation(c100426004.desop)
if Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentPhase()==PHASE_END then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
e1:SetLabel(Duel.GetTurnCount())
sc:RegisterFlagEffect(100426004,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetLabel(0)
sc:RegisterFlagEffect(100426004,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1)
end
Duel.RegisterEffect(e1,tp)
end
end
end
end
function c100426004.descon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp or Duel.GetTurnCount()==e:GetLabel() then return false end
return e:GetLabelObject():GetFlagEffect(100426004)>0
end
function c100426004.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
--EMジェントルード
--
--Script by Trishula9
function c101108001.initial_effect(c)
aux.EnablePendulumAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101108001,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,101108001)
e1:SetCondition(c101108001.scon)
e1:SetTarget(c101108001.stg)
e1:SetOperation(c101108001.sop)
c:RegisterEffect(e1)
--pendulum set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101108001,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101108001+100)
e2:SetTarget(c101108001.pentg)
e2:SetOperation(c101108001.penop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101108001,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_EXTRA)
e3:SetCountLimit(1,101108001+100)
e3:SetCondition(c101108001.thcon)
e3:SetCost(c101108001.thcost)
e3:SetTarget(c101108001.thtg)
e3:SetOperation(c101108001.thop)
c:RegisterEffect(e3)
end
function c101108001.cfilter(c)
return c:IsCode(101108002)
end
function c101108001.gfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function c101108001.scon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return Duel.IsExistingMatchingCard(c101108001.cfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
and (g:GetCount()==0 or g:FilterCount(c101108001.gfilter,nil)==g:GetCount())
end
function c101108001.sfilter(c)
return c:IsSetCard(0x99) and c:IsAbleToHand()
end
function c101108001.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101108001.sfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101108001.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101108001.sfilter,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 c101108001.penfilter(c)
return c:IsSetCard(0x9f) and c:IsType(TYPE_PENDULUM) and not c:IsCode(101108001) and not c:IsForbidden()
end
function c101108001.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))
and Duel.IsExistingMatchingCard(c101108001.penfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c101108001.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c101108001.penfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c101108001.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function c101108001.costfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsDiscardable()
end
function c101108001.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101108001.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c101108001.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c101108001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c101108001.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c101108001.thfilter,tp,LOCATION_PZONE,0,nil)
if c:IsLocation(LOCATION_HAND) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101108001,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
end
function c101108001.thfilter(c)
return c:IsSetCard(0x9f,0x99) and c:IsAbleToHand()
end
--EMレディアンジュ
--
--Script by Trishula9
function c101108002.initial_effect(c)
aux.EnablePendulumAttribute(c)
--atk down
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101108002,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCondition(c101108002.atkcon)
e1:SetCost(c101108002.atkcost)
e1:SetOperation(c101108002.atkop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101108002,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,101108002)
e2:SetCost(c101108002.drcost)
e2:SetTarget(c101108002.drtg)
e2:SetOperation(c101108002.drop)
c:RegisterEffect(e2)
--pendulum set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101108002,2))
e3:SetCategory(CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,101108002)
e3:SetCondition(c101108002.pencon)
e3:SetTarget(c101108002.pentg)
e3:SetOperation(c101108002.penop)
c:RegisterEffect(e3)
end
function c101108002.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
return a and d and d:IsFaceup()
end
function c101108002.costfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsDiscardable()
end
function c101108002.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101108002.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c101108002.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c101108002.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetBattleMonster(1-tp)
if tc and tc:IsRelateToBattle() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c101108002.drfilter(c)
return c:IsSetCard(0x9f) and c:IsType(TYPE_MONSTER) and not c:IsCode(101108002) and c:IsDiscardable()
end
function c101108002.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(c101108002.drfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c101108002.drfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c101108002.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c101108002.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c101108002.penfilter(c)
return (c:IsSetCard(0x99) or c:IsCode(101108001)) and c:IsFaceup()
end
function c101108002.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101108002.penfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c101108002.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 c101108002.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_PZONE,POS_FACEUP,true)
end
end
--オッドアイズ・ペンデュラムグラフ・ドラゴン
--Scripted by mallu11
function c101108034.initial_effect(c)
aux.EnablePendulumAttribute(c)
--revive limit
aux.EnableReviveLimitPendulumSummonable(c,LOCATION_HAND)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.ritlimit)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101108034,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,101108034)
e1:SetTarget(c101108034.thtg)
e1:SetOperation(c101108034.thop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101108034.damcon1)
e2:SetOperation(c101108034.damop1)
c:RegisterEffect(e2)
--sp_summon effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101108034.regcon)
e3:SetOperation(c101108034.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_CHAIN_SOLVED)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c101108034.damcon2)
e4:SetOperation(c101108034.damop2)
c:RegisterEffect(e4)
--disable
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101108034,1))
e5:SetCategory(CATEGORY_DISABLE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c101108034.discon)
e5:SetTarget(c101108034.distg)
e5:SetOperation(c101108034.disop)
c:RegisterEffect(e5)
end
function c101108034.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c101108034.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101108034.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c101108034.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101108034.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
function c101108034.filter(c,sp)
return c:IsSummonPlayer(sp) and c:IsSummonLocation(LOCATION_EXTRA)
end
function c101108034.damcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101108034.filter,1,nil,1-tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function c101108034.damop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,101108034)
Duel.Damage(1-tp,300,REASON_EFFECT)
end
function c101108034.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101108034.filter,1,nil,1-tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function c101108034.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(101108034,RESET_CHAIN,0,1)
end
function c101108034.damcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(101108034)>0
end
function c101108034.damop2(e,tp,eg,ep,ev,re,r,rp)
local n=e:GetHandler():GetFlagEffect(101108034)
e:GetHandler():ResetFlagEffect(101108034)
Duel.Hint(HINT_CARD,0,101108034)
Duel.Damage(1-tp,n*300,REASON_EFFECT)
end
function c101108034.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_SPELL) and Duel.IsChainDisablable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c101108034.distg(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
if e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) then
e:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON)
else
e:SetCategory(CATEGORY_DISABLE)
end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c101108034.spfilter(c,e,tp)
return c:IsSetCard(0x99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c101108034.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
if c:IsRelateToEffect(e) and c:IsFaceup() and not c:IsImmuneToEffect(e) then
if Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) and c:IsLocation(LOCATION_PZONE) then
if Duel.NegateEffect(ev) and c:IsSummonType(SUMMON_TYPE_RITUAL)
and Duel.IsExistingMatchingCard(c101108034.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(101108034,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101108034.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--EXP
--
--Script by Trishula9
function c101108052.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c101108052.activate)
c:RegisterEffect(e1)
end
function c101108052.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101108052,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_PENDULUM_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCountLimit(1,101108052)
e1:SetValue(c101108052.pendvalue)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101108052.pendvalue(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--ペンデュラム・スケール
--
--Script by Trishula9
function c101108069.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101108069,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101108069+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101108069.condition)
e1:SetTarget(c101108069.target)
e1:SetOperation(c101108069.operation)
c:RegisterEffect(e1)
end
function c101108069.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)==2
end
function c101108069.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c101108069.thfilter1(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelAbove(2) and c:IsLevelBelow(4) and c:IsAbleToHand()
end
function c101108069.thfilter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelAbove(5) and c:IsLevelBelow(7) and c:IsAbleToHand()
end
function c101108069.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
local scl1=tc1:GetLeftScale()
local scl2=tc2:GetRightScale()
local dif=math.abs(scl1-scl2)
if chk==0 then return
(dif==0 and Duel.IsExistingMatchingCard(c101108069.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler()))
or (dif>=1 and dif<=3 and Duel.IsExistingMatchingCard(c101108069.thfilter1,tp,LOCATION_DECK,0,1,nil))
or (dif>=4 and dif<=6 and Duel.IsExistingMatchingCard(c101108069.thfilter2,tp,LOCATION_DECK,0,1,nil))
or (dif>=7 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,nil)) end
if dif==0 then
local g=Duel.GetMatchingGroup(c101108069.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
if dif>=1 and dif<=6 then Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end
end
function c101108069.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)<2 then return end
local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
local scl1=tc1:GetLeftScale()
local scl2=tc2:GetRightScale()
local dif=math.abs(scl1-scl2)
local g1=Duel.GetMatchingGroup(c101108069.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local g2=Duel.GetMatchingGroup(c101108069.thfilter1,tp,LOCATION_DECK,0,nil)
local g3=Duel.GetMatchingGroup(c101108069.thfilter2,tp,LOCATION_DECK,0,nil)
local g4=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_PZONE,0,nil)
local b1=dif==0 and g1:GetCount()>=2
local b2=dif>=1 and dif<=3 and g2:GetCount()>=1
local b3=dif>=4 and dif<=6 and g3:GetCount()>=1
local b4=dif>=7 and g4:GetCount()>=1
if b1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g1:Select(tp,2,2,e:GetHandler())
Duel.Destroy(sg,REASON_EFFECT)
end
if b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g2:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
if b3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g3:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
if b4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g4:Select(tp,1,2,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
local fg=Duel.GetMatchingGroup(c101108069.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and fg:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(101108069,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local mg=fg:Select(tp,1,1,nil)
Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c101108069.spfilter(c,e,tp)
return c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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