Commit 36d2a2aa authored by mercury233's avatar mercury233

update scripts

parent 5e491dfe
--EMクレイブレイカー
--Performapal Clay Breaker
--Scripted by ahtelel
function c100200144.initial_effect(c)
--atk down
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200144,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCountLimit(1,100200144)
e1:SetCondition(c100200144.atkcon)
e1:SetOperation(c100200144.atkop)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200144,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100200144+100)
e2:SetCondition(c100200144.thcon)
e2:SetTarget(c100200144.thtg)
e2:SetOperation(c100200144.thop)
c:RegisterEffect(e2)
end
function c100200144.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle() and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c100200144.filter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function c100200144.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local ct=Duel.GetMatchingGroupCount(c100200144.filter,tp,LOCATION_EXTRA,0,nil)*500
if c:IsFaceup() and c:IsRelateToBattle() and bc:IsFaceup() and bc:IsRelateToBattle() and ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-ct)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
bc:RegisterEffect(e1)
end
end
function c100200144.cfilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c100200144.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100200144.cfilter,2,nil,tp)
end
function c100200144.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 c100200144.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--ファーニマル・エンジェル
--Fluffal Angel
--Scripted by ahtelel
function c100200145.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--sp summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100200145)
e1:SetTarget(c100200145.sptg)
e1:SetOperation(c100200145.spop)
c:RegisterEffect(e1)
--sp summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100200145+100)
e2:SetCost(c100200145.spcost)
e2:SetTarget(c100200145.sptg2)
e2:SetOperation(c100200145.spop2)
c:RegisterEffect(e2)
end
function c100200145.filter(c,e,tp)
return (c:IsSetCard(0xa9) or c:IsSetCard(0xc3)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100200145.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100200145.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c100200145.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100200145.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100200145.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c100200145.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100200145.splimit(e,c)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function c100200145.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c100200145.filter2(c,e,tp)
return c:IsSetCard(0xad) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100200145.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100200145.filter2(chkc,e,tp) end
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c100200145.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100200145.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100200145.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--シューティング・ライザー・ドラゴン
--Shooting Riser Dragon
function c100200146.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--lv
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200146,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100200146)
e1:SetCondition(c100200146.lvlcon)
e1:SetTarget(c100200146.lvtg1)
e1:SetOperation(c100200146.lvop1)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200146,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1c0+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100200146.sccon)
e2:SetTarget(c100200146.sctarg)
e2:SetOperation(c100200146.scop)
c:RegisterEffect(e2)
end
function c100200146.lvlcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c100200146.lvtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c100200146.tgfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100200146.tgfilter(c,lv)
return c:IsLevelBelow(lv-1) and c:IsAbleToGrave()
end
function c100200146.lvop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100200146.tgfilter,tp,LOCATION_DECK,0,1,1,nil,c:GetLevel())
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE)
and c:IsFaceup() then
local lv=g:GetFirst():GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-lv)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetValue(c100200146.aclimit)
e2:SetLabelObject(g:GetFirst())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c100200146.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
end
function c100200146.sccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c100200146.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100200146.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
--希望の魔術師
--Hope Magician
--Script by nekrozar
function c100200147.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--disable attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200147,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c100200147.atktg)
e1:SetOperation(c100200147.atkop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200147,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100200147)
e2:SetCost(c100200147.spcost)
e2:SetTarget(c100200147.sptg)
e2:SetOperation(c100200147.spop)
c:RegisterEffect(e2)
--material
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100200147,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c100200147.xyzcon)
e3:SetTarget(c100200147.xyztg)
e3:SetOperation(c100200147.xyzop)
c:RegisterEffect(e3)
end
c100200147.pendulum_level=4
function c100200147.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c100200147.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.NegateAttack() then
Duel.BreakEffect()
Duel.Destroy(c,REASON_EFFECT)
end
end
function c100200147.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 c100200147.spfilter(c,e,tp)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100200147.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100200147.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100200147.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,c100200147.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if not Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP_DEFENSE) then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and c:IsRelateToEffect(e) and c:IsFaceup()
and Duel.SelectYesNo(tp,aux.Stringid(100200147,3)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
function c100200147.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c100200147.xyzfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER)
end
function c100200147.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100200147.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100200147.xyzfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100200147,4))
local g=Duel.SelectTarget(tp,c100200147.xyzfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c100200147.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Overlay(c,Group.FromCards(tc))
end
end
--サクリファイス・アニマ
--Relinquished Anima
--Script by dest
function c100203028.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c100203028.matfilter,1)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100203028,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100203028)
e1:SetCondition(c100203028.eqcon)
e1:SetTarget(c100203028.eqtg)
e1:SetOperation(c100203028.eqop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(c100203028.adcon)
e2:SetValue(c100203028.atkval)
c:RegisterEffect(e2)
end
function c100203028.matfilter(c)
return c:IsLevel(1) and not c:IsLinkType(TYPE_TOKEN)
end
function c100203028.eqcon(e,tp,eg,ep,ev,re,r,rp)
return c100203028.can_equip_monster(e:GetHandler())
end
function c100203028.eqfilter(c)
return c:GetFlagEffect(100203028)~=0
end
function c100203028.can_equip_monster(c)
local g=c:GetEquipGroup():Filter(c100203028.eqfilter,nil)
return g:GetCount()==0
end
function c100203028.eqfilter2(c,tp,lg)
return c:IsFaceup() and (c:IsAbleToChangeControler() or c:IsControler(tp)) and lg:IsContains(c)
end
function c100203028.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c100203028.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c100203028.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp,lg)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c100203028.eqlimit(e,c)
return e:GetOwner()==c
end
function c100203028.equip_monster(c,tp,tc)
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(100203028,RESET_EVENT+0x1fe0000,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c100203028.eqlimit)
tc:RegisterEffect(e1)
end
function c100203028.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then
if c:IsRelateToEffect(e) then
c100203028.equip_monster(c,tp,tc)
else Duel.SendtoGrave(tc,REASON_EFFECT) end
end
end
function c100203028.adcon(e)
local c=e:GetHandler()
local g=c:GetEquipGroup():Filter(c100203028.eqfilter,nil)
return g:GetCount()>0
end
function c100203028.atkval(e,c)
local c=e:GetHandler()
local g=c:GetEquipGroup():Filter(c100203028.eqfilter,nil)
local atk=g:GetFirst():GetTextAttack()
if bit.band(g:GetFirst():GetOriginalType(),TYPE_MONSTER)==0 or atk<0 then
return 0
else
return atk
end
end
--ゴッドオーガス --ゴッドオーガス
--Orgoth the Relentless --Orgoth the Relentless
function c100227001.initial_effect(c) function c100227001.initial_effect(c)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100227001,0)) e1:SetDescription(aux.Stringid(100227001,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DRAW) e1:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
...@@ -24,9 +24,23 @@ function c100227001.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,9 +24,23 @@ function c100227001.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk) e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local res12=false
local res34=false
local res56=false
if d1==d2 and d2==d3 then if d1==d2 and d2==d3 then
res12=true
res34=true
res56=true
elseif (d1==d2 and (d1==1 or d1==2)) or (d1==d3 and (d1==1 or d1==2)) or (d2==d3 and (d2==1 or d2==2)) then
res12=true
elseif (d1==d2 and (d1==3 or d1==4)) or (d1==d3 and (d1==3 or d1==4)) or (d2==d3 and (d2==3 or d2==4)) then
res34=true
elseif (d1==d2 and (d1==5 or d1==6)) or (d1==d3 and (d1==5 or d1==6)) or (d2==d3 and (d2==5 or d2==6)) then
res56=true
end
if res12 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
...@@ -35,32 +49,17 @@ function c100227001.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,32 +49,17 @@ function c100227001.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.Draw(tp,2,REASON_EFFECT) end
if res34 then
Duel.Draw(tp,2,REASON_EFFECT)
end
if res56 then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DIRECT_ATTACK) e3:SetCode(EFFECT_DIRECT_ATTACK)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3) c:RegisterEffect(e3)
elseif d1==d2==1 or d2==d3==1 or d1==d3==1 or d1==d2==2 or d2==d3==2 or d1==d3==2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
elseif d1==d2==3 or d2==d3==3 or d1==d3==3 or d1==d2==4 or d2==d3==4 or d1==d3==4 then
Duel.Draw(tp,2,REASON_EFFECT)
elseif d1==d2==5 or d2==d3==5 or d1==d3==5 or d1==d2==5 or d2==d3==6 or d1==d3==6 then
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end end
end end
\ No newline at end of file
--リビング・フォッシル
--Living Fossil
--Script by dest
function c100227015.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:SetCountLimit(1,100227015+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100227015.target)
e1:SetOperation(c100227015.activate)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c100227015.rmop)
c:RegisterEffect(e2)
--Atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(-1000)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--disable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e5)
end
function c100227015.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100227015.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100227015.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100227015.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100227015.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c100227015.eqlimit(e,c)
return e:GetLabelObject()==c
end
function c100227015.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c100227015.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+0x47e0000)
e2:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e2)
end
end
function c100227015.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetHandler():GetEquipTarget()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--時械神 サンダイオン --時械神サンダイオン
--Sandaion the Timelord --Sandaion the Timelord
function c100227025.initial_effect(c) function c100227025.initial_effect(c)
c:SetUniqueOnField(1,0,100227025) c:SetUniqueOnField(1,0,100227025)
...@@ -42,6 +42,7 @@ function c100227025.initial_effect(c) ...@@ -42,6 +42,7 @@ function c100227025.initial_effect(c)
c:RegisterEffect(e8) c:RegisterEffect(e8)
--LP --LP
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(100227025,1))
e6:SetCategory(CATEGORY_DAMAGE) e6:SetCategory(CATEGORY_DAMAGE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
...@@ -54,11 +55,10 @@ function c100227025.initial_effect(c) ...@@ -54,11 +55,10 @@ function c100227025.initial_effect(c)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--to deck --to deck
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(100227025,1)) e7:SetDescription(aux.Stringid(100227025,2))
e7:SetCategory(CATEGORY_TODECK) e7:SetCategory(CATEGORY_TODECK)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_PHASE+PHASE_STANDBY) e7:SetCode(EVENT_PHASE+PHASE_STANDBY)
e7:SetProperty(EFFECT_FLAG_REPEAT)
e7:SetCountLimit(1) e7:SetCountLimit(1)
e7:SetRange(LOCATION_MZONE) e7:SetRange(LOCATION_MZONE)
e7:SetCondition(c100227025.tdcon) e7:SetCondition(c100227025.tdcon)
...@@ -69,7 +69,7 @@ end ...@@ -69,7 +69,7 @@ end
function c100227025.spcon(e,c) function c100227025.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function c100227025.damcon(e,tp,eg,ep,ev,re,r,rp) function c100227025.damcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -94,7 +94,7 @@ function c100227025.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -94,7 +94,7 @@ function c100227025.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c100227025.tdop(e,tp,eg,ep,ev,re,r,rp) function c100227025.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsAbleToDeck() then if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end end
end end
...@@ -25,7 +25,7 @@ function c100227033.initial_effect(c) ...@@ -25,7 +25,7 @@ function c100227033.initial_effect(c)
e2:SetCost(c100227033.negcost) e2:SetCost(c100227033.negcost)
e2:SetTarget(c100227033.negtg) e2:SetTarget(c100227033.negtg)
e2:SetOperation(c100227033.negop) e2:SetOperation(c100227033.negop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search --search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
...@@ -37,14 +37,14 @@ function c100227033.initial_effect(c) ...@@ -37,14 +37,14 @@ function c100227033.initial_effect(c)
e3:SetCondition(c100227033.condition) e3:SetCondition(c100227033.condition)
e3:SetTarget(c100227033.target) e3:SetTarget(c100227033.target)
e3:SetOperation(c100227033.operation) e3:SetOperation(c100227033.operation)
c:RegisterEffect(e3,false,1) c:RegisterEffect(e3)
end end
c100227033.xyz_number=90 c100227033.xyz_number=90
function c100227033.indcon(e) function c100227033.indcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x55) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x55)
end end
function c100227033.negcon(e,tp,eg,ep,ev,re,r,rp,chk) function c100227033.negcon(e,tp,eg,ep,ev,re,r,rp,chk)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp return ep~=tp
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end end
function c100227033.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100227033.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -56,16 +56,16 @@ end ...@@ -56,16 +56,16 @@ end
function c100227033.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100227033.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) if re:GetHandler():IsDestructable() and e:GetLabelObject():IsSetCard(0x7b) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,0,0)
end
end end
function c100227033.negop(e,tp,eg,ep,ev,re,r,rp) function c100227033.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and e:GetLabelObject():IsSetCard(0x7b) then if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) and e:GetLabelObject():IsSetCard(0x7b) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
function c100227033.condition(e,tp,eg,ep,ev,re,r,rp) function c100227033.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c100227033.filter(c) function c100227033.filter(c)
......
--トポロジック・ガンブラー・ドラゴン --トポロジック・ガンブラー・ドラゴン
--Topologic Gamble Dragon --Topologic Gamble Dragon
--not fully implemented(need update ocgcore)
--https://github.com/Fluorohydride/ygopro-core/pull/139
function c100227043.initial_effect(c) function c100227043.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
...@@ -15,7 +17,7 @@ function c100227043.initial_effect(c) ...@@ -15,7 +17,7 @@ function c100227043.initial_effect(c)
e1:SetCondition(c100227043.hdcon) e1:SetCondition(c100227043.hdcon)
e1:SetTarget(c100227043.hdtg) e1:SetTarget(c100227043.hdtg)
e1:SetOperation(c100227043.hdop) e1:SetOperation(c100227043.hdop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--discard --discard
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100227043,1)) e2:SetDescription(aux.Stringid(100227043,1))
...@@ -71,10 +73,11 @@ function c100227043.hdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,10 +73,11 @@ function c100227043.hdop(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local ct=math.min(hg:GetCount(),2) local ct=math.min(hg:GetCount(),2)
if ct<=0 then return false end if ct<=0 then return false end
ct=Duel.AnnounceNumber(tp,1,2) local ct2=1
local g=hg:RandomSelect(tp,ct) if ct>1 then ct2=Duel.AnnounceNumber(tp,1,2) end
local ct2=Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) local g=hg:RandomSelect(tp,ct2)
Duel.DiscardHand(1-tp,nil,ct2,ct2,REASON_EFFECT+REASON_DISCARD) local ct3=Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
Duel.DiscardHand(1-tp,nil,ct3,ct3,REASON_EFFECT+REASON_DISCARD)
end end
function c100227043.hdcon2(e) function c100227043.hdcon2(e)
return e:GetHandler():IsExtraLinked() return e:GetHandler():IsExtraLinked()
......
--オッドアイズ・ファンタズマ・ドラゴン
--Odd-Eyes Phantasma Dragon
--scripted by Naim
function c100228001.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100228001,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,100228001)
e1:SetCost(c100228001.thcost)
e1:SetTarget(c100228001.thtg)
e1:SetOperation(c100228001.thop)
c:RegisterEffect(e1)
--special summon from hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100228001,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,100228001+100)
e2:SetCondition(c100228001.spcon)
e2:SetCost(c100228001.spcost)
e2:SetTarget(c100228001.sptg)
e2:SetOperation(c100228001.spop)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100228001,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100228001+200)
e3:SetCondition(c100228001.atkcon)
e3:SetOperation(c100228001.atkop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(100228001,ACTIVITY_SPSUMMON,c100228001.counterfilter)
end
function c100228001.counterfilter(c)
return not c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c100228001.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c100228001.thfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
end
function c100228001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100228001.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c100228001.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,c100228001.thfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100228001.exfilter(c)
return c:IsFaceup() and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM)
end
function c100228001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100228001,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c100228001.splimit)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c100228001.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c100228001.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldCard(tp,LOCATION_PZONE,0) and Duel.GetFieldCard(tp,LOCATION_PZONE,1)
and Duel.IsExistingMatchingCard(c100228001.exfilter,tp,LOCATION_EXTRA,0,1,nil)
end
function c100228001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100228001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c100228001.atkfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function c100228001.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local d=c:GetBattleTarget()
local gc=Duel.GetMatchingGroupCount(c100228001.atkfilter,tp,LOCATION_EXTRA,0,nil)
return c==Duel.GetAttacker() and d and d:IsFaceup() and not d:IsControler(tp) and gc>0
end
function c100228001.atkop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttacker():GetBattleTarget()
local gc=Duel.GetMatchingGroupCount(c100228001.atkfilter,tp,LOCATION_EXTRA,0,nil)
if d:IsRelateToBattle() and d:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(-gc*1000)
d:RegisterEffect(e1)
end
end
--デーモンの降臨
--Advent Skull Archfiend
--Scripted by Eerie Code
function c100242101.initial_effect(c)
c:EnableReviveLimit()
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(70781052)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c100242101.indval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(c100242101.indeval)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCondition(c100242101.spcon)
e4:SetTarget(c100242101.sptg)
e4:SetOperation(c100242101.spop)
c:RegisterEffect(e4)
end
function c100242101.indval(e,c)
return not c:IsType(TYPE_RITUAL)
end
function c100242101.indeval(e,re,rp)
return re:IsActiveType(TYPE_MONSTER) and not re:IsActiveType(TYPE_RITUAL)
end
function c100242101.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL)
and rp~=tp and c:GetPreviousControler()==tp
end
function c100242101.spfilter(c,e,tp)
return c:IsCode(70781052) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c100242101.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
return Duel.IsExistingMatchingCard(c100242101.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c100242101.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 tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100242101.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
end
end
--テクスチェンジャー
--Texchangure
--Scripted by Eerie Code
function c100318002.initial_effect(c)
--negate attack
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c100318002.condition)
e1:SetTarget(c100318002.target)
e1:SetOperation(c100318002.operation)
c:RegisterEffect(e1)
end
function c100318002.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget() and Duel.GetAttackTarget():IsControler(tp)
end
function c100318002.filter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100318002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100318002.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c100318002.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateAttack() or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100318002.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--ウィジェット・キッド
--Widget Kid
--Scripted by Eerie Code
function c100318003.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100318003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100318003)
e1:SetTarget(c100318003.sptg)
e1:SetOperation(c100318003.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c100318003.filter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100318003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100318003.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100318003.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,c100318003.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
--サイバース・ホワイトハット
--Cyberse Whitehat
--Scripted by Eerie Code
function c100318004.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100318004,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100318004)
e1:SetCondition(c100318004.spcon)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100318004,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c100318004.atkcon)
e2:SetTarget(c100318004.atktg)
e2:SetOperation(c100318004.atkop)
c:RegisterEffect(e2)
end
function c100318004.filter(c,tp,race)
if c:IsFacedown() then return false end
if not race then
return Duel.IsExistingMatchingCard(c100318004.filter,tp,LOCATION_MZONE,0,1,c,tp,c:GetRace())
else
return c:IsRace(race)
end
end
function c100318004.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100318004.filter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetControler())
end
function c100318004.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK
end
function c100318004.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c100318004.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
\ No newline at end of file
--サイバネット・リカバー
--Cynet Recover
--Scripted by Eerie Code
function c100318021.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100318021,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100318021)
e2:SetCondition(c100318021.spcon)
e2:SetTarget(c100318021.sptg)
e2:SetOperation(c100318021.spop)
c:RegisterEffect(e2)
end
function c100318021.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousTypeOnField(),TYPE_LINK)~=0
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)
end
function c100318021.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100318021.cfilter,1,nil,tp)
end
function c100318021.filter(c,e,tp)
return not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100318021.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100318021.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100318021.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100318021.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100318021.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_DEFENSE)
end
end
--サイバネット・リグレッション
--Cynet Regression
--Scripted by Eerie Code
function c100318033.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100318033+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100318033.condition)
e1:SetTarget(c100318033.target)
e1:SetOperation(c100318033.activate)
c:RegisterEffect(e1)
end
function c100318033.cfilter(c,tp)
return c:IsType(TYPE_LINK) and c:GetSummonPlayer()==tp
end
function c100318033.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100318033.cfilter,1,nil,tp)
end
function c100318033.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c100318033.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--トランスコード・トーカー
--Transcode Talker
--Scripted by Eerie Code
function c100318041.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
--atk gain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCondition(c100318041.atkcon)
e1:SetTarget(c100318041.atktg)
e1:SetValue(500)
c:RegisterEffect(e1)
--untarget
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100318041,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,100318041)
e3:SetCost(c100318041.spcost)
e3:SetTarget(c100318041.sptg)
e3:SetOperation(c100318041.spop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(100318041,ACTIVITY_SPSUMMON,c100318041.counterfilter)
end
function c100318041.counterfilter(c)
return c:IsRace(RACE_CYBERSE)
end
function c100318041.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100318041,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100318041.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100318041.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_CYBERSE)
end
function c100318041.atkcon(e)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c100318041.atktg(e,c)
local g=e:GetHandler():GetMutualLinkedGroup()
return c==e:GetHandler() or g:IsContains(c)
end
function c100318041.filter(c,e,tp,zone)
return c:IsRace(RACE_CYBERSE) and c:IsLinkBelow(3) and c:IsType(TYPE_LINK) and not c:IsCode(100318041)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c100318041.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 c100318041.filter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100318041.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100318041.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100318041.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,zone)
end
end
--ペンテスタッグ
--Pentestag
--Scripted by Eerie Code
function c100318042.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2)
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PIERCE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLinkState))
c:RegisterEffect(e1)
end
--F.A. Dark Dragster
--Scripted by ahtelel
function c101004087.initial_effect(c)
c:EnableReviveLimit()
--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(c101004087.spcon)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101004087.atkval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(aux.chainreg)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101004087,0))
e4:SetCategory(CATEGORY_LVCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c101004087.lvcon)
e4:SetOperation(c101004087.lvop)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101004087,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCountLimit(1)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(c101004087.rdtg)
e5:SetOperation(c101004087.rdop)
c:RegisterEffect(e5)
end
function c101004087.spfilter1(c)
return c:IsFaceup() and c:IsCode(101004087)
end
function c101004087.spfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x107) and c:IsLevelAbove(7)
end
function c101004087.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or Duel.IsExistingMatchingCard(c101004087.spfilter1,tp,LOCATION_MZONE,0,1,nil) then return false end
return Duel.IsExistingMatchingCard(c101004087.spfilter2,tp,LOCATION_MZONE,0,1,nil)
end
function c101004087.atkval(e,c)
return c:GetLevel()*300
end
function c101004087.lvcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0
end
function c101004087.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_LEVEL)
e4:SetValue(1)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e4)
end
end
function c101004087.rdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101004087.rdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:GetLevel()<4 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(-3)
c:RegisterEffect(e1)
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--F.A. Dawn Dragster
function c101004088.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c101004088.atkval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101004088,0))
e3:SetCategory(CATEGORY_LVCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101004088.lvcon)
e3:SetOperation(c101004088.lvop)
c:RegisterEffect(e3)
--pierce
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4)
--negate
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101004088,1))
e5:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetCountLimit(1)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c101004088.negcon)
e5:SetTarget(c101004088.negtg)
e5:SetOperation(c101004088.negop)
c:RegisterEffect(e5)
end
function c101004088.atkval(e,c)
return c:GetLevel()*300
end
function c101004088.lvcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) and e:GetHandler():GetFlagEffect(1)>0
end
function c101004088.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_LEVEL)
e4:SetValue(1)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e4)
end
end
function c101004088.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c101004088.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c101004088.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or c:GetLevel()<3 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(-2)
c:RegisterEffect(e1)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--F.A. Winners
--Scripted by Eerie Code
function c101004089.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c101004089.indcon)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
--banish
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101004089)
e3:SetCondition(c101004089.rmcon)
e3:SetTarget(c101004089.rmtg)
e3:SetOperation(c101004089.rmop)
c:RegisterEffect(e3)
--win
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_REMOVE)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(c101004089.winop)
c:RegisterEffect(e4)
end
function c101004089.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107)
end
function c101004089.indcon(e)
return Duel.IsExistingMatchingCard(c101004089.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c101004089.rmcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=a:GetBattleTarget()
if not d then return false end
if not a:IsControler(tp) then a,d=d,a end
return a:IsControler(tp) and a:IsSetCard(0x107)
and a:GetLevel()-a:GetOriginalLevel()>=5
and ep~=tp
end
function c101004089.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c101004089.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0
and c:IsRelateToEffect(e) and c:IsFaceup() then
c:CreateRelation(c,RESET_EVENT+0x1fe0000)
end
end
function c101004089.winfilter(c,rc)
return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:IsRelateToCard(rc)
end
function c101004089.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_FA_WINNERS=0x1d
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c101004089.winfilter,tp,LOCATION_REMOVED,0,nil,c)
if g:GetClassCount(Card.GetCode)==3 then
Duel.Win(tp,WIN_REASON_FA_WINNERS)
end
end
--F.A. Dead Heat
function c101004090.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_ATTACK)
e1:SetTarget(c101004090.acttg)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101004090,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101004090)
e2:SetCondition(c101004090.spcon)
e2:SetCost(c101004090.spcost)
e2:SetTarget(c101004090.sptg)
e2:SetOperation(c101004090.spop)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101004090,1))
e3:SetCategory(CATEGORY_LVCHANGE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_CONFIRM)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c101004090.lvlcon)
e3:SetOperation(c101004090.lvlop)
c:RegisterEffect(e3)
end
function c101004090.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) then
if c101004090.spcon(e,tp,eg,ep,ev,re,r,rp)
and c101004090.spcost(e,tp,eg,ep,ev,re,r,rp,0)
and c101004090.sptg(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.SelectYesNo(tp,94) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetProperty(0)
e:SetOperation(c101004090.spop)
c101004090.spcost(e,tp,eg,ep,ev,re,r,rp,1)
c101004090.sptg(e,tp,eg,ep,ev,re,r,rp,1)
e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65)
return
end
end
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
function c101004090.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c101004090.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,101004090)==0 end
Duel.RegisterFlagEffect(tp,101004090,RESET_PHASE+PHASE_END,0,1)
end
function c101004090.spfilter(c,e,tp)
return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c101004090.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101004090.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101004090.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101004090.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101004090.lvlcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if not bc then return false end
if tc:IsControler(1-tp) then bc,tc=tc,bc end
return bc:IsFaceup() and tc:IsFaceup() and tc:IsSetCard(0x107)
end
function c101004090.lvlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if not bc then return false end
if tc:IsControler(1-tp) then bc,tc=tc,bc end
local d1=0
local d2=0
while d1==d2 do
d1,d2=Duel.TossDice(tp,1,1)
end
if d1>d2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(4)
tc:RegisterEffect(e1)
else
Duel.Destroy(tc,REASON_EFFECT)
end
end
--F.A. Overheat
--scripted by Naim
function c101004091.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c101004091.condition)
e1:SetTarget(c101004091.target)
e1:SetOperation(c101004091.activate)
c:RegisterEffect(e1)
--activate Spell
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c101004091.condition2)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c101004091.activate2)
c:RegisterEffect(e2)
end
function c101004091.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c101004091.filter(c,e,tp)
return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101004091.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101004091.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101004091.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101004091.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(3)
tc:RegisterEffect(e1)
end
end
function c101004091.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldCard(tp,LOCATION_SZONE,5)==nil
end
function c101004091.filter2(c,e,tp)
return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD)
end
function c101004091.activate2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101004091.filter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101004091.filter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.RaiseEvent(tc,4179255,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
end
--SIMMタブラス
--SIMM Dublas --SIMM Dublas
--scripted by Naim --scripted by Naim
function c101005001.initial_effect(c) function c101005001.initial_effect(c)
--return --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005001,0)) e1:SetDescription(aux.Stringid(101005001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
...@@ -15,14 +16,13 @@ function c101005001.initial_effect(c) ...@@ -15,14 +16,13 @@ function c101005001.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101005001.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c101005001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return not e:GetHandler():IsPublic() end
if chk==0 then return not c:IsPublic() end
end end
function c101005001.lkfilter(c) function c101005001.lkfilter(c)
return c:IsType(TYPE_LINK) and c:IsLinkState() return c:IsType(TYPE_LINK) and c:IsLinkState()
end end
function c101005001.filter(c) function c101005001.filter(c)
return c:IsRace(RACE_CYBERSE) and c:GetLevel()==4 return c:IsRace(RACE_CYBERSE) and c:GetLevel()==4 and c:IsAbleToHand()
end end
function c101005001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101005001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101005001.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101005001.filter(chkc) end
...@@ -34,8 +34,8 @@ function c101005001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -34,8 +34,8 @@ function c101005001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
zone=bit.bor(zone,bit.band(tc:GetLinkedZone(),0x1f)) zone=bit.bor(zone,bit.band(tc:GetLinkedZone(),0x1f))
end end
return zone~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) return zone~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101005001.filter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingTarget(c101005001.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c101005001.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c101005001.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
...@@ -56,4 +56,3 @@ function c101005001.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,4 +56,3 @@ function c101005001.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
...@@ -50,13 +50,12 @@ function c101005002.tkcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,13 +50,12 @@ function c101005002.tkcon2(e,tp,eg,ep,ev,re,r,rp)
end end
function c101005002.tkcost2(e,tp,eg,ep,ev,re,r,rp,chk) function c101005002.tkcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.GetAttackTarget() and Duel.GetAttackTarget():IsAbleToRemoveAsCost() end and Duel.GetAttackTarget() and Duel.GetAttackTarget():IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,Duel.GetAttackTarget())>0 end
local g=Group.FromCards(e:GetHandler(),Duel.GetAttackTarget()) local g=Group.FromCards(e:GetHandler(),Duel.GetAttackTarget())
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c101005002.tktg2(e,tp,eg,ep,ev,re,r,rp,chk) function c101005002.tktg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_MZONE,1,nil,TYPE_LINK)
and Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_MZONE,1,nil,TYPE_LINK)
and Duel.IsPlayerCanSpecialSummonMonster(tp,101005002+100,0,0x4011,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,101005002+100,0,0x4011,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
...@@ -66,13 +65,10 @@ function c101005002.tkop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,13 +65,10 @@ function c101005002.tkop2(e,tp,eg,ep,ev,re,r,rp)
local ct=math.min(Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_MZONE,nil,TYPE_LINK),Duel.GetLocationCount(tp,LOCATION_MZONE)) local ct=math.min(Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_MZONE,nil,TYPE_LINK),Duel.GetLocationCount(tp,LOCATION_MZONE))
if ct<1 then return end if ct<1 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local i=0 repeat
local ctn=true
while ct>0 and ctn do
local token=Duel.CreateToken(tp,101005002+100) local token=Duel.CreateToken(tp,101005002+100)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
ct=ct-1 ct=ct-1
if ct<=0 or not Duel.SelectYesNo(tp,aux.Stringid(101005002,0)) then ctn=false end until ct<=0 or not Duel.SelectYesNo(tp,aux.Stringid(101005002,0))
end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
--剛鬼ムーンサルト
--Gouki Moonsault
--Script by nekrozar
function c101005003.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101005003)
e1:SetCost(c101005003.spcost)
e1:SetTarget(c101005003.sptg)
e1:SetOperation(c101005003.spop)
c:RegisterEffect(e1)
--to extra
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005003,1))
e2:SetCategory(CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101005103)
e2:SetTarget(c101005003.tdtg)
e2:SetOperation(c101005003.tdop)
c:RegisterEffect(e2)
end
function c101005003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c101005003.spfilter(c)
return c:IsSetCard(0xfc) and c:IsFaceup() and c:IsAbleToHand() and not c:IsCode(101005003)
end
function c101005003.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c101005003.spfilter(chkc) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101005003.spfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c101005003.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101005003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
function c101005003.tdfilter(c)
return c:IsSetCard(0xfc) and c:IsType(TYPE_LINK) and c:IsAbleToExtra()
end
function c101005003.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101005003.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101005003.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c101005003.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c101005003.thfilter(c)
return c:IsSetCard(0xfc) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101005003.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101005003.thfilter),tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101005003,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--剛鬼ヘルトレーナー
--Gouki Hell Trainer
--Script by nekrozar
function c101005005.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101005005)
e1:SetCondition(c101005005.spcon)
e1:SetCost(c101005005.spcost)
e1:SetTarget(c101005005.sptg)
e1:SetOperation(c101005005.spop)
c:RegisterEffect(e1)
--indestructable
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(c101005005.indcon)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c101005005.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c101005005.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c101005005.spfilter(c,e,tp)
return c:IsSetCard(0xfc) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101005005.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101005005.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c101005005.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101005005.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function c101005005.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
end
function c101005005.indfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0xfc)
end
function c101005005.indcon(e)
return Duel.IsExistingMatchingCard(c101005005.indfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
--星遺物-『星冠』
--World Legacy - "World Crown"
--Scripted by ahtelel
function c101005011.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005011,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,101005011)
e1:SetCondition(c101005011.spcon)
e1:SetValue(c101005011.spval)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005011,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101005011.negcon)
e2:SetCost(c101005011.negcost)
e2:SetTarget(c101005011.negtg)
e2:SetOperation(c101005011.negop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101005011,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,101005011+100)
e3:SetCondition(c101005011.thcon)
e3:SetTarget(c101005011.thtg)
e3:SetOperation(c101005011.thop)
c:RegisterEffect(e3)
end
function c101005011.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=Duel.GetLinkedZone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101005011.spval(e,c)
return 0,Duel.GetLinkedZone(c:GetControler())
end
function c101005011.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetSummonLocation()==LOCATION_EXTRA
and Duel.IsChainNegatable(ev)
end
function c101005011.negcost(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 c101005011.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c101005011.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c101005011.thfilter(c)
return c:IsSetCard(0xfe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101005011.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL)
end
function c101005011.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005011.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101005011.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101005011.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
--魔神儀-キャンドール --魔神儀キャンドール
--Deviritual Candoll --Deviritual Candoll
function c101005012.initial_effect(c) function c101005012.initial_effect(c)
--spsummon --spsummon
...@@ -51,7 +51,7 @@ function c101005012.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,7 +51,7 @@ function c101005012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c101005012.filter,tp,LOCATION_DECK,0,1,e:GetHandler(),e,tp) end and Duel.IsExistingMatchingCard(c101005012.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
end end
function c101005012.spop(e,tp,eg,ep,ev,re,r,rp) function c101005012.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -59,7 +59,7 @@ function c101005012.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function c101005012.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101005012.filter,tp,LOCATION_DECK,0,1,1,e:GetHandler(),e,tp) local g=Duel.SelectMatchingCard(tp,c101005012.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
...@@ -85,4 +85,4 @@ function c101005012.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,4 +85,4 @@ function c101005012.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function c101005012.sumlimit(e,c,sump,sumtype,sumpos,targetp) function c101005012.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) return c:IsLocation(LOCATION_EXTRA)
end end
\ No newline at end of file
--魔神儀-タリスマンドラ --魔神儀タリスマンドラ
--Deviritual Talismandra --Deviritual Talismandra
function c101005013.initial_effect(c) function c101005013.initial_effect(c)
--spsummon --spsummon
...@@ -51,7 +51,7 @@ function c101005013.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,7 +51,7 @@ function c101005013.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c101005013.filter,tp,LOCATION_DECK,0,1,e:GetHandler(),e,tp) end and Duel.IsExistingMatchingCard(c101005013.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
end end
function c101005013.spop(e,tp,eg,ep,ev,re,r,rp) function c101005013.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -59,7 +59,7 @@ function c101005013.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function c101005013.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101005013.filter,tp,LOCATION_DECK,0,1,1,e:GetHandler(),e,tp) local g=Duel.SelectMatchingCard(tp,c101005013.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
...@@ -85,4 +85,4 @@ function c101005013.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,4 +85,4 @@ function c101005013.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function c101005013.sumlimit(e,c,sump,sumtype,sumpos,targetp) function c101005013.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) return c:IsLocation(LOCATION_EXTRA)
end end
\ No newline at end of file
--サイバー・ドラゴン・フィーア
--Cyber Dragon Vier
--Script by nekrozar
function c101005014.initial_effect(c)
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(70095154)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005014,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,101005014)
e2:SetCondition(c101005014.spcon)
e2:SetTarget(c101005014.sptg)
e2:SetOperation(c101005014.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsCode,70095154))
e4:SetValue(500)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
end
function c101005014.cfilter(c,tp)
return c:IsFaceup() and c:IsCode(70095154) and c:GetSummonPlayer()==tp
end
function c101005014.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101005014.cfilter,1,nil,tp)
end
function c101005014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101005014.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_DEFENSE)
end
end
--サイバー・ドラゴン・ヘルツ
--Cyber Dragon Hertz
--scripted by Naim
function c101005015.initial_effect(c)
--name change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(70095154)
c:RegisterEffect(e1)
--level change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005015,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101005015)
e2:SetTarget(c101005015.lvtg)
e2:SetOperation(c101005015.lvop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101005015,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,101005015)
e3:SetTarget(c101005015.thtg)
e3:SetOperation(c101005015.thop)
c:RegisterEffect(e3)
end
function c101005015.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsLevel(5) end
end
function c101005015.lvop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(5)
c:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetLabelObject(e)
e2:SetTarget(c101005015.splimit)
Duel.RegisterEffect(e2,tp)
end
function c101005015.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_MACHINE)
end
function c101005015.thfilter(c)
return c:IsCode(70095154) and c:IsAbleToHand()
end
function c101005015.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005015.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c101005015.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101005015.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,e:GetHandler())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ドラグニティ-セナート
--Dragunity Senatus
--Scripted by ahtelel
function c101005016.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005016,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101005016)
e1:SetCost(c101005016.eqcost)
e1:SetTarget(c101005016.eqtg)
e1:SetOperation(c101005016.eqop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005016,1))
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c101005016.reptg)
e2:SetValue(c101005016.repval)
e2:SetOperation(c101005016.repop)
c:RegisterEffect(e2)
end
function c101005016.cfilter(c)
return c:IsSetCard(0x29) and c:IsDiscardable()
end
function c101005016.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005016.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c101005016.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function c101005016.eqfilter(c,ec)
return c:IsSetCard(0x29) and c:IsType(TYPE_TUNER) and not c:IsForbidden()
end
function c101005016.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c101005016.eqfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function c101005016.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c101005016.eqfilter,tp,LOCATION_DECK,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c101005016.eqlimit)
e1:SetLabelObject(c)
g:GetFirst():RegisterEffect(e1)
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c101005016.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c101005016.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c101005016.splimit(e,c)
return not c:IsRace(RACE_DRAGON) and c:IsLocation(LOCATION_EXTRA)
end
function c101005016.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x29)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and not c:IsReason(REASON_REPLACE)
end
function c101005016.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) and c:IsSetCard(0x29)
and e:GetHandler():GetEquipGroup():IsContains(c)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function c101005016.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c101005016.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c101005016.desfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c101005016.desfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
end
return false
end
function c101005016.repval(e,c)
return c101005016.repfilter(c,e:GetHandlerPlayer())
end
function c101005016.repop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end
--ドラグニティ-クーゼ --ドラグニティクーゼ
--Dragunity Couse --Dragunity Couse
--scripted by Naim --scripted by Naim
function c101005017.initial_effect(c) function c101005017.initial_effect(c)
......
...@@ -34,16 +34,14 @@ function c101005026.initial_effect(c) ...@@ -34,16 +34,14 @@ function c101005026.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--atk up --atk up
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101005026,0)) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e4:SetCondition(c101005026.atkcon) e4:SetCondition(c101005026.atkcon)
e4:SetOperation(c101005026.atkop) e4:SetOperation(c101005026.atkop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--to hand --to hand
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101005026,1)) e5:SetDescription(aux.Stringid(101005026,0))
e5:SetCategory(CATEGORY_TOHAND) e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED) e5:SetCode(EVENT_DESTROYED)
...@@ -53,7 +51,7 @@ function c101005026.initial_effect(c) ...@@ -53,7 +51,7 @@ function c101005026.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c101005026.val(e,re,dam,r,rp,rc) function c101005026.val(e,re,dam,r,rp,rc)
if bit.band(r,REASON_BATTLE)>0 and Duel.IsPlayerAffectedByEffect(e:GetLabel(),92481084) then return dam end if bit.band(r,REASON_BATTLE)>0 then return dam end
if bit.band(r,REASON_EFFECT)~=0 or bit.band(r,REASON_BATTLE)~=0 then if bit.band(r,REASON_EFFECT)~=0 or bit.band(r,REASON_BATTLE)~=0 then
return dam/2 return dam/2
else else
...@@ -83,7 +81,7 @@ function c101005026.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +81,7 @@ function c101005026.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(1000) e1:SetValue(1000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -17,7 +17,7 @@ function c101005027.initial_effect(c) ...@@ -17,7 +17,7 @@ function c101005027.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005027,1)) e2:SetDescription(aux.Stringid(101005027,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(c101005027.target) e2:SetTarget(c101005027.target)
e2:SetOperation(c101005027.operation) e2:SetOperation(c101005027.operation)
...@@ -32,12 +32,10 @@ function c101005027.initial_effect(c) ...@@ -32,12 +32,10 @@ function c101005027.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101005027.atkcon(e,tp,eg,ep,ev,re,r,rp) function c101005027.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
return Duel.IsAbleToEnterBP() and c:IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c101005027.atkop(e,tp,eg,ep,ev,re,r,rp) function c101005027.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -58,18 +56,16 @@ function c101005027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -58,18 +56,16 @@ function c101005027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,c101005027.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101005027.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c101005027.operation(e,tp,eg,ep,ev,re,r,rp) function c101005027.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c101005027.actcon) e1:SetCondition(c101005027.actcon)
e1:SetOperation(c101005027.actop) e1:SetOperation(c101005027.actop)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0x1fe0000)
Duel.RegisterEffect(e1,tp) tc:RegisterEffect(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101005027,2)) tc:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101005027,2))
end end
end end
......
...@@ -17,8 +17,6 @@ function c101005028.initial_effect(c) ...@@ -17,8 +17,6 @@ function c101005028.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(c101005028.descon) e2:SetCondition(c101005028.descon)
e2:SetTarget(c101005028.destg) e2:SetTarget(c101005028.destg)
e2:SetOperation(c101005028.desop) e2:SetOperation(c101005028.desop)
...@@ -27,27 +25,23 @@ function c101005028.initial_effect(c) ...@@ -27,27 +25,23 @@ function c101005028.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101005028,1)) e3:SetDescription(aux.Stringid(101005028,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetTarget(c101005028.target) e3:SetTarget(c101005028.target)
e3:SetOperation(c101005028.operation) e3:SetOperation(c101005028.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101005028.descon(e,tp,eg,ep,ev,re,r,rp) function c101005028.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
return c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function c101005028.filter(c)
return c:IsFaceup()
end end
function c101005028.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c101005028.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(c101005028.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c101005028.desop(e,tp,eg,ep,ev,re,r,rp) function c101005028.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c101005028.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
...@@ -64,15 +58,15 @@ function c101005028.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -64,15 +58,15 @@ function c101005028.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c101005028.operation(e,tp,eg,ep,ev,re,r,rp) function c101005028.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c101005028.actop) e1:SetOperation(c101005028.actop)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
Duel.RegisterEffect(e1,tp) tc:RegisterEffect(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101005028,2)) tc:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101005028,2))
end end
end end
......
...@@ -39,8 +39,7 @@ function c101005029.initial_effect(c) ...@@ -39,8 +39,7 @@ function c101005029.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c101005029.indcon(e,tp,eg,ep,ev,re,r,rp) function c101005029.indcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
return c:IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c101005029.indtg(e,c) function c101005029.indtg(e,c)
return c:IsType(TYPE_RITUAL) return c:IsType(TYPE_RITUAL)
......
...@@ -20,6 +20,16 @@ function c101005030.initial_effect(c) ...@@ -20,6 +20,16 @@ function c101005030.initial_effect(c)
e2:SetTarget(c101005030.indtg) e2:SetTarget(c101005030.indtg)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--cost change
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_LPCOST_CHANGE)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetRange(LOCATION_MZONE)
e0:SetTargetRange(1,1)
e0:SetCondition(c101005030.costcon)
e0:SetValue(c101005030.costval)
c:RegisterEffect(e0)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
...@@ -32,8 +42,7 @@ function c101005030.initial_effect(c) ...@@ -32,8 +42,7 @@ function c101005030.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101005030.indcon(e,tp,eg,ep,ev,re,r,rp) function c101005030.indcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
return c:IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c101005030.indtg(e,c) function c101005030.indtg(e,c)
return c:IsType(TYPE_RITUAL) return c:IsType(TYPE_RITUAL)
...@@ -41,17 +50,22 @@ end ...@@ -41,17 +50,22 @@ end
function c101005030.mfilter(c) function c101005030.mfilter(c)
return not c:IsType(TYPE_RITUAL) return not c:IsType(TYPE_RITUAL)
end end
function c101005030.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c101005030.costcon(e)
local c=e:GetHandler() local c=e:GetHandler()
local mg=c:GetMaterial() local mg=c:GetMaterial()
local res=c:GetSummonType()==SUMMON_TYPE_RITUAL and not mg:IsExists(c101005030.mfilter,1,nil) return c:GetSummonType()==SUMMON_TYPE_RITUAL and mg:GetCount()>0 and not mg:IsExists(c101005030.mfilter,1,nil)
if chk==0 then return res or Duel.CheckLPCost(tp,2000) end end
if not res then function c101005030.costchange(e,re,rp,val)
Duel.PayLPCost(tp,2000) if re and re:IsHasType(0x7e0) and re:GetHandler()==e:GetHandler() then
end return 0
else return val end
end
function c101005030.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
Duel.PayLPCost(tp,2000)
end end
function c101005030.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c101005030.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local ct=g:FilterCount(Card.IsControler,nil,1-tp) local ct=g:FilterCount(Card.IsControler,nil,1-tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
......
--嵐竜の聖騎士
--Paladin of Storm Dragon
--Scripted by ahtelel
function c101005031.initial_effect(c)
c:EnableReviveLimit()
--return to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005031,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCountLimit(1,101005031)
e1:SetTarget(c101005031.thtg)
e1:SetOperation(c101005031.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005031,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101005131)
e2:SetCost(c101005031.spcost)
e2:SetTarget(c101005031.sptg)
e2:SetOperation(c101005031.spop)
c:RegisterEffect(e2)
end
function c101005031.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local d=Duel.GetAttackTarget()
if chk==0 then return Duel.GetAttacker()==c and d and d:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c101005031.thop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d and d:IsRelateToBattle() then
Duel.SendtoHand(d,nil,REASON_EFFECT)
end
end
function c101005031.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp,c)>0 and c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
function c101005031.spfilter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101005031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005031.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c101005031.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,c101005031.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc 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_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
--ドラグニティナイト-ハールーン
--Dragunity Knight – Harloon
--Script by dest
function c101005032.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x29),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005032,0))
e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101005032)
e1:SetTarget(c101005032.eqtg)
e1:SetOperation(c101005032.eqop)
c:RegisterEffect(e1)
--equip(self)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005032,1))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101005032+100)
e2:SetTarget(c101005032.eqstg)
e2:SetOperation(c101005032.eqsop)
c:RegisterEffect(e2)
end
function c101005032.filter(c)
return c:IsSetCard(0x29) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c101005032.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101005032.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101005032.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c101005032.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c101005032.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c101005032.eqlimit)
tc:RegisterEffect(e1)
end
end
function c101005032.eqlimit(e,c)
return e:GetOwner()==c
end
function c101005032.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x29)
end
function c101005032.eqstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005032.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101005032.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101005032.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101005032.eqsop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
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)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c101005032.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
end
--ドラグニティナイト-アスカロン` --ドラグニティナイト-アスカロン
--Dragunity Knight - Ascalon --Dragunity Knight - Ascalon
--Scripted by ahtelel --Scripted by ahtelel
function c101005033.initial_effect(c) function c101005033.initial_effect(c)
...@@ -39,10 +39,10 @@ function c101005033.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,10 +39,10 @@ function c101005033.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c101005033.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101005033.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c101005033.rmop(e,tp,eg,ep,ev,re,r,rp) function c101005033.rmop(e,tp,eg,ep,ev,re,r,rp)
...@@ -72,4 +72,4 @@ function c101005033.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,4 +72,4 @@ function c101005033.spop(e,tp,eg,ep,ev,re,r,rp)
if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
\ No newline at end of file
--ヴァレルソード・ドラゴン
--BorrelSword Dragon
function c101005034.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
c:EnableReviveLimit()
--battle indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005034,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetHintTiming(0,0x1e0)
e2:SetTarget(c101005034.postg)
e2:SetOperation(c101005034.posop)
c:RegisterEffect(e2)
--atk change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101005034,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetCountLimit(1)
e3:SetCondition(c101005034.atkcon)
e3:SetTarget(c101005034.atktg)
e3:SetOperation(c101005034.atkop)
c:RegisterEffect(e3)
end
function c101005034.posfilter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c101005034.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101005034.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101005034.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c101005034.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
Duel.SetChainLimit(c101005034.chlimit)
end
function c101005034.chlimit(e,ep,tp)
return tp==ep
end
function c101005034.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsAttackPos() and tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0
and c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
function c101005034.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
return tc and tc:IsFaceup() and tc:GetAttack()>0
end
function c101005034.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
e:GetHandler():GetBattleTarget():CreateEffectRelation(e)
end
function c101005034.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
if c:IsRelateToEffect(e) and c:IsFaceup() then
local atk=tc:GetAttack()
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+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetValue(math.ceil(atk/2))
c:RegisterEffect(e2)
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(math.ceil(atk/2))
tc:RegisterEffect(e1)
end
end
end
...@@ -10,6 +10,7 @@ function c101005035.initial_effect(c) ...@@ -10,6 +10,7 @@ function c101005035.initial_effect(c)
e1:SetDescription(aux.Stringid(101005035,0)) e1:SetDescription(aux.Stringid(101005035,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101005035) e1:SetCountLimit(1,101005035)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c101005035.thcon) e1:SetCondition(c101005035.thcon)
...@@ -78,9 +79,9 @@ end ...@@ -78,9 +79,9 @@ end
function c101005035.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101005035.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101005035.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101005035.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(aux.NecroValleyFilter(c101005035.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c101005035.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,aux.NecroValleyFilter(c101005035.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c101005035.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c101005035.spop(e,tp,eg,ep,ev,re,r,rp) function c101005035.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -7,13 +7,14 @@ function c101005036.initial_effect(c) ...@@ -7,13 +7,14 @@ function c101005036.initial_effect(c)
aux.AddLinkProcedure(c,c101005036.matfilter,1,1) aux.AddLinkProcedure(c,c101005036.matfilter,1,1)
--splimit --splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005036,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c101005036.ls) e1:SetOperation(c101005036.limop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005036,0)) e2:SetDescription(aux.Stringid(101005036,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE) e2:SetCode(EVENT_RELEASE)
...@@ -37,7 +38,7 @@ end ...@@ -37,7 +38,7 @@ end
function c101005036.matfilter(c,lc,sumtype,tp) function c101005036.matfilter(c,lc,sumtype,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE,lc,sumtype,tp) return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE,lc,sumtype,tp)
end end
function c101005036.ls(e,tp,eg,ep,ev,re,r,rp,c) function c101005036.limop(e,tp,eg,ep,ev,re,r,rp,c)
--cannot link summon --cannot link summon
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -49,7 +50,7 @@ function c101005036.ls(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -49,7 +50,7 @@ function c101005036.ls(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c101005036.splimit(e,c,tp,sumtp,sumpos) function c101005036.splimit(e,c,tp,sumtp,sumpos)
return c:IsType(TYPE_LINK) and c:GetLink()>=3 and bit.band(sumtp,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK return c:IsType(TYPE_LINK) and c:IsLinkAbove(3) and bit.band(sumtp,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end end
function c101005036.spcon(e,tp,eg,ep,ev,re,r,rp) function c101005036.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabel()>0 return e:GetLabel()>0
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
--Restoration Point Guard --Restoration Point Guard
--Scripted by Eerie Code --Scripted by Eerie Code
function c101005037.initial_effect(c) function c101005037.initial_effect(c)
--link summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2,2) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2,2)
--indes --indes
...@@ -26,7 +27,7 @@ function c101005037.incon(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +27,7 @@ function c101005037.incon(e,tp,eg,ep,ev,re,r,rp)
end end
function c101005037.inop(e,tp,eg,ep,ev,re,r,rp) function c101005037.inop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......
--剛鬼ジャドウ・オーガ
--Gouki Shadow Ogre
--Script by nekrozar
function c101005038.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xfc),2,2)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005038,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c101005038.negcon)
e1:SetTarget(c101005038.negtg)
e1:SetOperation(c101005038.negop)
c:RegisterEffect(e1)
end
function c101005038.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local loc,seq,p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE,CHAININFO_TRIGGERING_CONTROLER)
if p==1-tp then seq=seq+16 end
return re:IsActiveType(TYPE_MONSTER) and bit.band(loc,LOCATION_MZONE)~=0 and bit.extract(c:GetLinkedZone(),seq)~=0 and Duel.IsChainNegatable(ev)
end
function c101005038.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c101005038.spfilter(c,e,tp)
return c:IsSetCard(0xfc) and not c:IsCode(101005038) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101005038.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101005038.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101005038,1)) then
Duel.BreakEffect()
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
end
--剛鬼ザ・ジャイアント・オーガ
--Gouki the Giant Ogre
function c101005039.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xfc),3)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c101005039.immval)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101005039,0))
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101005039.negcon)
e3:SetTarget(c101005039.negtg)
e3:SetOperation(c101005039.negop)
c:RegisterEffect(e3)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101005039,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c101005039.atkcon)
e4:SetOperation(c101005039.atkop)
c:RegisterEffect(e4)
end
function c101005039.immval(e,te)
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
and te:GetOwner():GetAttack()<=e:GetHandler():GetAttack() and te:IsActivated()
end
function c101005039.negfilter(c,g)
return g:IsContains(c)
end
function c101005039.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if rp==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local lg=e:GetHandler():GetLinkedGroup()
lg:AddCard(c)
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and lg:IsExists(c101005039.negfilter,1,nil,tg) and Duel.IsChainNegatable(ev)
end
function c101005039.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c101005039.negop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsFacedown() or c:GetAttack()<500 or not c:IsRelateToEffect(e)
or Duel.GetCurrentChain()~=ev+1 or c:IsStatus(STATUS_BATTLE_DESTROYED) then
return
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
c:RegisterEffect(e1)
if not c:IsImmuneToEffect(e1) and not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then
Duel.NegateActivation(ev)
end
end
function c101005039.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetAttack()~=c:GetBaseAttack() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function c101005039.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
--ショートヴァレル・ドラゴン
--Miniborrel Dragon
--Script by nekrozar
function c101005040.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x102),2,2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005040,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,101005040)
e1:SetCondition(c101005040.spcon)
e1:SetCost(c101005040.spcost)
e1:SetTarget(c101005040.sptg)
e1:SetOperation(c101005040.spop)
c:RegisterEffect(e1)
end
function c101005040.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x10f) and c:IsType(TYPE_LINK)
end
function c101005040.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101005040.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101005040.cfilter(c,tp)
return c:IsLinkBelow(3) and Duel.GetMZoneCount(tp,c)>0
end
function c101005040.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101005040.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,c101005040.cfilter,1,1,nil,tp)
e:SetLabel(sg:GetFirst():GetLink())
Duel.Release(sg,REASON_COST)
end
function c101005040.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101005040.spop(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 e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetTarget(c101005040.lklimit)
e1:SetLabel(e:GetLabel())
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
function c101005040.lklimit(e,c)
if not c then return false end
local lk=e:GetLabel()
return c:IsLink(lk)
end
--アークロード・パラディオン
--Arch-Lord Palladion
--Script by nekrozar
function c101005044.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,c101005044.lcheck)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c101005044.atkval)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c101005044.antg)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101005044,0))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,0x1c0)
e3:SetCountLimit(1)
e3:SetCost(c101005044.discost)
e3:SetTarget(c101005044.distg)
e3:SetOperation(c101005044.disop)
c:RegisterEffect(e3)
end
function c101005044.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_LINK)
end
function c101005044.atkval(e,c)
local g=e:GetHandler():GetLinkedGroup():Filter(Card.IsFaceup,nil)
return g:GetSum(Card.GetBaseAttack)
end
function c101005044.antg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c101005044.cfilter(c,g)
return (c:IsSetCard(0xfe) or c:IsSetCard(0x217)) and g:IsContains(c)
end
function c101005044.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,c101005044.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,c101005044.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
end
function c101005044.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c101005044.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
...@@ -26,13 +26,14 @@ function c101005046.initial_effect(c) ...@@ -26,13 +26,14 @@ function c101005046.initial_effect(c)
e2:SetCondition(c101005046.con) e2:SetCondition(c101005046.con)
e2:SetTarget(c101005046.target) e2:SetTarget(c101005046.target)
e2:SetOperation(c101005046.operation) e2:SetOperation(c101005046.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101005046.lcheck(g,lc) function c101005046.lcheck(g,lc)
return g:IsExists(Card.IsLinkCode,1,nil,70095154) return g:IsExists(Card.IsLinkCode,1,nil,70095154)
end end
function c101005046.con(e,tp,eg,ep,ev,re,r,rp) function c101005046.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() and e:GetHandler():GetAttackAnnouncedCount()<1 return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) and e:GetHandler():GetAttackAnnouncedCount()<1
end end
function c101005046.filter(c) function c101005046.filter(c)
return c:IsFaceup() and c:IsAttackAbove(2100) and c:IsRace(RACE_MACHINE) return c:IsFaceup() and c:IsAttackAbove(2100) and c:IsRace(RACE_MACHINE)
......
--閃刀姫-ハヤテ
--Brandish Maiden Hayate
--Scripted by ahtelel
function c101005047.initial_effect(c)
c:SetSPSummonOnce(101005047)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c101005047.matfilter,1,1)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005047,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED)
e2:SetTarget(c101005047.tgtg)
e2:SetOperation(c101005047.tgop)
c:RegisterEffect(e2)
end
function c101005047.matfilter(c)
return c:IsLinkSetCard(0x1115) and not c:IsLinkAttribute(ATTRIBUTE_WIND)
end
function c101005047.tgfilter(c)
return c:IsSetCard(0x115) and c:IsAbleToGrave()
end
function c101005047.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005047.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101005047.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101005047.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--見習い魔嬢
--
--Scripted by Eerie Code
function c101005049.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_DARK),2,2)
c:EnableReviveLimit()
--atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK))
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT))
e3:SetValue(-400)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101005049,0))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(1,101005049)
e5:SetCondition(c101005049.thcon)
e5:SetTarget(c101005049.thtg)
e5:SetOperation(c101005049.thop)
c:RegisterEffect(e5)
end
function c101005049.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c101005049.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function c101005049.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101005049.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101005049.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101005049.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101005049.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--ハイパースター
--Hyper Star
--Scripted by Eerie Code
function c101005050.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_LIGHT),2,2)
c:EnableReviveLimit()
--atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT))
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK))
e3:SetValue(-400)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101005050,0))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(1,101005050)
e5:SetCondition(c101005050.thcon)
e5:SetTarget(c101005050.thtg)
e5:SetOperation(c101005050.thop)
c:RegisterEffect(e5)
end
function c101005050.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c101005050.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end
function c101005050.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101005050.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101005050.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101005050.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101005050.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
...@@ -13,10 +13,9 @@ function c101005056.initial_effect(c) ...@@ -13,10 +13,9 @@ function c101005056.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005056,0)) e2:SetDescription(aux.Stringid(101005056,0))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c101005056.thcon) e2:SetCondition(aux.exccon)
e2:SetCost(c101005056.thcost) e2:SetCost(c101005056.thcost)
e2:SetTarget(c101005056.thtg) e2:SetTarget(c101005056.thtg)
e2:SetOperation(c101005056.thop) e2:SetOperation(c101005056.thop)
...@@ -31,15 +30,13 @@ function c101005056.cfilter(c,e,tp,m) ...@@ -31,15 +30,13 @@ function c101005056.cfilter(c,e,tp,m)
end end
function c101005056.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101005056.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp):Filter(Card.IsOnField,nil)
mg1:Remove(Card.IsLocation,nil,LOCATION_HAND)
return Duel.IsExistingMatchingCard(c101005056.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1) return Duel.IsExistingMatchingCard(c101005056.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c101005056.activate(e,tp,eg,ep,ev,re,r,rp) function c101005056.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp):Filter(Card.IsOnField,nil)
mg1:Remove(Card.IsLocation,nil,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c101005056.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1) local tg=Duel.SelectMatchingCard(tp,c101005056.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1)
local tc=tg:GetFirst() local tc=tg:GetFirst()
...@@ -53,9 +50,6 @@ function c101005056.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,9 +50,6 @@ function c101005056.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
function c101005056.thcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e)
end
function c101005056.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101005056.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
--Break of the World --Break of the World
--Scripted by Eerie Code --Scripted by Eerie Code
function c101005057.initial_effect(c) function c101005057.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -75,7 +76,7 @@ function c101005057.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +76,7 @@ function c101005057.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c101005057.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101005057.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsPlayerCanDraw(tp,1) local b1=Duel.IsPlayerCanDraw(tp,1)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
local b2=g:GetCount()>0 local b2=g:GetCount()>0
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local sel=0 local sel=0
......
--サイバー・レヴシステム
--Cyber Revsystem
--Scripted by ahtelel
function c101005059.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:SetTarget(c101005059.target)
e1:SetOperation(c101005059.activate)
c:RegisterEffect(e1)
end
function c101005059.filter(c,e,tp)
return c:IsCode(70095154) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101005059.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101005059.filter,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 c101005059.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101005059.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
g:GetFirst():RegisterEffect(e1)
end
end
--獣・魔・導
--Beast Magic
--Scripted by Eerie Code
function c101005063.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005063,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101005063+EFFECT_COUNT_CODE_OATH)
e1:SetLabel(2)
e1:SetCost(c101005063.cost)
e1:SetTarget(c101005063.thtg)
e1:SetOperation(c101005063.thop)
c:RegisterEffect(e1)
--spsummon (mythical)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(101005063,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetLabel(4)
e2:SetTarget(c101005063.sptg1)
e2:SetOperation(c101005063.spop1)
c:RegisterEffect(e2)
--spsummon (generic)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(101005063,2))
e3:SetLabel(6)
e3:SetTarget(c101005063.sptg2)
e3:SetOperation(c101005063.spop2)
c:RegisterEffect(e3)
end
function c101005063.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,ct,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x1,ct,REASON_COST)
end
function c101005063.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x10d) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c101005063.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005063.thfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_MZONE)
end
function c101005063.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c101005063.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function c101005063.spfilter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x10d) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101005063.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c101005063.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101005063.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c101005063.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
if tc:IsCanAddCounter(0x1,2) and Duel.SelectYesNo(tp,aux.Stringid(101005063,3)) then
tc:AddCounter(0x1,2)
end
end
end
function c101005063.spfilter2(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101005063.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c101005063.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101005063.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c101005063.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--星呼びの天儀台
--Celestial Sextant
--Scripted by Eerie Code
function c101005064.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,101005064+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101005064.cost)
e1:SetTarget(c101005064.target)
e1:SetOperation(c101005064.activate)
c:RegisterEffect(e1)
end
function c101005064.filter(c)
return c:IsLevel(6) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToDeckAsCost()
end
function c101005064.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005064.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101005064.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function c101005064.target(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 c101005064.activate(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
--リンク・デス・ターレット
--Link Turret
--Scripted by Eerie Code
function c101005070.initial_effect(c)
c:EnableCounterPermit(0x48)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101005070.target)
e1:SetOperation(c101005070.activate)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c101005070.ctcon)
e2:SetOperation(c101005070.ctop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c101005070.spcon)
e3:SetCost(c101005070.spcost)
e3:SetTarget(c101005070.sptg)
e3:SetOperation(c101005070.spop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(101005070,ACTIVITY_SPSUMMON,c101005070.counterfilter)
end
function c101005070.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c101005070.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
local c=e:GetHandler()
if chk==0 then return Duel.IsCanAddCounter(tp,0x48,4,c) end
if c101005070.spcon(e,tp,eg,ep,ev,re,r,rp) and c101005070.spcost(e,tp,eg,ep,ev,re,r,rp,0)
and c101005070.sptg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(101005070,0)) then
e:SetCategory(CATEGORY_COUNTER+CATEGORY_SPECIAL_SUMMON)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(c101005070.spop)
c101005070.spcost(e,tp,eg,ep,ev,re,r,rp,1)
c101005070.sptg(e,tp,eg,ep,ev,re,r,rp,1)
end
end
function c101005070.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0x48,4)
end
end
function c101005070.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or (c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_DARK))
end
function c101005070.ctcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE)
end
function c101005070.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x48,1)
end
function c101005070.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c101005070.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanRemoveCounter(tp,0x48,1,REASON_EFFECT)
and Duel.GetCustomActivityCount(101005070,tp,ACTIVITY_SPSUMMON)==0
and c:GetFlagEffect(101005070)==0 end
c:RemoveCounter(tp,0x48,1,REASON_EFFECT)
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:SetTargetRange(1,0)
e1:SetTarget(c101005070.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
c:RegisterFlagEffect(101005070,RESET_CHAIN,0,1)
end
function c101005070.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_DARK)) and c:IsLocation(LOCATION_EXTRA)
end
function c101005070.spfilter(c,e,tp)
return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101005070.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101005070.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101005070.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101005070.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101005070.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0xfe0000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0xfe0000)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+0x47e0000)
e3:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e3,true)
end
end
--サイバネティック・オーバーフロー
--Cybernetic Overflow
--Scripted by Eerie Code
function c101005073.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101005073)
e1:SetTarget(c101005073.target)
e1:SetOperation(c101005073.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101005073+100)
e2:SetCondition(c101005073.thcon)
e2:SetTarget(c101005073.thtg)
e2:SetOperation(c101005073.thop)
c:RegisterEffect(e2)
end
function c101005073.rmfilter(c)
return (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) and c:IsCode(70095154) and c:IsLevelAbove(1) and c:IsAbleToRemove()
end
function c101005073.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005073.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c101005073.rescon(sg,e,tp,mg)
return sg:GetClassCount(Card.GetLevel)==sg:GetCount()
end
function c101005073.activate(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
local ct=dg:GetCount()
local g=Duel.GetMatchingGroup(c101005073.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil)
if ct==0 or g:GetCount()==0 then return end
local rg=Group.CreateGroup()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
rg:Merge(sg)
g:Remove(Card.IsLevel,nil,sg:GetFirst():GetLevel())
ct=ct-1
until ct==0 or g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(101005073,0))
local rc=Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
if rc>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=dg:Select(tp,rc,rc,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function c101005073.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and bit.band(r,REASON_EFFECT)~=0
end
function c101005073.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsSetCard(0x94) or c:IsSetCard(0x93)) and c:IsAbleToHand()
end
function c101005073.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005073.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101005073.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101005073.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
--ドラグニティ・ドライブ
--Dragunity Legion
--Scripted by Eerie Code
function c101005074.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:SetTarget(c101005074.eftg1)
e1:SetOperation(c101005074.efop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetLabel(2)
e2:SetTarget(c101005074.eftg2)
e2:SetOperation(c101005074.efop)
c:RegisterEffect(e2)
end
function c101005074.select(e,tp,b1,b2)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(101005074,1),aux.Stringid(101005074,2))+1
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(101005074,1))+1
else op=Duel.SelectOption(tp,aux.Stringid(101005074,2))+2 end
e:SetLabel(op)
if op==1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101005074.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
else
e:SetCategory(CATEGORY_EQUIP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101005074.eqfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
e:GetHandler():RegisterFlagEffect(101005074,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c101005074.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101005074.eqfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0x29) and Duel.IsExistingMatchingCard(c101005074.eqfilter2,tp,LOCATION_GRAVE,0,1,nil,c,tp)
end
function c101005074.eqfilter2(c,tc,tp)
return c:IsSetCard(0x29) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c101005074.eftg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
if e:GetLabel()==0 then return false
elseif e:GetLabel()==1 then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101005074.spfilter(chkc,e,tp)
else return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005074.eqfilter1(chkc,tp) end
end
if chk==0 then return true end
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c101005074.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c101005074.eqfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
if (not b1 and not b2) or not Duel.SelectYesNo(tp,aux.Stringid(101005074,0)) then
e:SetProperty(0)
e:SetCategory(0)
e:SetLabel(0)
return
end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
c101005074.select(e,tp,b1,b2)
end
function c101005074.eftg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
if e:GetLabel()==0 then return false
elseif e:GetLabel()==1 then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101005074.spfilter(chkc,e,tp)
else return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005074.eqfilter1(chkc,tp) end
end
local b1 = Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c101005074.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2 = Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c101005074.eqfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
if chk==0 then return e:GetHandler():GetFlagEffect(101005074)==0 and (b1 or b2) end
c101005074.select(e,tp,b1,b2)
end
function c101005074.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if e:GetLabel()==0 then
return
elseif e:GetLabel()==1 then
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
else
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local ec=Duel.GetFirstTarget()
if ec:IsRelateToEffect(e) and ec:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101005074.eqfilter2),tp,LOCATION_GRAVE,0,1,1,nil,ec,tp)
local tc=g:GetFirst()
if not tc or not Duel.Equip(tp,tc,ec,true) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c101005074.eqlimit2)
e1:SetLabelObject(ec)
tc:RegisterEffect(e1)
end
end
local e1=Effect.CreateEffect(c)
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:SetLabelObject(e)
e1:SetTarget(c101005074.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101005074.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x29)
end
function c101005074.eqlimit2(e,c)
return c==e:GetLabelObject()
end
--星遺物の交心
--World Legacy Communion
function c101005075.initial_effect(c)
--change effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101005075,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,101005075)
e1:SetCondition(c101005075.cecondition)
e1:SetTarget(c101005075.cetarget)
e1:SetOperation(c101005075.ceoperation)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101005075,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101005075)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101005075.sptarget)
e2:SetOperation(c101005075.spoperation)
c:RegisterEffect(e2)
end
function c101005075.repop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,c101005075.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
function c101005075.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x104)
end
function c101005075.cecondition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(c101005075.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101005075.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c101005075.cetarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005075.thfilter,rp,0,LOCATION_MZONE,1,nil) end
end
function c101005075.ceoperation(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c101005075.repop)
end
function c101005075.spfilter1(c,e,tp)
local zone=bit.band(c:GetLinkedZone(),0x1f)
return c:IsFaceup() and c:IsType(TYPE_LINK) and Duel.IsExistingMatchingCard(c101005075.spfilter2,tp,0x13,0,1,c,e,tp,zone)
end
function c101005075.spfilter2(c,e,tp,zone)
return c:IsSetCard(0x104) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,tp,zone)
end
function c101005075.sptarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c101005075.spfilter1(chkc,e,tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c101005075.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.SelectTarget(tp,c101005075.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13)
end
function c101005075.spoperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local zone=bit.band(tc:GetLinkedZone(),0x1f)
local sg=Duel.SelectMatchingCard(tp,c101005075.spfilter2,tp,0x13,0,1,1,c,e,tp,zone)
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE,zone)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--弩弓部隊
--Ballista Squad
--Script by nekrozar
function c101005077.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c101005077.cost)
e1:SetTarget(c101005077.target)
e1:SetOperation(c101005077.activate)
c:RegisterEffect(e1)
end
function c101005077.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c101005077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101005077.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
...@@ -8,10 +8,14 @@ function c101005079.initial_effect(c) ...@@ -8,10 +8,14 @@ function c101005079.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c101005079.condition)
e1:SetTarget(c101005079.target) e1:SetTarget(c101005079.target)
e1:SetOperation(c101005079.activate) e1:SetOperation(c101005079.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101005079.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c101005079.filter(c,tp) function c101005079.filter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c101005079.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack()) return c:IsFaceup() and Duel.IsExistingMatchingCard(c101005079.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack())
end end
......
--ヴァレル・リロード
--Borrel Regenerator
function c101005100.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101005100)
e1:SetTarget(c101005100.target)
e1:SetOperation(c101005100.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c101005100.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(c101005100.rmop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101005100,1))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,101005152)
e4:SetCondition(c101005100.drcon)
e4:SetTarget(c101005100.drtg)
e4:SetOperation(c101005100.drop)
c:RegisterEffect(e4)
end
function c101005100.spfilter(c,e,tp)
return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101005100.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101005100.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101005100.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101005100.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101005100.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 Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c101005100.eqlimit)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
function c101005100.eqlimit(e,c)
return e:GetOwner()==c
end
function c101005100.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c101005100.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetFirstCardTarget()
if c:IsReason(REASON_DESTROY) and tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c101005100.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
return c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_DESTROY)
end
function c101005100.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101005100.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
--孤毒の剣
--Sword of Toxic Solitude
--Scripted by Eerie Code
function c101005101.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
c:SetUniqueOnField(1,0,101005101)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101005101.target)
e1:SetOperation(c101005101.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(c101005101.eqlimit)
c:RegisterEffect(e2)
--self destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_SELF_TOGRAVE)
e3:SetCondition(c101005101.sdcon)
c:RegisterEffect(e3)
--double atk/def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_SET_BASE_ATTACK)
e4:SetCondition(c101005101.adcon)
e4:SetValue(c101005101.atkval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE)
e5:SetValue(c101005101.defval)
c:RegisterEffect(e5)
end
function c101005101.eqlimit(e,c)
return c:IsControler(e:GetHandlerPlayer())
end
function c101005101.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101005101.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c101005101.sdcon(e)
local g=e:GetHandler():GetEquipGroup()
return g and g:GetCount()>0 and Duel.IsExistingMatchingCard(nil,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,g)
end
function c101005101.adcon(e)
if Duel.GetCurrentPhase()~=PHASE_DAMAGE_CAL then return false end
local eqc=e:GetHandler():GetEquipTarget()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return d and (a==eqc or d==eqc)
end
function c101005101.atkval(e,c)
return c:GetBaseAttack()*2
end
function c101005101.defval(e,c)
return c:GetBaseDefense()*2
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