Commit 3902423f authored by mercury233's avatar mercury233

update

parent c32a00d7
#created by ...
#main
101104009
101104010
101104011
101104017
101104022
101104026
101104059
101104060
101104061
101104076
101104078
101104021
100200193
101104014
101104015
101104077
101104079
101104018
101104031
101104063
101104019
101104023
100275001
101104201
101104202
101104203
101104004
101104005
101104006
101104007
101104008
101104009
101104010
101104011
101104012
101104013
101104014
101104015
101104016
101104017
101104018
101104019
101104020
101104021
101104022
101104023
101104024
101104025
101104026
101104027
101104028
101104029
101104030
101104031
101104032
101104206
101104207
101104208
101104053
101104054
101104055
101104056
101104057
101104058
101104059
101104060
101104061
101104062
101104063
101104064
101104065
101104066
101104209
101104068
101104069
101104070
......@@ -48,30 +58,27 @@
101104073
101104074
101104075
101104020
100274203
101104201
101104202
101104203
101104206
101104207
101104208
101104209
101104076
101104077
#extra
101104043
101104033
101104034
101104035
101104036
101104045
101104047
101104037
101104042
101104048
101104033
101104038
101104204
101104205
101104041
101104042
101104043
!side
101104044
101104045
101104046
!side
100274201
100274202
101104204
101104205
101104047
101104048
101104049
101104078
101104079
101104080
#created by ...
#main
101103000
101103081
101103082
101103086
101103087
101103088
101103089
101103090
101103091
101103092
101103093
101103094
101103095
101103096
101103097
101103098
100276001
100416027
100416028
100416029
100416030
100416031
100416032
100416037
100416038
100416039
100200193
100275001
100274203
#extra
101103083
101103084
101103085
100416033
100416034
100416035
100274201
100274202
!side
#The first line is used for comment
!counter 0x59 落魂指示物
!counter 0x60 指示物(北极天熊北斗星)
!counter 0x61 指示物(岩战之试炼)
!victory 0x21 「混沌虚数No.1000 梦幻虚光神 原数天灵·原数天地」特殊胜利
!setname 0x7e 异热同心
!setname 0x107e 异热同心武器
!setname 0x207e 异热同心从者
!setname 0x25b 降阶魔法
!setname 0x25e 惊乐
!setname 0x25f 游乐设施
!setname 0x260 烙印
!setname 0x15b 惊乐
!setname 0x15c 游乐设施
!setname 0x15d 烙印
!setname 0x15e 降阶魔法
!setname 0x261 北极天熊
!setname 0x262 源质兽
!setname 0x263 岩战
field/101104058.jpg

81.4 KB | W: | H:

field/101104058.jpg

192 KB | W: | H:

field/101104058.jpg
field/101104058.jpg
field/101104058.jpg
field/101104058.jpg
  • 2-up
  • Swipe
  • Onion skin
--クロノダイバー・テンプホエーラー
--
--Script by mercury233
function c100276001.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100276001,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100276001)
e1:SetCost(c100276001.rmcost)
e1:SetTarget(c100276001.rmtg)
e1:SetOperation(c100276001.rmop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100276001,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,100276001+100)
e2:SetTarget(c100276001.sptg)
e2:SetOperation(c100276001.spop)
c:RegisterEffect(e2)
end
function c100276001.rmcost(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 c100276001.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c100276001.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(100276001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c100276001.retcon)
e1:SetOperation(c100276001.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c100276001.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(100276001)~=0
end
function c100276001.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c100276001.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x126) and not c:IsCode(100276001)
and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>0
end
function c100276001.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100276001.cfilter(chkc,tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c100276001.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c100276001.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100276001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND)
and 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_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
--ベアルクティ-ミクポーラ
--Bearcti - Micpola
--Scripted by Kohana Sonogami
function c100416027.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100416027,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,100416027)
e1:SetCondition(c100416027.spcon)
e1:SetCost(c100416027.spcost)
e1:SetTarget(c100416027.sptg)
e1:SetOperation(c100416027.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100416027,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,100416027+100)
e2:SetTarget(c100416027.thtg)
e2:SetOperation(c100416027.thop)
c:RegisterEffect(e2)
end
function c100416027.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c100416027.rfilter(c)
if c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) then
return c:IsFaceup() and c:IsSetCard(0x261) and c:IsReleasable()
else
return c:IsLevelAbove(7) and c:IsSetCard(0x261) and c:IsAbleToRemove() and c:IsHasEffect(100416038,tp)
end
end
function c100416027.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100416038.rfilter,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c100416038.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst()
local te=tc:IsHasEffect(100416038,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Duel.Release(tc,REASON_COST)
end
end
function c100416027.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 c100416027.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c100416027.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100416027.splimit(e,c)
return not c:IsLevel(0)
end
function c100416027.thfilter(c)
return c:IsLevelBelow(0x261) and c:IsType(TYPE_MONSTER) and not c:IsCode(100416027) and c:IsAbleToHand()
end
function c100416027.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100416027.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100416027.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100416027.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ベアルクティ-ミクタナス
--Scripted by mallu11
function c100416028.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100416028,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100416028)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c100416028.spcon)
e1:SetCost(c100416028.spcost)
e1:SetTarget(c100416028.sptg)
e1:SetOperation(c100416028.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100416028,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100416028+100)
e2:SetTarget(c100416028.thtg)
e2:SetOperation(c100416028.thop)
c:RegisterEffect(e2)
end
function c100416028.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100416028.rfilter(c,tp)
return c:IsLevelAbove(7) and (c:IsControler(tp) and c:IsLocation(LOCATION_HAND) or c:IsFaceup() and c:IsControler(1-tp))
end
function c100416028.excostfilter(c,tp)
return c:IsAbleToRemove() and c:IsHasEffect(100416038,tp)
end
function c100416028.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetReleaseGroup(tp,true):Filter(c100416028.rfilter,e:GetHandler(),tp)
local g2=Duel.GetMatchingGroup(c100416028.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
g1:Merge(g2)
if chk==0 then return g1:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
tc=g1:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then
local te=tc:IsHasEffect(100416038,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
else
Duel.Release(tc,REASON_COST)
end
end
function c100416028.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 c100416028.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100416028.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100416028.splimit(e,c)
return c:IsLevel(0)
end
function c100416028.thfilter(c)
return c:IsSetCard(0x261) and c:IsType(TYPE_MONSTER) and not c:IsCode(100416028) and c:IsAbleToHand()
end
function c100416028.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100416028.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100416028.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100416028.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100416028.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
--ベアルクティ-ミクビリス
--Scripted by mallu11
function c100416029.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100416029,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100416029)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c100416029.spcon)
e1:SetCost(c100416029.spcost)
e1:SetTarget(c100416029.sptg)
e1:SetOperation(c100416029.spop)
c:RegisterEffect(e1)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100416029,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,100416029+100)
e2:SetTarget(c100416029.sptg2)
e2:SetOperation(c100416029.spop2)
c:RegisterEffect(e2)
end
function c100416029.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100416029.rfilter(c,tp)
return c:IsLevelAbove(7) and (c:IsControler(tp) and c:IsLocation(LOCATION_HAND) or c:IsFaceup() and c:IsControler(1-tp))
end
function c100416029.excostfilter(c,tp)
return c:IsAbleToRemove() and c:IsHasEffect(100416038,tp)
end
function c100416029.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetReleaseGroup(tp,true):Filter(c100416029.rfilter,e:GetHandler(),tp)
local g2=Duel.GetMatchingGroup(c100416029.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
g1:Merge(g2)
if chk==0 then return g1:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
tc=g1:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then
local te=tc:IsHasEffect(100416038,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
else
Duel.Release(tc,REASON_COST)
end
end
function c100416029.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 c100416029.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100416029.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100416029.splimit(e,c)
return c:IsLevel(0)
end
function c100416029.spfilter2(c,e,tp)
return c:IsSetCard(0x261) and not c:IsCode(100416029) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100416029.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c100416029.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100416029.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100416029.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--ベアルクティ-メガポーラ
--Scripted by mallu11
function c100416030.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100416030,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100416030)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c100416030.spcon)
e1:SetCost(c100416030.spcost)
e1:SetTarget(c100416030.sptg)
e1:SetOperation(c100416030.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100416030,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100416030+100)
e2:SetCondition(c100416030.descon)
e2:SetTarget(c100416030.destg)
e2:SetOperation(c100416030.desop)
c:RegisterEffect(e2)
end
function c100416030.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100416030.rfilter(c,tp)
return c:IsLevelAbove(7) and (c:IsControler(tp) and c:IsLocation(LOCATION_HAND) or c:IsFaceup() and c:IsControler(1-tp))
end
function c100416030.excostfilter(c,tp)
return c:IsAbleToRemove() and c:IsHasEffect(100416038,tp)
end
function c100416030.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetReleaseGroup(tp,true):Filter(c100416030.rfilter,e:GetHandler(),tp)
local g2=Duel.GetMatchingGroup(c100416030.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
g1:Merge(g2)
if chk==0 then return g1:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
tc=g1:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then
local te=tc:IsHasEffect(100416038,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
else
Duel.Release(tc,REASON_COST)
end
end
function c100416030.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 c100416030.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100416030.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100416030.splimit(e,c)
return c:IsLevel(0)
end
function c100416030.confilter(c)
return c:IsFaceup() and c:IsSetCard(0x261)
end
function c100416030.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100416030.confilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c100416030.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100416030.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--ベアルクティ-メガタナス
--Scripted by mallu11
function c100416031.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100416031,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100416031)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c100416031.spcon)
e1:SetCost(c100416031.spcost)
e1:SetTarget(c100416031.sptg)
e1:SetOperation(c100416031.spop)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100416031,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100416031+100)
e2:SetCondition(c100416031.poscon)
e2:SetTarget(c100416031.postg)
e2:SetOperation(c100416031.posop)
c:RegisterEffect(e2)
end
function c100416031.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100416031.rfilter(c,tp)
return c:IsLevelAbove(7) and (c:IsControler(tp) and c:IsLocation(LOCATION_HAND) or c:IsFaceup() and c:IsControler(1-tp))
end
function c100416031.excostfilter(c,tp)
return c:IsAbleToRemove() and c:IsHasEffect(100416038,tp)
end
function c100416031.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetReleaseGroup(tp,true):Filter(c100416031.rfilter,e:GetHandler(),tp)
local g2=Duel.GetMatchingGroup(c100416031.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
g1:Merge(g2)
if chk==0 then return g1:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
tc=g1:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then
local te=tc:IsHasEffect(100416038,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
else
Duel.Release(tc,REASON_COST)
end
end
function c100416031.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 c100416031.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100416031.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100416031.splimit(e,c)
return c:IsLevel(0)
end
function c100416031.confilter(c)
return c:IsFaceup() and c:IsSetCard(0x261)
end
function c100416031.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100416031.confilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c100416031.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c100416031.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c100416031.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100416031.posfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c100416031.posfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c100416031.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
--ベアルクティ-メガビリス
--Scripted by mallu11
function c100416032.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100416032,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100416032)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c100416032.spcon)
e1:SetCost(c100416032.spcost)
e1:SetTarget(c100416032.sptg)
e1:SetOperation(c100416032.spop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100416032,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100416032+100)
e2:SetCondition(c100416032.rmcon)
e2:SetTarget(c100416032.rmtg)
e2:SetOperation(c100416032.rmop)
c:RegisterEffect(e2)
end
function c100416032.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100416032.rfilter(c,tp)
return c:IsLevelAbove(7) and (c:IsControler(tp) and c:IsLocation(LOCATION_HAND) or c:IsFaceup() and c:IsControler(1-tp))
end
function c100416032.excostfilter(c,tp)
return c:IsAbleToRemove() and c:IsHasEffect(100416038,tp)
end
function c100416032.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetReleaseGroup(tp,true):Filter(c100416032.rfilter,e:GetHandler(),tp)
local g2=Duel.GetMatchingGroup(c100416032.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
g1:Merge(g2)
if chk==0 then return g1:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
tc=g1:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then
local te=tc:IsHasEffect(100416038,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
else
Duel.Release(tc,REASON_COST)
end
end
function c100416032.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 c100416032.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100416032.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100416032.splimit(e,c)
return c:IsLevel(0)
end
function c100416032.confilter(c)
return c:IsFaceup() and c:IsSetCard(0x261)
end
function c100416032.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100416032.confilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c100416032.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c100416032.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--ベアルクティ-ポラリィ
--Scripted by mallu11
function c100416033.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c100416033.sprcon)
e2:SetOperation(c100416033.sprop)
c:RegisterEffect(e2)
--activate card
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100416033,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,100416033)
e3:SetTarget(c100416033.acttg)
e3:SetOperation(c100416033.actop)
c:RegisterEffect(e3)
--to hand/spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100416033,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100416033+100)
e4:SetCost(c100416033.thcost)
e4:SetTarget(c100416033.thtg)
e4:SetOperation(c100416033.thop)
c:RegisterEffect(e4)
end
function c100416033.tgrfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsAbleToGraveAsCost()
end
function c100416033.mnfilter(c,g)
return g:IsExists(c100416033.mnfilter2,1,c,c)
end
function c100416033.mnfilter2(c,mc)
return c:GetLevel()-mc:GetLevel()==1
end
function c100416033.fselect(g,tp,sc)
return g:GetCount()==2 and g:IsExists(Card.IsType,1,nil,TYPE_TUNER) and g:IsExists(aux.NOT(Card.IsType),1,nil,TYPE_TUNER) and g:IsExists(c100416033.mnfilter,1,nil,g) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
end
function c100416033.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c100416033.tgrfilter,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(c100416033.fselect,2,2,tp,c)
end
function c100416033.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c100416033.tgrfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:SelectSubGroup(tp,c100416033.fselect,false,2,2,tp,c)
Duel.SendtoGrave(tg,REASON_COST)
end
function c100416033.actfilter(c,tp)
return c:IsCode(100416038) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c100416033.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100416033.actfilter,tp,LOCATION_DECK,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
end
function c100416033.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local g=Duel.SelectMatchingCard(tp,c100416033.actfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.ResetFlagEffect(tp,15248873)
local tc=g:GetFirst()
if tc then
local te=tc:GetActivateEffect()
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
Duel.ResetFlagEffect(tp,15248873)
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
function c100416033.rfilter(c,tp)
return c:IsLevelAbove(7) and (c:IsControler(tp) or c:IsFaceup())
end
function c100416033.rfilter2(c,e,tp)
return Duel.IsExistingMatchingCard(c100416033.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c)
end
function c100416033.cfilter(c,e,tp,mc)
if not (c:IsSetCard(0x261) and c:IsType(TYPE_MONSTER)) then return false end
local b1=c:IsAbleToHand()
local b2=c:IsCanBeSpecialSummoned(e,0,tp,false,false)
if not b1 and b2 then
return Duel.GetMZoneCount(tp,mc)>0
else
return b1 or b2
end
end
function c100416033.excostfilter(c,tp)
return c:IsAbleToRemove() and c:IsHasEffect(100416038,tp)
end
function c100416033.cfilter2(c,e,tp,ft)
return Duel.IsExistingMatchingCard(c100416033.thfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,ft)
end
function c100416033.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetReleaseGroup(tp):Filter(c100416033.rfilter,nil,tp)
local g2=Duel.GetMatchingGroup(c100416033.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local b1=g1:IsExists(c100416033.rfilter2,1,nil,e,tp)
local b2=g2:IsExists(c100416033.cfilter2,1,nil,e,tp,ft)
if chk==0 then return b1 or b2 end
local s=0
if b1 and not b2 then
s=0
elseif not b1 and b2 then
s=1
elseif b1 and b2 then
s=Duel.SelectOption(tp,aux.Stringid(100416033,2),aux.Stringid(100416033,3))
end
local tc
if s==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
tc=g1:FilterSelect(tp,c100416033.rfilter2,1,1,nil,e,tp):GetFirst()
Duel.Release(tc,REASON_COST)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
tc=g2:FilterSelect(tp,c100416033.cfilter2,1,1,nil,e,tp,ft):GetFirst()
local te=tc:IsHasEffect(100416038,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
end
end
function c100416033.thfilter(c,e,tp,ft)
return c:IsSetCard(0x261) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not ft or ft>0))
end
function c100416033.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100416033.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
end
function c100416033.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100416033.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--ベアルクティ-セプテン=トリオン
--Scripted by mallu11
function c100416034.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c100416034.sprcon)
e2:SetOperation(c100416034.sprop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c100416034.distg)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100416034,0))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,100416034)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c100416034.thcon)
e4:SetTarget(c100416034.thtg)
e4:SetOperation(c100416034.thop)
c:RegisterEffect(e4)
end
function c100416034.tgrfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsAbleToGraveAsCost()
end
function c100416034.tgrfilter1(c)
return c:IsType(TYPE_TUNER) and c:IsLevelAbove(8)
end
function c100416034.tgrfilter2(c)
return not c:IsType(TYPE_TUNER) and c:IsType(TYPE_SYNCHRO)
end
function c100416034.mnfilter(c,g)
return g:IsExists(c100416034.mnfilter2,1,c,c)
end
function c100416034.mnfilter2(c,mc)
return c:GetLevel()-mc:GetLevel()==7
end
function c100416034.fselect(g,tp,sc)
return g:GetCount()==2 and g:IsExists(c100416034.tgrfilter1,1,nil) and g:IsExists(c100416034.tgrfilter2,1,nil) and g:IsExists(c100416034.mnfilter,1,nil,g) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
end
function c100416034.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c100416034.tgrfilter,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(c100416034.fselect,2,2,tp,c)
end
function c100416034.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c100416034.tgrfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:SelectSubGroup(tp,c100416034.fselect,false,2,2,tp,c)
Duel.SendtoGrave(tg,REASON_COST)
end
function c100416034.distg(e,c)
return c:GetSummonLocation()==LOCATION_EXTRA and c:IsLevel(0)
end
function c100416034.cfilter(c,sp)
return c:GetSummonPlayer()==sp
end
function c100416034.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100416034.cfilter,1,nil,1-tp)
end
function c100416034.thfilter(c)
return c:IsSetCard(0x261) and c:IsAbleToHand()
end
function c100416034.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100416034.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100416034.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100416034.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
--ベアルクティ-グラン=シャリオ
--Bearcti - Grand Chariot
--Scripted by Kohana Sonogami
function c100416035.initial_effect(c)
c:EnableReviveLimit()
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--spsummon condition
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c100416035.sprcon)
e2:SetOperation(c100416035.sprop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100416035,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c100416035.destg)
e3:SetOperation(c100416035.desop)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100416035,1))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c100416035.negcon)
e4:SetCost(c100416035.negcost)
e4:SetTarget(c100416035.negtg)
e4:SetOperation(c100416035.negop)
c:RegisterEffect(e4)
end
function c100416035.tgrfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsAbleToGraveAsCost()
end
function c100416035.tgrfilter1(c)
return c:IsType(TYPE_TUNER) and c:IsLevelAbove(8)
end
function c100416035.tgrfilter2(c)
return not c:IsType(TYPE_TUNER)
end
function c100416035.mnfilter(c,g)
return g:IsExists(c100416035.mnfilter2,1,c,c)
end
function c100416035.mnfilter2(c,mc)
return c:GetLevel()-mc:GetLevel()==7
end
function c100416035.fselect(g,tp,sc)
return g:GetCount()==2 and g:IsExists(c100416035.tgrfilter1,1,nil) and g:IsExists(c100416035.tgrfilter2,1,nil) and g:IsExists(c100416035.mnfilter,1,nil,g) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
end
function c100416035.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c100416035.tgrfilter,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(c100416035.fselect,2,2,tp,c)
end
function c100416035.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c100416035.tgrfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:SelectSubGroup(tp,c100416035.fselect,false,2,2,tp,c)
Duel.SendtoGrave(tg,REASON_COST)
end
function c100416035.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end
function c100416035.desop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #dg>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
end
function c100416035.negfilter(c)
return c:IsFaceup() and c:IsSetCard(0x261) and c:IsOnField() and c:IsControler(tp)
end
function c100416035.negcon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c100416035.negfilter,1,nil) and Duel.IsChainNegatable(ev)
end
function c100416035.costfilter(c,tp)
if c:IsLocation(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE) then
return c:IsType(TYPE_MONSTER) and c:IsReleasable()
else
return c:IsLevelAbove(7) and c:IsSetCard(0x261) and c:IsAbleToRemove() and c:IsHasEffect(100416038,tp)
end
end
function c100416035.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100416035.costfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c100416035.costfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst()
local te=tc:IsHasEffect(100416038,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else
Duel.Release(tc,REASON_COST)
end
end
function c100416035.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 c100416035.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
--ベアルクティ・スライダー
--Scripted by mallu11
function c100416037.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:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,100416037+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100416037.target)
e1:SetOperation(c100416037.activate)
c:RegisterEffect(e1)
end
function c100416037.filter(c,e,tp)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x261) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100416037.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c100416037.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100416037.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100416037.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100416037.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if 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_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(100416037,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(c100416037.descon)
e2:SetOperation(c100416037.desop)
Duel.RegisterEffect(e2,tp)
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTargetRange(1,0)
e3:SetTarget(c100416037.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
function c100416037.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(100416037)~=0 then
return true
else
e:Reset()
return false
end
end
function c100416037.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function c100416037.splimit(e,c)
return c:IsLevel(0)
end
--ベアルクティ・ビッグディッパー
--Bearcti Big Dipper
--Scripted by Kohana Sonogami
function c100416038.initial_effect(c)
c:EnableCounterPermit(0x60)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--change cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(100416038)
e2:SetCountLimit(1)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x261))
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
--counter
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetOperation(c100416038.ctop)
c:RegisterEffect(e3)
--take control
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100416038,0))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1)
e4:SetCost(c100416038.tkccost)
e4:SetTarget(c100416038.tkctg)
e4:SetOperation(c100416038.tkcop)
c:RegisterEffect(e4)
end
function c100416038.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x60,1)
end
function c100416038.tkccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x60,7,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x60,e:GetHandler():GetCounter(0x60),REASON_COST)
end
function c100416038.tkctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c100416038.tkcop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp)
end
end
--ベアルクティ・クィントチャージ
--Scripted by mallu11
function c100416039.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--to hand/spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(c100416039.cost)
e2:SetTarget(c100416039.target)
e2:SetOperation(c100416039.activate)
c:RegisterEffect(e2)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100416039,2))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c100416039.tdcon)
e3:SetTarget(c100416039.tdtg)
e3:SetOperation(c100416039.tdop)
c:RegisterEffect(e3)
end
function c100416039.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,700) end
Duel.PayLPCost(tp,700)
end
function c100416039.thfilter(c)
return c:IsSetCard(0x261) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100416039.rfilter(c,tp)
return (c:IsFaceup() or c:IsControler(tp)) and c:IsLevelAbove(1) and c:IsSetCard(0x261)
end
function c100416039.mnfilter(c,g,lv)
return g:IsExists(c100416039.mnfilter2,1,c,c,lv)
end
function c100416039.mnfilter2(c,mc,lv)
return c:GetLevel()-mc:GetLevel()==lv
end
function c100416039.spfilter(c,e,tp,g,lv)
return c:IsSetCard(0x261) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
and (not g and c:IsLevel(lv) or g:IsExists(c100416039.mnfilter,1,nil,g,c:GetLevel()))
end
function c100416039.fselect(g,e,tp)
return g:GetCount()==2 and g:IsExists(Card.IsType,1,nil,TYPE_TUNER) and g:IsExists(aux.NOT(Card.IsType),1,nil,TYPE_TUNER)
and Duel.IsExistingMatchingCard(c100416039.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end
function c100416039.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c100416039.thfilter,tp,LOCATION_GRAVE,0,1,nil)
local g=Duel.GetReleaseGroup(tp):Filter(c100416039.rfilter,nil,tp)
local b2=g:CheckSubGroup(c100416039.fselect,2,2,e,tp)
if chk==0 then return b1 or b2 end
local s=0
if b1 and not b2 then
s=Duel.SelectOption(tp,aux.Stringid(100416039,0))
elseif not b1 and b2 then
s=Duel.SelectOption(tp,aux.Stringid(100416039,1))+1
elseif b1 and b2 then
s=Duel.SelectOption(tp,aux.Stringid(100416039,0),aux.Stringid(100416039,1))
end
e:SetLabel(s)
if s==0 then
e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
end
function c100416039.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100416039.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
if e:GetLabel()==1 then
local g=Duel.GetReleaseGroup(tp):Filter(c100416039.rfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=g:SelectSubGroup(tp,c100416039.fselect,false,2,2,e,tp)
if rg and rg:GetCount()==2 then
local c1=rg:GetFirst()
local c2=rg:GetNext()
if Duel.Release(rg,REASON_EFFECT)==2 then
local lv=c1:GetLevel()-c2:GetLevel()
if lv<0 then lv=-lv end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c100416039.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil,lv)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
end
end
end
end
function c100416039.cfilter(c,tp)
return c:IsPreviousSetCard(0x261) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousTypeOnField()&TYPE_SYNCHRO~=0 and c:GetPreviousControler()==tp
end
function c100416039.tdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100416039.cfilter,1,nil,tp) and Duel.GetAttacker():IsControler(1-tp)
end
function c100416039.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if chk==0 then return g:GetCount()>=7 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,7,0,0)
end
function c100416039.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local sg=g:Select(1-tp,7,7,nil)
if sg and sg:GetCount()==7 then
Duel.SendtoDeck(sg,nil,2,REASON_RULE)
end
end
--War Rock Mountain
--Scripted by Kohana Sonogami
function c101103000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103000+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c101103000.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103000,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,101103000)
e2:SetCondition(c101103000.spcon)
e2:SetTarget(c101103000.sptg)
e2:SetOperation(c101103000.spop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_FZONE)
e3:SetTarget(c101103000.reptg)
e3:SetValue(c101103000.repval)
e3:SetOperation(c101103000.repop)
c:RegisterEffect(e3)
end
function c101103000.thfilter(c)
return c:IsSetCard(0x263) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101103000.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c101103000.thfilter,tp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101103000,0)) then
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
function c101103000.cfilter1(c)
return c:IsFacedown() or not c:IsRace(RACE_WARRIOR)
end
function c101103000.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101103000.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function c101103000.cfilter2(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c101103000.spfilter(c,e,tp)
return c:IsSetCard(0x263) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(c101103000.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function c101103000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101103000.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101103000.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,c101103000.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101103000.repfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x263)
and c:IsControler(tp) and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c101103000.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGrave() and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
and eg:IsExists(c101103000.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c101103000.repval(e,c)
return c101103000.repfilter(c,e:GetHandlerPlayer())
end
function c101103000.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
--Materiactor Gigadra
--Scripted by mallu11
function c101103081.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103081,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101103081)
e1:SetCost(c101103081.spcost)
e1:SetTarget(c101103081.sptg)
e1:SetOperation(c101103081.spop)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(c101103081.splimit)
c:RegisterEffect(e2)
end
function c101103081.costfilter(c,e,tp,normal)
return c:IsDiscardable() and (not normal or c:IsType(TYPE_NORMAL)) and Duel.IsExistingMatchingCard(c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp,normal)
end
function c101103081.spfilter(c,e,tp,normal)
return (normal and c:IsSetCard(0x262) or c:IsLevel(3) and c:IsType(TYPE_NORMAL)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103081.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100,0)
local b1=Duel.IsExistingMatchingCard(c101103081.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp,false)
local b2=Duel.IsExistingMatchingCard(c101103081.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp,true)
if chk==0 then return b1 or b2 end
local g1=Duel.GetMatchingGroup(c101103081.costfilter,tp,LOCATION_HAND,0,nil,e,tp,false)
local g2=Duel.GetMatchingGroup(c101103081.costfilter,tp,LOCATION_HAND,0,nil,e,tp,true)
local sg=nil
if b1 and not b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
sg=g1:Select(tp,1,1,nil)
elseif not b1 and b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
sg=g2:Select(tp,1,1,nil)
else
g1:Merge(g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
sg=g1:Select(tp,1,1,nil)
end
if sg:GetFirst():IsType(TYPE_NORMAL) then
e:SetLabel(100,1)
else
e:SetLabel(100,0)
end
Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD)
end
function c101103081.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,false)
local b2=Duel.IsExistingMatchingCard(c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,true)
local check,label=e:GetLabel()
if chk==0 then
e:SetLabel(0,0)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
if check==100 then
return b1 or b2
else
return b1
end
end
e:SetLabel(0,label)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101103081.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local normal=false
local check,label=e:GetLabel()
if label==1 then normal=true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,normal)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101103081.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
end
--Raging Storm Dragon - Beaufort IX
--Scripted by mallu11
function c101103082.initial_effect(c)
c:EnableReviveLimit()
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103082,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101103082)
e1:SetCondition(c101103082.discon)
e1:SetCost(c101103082.discost)
e1:SetTarget(c101103082.distg)
e1:SetOperation(c101103082.disop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103082,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,101103082+100)
e2:SetTarget(c101103082.thtg)
e2:SetOperation(c101103082.thop)
c:RegisterEffect(e2)
end
function c101103082.discon(e,tp,eg,ep,ev,re,r,rp)
e:SetLabelObject(Duel.GetAttacker())
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c101103082.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c101103082.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc and aux.disfilter1(bc) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,bc,1,0,0)
end
function c101103082.disop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if Duel.NegateAttack() and bc and bc:IsRelateToBattle() and bc:IsFaceup() and not bc:IsDisabled() then
Duel.NegateRelatedChain(bc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
bc:RegisterEffect(e2)
end
end
function c101103082.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c101103082.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101103082.thfilter(chkc) end
if chk==0 then return c:IsAbleToHand() and Duel.IsExistingTarget(c101103082.thfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c101103082.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0)
end
function c101103082.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
local rg=Group.FromCards(c,tc)
Duel.SendtoHand(rg,nil,REASON_EFFECT)
end
--Triphasic Dealmon Coordius
--Scripted by mallu11
function c101103083.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcMix(c,false,true,c101103083.fusfilter1,c101103083.fusfilter2,c101103083.fusfilter3)
--reg
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(c101103083.regcon)
e1:SetOperation(c101103083.regop)
c:RegisterEffect(e1)
end
c101103083.material_type=TYPE_SYNCHRO
function c101103083.fusfilter1(c)
return c:IsFusionType(TYPE_SYNCHRO)
end
function c101103083.fusfilter2(c)
return c:IsFusionType(TYPE_XYZ)
end
function c101103083.fusfilter3(c)
return c:IsFusionType(TYPE_LINK)
end
function c101103083.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c101103083.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101103083)
e1:SetTarget(c101103083.target)
e1:SetOperation(c101103083.operation)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c101103083.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101103083.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)>=2000 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101103083,0))
end
function c101103083.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLP(tp)<2000 then return end
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101103083.thfilter),tp,LOCATION_GRAVE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,3,nil)
local b3=c:IsRelateToEffect(e) and c:IsFaceup()
local pay=0
if b1 then pay=pay+2000 end
if b2 and Duel.GetLP(tp)-pay>=2000 then pay=pay+2000 end
if b3 and Duel.GetLP(tp)-pay>=2000 then pay=pay+2000 end
if pay<2000 then return end
local m=math.floor(pay/2000)
local t={}
for i=1,m do
t[i]=i*2000
end
local ac=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,ac)
if Duel.GetLP(tp)<=0 then return end
m=math.floor(ac/2000)
local g=nil
if b1 and (m>2 or (m>1 and not (b2 and b3)) or m>0 and (not (b2 or b3) or Duel.SelectYesNo(tp,aux.Stringid(101103083,1)))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101103083.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
m=m-1
end
if b2 and (m>1 or m>0 and (not b3 or Duel.SelectYesNo(tp,aux.Stringid(101103083,2)))) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,3,3,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
m=m-1
end
if b3 and m>0 then
Duel.BreakEffect()
local atk=math.floor(math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))/2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_ATTACK)
e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetTargetRange(LOCATION_MZONE,0)
e0:SetTarget(c101103083.ftarget)
e0:SetLabel(c:GetFieldID())
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
end
end
function c101103083.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
--Materiactor Gigaboros
--Scripted by mallu11
function c101103084.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,3,2,nil,nil,99)
--atk/def
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(c101103084.adval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--material
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103084,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101103084)
e3:SetCost(c101103084.matcost)
e3:SetTarget(c101103084.mattg)
e3:SetOperation(c101103084.matop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101103084,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetCountLimit(1,101103084+100)
e4:SetCondition(c101103084.thcon)
e4:SetTarget(c101103084.thtg)
e4:SetOperation(c101103084.thop)
c:RegisterEffect(e4)
end
function c101103084.adval(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*500
end
function c101103084.matcost(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 c101103084.matfilter(c)
return c:IsSetCard(0x262) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function c101103084.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(c101103084.matfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c101103084.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c101103084.matfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
end
function c101103084.thcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==1-tp
and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end
function c101103084.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetOverlayGroup()
if chk==0 then return g:IsExists(Card.IsAbleToHand,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_OVERLAY)
end
function c101103084.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local g=c:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
end
--Breath of Acclamation
--Scripted by mallu11
function c101103086.initial_effect(c)
aux.AddRitualProcEqual2(c,c101103086.ritual_filter)
end
function c101103086.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsAttribute(ATTRIBUTE_WIND)
end
--Greater Polymerization
--Scripted by mallu11
function c101103087.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101103087.target)
e1:SetOperation(c101103087.activate)
c:RegisterEffect(e1)
end
function c101103087.filter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101103087.fcheck(tp,sg,fc)
return sg:GetCount()>=3
end
function c101103087.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(aux.NOT(Card.IsImmuneToEffect),nil,e)
aux.FCheckAdditional=c101103087.fcheck
local res=Duel.IsExistingMatchingCard(c101103087.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101103087.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101103087.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(aux.NOT(Card.IsImmuneToEffect),nil,e)
aux.FCheckAdditional=c101103087.fcheck
local sg1=Duel.GetMatchingGroup(c101103087.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101103087.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
local res=false
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
Auxiliary.FCheckAdditional=c101103087.fcheck
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
res=true
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
res=true
end
if res then
tc:CompleteProcedure()
--cannot be destroyed
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
--pierce
local e2=Effect.CreateEffect(tc)
e2:SetDescription(aux.Stringid(101103087,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
if not tc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(tc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3,true)
end
end
end
aux.FCheckAdditional=nil
end
--Psychic Eraser Laser
--Scripted by mallu11
function c101103089.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103089+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101103089.target)
e1:SetOperation(c101103089.operation)
c:RegisterEffect(e1)
end
function c101103089.filter(c)
return c:GetSummonLocation()==LOCATION_EXTRA and c:IsAbleToGrave()
end
function c101103089.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103089.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,0)
end
function c101103089.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103089.filter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER) then
local atk=tc:GetTextAttack()
local def=tc:GetTextDefense()
local rec=atk>=def and atk or def
if rec>0 then
Duel.BreakEffect()
Duel.Recover(1-tp,rec,REASON_EFFECT)
end
end
end
end
--Underdog
--Scripted by mallu11
function c101103092.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c101103092.disable)
c:RegisterEffect(e2)
end
function c101103092.disable(e,c)
return (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT) and c:IsControler(1-Duel.GetTurnPlayer())
end
--War Lock Fortia
--Scripted by Kohana Sonogami
function c101103093.initial_effect(c)
--tohand & atkchange
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103093,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_BATTLED)
e1:SetCountLimit(1,101103093)
e1:SetTarget(c101103093.thtg)
e1:SetOperation(c101103093.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103093,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101103093+100)
e2:SetCondition(c101103093.spcon)
e2:SetTarget(c101103093.sptg)
e2:SetOperation(c101103093.spop)
c:RegisterEffect(e2)
end
function c101103093.thfilter(c)
return c:IsSetCard(0x263) and not c:IsCode(101103093) and c:IsAbleToHand()
end
function c101103093.check(c,tp)
return c and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR)
end
function c101103093.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil
and (c101103093.check(Duel.GetAttacker(),tp) or c101103093.check(Duel.GetAttackTarget(),tp))
and Duel.IsExistingMatchingCard(c101103093.thfilter,tp,LOCATION_DECK,0,1,nil) end
if c101103093.check(Duel.GetAttacker(),tp) then
Duel.SetTargetCard(Duel.GetAttackTarget())
else
Duel.SetTargetCard(Duel.GetAttacker())
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101103093.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x263)
end
function c101103093.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101103093.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c101103093.atkfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101103093.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
end
end
function c101103093.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT)
end
function c101103093.spfilter(c,e,tp)
return c:IsLevelAbove(5) and c:IsSetCard(0x263) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103093.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101103093.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 c101103093.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,c101103093.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--War Rock Gactos
--Scripted by Kohana Sonogami
function c101103094.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103094,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101103094)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c101103094.spcon1)
e1:SetTarget(c101103094.sptg1)
e1:SetOperation(c101103094.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103094,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101103094+100)
e2:SetCondition(c101103094.spcon2)
e2:SetTarget(c101103094.sptg2)
e2:SetOperation(c101103094.spop2)
c:RegisterEffect(e2)
end
function c101103094.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x263) and c:IsControler(tp)
end
function c101103094.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103094.cfilter,1,nil,tp)
end
function c101103094.sptg1(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 c101103094.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c101103094.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT)
end
function c101103094.spfilter2(c,e,tp)
return c:IsLevelAbove(5) and c:IsSetCard(0x263) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103094.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101103094.spfilter2,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 c101103094.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103094.spfilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--War Rock Orpis
--Scripted by Kohana Sonogami
function c101103095.initial_effect(c)
--normal summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103095,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c101103095.ntcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--tograve & atkchange
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103095,1))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_BATTLED)
e1:SetCountLimit(1,101103095)
e1:SetTarget(c101103095.tgtg)
e1:SetOperation(c101103095.tgop)
c:RegisterEffect(e1)
end
function c101103095.cfilter(c)
return c:IsFacedown() or not c:IsRace(RACE_WARRIOR)
end
function c101103095.ntcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc==0 and c:IsLevelAbove(4) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(c101103095.cfilter,tp,LOCATION_MZONE,0,1,nil))
end
function c101103095.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c101103095.check(c,tp)
return c and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR)
end
function c101103095.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil
and (c101103095.check(Duel.GetAttacker(),tp) or c101103095.check(Duel.GetAttackTarget(),tp))
and Duel.IsExistingMatchingCard(c101103095.tgfilter,tp,LOCATION_DECK,0,1,nil) end
if c101103095.check(Duel.GetAttacker(),tp) then
Duel.SetTargetCard(Duel.GetAttackTarget())
else
Duel.SetTargetCard(Duel.GetAttacker())
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101103095.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x263)
end
function c101103095.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103095.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT) then
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101103095.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
end
end
--War Lock Skyler
--Scripted by Kohana Sonogami
function c101103096.initial_effect(c)
--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(c101103096.val)
c:RegisterEffect(e1)
--special summon & atkchange
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103096,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,101103096)
e2:SetCondition(c101103096.spcon)
e2:SetTarget(c101103096.sptg)
e2:SetOperation(c101103096.spop)
c:RegisterEffect(e2)
end
function c101103096.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c101103096.val(e,c)
return Duel.GetMatchingGroupCount(c101103096.atkfilter,c:GetControler(),0,LOCATION_MZONE,nil)*100
end
function c101103096.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetBattledGroupCount()>0
end
function c101103096.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101103096.cfilter,tp,LOCATION_MZONE,0,1,nil)
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c101103096.spfilter(c,e,tp)
return c:IsLevelAbove(5) and c:IsSetCard(0x263) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103096.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101103096.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101103096.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101103096.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101103096.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x263)
end
function c101103096.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local g=Duel.GetMatchingGroup(c101103096.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsLevelBelow,5))
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
--War Rock Bashileos
--Scripted by Kohana Sonogami
function c101103097.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103097,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103097)
e1:SetCondition(c101103097.dracon)
e1:SetOperation(c101103097.draop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103097,1))
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_GRAVE)
e2:SetCountLimit(1,101103097+100)
e2:SetCondition(c101103097.spcon)
e2:SetTarget(c101103097.sptg)
e2:SetOperation(c101103097.spop)
c:RegisterEffect(e2)
end
function c101103097.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetBattledGroupCount()>0
end
function c101103097.dracon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101103097.cfilter,tp,LOCATION_MZONE,0,1,nil)
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c101103097.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x263)
end
function c101103097.draop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(c101103097.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
end
function c101103097.spfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsSetCard(0x253) and c:IsType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_BATTLE)
end
function c101103097.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103097.spfilter,1,nil,tp)
end
function c101103097.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101103097.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) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
--War Rock Ordeal
--Scripted by Kohana Sonogami
function c101103098.initial_effect(c)
c:EnableCounterPermit(0x61,LOCATION_SZONE)
c:SetUniqueOnField(1,0,101103098)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c101103098.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103098,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c101103098.drcost)
e2:SetTarget(c101103098.drtg)
e2:SetOperation(c101103098.drop)
c:RegisterEffect(e2)
end
function c101103098.activate(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x61,3)
end
function c101103098.drcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(0x263)
end
function c101103098.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c101103098.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then
e:SetLabel(0)
return Duel.IsPlayerCanDraw(tp,1) and e:GetHandler():IsCanRemoveCounter(tp,0x61,1,REASON_COST)
else return false end
end
e:SetLabel(0)
e:GetHandler():RemoveCounter(tp,0x61,1,REASON_COST)
if e:GetHandler():GetCounter(0x61)==0 then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101103098.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
......@@ -7,7 +7,7 @@ function c101104005.initial_effect(c)
e1:SetDescription(aux.Stringid(101104005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,101104005)
e1:SetCondition(c101104005.spcon)
......
......@@ -61,7 +61,7 @@ function c101104006.eqfilter1(c,e,tp)
and Duel.IsExistingMatchingCard(c101104006.eqfilter2,tp,LOCATION_DECK,0,1,nil)
end
function c101104006.eqfilter2(c)
return c:IsSetCard(0x25f) and c:IsType(TYPE_TRAP) and not c:IsForbidden()
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and not c:IsForbidden()
end
function c101104006.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c101104006.eqfilter1(chkc,e,tp) end
......@@ -96,7 +96,7 @@ function c101104006.eqlimit(e,c)
return e:GetLabelObject()==c
end
function c101104006.costfilter(c)
return c:IsSetCard(0x25f) and c:IsType(TYPE_TRAP) and c:IsAbleToRemoveAsCost()
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end
function c101104006.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101104006.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -25,7 +25,7 @@ function c101104007.initial_effect(c)
c:RegisterEffect(e2)
end
function c101104007.eqfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSetCard(0x25f)
return c:IsType(TYPE_TRAP) and c:IsSetCard(0x15c)
end
function c101104007.eqtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
......@@ -61,11 +61,11 @@ function c101104007.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c101104007.eqfilter1(c,tp)
return c:IsSetCard(0x25f) and c:IsType(TYPE_TRAP) and c:IsFaceup() and c:GetEquipTarget()
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsFaceup() and c:GetEquipTarget()
and Duel.IsExistingTarget(c101104007.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),tp)
end
function c101104007.eqfilter2(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x25e) or not c:IsControler(tp))
return c:IsFaceup() and (c:IsSetCard(0x15b) or not c:IsControler(tp))
end
function c101104007.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
......@@ -94,5 +94,5 @@ function c101104007.eqop2(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104007.eqlimit2(e,c)
return c:IsSetCard(0x25e) or c:IsControler(1-e:GetHandlerPlayer())
return c:IsSetCard(0x15b) or c:IsControler(1-e:GetHandlerPlayer())
end
......@@ -23,7 +23,7 @@ function c101104008.initial_effect(c)
c:RegisterEffect(e2)
end
function c101104008.setfilter(c)
return c:IsSetCard(0x25f) and c:IsType(TYPE_TRAP) and c:IsSSetable()
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c101104008.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101104008.setfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -36,11 +36,11 @@ function c101104008.setop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104008.eqfilter1(c,tp)
return c:IsSetCard(0x25f) and c:IsType(TYPE_TRAP) and c:IsFaceup() and c:GetEquipTarget()
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsFaceup() and c:GetEquipTarget()
and Duel.IsExistingTarget(c101104008.eqfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),tp)
end
function c101104008.eqfilter2(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x25e) or not c:IsControler(tp))
return c:IsFaceup() and (c:IsSetCard(0x15b) or not c:IsControler(tp))
end
function c101104008.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
......@@ -69,5 +69,5 @@ function c101104008.eqop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104008.eqlimit(e,c)
return c:IsSetCard(0x25e) or c:IsControler(1-e:GetHandlerPlayer())
return c:IsSetCard(0x15b) or c:IsControler(1-e:GetHandlerPlayer())
end
--王家の守護者スフィンクス
--Scripted by mallu11
function c101104024.initial_effect(c)
--turn set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104024,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c101104024.postg)
e1:SetOperation(c101104024.posop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104024,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101104024)
e2:SetTarget(c101104024.tdtg)
e2:SetOperation(c101104024.tdop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101104024,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,101104024+100)
e3:SetCondition(c101104024.spcon)
e3:SetTarget(c101104024.sptg)
e3:SetOperation(c101104024.spop)
c:RegisterEffect(e3)
end
function c101104024.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(101104024)==0 end
c:RegisterFlagEffect(101104024,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end
function c101104024.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
end
function c101104024.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c101104024.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function c101104024.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c101104024.spfilter(c,e,tp)
return c:IsRace(RACE_ROCK) and c:IsLevel(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c101104024.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101104024.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101104024.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,c101104024.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
Duel.ConfirmCards(1-tp,g)
end
end
--ダークアイ・ナイトメア
--Scripted by mallu11
function c101104027.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101104027)
e1:SetCost(c101104027.drcost)
e1:SetTarget(c101104027.drtg)
e1:SetOperation(c101104027.drop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c101104027.reptg)
c:RegisterEffect(e2)
end
function c101104027.drfilter(c)
return c:IsType(TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end
function c101104027.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101104027.drfilter,tp,LOCATION_GRAVE,0,1,nil) end
local ct=2
if Duel.IsPlayerCanDraw(tp,2) then ct=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101104027.drfilter,tp,LOCATION_GRAVE,0,1,ct,nil)
e:SetLabel(Duel.Remove(g,POS_FACEUP,REASON_COST))
end
function c101104027.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
local label=e:GetLabel()
if label==1 then
e:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
elseif label==2 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
elseif label==3 then
e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
end
function c101104027.drop(e,tp,eg,ep,ev,re,r,rp)
local label=e:GetLabel()
if label==1 then
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
end
elseif label==2 then
Duel.Draw(tp,1,REASON_EFFECT)
elseif label==3 then
if Duel.Draw(tp,2,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
end
end
end
function c101104027.repfilter(c)
return c:IsType(TYPE_TRAP) and c:IsAbleToRemove()
end
function c101104027.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReason(REASON_BATTLE) and Duel.IsExistingMatchingCard(c101104027.repfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101104027.repfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
return true
else return false end
end
--地久神-カルボン
--Jikyu Shinichi Carbon
--Scripted by Kohana Sonogami
function c101104028.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104028,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101104028)
e1:SetCondition(c101104028.thcon)
e1:SetCost(c101104028.thcost)
e1:SetTarget(c101104028.thtg)
e1:SetOperation(c101104028.thop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104028,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101104028+100)
e2:SetCondition(c101104028.tdcon)
e2:SetTarget(c101104028.tdtg)
e2:SetOperation(c101104028.tdop)
c:RegisterEffect(e2)
end
function c101104028.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL)
end
function c101104028.thcost(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 c101104028.thfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_EARTH)
and not c:IsCode(101104028) and c:IsAbleToHand()
end
function c101104028.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101104028.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101104028.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101104028.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c101104028.cfilter(c,tp)
return c:IsRace(RACE_FAIRY)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp
end
function c101104028.tdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101104028.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c101104028.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c101104028.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
end
--ヤモイモリ
--Yamoimori
--Scripted by Kohana Sonogami
function c101104029.initial_effect(c)
--change / destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,101104029)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c101104029.target)
e1:SetOperation(c101104029.activate)
c:RegisterEffect(e1)
end
function c101104029.filter1(c)
return c:IsFaceup() and c:IsRace(RACE_REPTILE)
end
function c101104029.filter2(c)
return c:IsFaceup() and (c:IsCanTurnSet() or c:GetAttack()>0)
end
function c101104029.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101104029.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c101104029.filter2,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c101104029.filter1,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,c101104029.filter2,tp,0,LOCATION_MZONE,1,1,nil)
local sel
local tc2=g2:GetFirst()
if tc2:IsAttack(0) then
sel=Duel.SelectOption(tp,aux.Stringid(101104029,0))
elseif not tc2:IsCanTurnSet() then
sel=Duel.SelectOption(tp,aux.Stringid(101104029,1))+1
else
sel=Duel.SelectOption(tp,aux.Stringid(101104029,0),aux.Stringid(101104029,1))
end
e:SetLabel(sel)
if sel==0 then
e:SetCategory(CATEGORY_POSITION)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,1,0,0)
else
e:SetCategory(CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0)
end
end
function c101104029.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sel=e:GetLabel()
if sel==0 then
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.ChangePosition(tg,POS_FACEDOWN_DEFENSE)
else
local tc1=e:GetLabelObject()
local tc2=g:GetFirst()
if tc2==tc1 then tc2=g:GetNext() end
if tc1:IsRelateToEffect(e) and Duel.Destroy(tc1,REASON_EFFECT)~=0 and tc2:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(tc2)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc2:RegisterEffect(e1)
end
end
end
......@@ -115,7 +115,7 @@ function c101104033.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(101104033)>0
end
function c101104033.thfilter(c)
if not (c:IsSetCard(0x260) and c:IsType(TYPE_SPELL+TYPE_TRAP)) then return false end
if not (c:IsSetCard(0x15d) and c:IsType(TYPE_SPELL+TYPE_TRAP)) then return false end
return c:IsAbleToHand() or c:IsSSetable()
end
function c101104033.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--ミュステリオンの竜冠
--Dracrown of Mysterion
--Scripted by Kohana Sonogami
function c101104034.initial_effect(c)
--fusion summon
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),true)
--cannot be fusion material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
--ATK down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetValue(c101104034.atkval)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101104034,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101104034)
e3:SetTarget(c101104034.remtg)
e3:SetOperation(c101104034.remop)
c:RegisterEffect(e3)
end
function c101104034.atkval(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_REMOVED,0)*-100
end
function c101104034.cfilter(c,e,rc)
return c:IsFaceup() and (c:GetOriginalRace()==rc:GetOriginalRace() or c==rc)
and c:IsCanBeEffectTarget(e) and c:IsAbleToRemove()
end
function c101104034.rmfilter(c,tc)
return c:IsFaceup() and c:GetOriginalRace()==tc:GetOriginalRace()
end
function c101104034.remtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c101104034.cfilter(chkc,e,re:GetHandler()) end
if chk==0 then return re and re:IsActivated() and re:IsActiveType(TYPE_MONSTER)
and eg:IsExists(c101104034.cfilter,1,nil,e,re:GetHandler()) end
local tc=eg:GetFirst()
if #eg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
tc=eg:FilterSelect(tp,c101104034.cfilter,1,1,nil,e,re:GetHandler()):GetFirst()
end
Duel.SetTargetCard(tc)
local g=Duel.GetMatchingGroup(c101104034.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tc)
g:AddCard(tc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function c101104034.remop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local g=Group.FromCards(tc)
if tc:IsFaceup() then
g=g+Duel.GetMatchingGroup(c101104034.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tc)
end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--照耀の光霊使いライナ
--scripted by 婉好
function c101104049.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c101104049.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104049,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101104049)
e1:SetTarget(c101104049.sptg)
e1:SetOperation(c101104049.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104049,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,101104049+100)
e2:SetCondition(c101104049.thcon)
e2:SetTarget(c101104049.thtg)
e2:SetOperation(c101104049.thop)
c:RegisterEffect(e2)
end
function c101104049.lcheck(g)
return g:IsExists(Card.IsLinkAttribute,1,nil,ATTRIBUTE_LIGHT)
end
function c101104049.spfilter(c,e,tp,zone)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101104049.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(1-tp) and c101104049.spfilter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101104049.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101104049.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101104049.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
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
function c101104049.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:GetPreviousControler()==tp))
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c101104049.thfilter(c)
return c:IsDefenseBelow(1500) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end
function c101104049.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101104049.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101104049.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101104049.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
......@@ -17,10 +17,10 @@ function c101104056.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,800)
end
function c101104056.thfilter(c)
return c:IsSetCard(0x25e) and c:IsAbleToHand()
return c:IsSetCard(0x15b) and c:IsAbleToHand()
end
function c101104056.setfilter(c)
return c:IsSetCard(0x25f) and c:IsType(TYPE_TRAP) and c:IsSSetable()
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c101104056.target(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetTurnPlayer()==tp then
......
......@@ -13,7 +13,7 @@ function c101104057.initial_effect(c)
c:RegisterEffect(e1)
end
function c101104057.thfilter(c,tp,e)
return c:IsFaceup() and c:IsSetCard(0x25e) and c:IsLocation(LOCATION_MZONE)
return c:IsFaceup() and c:IsSetCard(0x15b) and c:IsLocation(LOCATION_MZONE)
and c:IsControler(tp) and c:IsCanBeEffectTarget(e) and c:IsAbleToHand()
end
function c101104057.spcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -31,7 +31,7 @@ function c101104057.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end
function c101104057.spfilter(c,e,tp)
return c:IsSetCard(0x25e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x15b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101104057.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -16,7 +16,7 @@ function c101104058.initial_effect(c)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetCountLimit(1,101104058)
e1:SetCondition(c101104058.actcon)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x25f))
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x15c))
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
......@@ -36,11 +36,11 @@ function c101104058.actcon(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer() and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c101104058.filter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x25f) and c:IsType(TYPE_TRAP) and c:GetEquipTarget() and c:IsAbleToGraveAsCost()
return c:IsFaceup() and c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:GetEquipTarget() and c:IsAbleToGraveAsCost()
and Duel.IsExistingTarget(c101104058.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,c:GetCode())
end
function c101104058.setfilter(c,code)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x25f) and c:IsType(TYPE_TRAP) and not c:IsCode(code) and c:IsSSetable(true)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and not c:IsCode(code) and c:IsSSetable(true)
end
function c101104058.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
......
--ユウ-Ai-
--You & A.I.
--Scripted by Kohana Sonogami
--Scripted by Kohana Sonogami & mercury233
function c101104061.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--EARTH or WATER
--select effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104061,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101104061)
e2:SetCondition(c101104061.attrcon1)
e2:SetTarget(c101104061.attrtg1)
e2:SetOperation(c101104061.attrop1)
e2:SetTarget(c101104061.target)
c:RegisterEffect(e2)
--WIND or LIGHT
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101104061,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101104061+100)
e3:SetCondition(c101104061.attrcon2)
e3:SetTarget(c101104061.attrtg2)
e3:SetOperation(c101104061.attrop2)
c:RegisterEffect(e3)
--FIRE or DARK
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101104061,2))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,101104061+200)
e4:SetCondition(c101104061.attrcon3)
e4:SetTarget(c101104061.attrtg3)
e4:SetOperation(c101104061.attrop3)
c:RegisterEffect(e4)
end
function c101104061.filter(c,att)
return c:GetBaseAttack()==2300 and c:IsRace(RACE_CYBERSE) and c:IsAttribute(att)
function c101104061.filter(c,att,used)
return c:GetBaseAttack()==2300 and c:IsRace(RACE_CYBERSE) and c:IsAttribute(att) and c:GetAttribute()&used==0
end
function c101104061.attrcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101104061.filter,1,nil,ATTRIBUTE_EARTH+ATTRIBUTE_WATER)
end
function c101104061.attrtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
function c101104061.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 and not eg:IsExists(c101104061.filter,1,nil,0xff,0) then return false end
local b1=Duel.IsExistingMatchingCard(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b3=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,11738490,0,0x4011,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK)
local used=Duel.GetFlagEffectLabel(tp,101104061)
if used==nil then
used=0
Duel.RegisterFlagEffect(tp,101104061,RESET_PHASE+PHASE_END,0,1,used)
end
local att=0
if b1 and eg:IsExists(c101104061.filter,1,nil,ATTRIBUTE_EARTH,used) then att=att|ATTRIBUTE_EARTH end
if b1 and eg:IsExists(c101104061.filter,1,nil,ATTRIBUTE_WATER,used) then att=att|ATTRIBUTE_WATER end
if b2 and eg:IsExists(c101104061.filter,1,nil,ATTRIBUTE_WIND,used) then att=att|ATTRIBUTE_WIND end
if b2 and eg:IsExists(c101104061.filter,1,nil,ATTRIBUTE_LIGHT,used) then att=att|ATTRIBUTE_LIGHT end
if b3 and eg:IsExists(c101104061.filter,1,nil,ATTRIBUTE_FIRE,used) then att=att|ATTRIBUTE_FIRE end
if b3 and eg:IsExists(c101104061.filter,1,nil,ATTRIBUTE_DARK,used) then att=att|ATTRIBUTE_DARK end
if chk==0 then return att>0 end
if att&(att-1)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101104061,1))
att=Duel.AnnounceAttribute(tp,1,att)
end
used=used|att
Duel.SetFlagEffectLabel(tp,101104061,used)
if att&(ATTRIBUTE_EARTH+ATTRIBUTE_WATER)>0 then
e:SetCategory(CATEGORY_ATKCHANGE)
e:SetOperation(c101104061.attrop1)
end
if att&(ATTRIBUTE_WIND+ATTRIBUTE_LIGHT)>0 then
e:SetCategory(0)
e:SetOperation(c101104061.attrop2)
end
if att&(ATTRIBUTE_FIRE+ATTRIBUTE_DARK)>0 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetOperation(c101104061.attrop3)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
end
end
function c101104061.attrop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -67,13 +74,6 @@ function c101104061.attrop1(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(math.ceil(tc:GetAttack()/2))
tc:RegisterEffect(e1)
end
function c101104061.attrcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101104061.filter,1,nil,ATTRIBUTE_WIND+ATTRIBUTE_LIGHT)
end
function c101104061.attrtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c101104061.attrop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
......@@ -94,15 +94,6 @@ function c101104061.attrop2(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
function c101104061.attrcon3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101104061.filter,1,nil,ATTRIBUTE_FIRE+ATTRIBUTE_DARK)
end
function c101104061.attrtg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,11738490,0,0x4011,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
end
function c101104061.attrop3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,11738490,0,0x4011,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) then return end
......
--ワンクリウェイ
--Scripted by mallu11
function c101104065.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101104065+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101104065.target)
e1:SetOperation(c101104065.operation)
c:RegisterEffect(e1)
end
function c101104065.filter(c,e,tp)
local p=c:GetControler()
return c:IsLink(1) and (c:IsAbleToExtra() or Duel.GetLocationCount(p,LOCATION_MZONE,tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p))
end
function c101104065.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101104065.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101104065.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101104065,0))
local g=Duel.SelectTarget(tp,c101104065.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,0,0,0)
end
function c101104065.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local p=tc:GetControler()
local ft=Duel.GetLocationCount(p,LOCATION_MZONE,tp)
if tc:IsAbleToExtra() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p) or ft<=0 or Duel.SelectOption(tp,aux.Stringid(101104065,1),1152)==0) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
else
Duel.SpecialSummon(tc,0,tp,p,false,false,POS_FACEUP)
end
end
......@@ -34,7 +34,7 @@ function c101104070.initial_effect(c)
e5:SetDescription(aux.Stringid(101104070,0))
e5:SetCode(EFFECT_ADD_SETCODE)
e5:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e5:SetValue(0x25e)
e5:SetValue(0x15b)
c:RegisterEffect(e5)
end
function c101104070.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -63,7 +63,7 @@ function c101104070.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104070.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x25f) and c:IsType(TYPE_TRAP) and c:IsControler(tp)
return c:IsFaceup() and c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsControler(tp)
end
function c101104070.filter(c,tp)
return c:IsFaceup() and c:GetEquipGroup():IsExists(c101104070.cfilter,1,nil,tp) and c:IsControlerCanBeChanged()
......
......@@ -67,7 +67,7 @@ function c101104071.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104071.filter(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x25e) or c:IsControler(1-tp))
return c:IsFaceup() and (c:IsSetCard(0x15b) or c:IsControler(1-tp))
end
function c101104071.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101104071.filter(chkc,tp) end
......@@ -96,7 +96,7 @@ function c101104071.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104071.eqlimit(e,c)
return c:IsSetCard(0x25e) or c:IsControler(1-e:GetHandlerPlayer())
return c:IsSetCard(0x15b) or c:IsControler(1-e:GetHandlerPlayer())
end
function c101104071.togcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
......@@ -123,7 +123,7 @@ function c101104071.thcon(e,tp,eg,ep,ev,re,r,rp)
return ec and ec:IsControler(1-tp)
end
function c101104071.thfilter(c)
return c:IsSetCard(0x25e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0x15b) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101104071.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101104071.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -67,7 +67,7 @@ function c101104072.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104072.filter(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x25e) or c:IsControler(1-tp))
return c:IsFaceup() and (c:IsSetCard(0x15b) or c:IsControler(1-tp))
end
function c101104072.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101104072.filter(chkc,tp) end
......@@ -96,7 +96,7 @@ function c101104072.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104072.eqlimit(e,c)
return c:IsSetCard(0x25e) or c:IsControler(1-e:GetHandlerPlayer())
return c:IsSetCard(0x15b) or c:IsControler(1-e:GetHandlerPlayer())
end
function c101104072.drcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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