Commit eea1c927 authored by mercury233's avatar mercury233

rm

parent 1c6f48db
...@@ -12,14 +12,10 @@ ...@@ -12,14 +12,10 @@
100427025 100427025
100427026 100427026
100427027 100427027
100200217
100427030 100427030
100427031 100427031
100427033 100427033
100427036 100427036
100284001
100284002
100284003
#extra #extra
100290018 100290018
100290042 100290042
......
#created by ...
#main
101109001
101109002
101109003
101109004
101109005
101109006
101109007
101109008
101109009
101109010
101109011
101109012
101109013
101109014
101109015
101109016
101109017
101109018
101109019
101109020
101109021
101109022
101109023
101109024
101109025
101109026
101109027
101109028
101109029
101109030
101109031
101109032
101109033
101109034
101109035
101109036
101109037
101109038
101109039
101109040
101109051
101109052
101109053
101109054
101109055
101109056
101109057
101109058
101109059
101109060
101109061
101109062
101109063
101109064
101109065
101109066
101109067
101109068
#extra
101109041
101109042
101109043
101109044
101109045
101109046
101109047
101109048
101109049
101109050
!side
101109069
101109070
101109071
101109072
101109073
101109074
101109075
101109076
101109077
101109078
101109079
101109080
#The first line is used for comment #The first line is used for comment
!counter 0x15f 指示物(逐渐削减的生命)
!counter 0x160 G石人指示物 !counter 0x160 G石人指示物
!setname 0x17a 恐吓爪牙族 スケアクロー
!setname 0x27f 翼侠 ウィングマン
!setname 0x281 春化精 春化精
!setname 0x282 悠悠 もけもけ
!setname 0x283 卫星闪灵 スプライト
!setname 0x284 珠泪哀歌族 ティアラメンツ
!setname 0x285 G石人 Gゴーレム !setname 0x285 G石人 Gゴーレム
--エルロン
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(400)
e2:SetCondition(s.atkcon)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,id)
e3:SetCondition(s.tgcon)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1115)
end
function s.eqtg(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(tp) and s.filter(chkc) and chkc~=c end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():CheckUniqueOnField(tp)
and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,c)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown()
or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0x1115)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.tgfilter(c)
return c:IsSetCard(0x115) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--攻撃誘導アーマー
--
--Script by Trishula9
function c100284001.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,100284001+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100284001.target)
e1:SetOperation(c100284001.operation)
c:RegisterEffect(e1)
end
function c100284001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local a,d=Duel.GetBattleMonster(0)
local ad=Group.FromCards(a,d)
local s=0
local b=Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,ad)
if b then
s=Duel.SelectOption(tp,aux.Stringid(100284001,0),aux.Stringid(100284001,1))
end
e:SetLabel(s)
if s==0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,a,1,0,0)
end
if s==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ad)
end
end
function c100284001.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if e:GetLabel()==0 then
if a and a:IsRelateToBattle() then
Duel.Destroy(a,REASON_EFFECT)
end
end
if e:GetLabel()==1 then
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc)
end
end
end
\ No newline at end of file
--削りゆく命
--
--Script by Trishula9
function c100284002.initial_effect(c)
c:SetUniqueOnField(1,0,100284002)
c:EnableCounterPermit(0x15f)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c100284002.ctcon)
e2:SetTarget(c100284002.cttg)
e2:SetOperation(c100284002.ctop)
c:RegisterEffect(e2)
--discard
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_END)
e3:SetCondition(c100284002.hdcon)
e3:SetTarget(c100284002.hdtg)
e3:SetOperation(c100284002.hdop)
c:RegisterEffect(e3)
end
function c100284002.ctcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c100284002.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x15f)
end
function c100284002.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0x15f,1)
end
end
function c100284002.hdcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_MAIN1 and ph<=PHASE_MAIN2 and e:GetHandler():GetCounter(0x15f)>0
end
function c100284002.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGrave() and c:GetFlagEffect(100284002)==0 end
e:SetLabel(c:GetCounter(0x15f))
c:RegisterFlagEffect(100284002,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c100284002.hdop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) then
Duel.BreakEffect()
Duel.DiscardHand(1-tp,nil,e:GetLabel(),e:GetLabel(),REASON_EFFECT+REASON_DISCARD)
end
end
--機械じかけのマジックミラー
--
--Script by Trishula9
function c100284003.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c100284003.condition)
e1:SetTarget(c100284003.target)
e1:SetOperation(c100284003.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCost(c100284003.spcost)
e2:SetTarget(c100284003.sptg)
e2:SetOperation(c100284003.spop)
c:RegisterEffect(e2)
end
function c100284003.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c100284003.filter(c,tp,ft)
return c:IsType(TYPE_SPELL) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>ft)
end
function c100284003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=0
if e:GetHandler():IsLocation(LOCATION_HAND) then ft=1 end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c100284003.filter(chkc,tp,ft) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>ft
and Duel.IsExistingTarget(c100284003.filter,tp,0,LOCATION_GRAVE,1,nil,tp,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c100284003.filter,tp,0,LOCATION_GRAVE,1,1,nil,tp,ft)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c100284003.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
function c100284003.costfilter(c)
return c:IsCode(83764718) and c:IsAbleToGraveAsCost()
and (c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_SZONE) and c:IsFacedown()))
end
function c100284003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c100284003.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100284003.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c100284003.spfilter(c,e,tp)
return c:IsCode(10000000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100284003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100284003.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100284003.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c100284003.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0
and Duel.GetTurnPlayer()==1-tp then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(c100284003.atklimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_MUST_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function c100284003.atklimit(e,c)
return c~=e:GetHandler()
end
\ No newline at end of file
--E・HERO スピリット・オブ・ネオス
--Script by JSY1728
local s,id,o=GetID()
function s.initial_effect(c)
--Special Summon (from hand : itself)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--Special Summon (from hand : Elemental HERO)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,id+o*2)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function s.thfilter(c)
return c:IsAbleToHand() and (c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.IsSetNameMonsterListed(c,0x3008) or c:IsCode(24094653))
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.spfilter2(c,e,tp)
return c:IsSetCard(0x3008) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--クロス・キーパー
--Script by JSY1728
local s,id,o=GetID()
function s.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Draw & Return to Deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.drcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x3008,0x1f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
and tc:IsPreviousLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function s.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3008) and c:IsType(TYPE_FUSION) and c:IsSummonPlayer(tp)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp) --not fully implemented
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==2 then
Duel.ShuffleHand(p)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(p,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,1,nil)
if #sg>0 then
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
end
--スプライト・ブルー
--
--Script by Trishula9
function c101109003.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109003+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101109003.spcon)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,101109003+100)
e2:SetTarget(c101109003.thtg)
e2:SetOperation(c101109003.thop)
c:RegisterEffect(e2)
end
function c101109003.filter(c)
return (c:IsLevel(2) or c:IsRank(2)) and c:IsFaceup()
end
function c101109003.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109003.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c101109003.thfilter(c)
return c:IsSetCard(0x283) and not c:IsCode(101109003) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101109003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109003.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109003.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109003.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
--スプライト・ジェット
--
--Script by Trishula0
function c101109004.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109004+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101109004.spcon)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,101109004+100)
e2:SetTarget(c101109004.thtg)
e2:SetOperation(c101109004.thop)
c:RegisterEffect(e2)
end
function c101109004.filter(c)
return (c:IsLevel(2) or c:IsRank(2)) and c:IsFaceup()
end
function c101109004.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109004.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c101109004.thfilter(c)
return c:IsSetCard(0x283) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101109004.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109004.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109004.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109004.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
--スプライト・ピクシーズ
--
--Script by Trishula9
function c101109005.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109005,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109005+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101109005.spcon)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109005,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCountLimit(1,101109005+100)
e2:SetCondition(c101109005.atkcon)
e2:SetCost(c101109005.atkcost)
e2:SetOperation(c101109005.atkop)
c:RegisterEffect(e2)
end
function c101109005.filter(c)
return (c:IsLevel(2) or c:IsRank(2)) and c:IsFaceup()
end
function c101109005.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109005.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c101109005.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
return a and d and (a:IsLevel(2) or a:IsRank(2) or a:IsLink(2)) and a~=e:GetHandler()
end
function c101109005.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c101109005.atkop(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
if not a:IsRelateToBattle() or not d:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(d:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
a:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
a:RegisterEffect(e2)
end
--スプライト・レッド
--
--Script by Trishula9
function c101109006.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109006,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109006+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101109006.spcon)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109006,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,101109006+100)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101109006.discon)
e2:SetCost(c101109006.discost)
e2:SetTarget(c101109006.distg)
e2:SetOperation(c101109006.disop)
c:RegisterEffect(e2)
end
function c101109006.filter(c)
return (c:IsLevel(2) or c:IsLink(2)) and c:IsFaceup()
end
function c101109006.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109006.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c101109006.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
function c101109006.cfilter(c)
return c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)
end
function c101109006.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101109006.cfilter,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,c101109006.cfilter,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
local tc=Duel.GetOperatedGroup():GetFirst()
e:SetLabelObject(tc)
end
function c101109006.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c101109006.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable()
and (e:GetLabelObject():IsRank(2) or e:GetLabelObject():IsLink(2))
and Duel.SelectYesNo(tp,aux.Stringid(101109006,2)) then
Duel.BreakEffect()
Duel.Destroy(rc,REASON_EFFECT)
end
end
--スプライト・キャロット
--
--Script by Trishula9
function c101109007.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109007,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109007+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101109007.spcon)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109007,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,101109007+100)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101109007.discon)
e2:SetCost(c101109007.discost)
e2:SetTarget(c101109007.distg)
e2:SetOperation(c101109007.disop)
c:RegisterEffect(e2)
end
function c101109007.filter(c)
return (c:IsLevel(2) or c:IsLink(2)) and c:IsFaceup()
end
function c101109007.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109007.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c101109007.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev)
end
function c101109007.cfilter(c)
return c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)
end
function c101109007.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101109007.cfilter,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,c101109007.cfilter,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
local tc=Duel.GetOperatedGroup():GetFirst()
e:SetLabelObject(tc)
end
function c101109007.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c101109007.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable()
and (e:GetLabelObject():IsRank(2) or e:GetLabelObject():IsLink(2))
and Duel.SelectYesNo(tp,aux.Stringid(101109007,2)) then
Duel.BreakEffect()
Duel.Destroy(rc,REASON_EFFECT)
end
end
--セリオンズ“エンプレス”アラシア
--
--Script by Trishula9
function c101109008.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109008,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101109008)
e1:SetTarget(c101109008.sptg1)
e1:SetOperation(c101109008.spop1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109008,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101109008+100)
e2:SetCost(c101109008.spcost2)
e2:SetTarget(c101109008.sptg2)
e2:SetOperation(c101109008.spop2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c101109008.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--Atk up
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(700)
e4:SetCondition(c101109008.atkcon)
c:RegisterEffect(e4)
end
function c101109008.eqfilter(c,tp)
return (c:IsRace(RACE_REPTILE) or c:IsSetCard(0x179)) and c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp)
end
function c101109008.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101109008.eqfilter(chkc,e,tp) and chkc:IsControler(tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101109008.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectTarget(tp,c101109008.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,sg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101109008.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Equip(tp,tc,c,false)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101109008.eqlimit)
tc:RegisterEffect(e1)
end
end
end
function c101109008.eqlimit(e,c)
return e:GetOwner()==c
end
function c101109008.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c101109008.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x179) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109008.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101109008.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101109008.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101109008.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101109008.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101109008.eftg(e,c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x179) and c:GetEquipGroup():IsContains(e:GetHandler())
end
function c101109008.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0x179)
end
--セリオンズ・イレギュラー
--
--Script by Trishula9
function c101109009.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109009,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101109009)
e1:SetTarget(c101109009.sptg1)
e1:SetOperation(c101109009.spop1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109009,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101109009+100)
e2:SetCost(c101109009.descost)
e2:SetTarget(c101109009.destg)
e2:SetOperation(c101109009.desop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109009,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101109009+200)
e3:SetCondition(c101109009.spcon2)
e3:SetTarget(c101109009.sptg2)
e3:SetOperation(c101109009.spop2)
c:RegisterEffect(e3)
end
function c101109009.eqfilter(c,tp)
return c:IsSetCard(0x179) and c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp)
end
function c101109009.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101109009.eqfilter(chkc,e,tp) and chkc:IsControler(tp) end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and ft>0
and Duel.IsExistingTarget(c101109009.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if ft>3 then ft=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectTarget(tp,c101109009.eqfilter,tp,LOCATION_GRAVE,0,1,ft,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,sg,#sg,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101109009.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
if g:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
g=g:Select(tp,ft,ft,nil)
end
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c,true,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101109009.eqlimit)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
Duel.EquipComplete()
end
end
end
function c101109009.eqlimit(e,c)
return e:GetOwner()==c
end
function c101109009.cfilter(c)
return c:IsCode(21887075) and c:IsDiscardable()
end
function c101109009.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109009.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c101109009.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c101109009.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c101109009.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function c101109009.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function c101109009.sptg2(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 c101109009.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) and tc then
Duel.BreakEffect()
Duel.Equip(tp,tc,c,false)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101109009.eqlimit)
tc:RegisterEffect(e1)
end
end
--氷水艇エーギロカシス
--
--Script by Trishula9
function c101109010.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,101109010)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c101109010.eqtg)
e1:SetOperation(c101109010.eqop)
c:RegisterEffect(e1)
--atk and def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c101109010.atkval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,101109010)
e4:SetCondition(c101109010.spcon)
e4:SetTarget(c101109010.sptg)
e4:SetOperation(c101109010.spop)
c:RegisterEffect(e4)
end
function c101109010.filter(c)
return c:IsFaceup() and c:IsSetCard(0x16c)
end
function c101109010.eqtg(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(tp) and c101109010.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():CheckUniqueOnField(tp)
and Duel.IsExistingTarget(c101109010.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101109010.filter,tp,LOCATION_MZONE,0,1,1,nil)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function c101109010.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101109010.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
function c101109010.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c101109010.atkfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c101109010.atkval(e,c)
return Duel.GetMatchingGroupCount(c101109010.atkfilter,0,LOCATION_REMOVED,LOCATION_REMOVED,nil)*400
end
function c101109010.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function c101109010.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 c101109010.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--灰燼のアルバス
--
--Script by Trishula9
function c101109011.initial_effect(c)
--change name
aux.EnableChangeCode(c,68468459,LOCATION_MZONE+LOCATION_GRAVE)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c101109011.condition)
e1:SetValue(c101109011.atkct)
c:RegisterEffect(e1)
--cannot be effect target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c101109011.condition)
e2:SetTarget(c101109011.tglimit)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,101109011)
e3:SetCondition(c101109011.spcon)
e3:SetTarget(c101109011.sptg)
e3:SetOperation(c101109011.spop)
c:RegisterEffect(e3)
end
function c101109011.filter(c)
return c:IsType(TYPE_FUSION) and c:IsLevel(8)
end
function c101109011.condition(e)
return Duel.IsExistingMatchingCard(c101109011.filter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
end
function c101109011.atkct(e)
return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_MONSTER)*200
end
function c101109011.tglimit(e,c)
return c~=e:GetHandler()
end
function c101109011.cfilter(c,tp,rp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c101109011.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101109011.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler())
and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,eg,TYPE_FUSION)
end
function c101109011.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 c101109011.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
--ティアラメンツ・メイルゥ
--
--Script by JoyJ
function c101109012.initial_effect(c)
--deckdes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109012,0))
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101109012)
e1:SetTarget(c101109012.ddtg)
e1:SetOperation(c101109012.ddop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109012,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,101109012+100)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c101109012.condition)
e3:SetTarget(c101109012.target)
e3:SetOperation(c101109012.activate)
c:RegisterEffect(e3)
end
function c101109012.ddtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function c101109012.ddop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
function c101109012.filter0(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c101109012.filter1(c,e,tp,m,f,chkf)
if not (c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
local res=c:CheckFusionMaterial(m,e:GetHandler(),chkf)
return res
end
function c101109012.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL and e:GetHandler():IsReason(REASON_EFFECT)
end
function c101109012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c101109012.filter0,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c101109012.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,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(c101109012.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101109012.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101109012.filter0),tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c101109012.filter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg,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(c101109012.filter1,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()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg,e:GetHandler(),chkf)
tc:SetMaterial(mat1)
if mat1:IsExists(c101109012.fdfilter,1,nil) then
local cg=mat1:Filter(c101109012.fdfilter,nil)
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(mat1,nil,SEQ_DECKTOP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
local p=tp
for i=1,2 do
local dg=mat1:Filter(c101109012.seqfilter,nil,p)
if #dg>1 then
Duel.SortDecktop(tp,p,#dg)
end
for i=1,#dg do
local mg=Duel.GetDecktopGroup(p,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
p=1-tp
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,e:GetHandler(),chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c101109012.fdfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFacedown() or c:IsLocation(LOCATION_HAND)
end
function c101109012.seqfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsControler(tp)
end
--ティアラメンツ・ハゥフニス
--
--Script by JoyJ
function c101109013.initial_effect(c)
--sp summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109013,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109013)
e1:SetCondition(c101109013.tgcon)
e1:SetTarget(c101109013.tgtg)
e1:SetOperation(c101109013.tgop)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109013,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101109013+100)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c101109013.condition)
e2:SetTarget(c101109013.target)
e2:SetOperation(c101109013.activate)
c:RegisterEffect(e2)
end
function c101109013.tgcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE
end
function c101109013.tgtg(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)
and Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101109013.tgop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
end
function c101109013.filter0(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c101109013.filter1(c,e,tp,m,f,chkf)
if not (c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
local res=c:CheckFusionMaterial(m,e:GetHandler(),chkf)
return res
end
function c101109013.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL and e:GetHandler():IsReason(REASON_EFFECT)
end
function c101109013.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c101109013.filter0,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c101109013.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,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(c101109013.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101109013.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101109013.filter0),tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c101109013.filter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg,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(c101109013.filter1,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()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg,e:GetHandler(),chkf)
tc:SetMaterial(mat1)
if mat1:IsExists(c101109013.fdfilter,1,nil) then
local cg=mat1:Filter(c101109013.fdfilter,nil)
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(mat1,nil,SEQ_DECKTOP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
local p=tp
for i=1,2 do
local dg=mat1:Filter(c101109013.seqfilter,nil,p)
if #dg>1 then
Duel.SortDecktop(tp,p,#dg)
end
for i=1,#dg do
local mg=Duel.GetDecktopGroup(p,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
p=1-tp
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,e:GetHandler(),chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c101109013.fdfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFacedown() or c:IsLocation(LOCATION_HAND)
end
function c101109013.seqfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsControler(tp)
end
--ティアラメンツ・シェイレーン
--
--Script by JoyJ
function c101109014.initial_effect(c)
--sp summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109014,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109014)
e1:SetTarget(c101109014.tgtg)
e1:SetOperation(c101109014.tgop)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109014,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101109014+100)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c101109014.condition)
e2:SetTarget(c101109014.target)
e2:SetOperation(c101109014.activate)
c:RegisterEffect(e2)
end
function c101109014.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c101109014.tgtg(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)
and Duel.IsPlayerCanDiscardDeck(tp,3)
and Duel.IsExistingMatchingCard(c101109014.tgfilter,tp,LOCATION_HAND,0,1,c) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101109014.tgop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101109014.tgfilter,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_GRAVE)
and Duel.IsPlayerCanDiscardDeck(tp,1) then
Duel.BreakEffect()
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
end
end
function c101109014.filter0(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c101109014.filter1(c,e,tp,m,f,chkf)
if not (c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
local res=c:CheckFusionMaterial(m,e:GetHandler(),chkf)
return res
end
function c101109014.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL and e:GetHandler():IsReason(REASON_EFFECT)
end
function c101109014.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c101109014.filter0,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c101109014.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,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(c101109014.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101109014.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101109014.filter0),tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c101109014.filter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg,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(c101109014.filter1,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()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg,e:GetHandler(),chkf)
tc:SetMaterial(mat1)
if mat1:IsExists(c101109014.fdfilter,1,nil) then
local cg=mat1:Filter(c101109014.fdfilter,nil)
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(mat1,nil,SEQ_DECKTOP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
local p=tp
for i=1,2 do
local dg=mat1:Filter(c101109014.seqfilter,nil,p)
if #dg>1 then
Duel.SortDecktop(tp,p,#dg)
end
for i=1,#dg do
local mg=Duel.GetDecktopGroup(p,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
p=1-tp
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,e:GetHandler(),chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c101109014.fdfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFacedown() or c:IsLocation(LOCATION_HAND)
end
function c101109014.seqfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsControler(tp)
end
--ティアラメンツ・レイノハート
--
--Script by JoyJ
function c101109015.initial_effect(c)
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109015,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101109015)
e1:SetTarget(c101109015.target)
e1:SetOperation(c101109015.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109015,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,101109015+100)
e3:SetCondition(c101109015.spcon)
e3:SetTarget(c101109015.sptg)
e3:SetOperation(c101109015.spop)
c:RegisterEffect(e3)
end
function c101109015.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x284) and not c:IsCode(101109015) and c:IsAbleToGrave()
end
function c101109015.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109015.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101109015.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101109015.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c101109015.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c101109015.tgfilter2(c)
return c:IsSetCard(0x284) and c:IsAbleToGrave()
end
function c101109015.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)
and Duel.IsExistingMatchingCard(c101109015.tgfilter2,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
end
function c101109015.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101109015.tgfilter2,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
--丘と芽吹の春化精
--
--Script by Trishula9
function c101109016.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109016)
e1:SetCost(c101109016.thcost)
e1:SetTarget(c101109016.thtg)
e1:SetOperation(c101109016.thop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c101109016.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c101109016.costfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsSetCard(0x281)) and c:IsDiscardable()
end
function c101109016.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,101109061)
local b2=Duel.IsExistingMatchingCard(c101109016.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and (fe or b2) end
if fe and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(101109061,0))) then
Duel.Hint(HINT_CARD,0,101109061)
fe:UseCountLimit(tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c101109016.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
end
function c101109016.thfilter(c)
return c:IsSetCard(0x281) and not c:IsCode(101109016) and c:IsAbleToHand()
end
function c101109016.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109016.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109016.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109016.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109016.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101109016.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101109016,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c101109016.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101109016.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsAttribute(ATTRIBUTE_EARTH)
end
function c101109016.indtg(e,c)
return c:IsSetCard(0x281) and c:IsFaceup()
end
--森と目覚の春化精
--
--Script by Trishula9
function c101109017.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109017)
e1:SetCost(c101109017.tgcost)
e1:SetTarget(c101109017.tgtg)
e1:SetOperation(c101109017.tgop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101109017+100)
e2:SetTarget(c101109017.atktg)
e2:SetOperation(c101109017.atkop)
c:RegisterEffect(e2)
end
function c101109017.costfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsSetCard(0x281)) and c:IsDiscardable()
end
function c101109017.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,101109061)
local b2=Duel.IsExistingMatchingCard(c101109017.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and (fe or b2) end
if fe and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(101109061,0))) then
Duel.Hint(HINT_CARD,0,101109061)
fe:UseCountLimit(tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c101109017.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
end
function c101109017.tgfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSummonableCard() and c:IsAbleToGrave()
end
function c101109017.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109017.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101109017.spfilter(c,e,tp,code)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109017.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101109017.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
local sg=Duel.GetMatchingGroup(c101109017.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp,tc:GetCode())
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101109017,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c101109017.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101109017.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsAttribute(ATTRIBUTE_EARTH)
end
function c101109017.atkfilter(c)
return c:IsSetCard(0x281) and c:IsFaceup()
end
function c101109017.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101109017.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101109017.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101109017.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101109017.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--花と野原の春化精
--
--Script by Trishula9
function c101109018.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109018)
e1:SetCost(c101109018.thcost)
e1:SetTarget(c101109018.thtg)
e1:SetOperation(c101109018.thop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c101109018.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
end
function c101109018.costfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsSetCard(0x281)) and c:IsDiscardable()
end
function c101109018.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,101109061)
local b2=Duel.IsExistingMatchingCard(c101109018.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and (fe or b2) end
if fe and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(101109061,0))) then
Duel.Hint(HINT_CARD,0,101109061)
fe:UseCountLimit(tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c101109018.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
end
function c101109018.thfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsCode(101109018) and c:IsAbleToHand()
end
function c101109018.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109018.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c101109018.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109018.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101109018.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101109018.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101109018,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c101109018.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101109018.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsAttribute(ATTRIBUTE_EARTH)
end
function c101109018.tgtg(e,c)
return c:IsSetCard(0x281) and c:IsFaceup()
end
--山と雪解の春化精
function c101109019.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109019)
e1:SetCost(c101109019.drcost)
e1:SetTarget(c101109019.drtg)
e1:SetOperation(c101109019.drop)
c:RegisterEffect(e1)
--atk twice
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101109019+100)
e2:SetCondition(c101109019.atkcon)
e2:SetTarget(c101109019.atktg)
e2:SetOperation(c101109019.atkop)
c:RegisterEffect(e2)
end
function c101109019.costfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsSetCard(0x281)) and c:IsDiscardable()
end
function c101109019.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,101109061)
local b2=Duel.IsExistingMatchingCard(c101109019.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and (fe or b2) end
if fe and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(101109061,0))) then
Duel.Hint(HINT_CARD,0,101109061)
fe:UseCountLimit(tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c101109019.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
end
function c101109019.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101109019.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109019.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101109019.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101109019,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c101109019.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101109019.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsAttribute(ATTRIBUTE_EARTH)
end
function c101109019.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c101109019.atkfilter(c)
return c:IsSetCard(0x281) and c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
end
function c101109019.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101109019.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101109019.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101109019.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101109019.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(101109019,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
--ジェムナイト・クォーツ
--
--Script by Trishula9
function c101109020.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109020)
e1:SetCondition(c101109020.stcon)
e1:SetCost(c101109020.stcost)
e1:SetTarget(c101109020.sttg)
e1:SetOperation(c101109020.stop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101109020+100)
e2:SetCondition(c101109020.thcon)
e2:SetTarget(c101109020.thtg)
e2:SetOperation(c101109020.thop)
c:RegisterEffect(e2)
end
function c101109020.stcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c101109020.stcost(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 c101109020.stfilter(c)
return c:IsSetCard(0x46) and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsSSetable()
end
function c101109020.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109020.stfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c101109020.stop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c101109020.stfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101109020.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101109020.splimit(e,c)
return not c:IsSetCard(0x1047) and c:IsLocation(LOCATION_EXTRA)
end
function c101109020.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()) and r==REASON_FUSION
end
function c101109020.thfilter(c)
return not c:IsCode(101109020) and c:IsSetCard(0x1047) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101109020.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109020.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c101109020.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101109020.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--ブリリアント・ローズ
--
--Script by Trishula9
function c101109021.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109021)
e1:SetCost(c101109021.spcost)
e1:SetTarget(c101109021.sptg)
e1:SetOperation(c101109021.spop)
c:RegisterEffect(e1)
--copy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c101109021.cpcost)
e2:SetOperation(c101109021.cpop)
c:RegisterEffect(e2)
end
function c101109021.cfilter(c)
return c:IsSetCard(0x1047,0x9b) and c:IsDiscardable()
end
function c101109021.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109021.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c101109021.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function c101109021.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 c101109021.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
end
function c101109021.cpfilter(c)
return c:IsSetCard(0x1047,0x9b) and c:IsAbleToGraveAsCost()
end
function c101109021.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109021.cpfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101109021.cpfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
Duel.SendtoGrave(g,REASON_COST)
e:SetLabelObject(tc)
end
function c101109021.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end
local tc=e:GetLabelObject()
local code=tc:GetOriginalCodeRule()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(code)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(tc:GetOriginalRace())
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(tc:GetOriginalAttribute())
c:RegisterEffect(e3)
end
--メルフィー・ワラビィ
--
--Script by JoyJ
function c101109022.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109022,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101109022)
e1:SetCondition(c101109022.thcon)
e1:SetTarget(c101109022.thtg)
e1:SetOperation(c101109022.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(c101109022.thcon2)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101109022,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1,101109022+100)
e4:SetCondition(c101109022.spcon)
e4:SetTarget(c101109022.sptg)
e4:SetOperation(c101109022.spop)
c:RegisterEffect(e4)
end
function c101109022.cfilter(c,sp)
return c:IsSummonPlayer(sp)
end
function c101109022.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101109022.cfilter,1,nil,1-tp)
end
function c101109022.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c101109022.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c101109022.spfilter(c,e,tp)
return c:IsSetCard(0x146) and not c:IsCode(101109022) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109022.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c101109022.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and g:GetClassCount(Card.GetCode)>1
and Duel.SelectYesNo(tp,aux.Stringid(101109022,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101109022.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c101109022.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 c101109022.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
end
--メルフィー・ラッシィ
--
--Script by JoyJ
function c101109023.initial_effect(c)
--synchro summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109023,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101109023)
e1:SetHintTiming(0,TIMING_CHAIN_END+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c101109023.syncon)
e1:SetTarget(c101109023.syntg)
e1:SetOperation(c101109023.synop)
c:RegisterEffect(e1)
--be material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109023,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101109023+100)
e2:SetCondition(c101109023.xyzcon)
e2:SetTarget(c101109023.xyztg)
e2:SetOperation(c101109023.xyzop)
c:RegisterEffect(e2)
--
if not c101109023.global_check then
c101109023.global_check=true
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_TO_HAND)
e0:SetOperation(c101109023.regop)
Duel.RegisterEffect(e0,0)
end
end
function c101109023.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and (c:GetPreviousRaceOnField()&RACE_BEAST)>0
and c:IsPreviousPosition(POS_FACEUP)
end
function c101109023.regop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
if eg:IsExists(c101109023.cfilter,1,nil,p) then
Duel.RegisterFlagEffect(p,101109023,RESET_PHASE+PHASE_END,0,1)
end
end
end
function c101109023.syncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,101109023)>0
end
function c101109023.syntg(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 c101109023.synhfilter(c,sc,tuner)
return c:IsCanBeSynchroMaterial(sc,tuner) and c:IsSetCard(0x146)
end
function c101109023.synfilter(c,mc,tp)
local mg=Duel.GetMatchingGroup(c101109023.synhfilter,tp,LOCATION_HAND,0,nil,c,mc)
mg:AddCard(mc)
return c:IsSynchroSummonable(mc,mg) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c101109023.synop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if Duel.IsExistingMatchingCard(c101109023.synfilter,tp,LOCATION_EXTRA,0,1,nil,c,tp)
and Duel.SelectYesNo(tp,aux.Stringid(101109023,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local fc=Duel.SelectMatchingCard(tp,c101109023.synfilter,tp,LOCATION_EXTRA,0,1,1,nil,c,tp):GetFirst()
local mg=Duel.GetMatchingGroup(c101109023.synhfilter,tp,LOCATION_HAND,0,nil,fc,c)
mg:AddCard(c)
Duel.SynchroSummon(tp,fc,c,mg)
end
end
function c101109023.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c101109023.xyzfilter(c)
return c:IsType(TYPE_XYZ) and c:IsRace(RACE_BEAST) and c:IsFaceup()
end
function c101109023.xyztg(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(tp) and c101109023.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101109023.xyzfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101109023.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c101109023.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
--スカー・ヴェンデット
--
--Script by Trishula9
function c101109024.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101109024)
e1:SetTarget(c101109024.thtg)
e1:SetOperation(c101109024.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101109024+100)
e2:SetCondition(c101109024.spcon)
e2:SetCost(c101109024.spcost)
e2:SetTarget(c101109024.sptg)
e2:SetOperation(c101109024.spop)
c:RegisterEffect(e2)
end
function c101109024.thfilter(c)
return c:IsSetCard(0x106) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101109024.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109024.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109024.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109024.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c101109024.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_MZONE) and not eg:IsContains(e:GetHandler())
end
function c101109024.cfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost()
end
function c101109024.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109024.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101109024.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101109024.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 c101109024.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c101109024.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
end
end
function c101109024.splimit(e,c)
return not c:IsSetCard(0x106)
end
--エクソシスター・マルファ
--Scripted by mallu11
function c101109025.initial_effect(c)
aux.AddCodeList(c,16474916)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109025,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109025)
e1:SetCondition(c101109025.spcon)
e1:SetCost(c101109025.spcost)
e1:SetTarget(c101109025.sptg)
e1:SetOperation(c101109025.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109025,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_GRAVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101109025+100)
e2:SetTarget(c101109025.xyztg)
e2:SetOperation(c101109025.xyzop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(101109025,ACTIVITY_SPSUMMON,c101109025.counterfilter)
end
function c101109025.counterfilter(c)
return c:IsSetCard(0x172)
end
function c101109025.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c101109025.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
return ct==0 or ct==Duel.GetMatchingGroupCount(c101109025.cfilter,tp,LOCATION_MZONE,0,nil)
end
function c101109025.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(101109025,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c101109025.splimit)
Duel.RegisterEffect(e1,tp)
end
function c101109025.splimit(e,c)
return not c:IsSetCard(0x172)
end
function c101109025.spfilter(c,e,tp)
return c:IsCode(16474916) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109025.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c101109025.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101109025.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101109025.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
function c101109025.xyzfilter(c,e,tp,mc)
return c:IsSetCard(0x172) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c101109025.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c101109025.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101109025.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101109025.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
--赤しゃりの軍貫
--
--Script by Trishula9
function c101109026.initial_effect(c)
--change name
aux.EnableChangeCode(c,24639891,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109026)
e1:SetCost(c101109026.spcost)
e1:SetTarget(c101109026.sptg)
e1:SetOperation(c101109026.spop)
c:RegisterEffect(e1)
end
function c101109026.cfilter(c)
return c:IsCode(24639891) and not c:IsPublic()
end
function c101109026.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109026.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c101109026.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c101109026.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 c101109026.filter(c,e,tp,oc)
return c:IsSetCard(0x166) and not c:IsCode(24639891) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c101109026.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,oc,c)
end
function c101109026.xyzfilter(c,e,tp,oc,mc)
return c:IsType(TYPE_XYZ) and aux.IsCodeListed(c,mc:GetCode())
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and oc:IsCanBeXyzMaterial(c) and mc:IsCanBeXyzMaterial(c)
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(oc,mc),c)>0
and aux.MustMaterialCheck(Group.FromCards(oc,mc),tp,EFFECT_MUST_BE_XMATERIAL)
end
function c101109026.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(c101109026.filter,tp,LOCATION_DECK,0,nil,e,tp,c)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.IsPlayerCanSpecialSummonCount(tp,2)
and mg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101109026,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=mg:Select(tp,1,1,nil)
local sc=sg:GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
sc:RegisterEffect(e2)
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
local g=Group.FromCards(c,sc)
if g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local xyzg=Duel.GetMatchingGroup(c101109026.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp,c,sc)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
xyz:SetMaterial(g)
Duel.Overlay(xyz,g)
Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
xyz:CompleteProcedure()
end
end
end
--六花のしらひめ
--
--Script by Trishula9
function c101109027.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109027)
e1:SetTarget(c101109027.sptg)
e1:SetOperation(c101109027.spop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,101109027+100)
e2:SetCondition(c101109027.discon)
e2:SetCost(c101109027.discost)
e2:SetTarget(c101109027.distg)
e2:SetOperation(c101109027.disop)
c:RegisterEffect(e2)
end
function c101109027.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 c101109027.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c101109027.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
end
end
function c101109027.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function c101109027.filter(c)
return c:IsSetCard(0x141) and c:IsFaceup()
end
function c101109027.discon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(c101109027.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c101109027.costfilter(c,tp)
return (c:IsControler(tp) or c:IsFaceup()) and (c:IsRace(RACE_PLANT) or c:IsHasEffect(101109066))
end
function c101109027.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() and Duel.CheckReleaseGroup(tp,c101109027.costfilter,1,nil,tp) end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c101109027.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c101109027.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c101109027.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--斬機サーキュラー
--
--Script by Trishula9
function c101109028.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109028)
e1:SetCost(c101109028.spcost)
e1:SetTarget(c101109028.sptg)
e1:SetOperation(c101109028.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101109028+100)
e2:SetCondition(c101109028.thcon)
e2:SetTarget(c101109028.thtg)
e2:SetOperation(c101109028.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c101109028.costfilter(c)
return c:IsSetCard(0x132) and c:IsType(TYPE_MONSTER) and not c:IsCode(101109028) and c:IsAbleToGraveAsCost()
end
function c101109028.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109028.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101109028.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c101109028.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 c101109028.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
--check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c101109028.checkop)
Duel.RegisterEffect(e1,tp)
--cannot announce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(c101109028.atkcon)
e2:SetTarget(c101109028.atktg)
e1:SetLabelObject(e2)
Duel.RegisterEffect(e2,tp)
end
function c101109028.checkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,101109028)~=0 then return end
local fid=eg:GetFirst():GetFieldID()
Duel.RegisterFlagEffect(tp,101109028,RESET_PHASE+PHASE_END,0,1)
e:GetLabelObject():SetLabel(fid)
end
function c101109028.atkcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),101109028)>0
end
function c101109028.atktg(e,c)
return c:GetFieldID()~=e:GetLabel()
end
function c101109028.cfilter(c,tp)
return c:IsSetCard(0x132) and c:IsControler(tp) and c:IsFaceup()
end
function c101109028.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101109028.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c101109028.thfilter(c)
return c:IsSetCard(0x132) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101109028.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109028.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109028.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109028.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
--クローラー・ソゥマ
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetTarget(s.hsptg)
e1:SetOperation(s.hspop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,id+o)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function s.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
function s.spfilter(c,e,tp)
return c:IsLevelAbove(0) and c:IsLevelBelow(4) and c:IsSetCard(0x104) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE)
end
function s.gselect(sg,lv)
return sg:GetSum(Card.GetLevel)==lv
end
function s.gcheck(lv)
return function(sg)
return aux.dncheck(sg) and sg:GetSum(Card.GetLevel)<=lv
end
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
local clv=c:GetLevel()
if clv<=2 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
aux.GCheckAdditional=s.gcheck(2)
local b2=clv>2 and g:CheckSubGroup(s.gselect,1,ft,2)
aux.GCheckAdditional=s.gcheck(4)
local b4=clv>4 and g:CheckSubGroup(s.gselect,1,ft,4)
aux.GCheckAdditional=nil
return b2 or b4
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local clv=c:GetLevel()
if clv<=2 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
aux.GCheckAdditional=s.gcheck(2)
local b2=clv>2 and g:CheckSubGroup(s.gselect,1,ft,2)
aux.GCheckAdditional=s.gcheck(4)
local b4=clv>4 and g:CheckSubGroup(s.gselect,1,ft,4)
aux.GCheckAdditional=nil
local off=1
local ops={}
local opval={}
if b2 then
ops[off]=aux.Stringid(id,2)
opval[off-1]=2
off=off+1
end
if b4 then
ops[off]=aux.Stringid(id,3)
opval[off-1]=4
off=off+1
end
if off==1 then return end
local lv=opval[Duel.SelectOption(tp,table.unpack(ops))]
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-lv)
c:RegisterEffect(e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.GCheckAdditional=s.gcheck(lv)
local sg=g:SelectSubGroup(tp,s.gselect,false,1,ft,lv)
aux.GCheckAdditional=nil
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_DEFENSE)
end
--はぐれ・もけもけ
--
--Script by Trishula9
function c101109030.initial_effect(c)
--change name
aux.EnableChangeCode(c,27288416,LOCATION_MZONE+LOCATION_GRAVE)
--normal monster
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(TYPE_NORMAL)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_REMOVE_TYPE)
e2:SetValue(TYPE_EFFECT)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCost(c101109030.thcost)
e3:SetTarget(c101109030.thtg)
e3:SetOperation(c101109030.thop)
c:RegisterEffect(e3)
end
function c101109030.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c101109030.thfilter(c)
return not c:IsCode(101109030) and c:IsSetCard(0x282) and c:IsAbleToHand()
end
function c101109030.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c101109030.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109030.thop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109030.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
--倶利伽羅天童
--Scripted by mallu11
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--special summon 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:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.sprcon)
e2:SetOperation(s.sprop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) then return end
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if loc==LOCATION_MZONE and rc:GetFlagEffect(id+o+p)==0 then
rc:RegisterFlagEffect(id+o+p,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function s.rfilter(c,p)
return c:IsFaceup() and c:GetFlagEffect(id+o+p)>0
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp)
return rg:GetCount()>0 and rg:FilterCount(Card.IsReleasable,nil)==rg:GetCount() and aux.mzctcheck(rg,tp)
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp)
Duel.Release(rg,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(rg:GetCount()*1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--地霊媒師アウス
--
--Script by Trishula9
function c101109032.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109032)
e1:SetCost(c101109032.srcost)
e1:SetTarget(c101109032.srtg)
e1:SetOperation(c101109032.srop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,101109032+100)
e2:SetCondition(c101109032.spcon)
e2:SetTarget(c101109032.sptg)
e2:SetOperation(c101109032.spop)
c:RegisterEffect(e2)
end
function c101109032.filter(c,sc,tp)
if not (c:IsAttribute(ATTRIBUTE_EARTH) and c:IsDiscardable()) then return false end
local race=c:GetOriginalRace()|sc:GetOriginalRace()
return Duel.IsExistingMatchingCard(c101109032.srfilter,tp,LOCATION_DECK,0,1,nil,race)
end
function c101109032.srfilter(c,race)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAttackBelow(1850) and c:IsAbleToHand()
and c:GetOriginalRace()&race>0
end
function c101109032.srcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c101109032.filter,tp,LOCATION_HAND,0,1,c,c,tp) and c:IsDiscardable() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c101109032.filter,tp,LOCATION_HAND,0,1,1,c,c,tp)
e:SetLabelObject(g:GetFirst())
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c101109032.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local res=e:GetLabel()==100
e:SetLabel(0)
return res
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109032.srop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sc=e:GetLabelObject()
local race=c:GetOriginalRace()|sc:GetOriginalRace()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109032.srfilter,tp,LOCATION_DECK,0,1,1,nil,race)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c101109032.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101109032.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsAttribute(ATTRIBUTE_EARTH)
end
function c101109032.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_EARTH)~=0
end
function c101109032.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101109032.cfilter,1,nil,tp)
end
function c101109032.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 c101109032.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
end
--グランドタスク・ドラゴン
--
--Script by Trishula9
function c101109033.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101109033)
e1:SetTarget(c101109033.destg)
e1:SetOperation(c101109033.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c101109033.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c101109033.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
local ct=Duel.Destroy(tg,REASON_EFFECT)
if c:IsRelateToEffect(e) and c:IsFaceup() and not c:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
end
--炎獣使いエーカ
--Scripted by mallu11
function c101109034.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109034,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101109034)
e1:SetTarget(c101109034.sptg)
e1:SetOperation(c101109034.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--equip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109034,1))
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101109034+100)
e3:SetTarget(c101109034.eqtg)
e3:SetOperation(c101109034.eqop)
c:RegisterEffect(e3)
end
function c101109034.spfilter(c,e,tp)
return c:IsFaceup() and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109034.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c101109034.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101109034.spfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101109034.spfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101109034.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101109034.eqfilter(c)
return c:IsFaceup() and c:CheckUniqueOnField(tp,LOCATION_SZONE) and not c:IsForbidden()
end
function c101109034.eqtg(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(tp) and c101109034.eqfilter(chkc) and chkc~=c end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101109034.eqfilter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c101109034.eqfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c101109034.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetLabelObject(c)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101109034.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function c101109034.eqlimit(e,c)
return c==e:GetLabelObject()
end
--プロパ・ガンダケ
--Script by starvevenom
function c101109035.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109035,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c101109035.rctg)
e1:SetOperation(c101109035.rcop)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetCondition(c101109035.econ)
e2:SetValue(c101109035.value)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetCondition(c101109035.econ)
e3:SetTarget(c101109035.etg)
e3:SetValue(c101109035.tgoval)
c:RegisterEffect(e3)
end
function c101109035.cfilter(c)
local race=c:GetOriginalRace()
return c:IsFaceup() and (race==RACE_BEAST or race==RACE_ROCK or race==RACE_PLANT or race==RACE_INSECT)
end
function c101109035.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109035.cfilter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(c101109035.cfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
local race=0
while tc do
race=race|tc:GetOriginalRace()
tc=g:GetNext()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local rc=Duel.AnnounceRace(tp,1,race)
e:SetLabel(rc)
end
function c101109035.rcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(e:GetLabel())
c:RegisterEffect(e1)
c:RegisterFlagEffect(101109035,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function c101109035.econ(e)
return e:GetHandler():GetFlagEffect(101109035)>0
end
function c101109035.value(e,c)
return e:GetHandler():GetRace()
end
function c101109035.etg(e,c)
return c:IsRace(e:GetHandler():GetRace())
end
function c101109035.tgoval(e,re,rp)
return rp==1-e:GetHandlerPlayer()
and re:GetActivateLocation()==LOCATION_MZONE and re:GetHandler():IsRace(e:GetHandler():GetRace())
end
--水界の秘石-カトリン
--Scripted by mallu11
function c101109036.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109036,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109036)
e1:SetCost(c101109036.sumcost)
e1:SetTarget(c101109036.sumtg)
e1:SetOperation(c101109036.sumop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(101109036,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101109036+100)
e2:SetCondition(c101109036.spcon)
e2:SetTarget(c101109036.sptg)
e2:SetOperation(c101109036.spop)
c:RegisterEffect(e2)
end
function c101109036.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c101109036.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,101109036)==0 end
end
function c101109036.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,101109036)~=0 then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109036,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH+ATTRIBUTE_WATER))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,101109036,RESET_PHASE+PHASE_END,0,1)
end
function c101109036.cfilter(c,attr)
return c:IsFaceup() and c:IsAttribute(attr)
end
function c101109036.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101109036.cfilter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_EARTH)
and Duel.IsExistingMatchingCard(c101109036.cfilter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER)
end
function c101109036.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 c101109036.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
end
--お代狸様の代算様
--Script by mercury233
--not fully implemented
local s,id,o=GetID()
function s.initial_effect(c)
--cannot release
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
--extra ritual material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetTargetRange(LOCATION_EXTRA,0)
e3:SetValue(1)
c:RegisterEffect(e3)
--workaround
if not aux.rit_mat_hack_check then
aux.rit_mat_hack_check=true
function aux.rit_mat_hack_exmat_filter(c)
return c:IsHasEffect(EFFECT_EXTRA_RITUAL_MATERIAL,c:GetControler()) and c:IsLocation(LOCATION_EXTRA)
and (c:IsLevelAbove(0) or c22398665~=nil)
end
function aux.RitualCheckGreater(g,c,lv)
if g:FilterCount(aux.rit_mat_hack_exmat_filter,nil)>1 then return false end
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetRitualLevel,lv,c)
end
function aux.RitualCheckEqual(g,c,lv)
if g:FilterCount(aux.rit_mat_hack_exmat_filter,nil)>1 then return false end
return g:CheckWithSumEqual(Card.GetRitualLevel,lv,#g,#g,c)
end
_GetRitualMaterial=Duel.GetRitualMaterial
function Duel.GetRitualMaterial(tp)
local g=_GetRitualMaterial(tp)
local exg=Duel.GetMatchingGroup(aux.rit_mat_hack_exmat_filter,tp,LOCATION_EXTRA,0,nil)
return g+exg
end
_GetRitualMaterialEx=Duel.GetRitualMaterialEx
function Duel.GetRitualMaterialEx(tp)
local g=_GetRitualMaterialEx(tp)
local exg=Duel.GetMatchingGroup(aux.rit_mat_hack_exmat_filter,tp,LOCATION_EXTRA,0,nil)
return g+exg
end
_ReleaseRitualMaterial=Duel.ReleaseRitualMaterial
function Duel.ReleaseRitualMaterial(mat)
local rg=mat:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
mat:Sub(rg)
local tc=rg:Filter(aux.rit_mat_hack_exmat_filter,nil):GetFirst()
if tc then
local te=tc:IsHasEffect(EFFECT_EXTRA_RITUAL_MATERIAL,tc:GetControler())
te:UseCountLimit(tc:GetControler())
end
Duel.SendtoGrave(rg,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
return _ReleaseRitualMaterial(mat)
end
end
end
--悪醒師ナイトメルト
--Script by starvevenom
function c101109038.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109035,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101109038)
e1:SetCost(c101109038.spcost)
e1:SetTarget(c101109038.sptg)
e1:SetOperation(c101109038.spop)
c:RegisterEffect(e1)
end
function c101109038.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c101109038.cfilter(c,e,tp)
local loc=nil
if c:IsSummonLocation(LOCATION_EXTRA) then loc=LOCATION_DECK+LOCATION_EXTRA else loc=LOCATION_DECK end
return (c:IsControler(tp) or c:IsFaceup()) and c:IsLevelAbove(0)
and Duel.IsExistingMatchingCard(c101109038.spfilter,tp,loc,0,1,nil,c,e,tp)
end
function c101109038.spfilter(c,mc,e,tp)
return c:IsLevel(mc:GetOriginalLevel()) and not c:IsOriginalCodeRule(mc:GetOriginalCodeRule())
and c:IsRace(mc:GetOriginalRace()) and c:IsAttribute(mc:GetOriginalAttribute())
and c:GetTextAttack()==mc:GetTextAttack() and c:GetTextDefense()==mc:GetTextDefense()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetMZoneCount(tp,c)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0)
end
function c101109038.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c101109038.cfilter,1,nil,e,tp)
end
local c=e:GetHandler()
local g=Duel.SelectReleaseGroup(tp,c101109038.cfilter,1,1,nil,e,tp)
local tc=g:GetFirst()
local loc=nil
if tc:IsSummonLocation(LOCATION_EXTRA) then
e:SetLabel(1)
loc=LOCATION_DECK+LOCATION_EXTRA
else
e:SetLabel(0)
loc=LOCATION_DECK
end
e:SetLabelObject(tc)
Duel.Release(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end
function c101109038.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local rc=e:GetLabelObject()
local loc=nil
if e:GetLabel()==1 then loc=LOCATION_DECK+LOCATION_EXTRA else loc=LOCATION_DECK end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101109038.spfilter,tp,loc,0,1,1,nil,rc,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--ハイドランダー・オービット
--
--Script by Trishula9
function c101109039.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101109039)
e1:SetCondition(c101109039.thcon)
e1:SetCost(c101109039.thcost)
e1:SetTarget(c101109039.thtg)
e1:SetOperation(c101109039.thop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101109039+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101109039.tdtg)
e2:SetOperation(c101109039.tdop)
c:RegisterEffect(e2)
end
function c101109039.thcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
return g:GetCount()>=4 and g:GetClassCount(Card.GetCode)==g:GetCount()
end
function c101109039.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 c101109039.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<ct then return false end
local g=Duel.GetDecktopGroup(tp,ct)
return g:FilterCount(Card.IsAbleToHand,nil)>0
end
end
function c101109039.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
Duel.ConfirmDecktop(tp,ct)
local dg=Duel.GetDecktopGroup(tp,ct)
local g=dg:Filter(Card.IsType,nil,TYPE_MONSTER)
if g:GetCount()>=2 and g:GetClassCount(Card.GetCode)==g:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.DisableShuffleCheck()
if sg:GetFirst():IsAbleToHand() then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
else
Duel.SendtoGrave(sg,REASON_RULE)
end
Duel.SortDecktop(tp,tp,dg:GetCount()-1)
else Duel.SortDecktop(tp,tp,dg:GetCount()) end
end
function c101109039.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c101109039.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101109039.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101109039.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c101109039.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c101109039.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
--ヴェンデット・スカヴェンジャー
--
--Script by Trishula9
function c101109040.initial_effect(c)
c:EnableReviveLimit()
--atk up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,101109040)
e1:SetCondition(c101109040.atkcon)
e1:SetCost(c101109040.atkcost)
e1:SetOperation(c101109040.atkop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101109040+100)
e2:SetCondition(c101109040.spcon)
e2:SetTarget(c101109040.sptg)
e2:SetOperation(c101109040.spop)
c:RegisterEffect(e2)
end
function c101109040.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c101109040.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,c,RACE_ZOMBIE) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,c,RACE_ZOMBIE)
local tc=g:GetFirst()
e:SetLabelObject(tc)
Duel.Release(g,REASON_COST)
end
function c101109040.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabelObject():GetBaseAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c101109040.filter(c)
return c:IsCode(4388680) and c:IsFaceup()
end
function c101109040.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101109040.filter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c101109040.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 c101109040.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_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
--E・HERO シャイニング・ネオス・ウィングマン
--Script by JSY1728
local s,id,o=GetID()
function s.initial_effect(c)
--Fusion Material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,89943723,s.mfilter,1,true,true)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
--Gain ATK
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(s.atkval)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
c:RegisterEffect(e3)
--Damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdcon)
e4:SetTarget(s.damtg)
e4:SetOperation(s.damop)
c:RegisterEffect(e4)
end
s.material_setcode=0x8
s.neos_fusion=true
function s.mfilter(c)
return c:IsFusionSetCard(0x27f) and c:IsFusionType(TYPE_FUSION)
end
function s.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local cg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local ct=cg:GetClassCount(Card.GetAttribute)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function s.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_MONSTER)*300
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local dam=e:GetHandler():GetBattleTarget():GetBaseAttack()
if dam<0 then dam=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--ティアラメンツ・キトカロス
--
--Script by JoyJ
function c101109042.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x284),aux.FilterBoolFunction(Card.IsRace,RACE_AQUA),true)
--to hand or grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109042,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101109042)
e1:SetTarget(c101109042.target)
e1:SetOperation(c101109042.operation)
c:RegisterEffect(e1)
--tograve and spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109042,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101109042+100)
e2:SetTarget(c101109042.tgtg)
e2:SetOperation(c101109042.tgop)
c:RegisterEffect(e2)
--discard deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109042,2))
e3:SetCategory(CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,101109042+200)
e3:SetCondition(c101109042.discon)
e3:SetTarget(c101109042.distg)
e3:SetOperation(c101109042.disop)
c:RegisterEffect(e3)
end
function c101109042.cfilter(c)
return c:IsSetCard(0x284) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c101109042.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109042.cfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c101109042.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c101109042.cfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
function c101109042.spfilter(c,e,tp)
return c:IsSetCard(0x284) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c101109042.tgtg(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(tp) and chkc:IsAbleToGrave() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c101109042.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetMZoneCount(tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c101109042.tgop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101109042.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c101109042.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c101109042.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(5)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,5)
end
function c101109042.disop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,d,REASON_EFFECT)
end
--ティアラメンツ・カレイドハート
--
--Script by JoyJ
function c101109043.initial_effect(c)
c:EnableReviveLimit()
--fusion material
aux.AddFusionProcCodeFun(c,101109015,aux.FilterBoolFunction(Card.IsRace,RACE_AQUA),2,true,true)
--cannot be fusion material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109043,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,101109043)
e1:SetTarget(c101109043.tdtg)
e1:SetOperation(c101109043.tdop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101109043.tdcon)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109043,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,101109043+100)
e3:SetCondition(c101109043.spcond)
e3:SetTarget(c101109043.sptg)
e3:SetOperation(c101109043.spop)
c:RegisterEffect(e3)
end
function c101109043.cfilter(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsControler(tp) and c:IsRace(RACE_AQUA)
end
function c101109043.tdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101109043.cfilter,1,nil,tp)
end
function c101109043.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c101109043.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function c101109043.spcond(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c101109043.tgfilter(c)
return c:IsSetCard(0x284) and c:IsAbleToGrave()
end
function c101109043.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)
and Duel.IsExistingMatchingCard(c101109043.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101109043.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101109043.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
--ジェムナイトレディ・ローズ・ダイヤ
--
--Script by Trishula9
function c101109044.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1047),aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),true)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c101109044.indcon)
e1:SetTarget(c101109044.indtg)
e1:SetCountLimit(1)
e1:SetValue(c101109044.valcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c101109044.descon)
e2:SetCost(c101109044.descost)
e2:SetTarget(c101109044.destg)
e2:SetOperation(c101109044.desop)
c:RegisterEffect(e2)
end
function c101109044.indcon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end
function c101109044.indtg(e,c)
return c:IsSetCard(0x1047) and c:IsFaceup()
end
function c101109044.valcon(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function c101109044.descon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER)
and Duel.GetTurnPlayer()==tp
end
function c101109044.cfilter(c)
return c:IsSetCard(0x1047) and c:IsAbleToRemoveAsCost()
end
function c101109044.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109044.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101109044.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101109044.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101109044.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
\ No newline at end of file
--うきうきメルフィーズ
--
--Script by JoyJ
function c101109045.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--return to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109045,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101109045)
e1:SetTarget(c101109045.thtg)
e1:SetOperation(c101109045.thop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109045,1))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101109045+100)
e2:SetCondition(c101109045.tdcon)
e2:SetTarget(c101109045.tdtg)
e2:SetOperation(c101109045.tdop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BE_BATTLE_TARGET)
e4:SetCondition(c101109045.tdcon2)
c:RegisterEffect(e4)
end
function c101109045.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c101109045.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101109045.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101109045.thfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c101109045.thfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101109045.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
function c101109045.cfilter(c,sp)
return c:IsSummonPlayer(sp)
end
function c101109045.tdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101109045.cfilter,1,nil,1-tp)
end
function c101109045.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c101109045.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c101109045.spfilter(c,e,tp)
return c:IsSetCard(0x146) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c101109045.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e)
and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA)
and Duel.IsExistingMatchingCard(c101109045.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(101109045,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101109045.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--P.U.N.K.JAMドラゴン・ドライブ
--
--Script by Trishula9
function c101109046.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHO),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--to hand or grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101109046)
e1:SetCondition(c101109046.thcon)
e1:SetCost(c101109046.thcost)
e1:SetTarget(c101109046.thtg)
e1:SetOperation(c101109046.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101109046+100)
e2:SetCondition(c101109046.spcon)
e2:SetTarget(c101109046.sptg)
e2:SetOperation(c101109046.spop)
c:RegisterEffect(e2)
end
function c101109046.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) or re:GetHandler():IsSetCard(0x171)
end
function c101109046.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
end
function c101109046.thfilter(c)
return c:IsRace(RACE_PSYCHO) and c:IsLevel(3) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c101109046.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109046.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c101109046.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c101109046.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
function c101109046.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
if ct<2 then return end
local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandler():IsSetCard(0x171) and p==tp and rp==1-tp
end
function c101109046.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 c101109046.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
--ギガンティック・スプライト
--
--Script by Trishula9
function c101109047.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c101109047.mfilter,nil,2,2)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetCondition(c101109047.adcon)
e1:SetValue(c101109047.atkval)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101109047)
e2:SetTarget(c101109047.sptg)
e2:SetOperation(c101109047.spop)
c:RegisterEffect(e2)
end
function c101109047.mfilter(c,xyzc)
return c:IsXyzLevel(xyzc,2) or c:IsLink(2)
end
function c101109047.adcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function c101109047.atkval(e,c)
return c:GetBaseAttack()*2
end
function c101109047.spfilter(c,e,tp)
return c:IsLevel(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109047.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109047.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101109047.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101109047.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,1)
e1:SetTarget(c101109047.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101109047.splimit(e,c)
return not c:IsLevel(2) and not c:IsRank(2) and not c:IsLink(2)
end
--亜種羅王
--Scripted by mallu11
function c101109048.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,3,nil,nil,99)
c:EnableReviveLimit()
--extra attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetCondition(c101109048.atkcon)
e1:SetValue(c101109048.atkval)
c:RegisterEffect(e1)
--attack up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109048,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_START)
e2:SetCondition(c101109048.condition)
e2:SetOperation(c101109048.operation)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109048,1))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101109048)
e3:SetCondition(c101109048.discon)
e3:SetCost(c101109048.discost)
e3:SetTarget(c101109048.distg)
e3:SetOperation(c101109048.disop)
c:RegisterEffect(e3)
end
function c101109048.atkcon(e)
return e:GetHandler():GetOverlayCount()>0
end
function c101109048.atkval(e,c)
return e:GetHandler():GetOverlayCount()-1
end
function c101109048.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsRelateToBattle()
end
function c101109048.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c101109048.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc~=c and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c101109048.discost(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 c101109048.distg(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 c101109048.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
end
end
--スプライト・エルフ
--
--Script by Trishula9
function c101109049.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2,c101109049.lcheck)
--cannot link 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_LINK_MATERIAL)
e1:SetValue(c101109049.lmlimit)
c:RegisterEffect(e1)
--cannot be effect target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c101109049.etlimit)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,101109049)
e3:SetCondition(c101109049.spcon)
e3:SetTarget(c101109049.sptg)
e3:SetOperation(c101109049.spop)
c:RegisterEffect(e3)
end
function c101109049.lcheck(g,lc)
return g:IsExists(Card.IsLevel,1,nil,2) or g:IsExists(Card.IsRank,1,nil,2) or g:IsExists(Card.IsLink,1,nil,2)
end
function c101109049.lmlimit(e)
local c=e:GetHandler()
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c101109049.etlimit(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c101109049.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c101109049.spfilter(c,e,tp,check)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLevel(2) or (check and (c:IsRank(2) or c:IsLink(2))))
end
function c101109049.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local check=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101109049.spfilter(chkc,e,tp,check) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101109049.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,check) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101109049.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,check)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101109049.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--スケアクロー・ライトハート
--
--Script by Trishula9
function c101109050.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c101109050.mfilter,1,1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c101109050.thcon)
e1:SetTarget(c101109050.thtg)
e1:SetOperation(c101109050.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101109050+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c101109050.spcon)
e2:SetTarget(c101109050.sptg)
e2:SetOperation(c101109050.spop)
c:RegisterEffect(e2)
end
function c101109050.mfilter(c)
return (c:IsLinkSetCard(0x17a) or c:IsLinkCode(56099748))
and (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 or not c:IsLocation(LOCATION_MZONE))
end
function c101109050.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK) and c:GetSequence()>4
end
function c101109050.thfilter(c)
return c:IsCode(56063182) and c:IsAbleToHand()
end
function c101109050.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109050.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109050.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109050.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c101109050.filter(c)
return c:IsCode(56099748) and c:IsFaceup()
end
function c101109050.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101109050.filter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c101109050.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 c101109050.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
end
\ No newline at end of file
--EN-エンゲージ・ネオスペース
--Script by JSY1728
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,89943723)
aux.AddSetNameMonsterList(c,0x3008)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_FUSION)
end
function s.costfilter(c)
return c:IsSetCard(0x1f,0x3008) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function s.fselect(g,e,tp)
return g:GetClassCount(Card.GetLocation)==g:GetCount() and aux.gfcheck(g,Card.IsSetCard,0x1f,0x3008)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,g,e,tp)
end
function s.spfilter(c,e,tp)
return (c:IsSetCard(0x1f) or (c:IsLevelAbove(5) and c:IsSetCard(0x3008))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0
and g:CheckSubGroup(s.fselect,2,2,e,tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,s.fselect,false,2,2,e,tp)
Duel.SendtoGrave(sg,REASON_COST)
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION)
end
function s.thfilter(c)
return c:IsCode(24094653) and c:IsAbleToHand()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.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 sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then
if sc:IsCode(89943723) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=hg:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
--インスタント・コンタクト
--Script by JSY1728
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,89943723)
aux.AddSetNameMonsterList(c,0x3008)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function s.spfilter(c,e,tp)
return (c:IsLevelBelow(7) and c:IsSetCard(0x3008) or c:IsSetCard(0x1f))
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.cfilter(c)
return c:IsCode(89943723) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if not tc then return end
if Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) then
local c=e:GetHandler()
-- Cannot attack
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)
-- Effects are negated
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e3,true)
-- Return it to the Extra Deck during the End Phase
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetLabelObject(tc)
e4:SetCondition(s.tdcon)
e4:SetOperation(s.tdop)
Duel.RegisterEffect(e4,tp)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
end
Duel.SpecialSummonComplete()
end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not tc or tc:GetFlagEffect(id)==0 then
e:Reset()
return false
end
return true
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--ENウェーブ
--Script by JSY1728
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,89943723)
aux.AddSetNameMonsterList(c,0x3008)
-- Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
-- Special Summon from Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.dspcon)
e1:SetTarget(s.dsptg)
e1:SetOperation(s.dspop)
c:RegisterEffect(e1)
-- Special Summon from GY
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.gspcon)
e2:SetTarget(s.gsptg)
e2:SetOperation(s.gspop)
c:RegisterEffect(e2)
end
function s.dspconfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED)
and (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousSetCard(0x3008)
or not c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0x3008))
end
function s.dspcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_FUSION and eg:IsExists(s.dspconfilter,1,nil,tp)
end
function s.dspfilter(c,e,tp)
return (c:IsSetCard(0x1f) or c:IsCode(89943723)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.dsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.dspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.dspop(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,s.dspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.gspconfilter(c,tp)
return ((c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1f)) or c:IsCode(89943723))
and c:IsPreviousControler(tp) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE+LOCATION_GRAVE)
end
function s.gspcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.gspconfilter,1,nil,tp)
end
function s.gspfilter(c,e,tp)
return c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.gsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.gspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.gspop(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,s.gspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--融合超渦
--Script by JSY1728
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,89943723)
aux.AddSetNameMonsterList(c,0x3008)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.fstg)
e1:SetOperation(s.fsop)
c:RegisterEffect(e1)
end
function s.tgfilter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,nil,c,tp)
end
function s.cfilter(c,tc,tp)
if c:IsCode(tc:GetFusionCode()) then return false end
return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x1f) or c:IsSetCard(0x3008) or c:IsLevel(10))
end
function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
end
function s.neosfilter(c)
return c:IsCode(89943723) and (c:IsFaceup() or not c:IsOnField())
end
function s.fsop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,tc,tp):GetFirst()
if cg==nil then return end
Duel.ConfirmCards(1-tp,cg)
local code1,code2=cg:GetOriginalCodeRule()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_FUSION_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(code1)
tc:RegisterEffect(e1)
if code2 then
local e2=e1:Clone()
e2:SetValue(code2)
tc:RegisterEffect(e2)
end
if Duel.IsExistingMatchingCard(s.neosfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) then
Duel.SendtoGrave(cg,REASON_EFFECT)
elseif cg:IsLocation(LOCATION_HAND) then
Duel.SendtoDeck(cg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--スプライト・スターター
--
--Script by Trishula9
function c101109055.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:SetCountLimit(1,101109055+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101109055.target)
e1:SetOperation(c101109055.activate)
c:RegisterEffect(e1)
end
function c101109055.filter(c,e,tp)
return c:IsSetCard(0x283) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109055.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109055.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101109055.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101109055.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-tc:GetBaseAttack())
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c101109055.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101109055.splimit(e,c)
return not c:IsLevel(2) and not c:IsRank(2) and not c:IsLink(2)
end
--スプライト・ガンマ・バースト
--
--Script by Trishula9
function c101109056.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101109056)
e1:SetCondition(aux.dscon)
e1:SetTarget(c101109056.target)
e1:SetOperation(c101109056.activate)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101109056)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101109056.atktg)
e2:SetOperation(c101109056.atkop)
c:RegisterEffect(e2)
end
function c101109056.filter(c)
return (c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)) and c:IsFaceup()
end
function c101109056.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109056.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c101109056.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101109056.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c101109056.atkfilter(c)
return (c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)) and c:IsFaceup()
end
function c101109056.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101109056.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101109056.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101109056.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101109056.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
end
end
--スプライト・スマッシャーズ
--
--Script by Trishula9
function c101109057.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109057,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101109057+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c101109057.cost)
e1:SetTarget(c101109057.sptg1)
e1:SetOperation(c101109057.spop1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109057,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,101109057+EFFECT_COUNT_CODE_OATH)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(c101109057.cost)
e2:SetTarget(c101109057.sptg2)
e2:SetOperation(c101109057.spop2)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109057,2))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,101109057+EFFECT_COUNT_CODE_OATH)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(c101109057.cost)
e3:SetTarget(c101109057.rmtg)
e3:SetOperation(c101109057.rmop)
c:RegisterEffect(e3)
end
function c101109057.cfilter(c)
return c:IsSetCard(0x155,0x179,0x283) and c:IsAbleToRemoveAsCost()
end
function c101109057.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109057.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101109057.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101109057.spfilter1(c,e,tp)
return c:IsSetCard(0x155) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109057.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109057.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101109057.spop1(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,c101109057.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101109057.spfilter2(c,e,tp)
return c:IsSetCard(0x179) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109057.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109057.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c101109057.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,aux.NecroValleyFilter(c101109057.spfilter2),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101109057.rmfilter(c)
return (c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)) and c:IsFaceup() and c:IsAbleToRemove()
end
function c101109057.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109057.rmfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,PLAYER_ALL,LOCATION_ONFIELD)
end
function c101109057.rmop(e,tp,eg,ep,ev,re,r,rp)
if not c101109057.rmtg(e,tp,eg,ep,ev,re,r,rp,0) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c101109057.rmfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,tp)
g1:Merge(g2)
Duel.HintSelection(g1)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end
--烙印の命数
--
--Script by Trishula9
function c101109058.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109058,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101109058)
e2:SetCondition(c101109058.tgcon)
e2:SetTarget(c101109058.tgtg)
e2:SetOperation(c101109058.tgop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,101109058+100)
e3:SetCondition(c101109058.atkcon)
e3:SetTarget(c101109058.atktg)
e3:SetOperation(c101109058.atkop)
c:RegisterEffect(e3)
end
function c101109058.tcfilter(c,tp,re,rp)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and re and re:IsActiveType(TYPE_SPELL) and rp==tp
end
function c101109058.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==1 and eg:FilterCount(c101109058.tcfilter,nil,tp,re,rp)==1
end
function c101109058.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)>0 or Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_EXTRA)
end
function c101109058.tgop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if (#g1~=0 or #g2~=0) then
local g=nil
if #g1~=0 and (#g2==0 or Duel.SelectOption(tp,aux.Stringid(101109058,1),aux.Stringid(101109058,2))==0) then
g=g1
else
g=g2
Duel.ConfirmCards(tp,g)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
if g==g2 then Duel.ShuffleExtra(1-tp) end
end
end
function c101109058.acfilter(c,tp,re,rp)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and re and re:IsActiveType(TYPE_SPELL) and rp==tp
end
function c101109058.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==1 and eg:FilterCount(c101109058.acfilter,nil,tp,re,rp)==1
end
function c101109058.tgfilter(c,eg)
return eg:IsContains(c)
end
function c101109058.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101109058.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,eg) end
Duel.SetTargetCard(eg)
end
function c101109058.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
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:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetBaseAttack())
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(c101109058.atlimit)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
function c101109058.atlimit(e,c)
return not c:IsAttackPos() or c:IsControler(e:GetHandlerPlayer())
end
--肆世壊からの天跨
--
--Script by Trishula9
function c101109059.initial_effect(c)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101109059,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,101109059+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(aux.dscon)
e1:SetTarget(c101109059.atktg)
e1:SetOperation(c101109059.atkop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109059,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,101109059+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c101109059.discon)
e2:SetTarget(c101109059.distg)
e2:SetOperation(c101109059.disop)
c:RegisterEffect(e2)
end
function c101109059.atkfilter(c)
return c:IsSetCard(0x17a) or c:IsCode(56099748)
end
function c101109059.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101109059.atkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c101109059.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
end
function c101109059.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<2 then return end
local sc1=tg:Filter(Card.IsControler,nil,tp):GetFirst()
local sc2=tg:Filter(Card.IsControler,nil,1-tp):GetFirst()
if not sc1 or not sc2 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(math.max(sc2:GetAttack(),sc2:GetDefense()))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc1:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc1:RegisterEffect(e2)
end
function c101109059.disfilter(c,tp)
return (c:IsSetCard(0x17a) or c:IsCode(56099748))
and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(tp)
end
function c101109059.discon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c101109059.disfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c101109059.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c101109059.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--壱世壊=ペルレイノ
--
--Script by JoyJ
function c101109060.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,101109060+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c101109060.activate)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c101109060.atktg)
e2:SetValue(500)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109060,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,101109060+100)
e3:SetCode(EVENT_TO_DECK)
e3:SetCondition(c101109060.descon)
e3:SetTarget(c101109060.destg)
e3:SetOperation(c101109060.desop)
c:RegisterEffect(e3)
end
function c101109060.filter(c)
return ((c:IsSetCard(0x284) and c:IsType(TYPE_MONSTER)) or c:IsCode(56099748)) and c:IsAbleToHand()
end
function c101109060.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101109060.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101109060,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 c101109060.atktg(e,c)
return c:IsType(TYPE_FUSION) or c:IsSetCard(0x284)
end
function c101109060.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsSetCard(0x284) and c:IsType(TYPE_MONSTER)
and (c:IsPreviousLocation(LOCATION_GRAVE)
or (c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x284)))
end
function c101109060.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101109060.cfilter,1,nil,tp)
end
function c101109060.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101109060.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
--春化精の花冠
--
--Script by Trishula9
function c101109061.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add setcode
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH))
e2:SetCode(EFFECT_ADD_SETCODE)
e2:SetValue(0x281)
c:RegisterEffect(e2)
--change cost
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(101109061)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
end
--スキャッター・フュージョン
--
--Script by Trishula9
function c101109062.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101109062)
e2:SetCondition(c101109062.condition)
e2:SetTarget(c101109062.target)
e2:SetOperation(c101109062.operation)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetOperation(c101109062.desop)
c:RegisterEffect(e3)
end
function c101109062.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c101109062.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c101109062.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c101109062.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and not c:IsRace(RACE_ROCK) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101109062.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c101109062.filter0,tp,LOCATION_DECK,0,nil)
local res=Duel.IsExistingMatchingCard(c101109062.filter2,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(c101109062.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101109062.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(c101109062.filter1,tp,LOCATION_DECK,0,nil,e)
local sg1=Duel.GetMatchingGroup(c101109062.filter2,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(c101109062.filter2,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()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
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)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
e:GetHandler():SetCardTarget(tc)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101109062.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101109062.splimit(e,c)
return not c:IsSetCard(0x1047) and c:IsLocation(LOCATION_EXTRA)
end
function c101109062.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--メルフィーとにらめっこ
--
--Script by JoyJ
function c101109063.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,101109063)
e1:SetCost(c101109063.cost)
e1:SetTarget(c101109063.target)
e1:SetOperation(c101109063.operation)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(43175027,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101109063+100)
e2:SetCondition(c101109063.atkcon)
e2:SetTarget(c101109063.atktg)
e2:SetOperation(c101109063.atkop)
c:RegisterEffect(e2)
--atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(c101109063.atkval)
c:RegisterEffect(e3)
e3:SetLabelObject(e2)
end
function c101109063.cfilter(c,tp)
return not c:IsPublic() and c:IsRace(RACE_BEAST) and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(c101109063.cfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c)
end
function c101109063.cfilter2(c,oc)
return not c:IsCode(oc:GetCode()) and c:IsAbleToHand() and c:IsSetCard(0x146) and c:IsType(TYPE_MONSTER)
end
function c101109063.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
e:SetLabel(1)
return Duel.IsExistingMatchingCard(c101109063.cfilter,tp,LOCATION_HAND,0,1,nil,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101109063.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
e:SetLabelObject(g:GetFirst())
end
function c101109063.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local b=e:GetLabel()
e:SetLabel(0)
return b==1
end
e:GetLabelObject():CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetLabelObject(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109063.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101109063.cfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
function c101109063.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c101109063.atkfilter(c)
return not c:IsPublic() and c:IsSetCard(0x146) and c:IsType(TYPE_MONSTER)
end
function c101109063.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109063.atkfilter,tp,LOCATION_HAND,0,1,nil) end
end
function c101109063.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101109063,2))
local g=Duel.SelectMatchingCard(tp,c101109063.atkfilter,tp,LOCATION_HAND,0,1,99,nil)
if #g==0 then return end
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetDescription(66)
e1:SetCode(EFFECT_PUBLIC)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(101109063,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
g:KeepAlive()
local g2=e:GetLabelObject()
if g2 then g2:DeleteGroup() end
e:SetLabelObject(g)
end
function c101109063.sum(c)
if c:GetFlagEffect(101109063)==0 then return 0 end
return c:GetAttack()+c:GetDefense()
end
function c101109063.atkval(e,c)
local g=e:GetLabelObject():GetLabelObject()
if g and #g>0 then
return -g:GetSum(c101109063.sum)
end
return 0
end
--ラヴェナス・ヴェンデット
--
--Script by Trishula9
function c101109064.initial_effect(c)
aux.AddCodeList(c,101109040)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101109064+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101109064.target)
e1:SetOperation(c101109064.activate)
c:RegisterEffect(e1)
end
function c101109064.filter(c)
return c:IsSetCard(0x106)
end
function c101109064.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk,mc)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local lv=level_function(c)
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal)
local res=mg:CheckSubGroup(c101109064.rcheck,1,lv,tp,c,lv,greater_or_equal,mc)
Auxiliary.GCheckAdditional=nil
return res
end
function c101109064.rcheck(g,tp,c,lv,greater_or_equal,mc)
return Auxiliary.RitualCheck(g,tp,c,lv,greater_or_equal) and g:IsContains(mc)
end
function c101109064.spfilter(c,e,tp)
if not (c:IsSetCard(0x106) and not c:IsCode(101109040)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)) then return false end
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_MZONE)
mg:AddCard(c)
if c:IsLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
local res=Duel.IsExistingMatchingCard(c101109064.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c101109064.filter,e,tp,mg,nil,Card.GetLevel,"Greater",true,c)
e1:Reset()
return res
else
return Duel.IsExistingMatchingCard(c101109064.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c101109064.filter,e,tp,mg,nil,Card.GetLevel,"Greater",true,c)
end
end
function c101109064.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109064.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsPlayerCanSpecialSummonCount(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c101109064.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101109064.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
Duel.ConfirmCards(1-tp,sc)
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101109064.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c101109064.filter,e,tp,mg,nil,Card.GetLevel,"Greater",true,sc)
local tc=tg:GetFirst()
local mat
if tc then
Duel.BreakEffect()
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local lv=Card.GetLevel(tc)
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(tc,lv,"Greater")
mat=mg:SelectSubGroup(tp,c101109064.rcheck,false,1,lv,tp,tc,lv,"Greater",sc)
Auxiliary.GCheckAdditional=nil
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
--P.U.N.K.JAMエクストリーム・セッション
--
--Script by Trishula9
function c101109065.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCost(c101109065.spcost)
e2:SetTarget(c101109065.sptg)
e2:SetOperation(c101109065.spop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PAY_LPCOST)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(2,101109065)
e3:SetCondition(c101109065.drcon)
e3:SetTarget(c101109065.drtg)
e3:SetOperation(c101109065.drop)
c:RegisterEffect(e3)
end
function c101109065.costfilter(c)
return c:IsSetCard(0x171) and c:IsAbleToRemoveAsCost()
end
function c101109065.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109065.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101109065.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101109065.spfilter(c,e,tp)
return c:IsSetCard(0x171) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109065.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109065.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101109065.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,c101109065.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function c101109065.drcon(e,tp,eg,ep,ev,re,r,rp)
if not (tp==ep and re and re:IsActivated() and re:GetActivateLocation()==LOCATION_MZONE) then return false end
local rc=re:GetHandler()
return rc:IsRelateToEffect(re) and rc:IsRace(RACE_PSYCHO)
or not rc:IsRelateToEffect(re) and rc:GetPreviousRaceOnField()&RACE_PSYCHO~=0
end
function c101109065.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101109065.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
--六花来々
--
--Script by Trishula9
function c101109066.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,101109066)
e2:SetCondition(c101109066.stcon)
e2:SetTarget(c101109066.sttg)
e2:SetOperation(c101109066.stop)
c:RegisterEffect(e2)
--release replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_EXTRA_RELEASE_NONSUM)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(aux.TRUE)
e3:SetCountLimit(1)
e3:SetValue(c101109066.relval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(101109066)
c:RegisterEffect(e4)
end
function c101109066.filter(c)
return c:IsSetCard(0x141) and c:IsFaceup()
end
function c101109066.stcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101109066.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c101109066.stfilter(c)
return c:IsSetCard(0x141) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSSetable()
end
function c101109066.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c101109066.stfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c101109066.stop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c101109066.stfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101109066.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101109066.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function c101109066.relval(e,re,r,rp)
return re:IsActivated() and re:GetHandler():IsSetCard(0x141) and bit.band(r,REASON_COST)~=0
end
--月女神の鏃
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function s.tgfilter(c,tp)
return c:IsAbleToGraveAsCost() and Duel.IsExistingTarget(s.tdfilter,tp,0,LOCATION_MZONE,1,nil,c:GetType())
end
function s.tdfilter(c,type)
return c:IsFaceup() and c:IsAbleToDeck() and c:GetType()&type&(TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_PENDULUM|TYPE_LINK)>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.tdfilter(chkc,e:GetLabel()) end
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
local type=g:GetFirst():GetType()
e:SetLabel(type)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectTarget(tp,s.tdfilter,tp,0,LOCATION_MZONE,1,1,nil,type)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,1,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(s.chainlm)
end
end
function s.chainlm(re,rp,tp)
return tp==rp or not re:GetHandler():IsType(TYPE_MONSTER)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--無千ジャミング
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(s.atkcon1)
e2:SetOperation(s.atkop1)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DESTROYED)
e3:SetOperation(s.atkop2)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsAttackAbove(1000)
end
function s.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function s.atkop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(tc:GetAttack()%1000)
tc:RegisterEffect(e1)
if tc:IsDefenseAbove(0) then
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(tc:GetDefense()%1000)
tc:RegisterEffect(e2)
end
end
end
function s.atkop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetAttack()%1000)
tc:RegisterEffect(e1)
if tc:IsDefenseAbove(0) then
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(tc:GetDefense()%1000)
tc:RegisterEffect(e2)
end
end
end
--フェイバリット・コンタクト
--Script by JSY1728
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,89943723)
aux.AddSetNameMonsterList(c,0x3008)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.fstg)
e1:SetOperation(s.fsop)
c:RegisterEffect(e1)
end
function s.fsfilter1(c,e)
return (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsType(TYPE_MONSTER)
and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function s.fsfilter2(c,e,tp,m,chkf)
if not (c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0x8)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end
aux.FCheckAdditional=c.hero_fusion_check or s.fscheck
local res=c:CheckFusionMaterial(m,nil,chkf,true)
aux.FCheckAdditional=nil
return res
end
function s.fscheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionSetCard,1,nil,0x8)
end
function s.fscfilter(c)
return c:IsLocation(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED) or (c:IsLocation(LOCATION_MZONE) and c:IsFacedown())
end
function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp|0x200
local mg=Duel.GetMatchingGroup(s.fsfilter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
return Duel.IsExistingMatchingCard(s.fsfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,chkf) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.dfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsControler(tp)
end
function s.exfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsCode(89943723)
end
function s.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp|0x200
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.fsfilter1),tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg=Duel.GetMatchingGroup(s.fsfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,chkf)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
aux.FCheckAdditional=tc.hero_fusion_check or s.fscheck
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf,true)
aux.FCheckAdditional=nil
local cf=mat:Filter(s.fscfilter,nil)
if cf:GetCount()>0 then
Duel.ConfirmCards(1-tp,cf)
end
if #mat>0 and Duel.SendtoDeck(mat,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then
local p=tp
for i=1,2 do
local dg=mat:Filter(s.dfilter,nil,p)
if #dg>1 then
Duel.SortDecktop(tp,p,#dg)
end
for i=1,#dg do
local mg=Duel.GetDecktopGroup(p,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
p=1-tp
end
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
if mat:IsExists(s.exfilter,1,nil) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TO_DECK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
--分かつ烙印
--
--Script by Trishula9
function c101109070.initial_effect(c)
aux.AddCodeList(c,68468459)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101109070+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c101109070.cost)
e1:SetTarget(c101109070.target)
e1:SetOperation(c101109070.activate)
c:RegisterEffect(e1)
end
function c101109070.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c101109070.rfilter1(c,tp)
return c:IsType(TYPE_FUSION) and (c:IsControler(tp) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c)>0
end
function c101109070.rfilter2(c,tp)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,68468459) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>1
end
function c101109070.spfilter1(c,e,tp)
return not c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c101109070.spfilter2(c,e,tp)
return not c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101109070.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local b1=ft>0 and Duel.CheckReleaseGroup(tp,c101109070.rfilter1,1,nil,tp)
and Duel.IsExistingTarget(c101109070.spfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,2,nil,e,tp)
local b2=ft==0 and Duel.CheckReleaseGroup(tp,c101109070.rfilter2,1,nil,tp)
and Duel.IsExistingTarget(c101109070.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,2,nil,e,tp)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c101109070.spfilter1(chkc,e,tp) end
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return not Duel.IsPlayerAffectedByEffect(tp,59822133) and (b1 or b2)
end
e:SetLabel(0)
if b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c101109070.rfilter2,1,1,nil,tp)
local tc=g:GetFirst()
e:SetLabelObject(tc)
Duel.Release(g,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectTarget(tp,c101109070.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,2,2,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,2,0,0)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c101109070.rfilter1,1,1,nil,tp)
local tc=g:GetFirst()
e:SetLabelObject(tc)
Duel.Release(g,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectTarget(tp,c101109070.spfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,2,2,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,2,0,0)
end
end
function c101109070.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if ft1<=0 and ft2<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==2 then
local b=aux.IsMaterialListCode(e:GetLabelObject(),68468459)
if b and ft1>1 and g:FilterCount(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false,POS_FACEUP_DEFENSE)==2
and Duel.SelectYesNo(tp,aux.Stringid(101109070,0)) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
else
if ft1>0 and ft2==0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101109070,1))
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
elseif ft1==0 and ft2>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101109070,2))
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,1-tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101109070,1))
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummonStep(sg:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep((g-sg):GetFirst(),0,tp,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
end
end
--壱世壊に軋む爪音
--
--Script by JoyJ
function c101109071.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101109071)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c101109071.condition)
e1:SetTarget(c101109071.target)
e1:SetOperation(c101109071.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101109071)
e2:SetCondition(c101109071.thcon)
e2:SetTarget(c101109071.thtg)
e2:SetOperation(c101109071.thop)
c:RegisterEffect(e2)
end
function c101109071.actcfilter(c)
return ((c:IsSetCard(0x284) and c:IsLocation(LOCATION_MZONE)) or c:IsCode(56099748)) and c:IsFaceup()
end
function c101109071.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101109071.actcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c101109071.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c101109071.tgfilter(c)
return c:IsSetCard(0x284) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function c101109071.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101109071.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101109071.posfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c101109071.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c101109071.posfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101109071.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101109071.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c101109071.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c101109071.thfilter(c)
return c:IsSetCard(0x284) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101109071.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101109071.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101109071.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101109071.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101109071.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
--壱世壊に奏でる哀唱
--
--Script by JoyJ
function c101109072.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--quick
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109072,0))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101109072)
e2:SetCondition(c101109072.condition)
e2:SetTarget(c101109072.target)
e2:SetOperation(c101109072.activate)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,101109072+100)
e3:SetCondition(c101109072.thcon)
e3:SetTarget(c101109072.thtg)
e3:SetOperation(c101109072.thop)
c:RegisterEffect(e3)
end
function c101109072.actcfilter(c)
return ((c:IsSetCard(0x284) and c:IsLocation(LOCATION_MZONE)) or c:IsCode(56099748)) and c:IsFaceup()
end
function c101109072.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101109072.actcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c101109072.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
end
function c101109072.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.AdjustInstantly()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c101109072.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c101109072.thfilter(c)
return c:IsSetCard(0x284) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101109072.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109072.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109072.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109072.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
--壱世壊に澄み渡る残響
--
--Script by JoyJ
function c101109073.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,101109073)
e1:SetCondition(c101109073.condition)
e1:SetTarget(c101109073.target)
e1:SetOperation(c101109073.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101109073)
e2:SetCondition(c101109073.thcon)
e2:SetTarget(c101109073.thtg)
e2:SetOperation(c101109073.thop)
c:RegisterEffect(e2)
end
function c101109073.actcfilter(c)
return ((c:IsSetCard(0x284) and c:IsLocation(LOCATION_MZONE)) or c:IsCode(56099748)) and c:IsFaceup()
end
function c101109073.condition(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c101109073.actcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c101109073.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c101109073.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109073.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
end
function c101109073.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
ec:CancelToGrave()
if Duel.SendtoDeck(ec,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101109073.cfilter,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
end
function c101109073.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c101109073.thfilter(c)
return c:IsSetCard(0x284) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToHand()
end
function c101109073.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101109073.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101109073.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101109073.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101109073.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
--春化精の暦替
--
--Script by Trishula9
function c101109074.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101109074)
e1:SetTarget(c101109074.target)
e1:SetOperation(c101109074.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,101109074+100)
e2:SetCondition(c101109074.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101109074.sptg)
e2:SetOperation(c101109074.spop)
c:RegisterEffect(e2)
end
function c101109074.filter(c,e,tp)
return c:IsSetCard(0x281) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c101109074.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101109074.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101109074.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101109074.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
end
function c101109074.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if aux.NecroValleyNegateCheck(tc) then return end
if not aux.NecroValleyFilter()(tc) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
function c101109074.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and aux.exccon(e,tp,eg,ep,ev,re,r,rp)
end
function c101109074.spfilter(c,e,tp)
return c:IsSetCard(0x281) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109074.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101109074.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c101109074.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101109074.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or g:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local ct=math.min(g:GetClassCount(Card.GetCode),ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,ct,ct)
if not sg then return end
local fid=e:GetHandler():GetFieldID()
local tc=sg:GetFirst()
while tc do
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
tc:RegisterFlagEffect(101109074,RESET_EVENT+RESETS_STANDARD,0,1,fid)
end
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
sg:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(sg)
e1:SetCondition(c101109074.thcon)
e1:SetOperation(c101109074.thop)
Duel.RegisterEffect(e1,tp)
end
function c101109074.thfilter(c,fid)
return c:GetFlagEffectLabel(101109074)==fid
end
function c101109074.thcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local g=e:GetLabelObject()
if not g:IsExists(c101109074.thfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c101109074.thop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c101109074.thfilter,nil,e:GetLabel())
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
--春化精と花蕾
--
--Script by Trishula9
function c101109075.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101109075+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c101109075.target)
e1:SetOperation(c101109075.activate)
c:RegisterEffect(e1)
end
function c101109075.cfilter(c)
return c:IsSummonLocation(LOCATION_GRAVE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()
end
function c101109075.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c101109075.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c101109075.thfilter(chkc) end
local g=Duel.GetMatchingGroup(c101109075.cfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return #g>0 and Duel.IsExistingTarget(c101109075.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local ct=g:GetClassCount(Card.GetCode)
local sg=Duel.SelectTarget(tp,c101109075.thfilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount()*2,0,0)
end
function c101109075.sfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() and c:IsAbleToHand()
end
function c101109075.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
local ct=g:GetCount()
local g2=Duel.GetMatchingGroup(c101109075.sfilter,tp,LOCATION_MZONE,0,nil)
if g2:GetCount()<ct then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g2:Select(tp,ct,ct,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
--エクソシスター・リタニア
--Scripted by mallu11
function c101109076.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+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,101109076+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101109076.condition)
e1:SetCost(c101109076.cost)
e1:SetTarget(c101109076.target)
e1:SetOperation(c101109076.activate)
c:RegisterEffect(e1)
if not c101109076.global_check then
c101109076.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetCondition(c101109076.checkcon)
ge1:SetOperation(c101109076.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c101109076.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_XYZ)
end
function c101109076.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsSummonType,nil,SUMMON_TYPE_XYZ)
local tc=g:GetFirst()
while tc do
if Duel.GetFlagEffect(tc:GetSummonPlayer(),101109076)==0 then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),101109076,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(0,101109076)>0 and Duel.GetFlagEffect(1,101109076)>0 then
break
end
tc=g:GetNext()
end
end
function c101109076.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x172)
end
function c101109076.condition(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
return ct>0 and ct==Duel.GetMatchingGroupCount(c101109076.cfilter,tp,LOCATION_MZONE,0,nil)
end
function c101109076.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
end
function c101109076.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c101109076.xyzfilter(c)
return c:IsSetCard(0x172) and c:IsXyzSummonable(nil)
end
function c101109076.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
local b1=Duel.IsExistingMatchingCard(c101109076.xyzfilter,tp,LOCATION_EXTRA,0,1,nil)
local b2=Duel.GetFlagEffect(tp,101109076)>0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(101109076,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(101109076,1)
opval[off-1]=2
off=off+1
end
ops[off]=aux.Stringid(101109076,2)
opval[off-1]=3
off=off+1
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101109076.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.XyzSummon(tp,g:GetFirst(),nil)
elseif opval[op]==2 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
--A・∀・TT
function c101109077.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c101109077.cost)
e1:SetTarget(c101109077.target)
e1:SetOperation(c101109077.operation)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101109077)
e2:SetCondition(c101109077.stcon)
e2:SetTarget(c101109077.sttg)
e2:SetOperation(c101109077.stop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_CHAIN_END+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101109077)
e3:SetCondition(c101109077.rmcon)
e3:SetTarget(c101109077.rmtg)
e3:SetOperation(c101109077.rmop)
c:RegisterEffect(e3)
end
function c101109077.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c101109077.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c101109077.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function c101109077.filter(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x15b) or c:IsControler(1-tp))
end
function c101109077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101109077.filter(chkc,tp) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c101109077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c101109077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101109077.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101109077.eqlimit)
c:RegisterEffect(e1)
end
elseif c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then
c:CancelToGrave(false)
end
end
function c101109077.eqlimit(e,c)
return c:IsSetCard(0x15b) or c:IsControler(1-e:GetHandlerPlayer())
end
function c101109077.stcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsControler(tp)
end
function c101109077.stfilter(c)
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c101109077.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec and ec:IsCanChangePosition()
and Duel.IsExistingMatchingCard(c101109077.stfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,ec,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function c101109077.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
local g=Duel.GetMatchingGroup(c101109077.stfilter,tp,LOCATION_GRAVE,0,nil)
if ec and c:IsRelateToEffect(e)
and Duel.ChangePosition(ec,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0
and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET)
local sg=g:Select(1-tp,1,1,nil)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
end
end
end
function c101109077.rmcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsControler(1-tp)
end
function c101109077.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec and ec:IsAbleToRemove(tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,ec,1,0,0)
end
function c101109077.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if ec and c:IsRelateToEffect(e) and Duel.Remove(ec,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
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(ec)
e1:SetCountLimit(1)
e1:SetOperation(c101109077.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c101109077.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--現世離レ
--Scripted by mallu11
function c101109078.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
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,101109078+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101109078.target)
e1:SetOperation(c101109078.activate)
c:RegisterEffect(e1)
end
function c101109078.tgfilter(c,e,tp)
return c:IsAbleToGrave() and Duel.IsExistingTarget(c101109078.setfilter,tp,0,LOCATION_GRAVE,1,nil,c,e,tp)
end
function c101109078.setfilter(c,cc,e,tp)
local b1=Duel.GetMZoneCount(1-tp,cc,tp)>0
local st=Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)
local b2=st>0 or cc:IsLocation(LOCATION_SZONE) and cc:GetSequence()<5 and st>-1
return b1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)
or (b2 or c:IsType(TYPE_FIELD)) and c:IsSSetable(true)
end
function c101109078.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101109078.tgfilter,tp,0,LOCATION_ONFIELD,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectTarget(tp,c101109078.tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil,e,tp)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g2=Duel.SelectTarget(tp,c101109078.setfilter,tp,0,LOCATION_GRAVE,1,1,nil,g1:GetFirst(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,0,0)
if g2:GetFirst():IsType(TYPE_MONSTER) then
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0)
else
e:SetCategory(CATEGORY_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g2,1,0,0)
end
end
function c101109078.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc1=e:GetLabelObject()
local tc2=tg:GetFirst()
if tc2==tc1 then tc2=tg:GetNext() end
if tc1:IsRelateToEffect(e) and Duel.SendtoGrave(tc1,REASON_EFFECT)~=0 and tc1:IsLocation(LOCATION_GRAVE)
and tc2:IsRelateToEffect(e) then
if tc2:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(tc2,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
else
Duel.SSet(tp,tc2,1-tp)
end
end
end
--龍皇の波動
--
--Script by Trishula9
function c101109079.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,101109079+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101109079.condition)
e1:SetTarget(c101109079.target)
e1:SetOperation(c101109079.activate)
c:RegisterEffect(e1)
end
function c101109079.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:GetActivateLocation()==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c101109079.target(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 c101109079.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c101109079.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(c101109079.filter,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and rc:IsType(TYPE_MONSTER) and rc:IsLocation(LOCATION_GRAVE) and aux.NecroValleyFilter()(rc)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and rc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.SelectYesNo(tp,aux.Stringid(101109079,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
if sg:GetCount()>0 and Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)>0 and sg:GetFirst():IsLocation(LOCATION_REMOVED) then
Duel.SpecialSummonStep(rc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(RESET_TURN_SET)
rc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
end
end
--砂塵の大ハリケーン
--Scripted by mallu11
function c101109080.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
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,101109080+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101109080.target)
e1:SetOperation(c101109080.activate)
c:RegisterEffect(e1)
end
function c101109080.filter(c)
return c:IsFacedown() and c:GetSequence()<5 and c:IsAbleToHand()
end
function c101109080.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101109080.filter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c101109080.filter,tp,LOCATION_SZONE,0,1,c) and c:IsAbleToHand() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c101109080.filter,tp,LOCATION_SZONE,0,1,5,c)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c101109080.cfilter(c,e)
return c:IsRelateToEffect(e) and c:IsFacedown()
end
function c101109080.fselect(g,ft)
local fc=g:FilterCount(Card.IsType,nil,TYPE_FIELD)
return fc<=1 and #g-fc<=ft
end
function c101109080.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c101109080.cfilter,nil,e)
if c:IsRelateToEffect(e) and tg:GetCount()>0 then
c:CancelToGrave()
tg:AddCard(c)
if Duel.SendtoHand(tg,nil,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_HAND)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_HAND,0,nil)
if #og>0 and g:CheckSubGroup(c101109080.fselect,#og,#og,ft) and Duel.SelectYesNo(tp,aux.Stringid(101109080,0)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:SelectSubGroup(tp,c101109080.fselect,false,#og,#og,ft)
Duel.SSet(tp,sg,tp,false)
end
end
end
end
--空母軍貫-しらうお型特務艦
function c21293424.initial_effect(c)
aux.AddCodeList(c,24639891,78362751)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--apply the effect
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c21293424.valcheck)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21293424,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,21293424)
e1:SetCondition(c21293424.effcon)
e1:SetTarget(c21293424.efftg)
e1:SetOperation(c21293424.effop)
c:RegisterEffect(e1)
e0:SetLabelObject(e1)
--protection
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c21293424.indescon)
e2:SetTarget(c21293424.indestg)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c21293424.atkval)
c:RegisterEffect(e3)
end
function c21293424.valcheck(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=0
if c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 then flag=flag|1 end
if c:GetMaterial():FilterCount(Card.IsCode,nil,78362751)>0 then flag=flag|2 end
e:GetLabelObject():SetLabel(flag)
end
function c21293424.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c21293424.thfilter(c)
return c:IsSetCard(0x166) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c21293424.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local chk1=e:GetLabel()&1>0
local chk2=e:GetLabel()&2>0
if chk==0 then return chk1 and Duel.IsPlayerCanDraw(tp,1)
or chk2 and Duel.IsExistingMatchingCard(c21293424.thfilter,tp,LOCATION_DECK,0,1,nil) end
e:SetCategory(0)
if chk1 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if chk2 then
e:SetCategory(e:GetCategory()|(CATEGORY_TOHAND+CATEGORY_SEARCH))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c21293424.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chk1=e:GetLabel()&1>0
local chk2=e:GetLabel()&2>0
if chk1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if chk2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21293424.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c21293424.indescon(e)
return Duel.IsExistingMatchingCard(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function c21293424.indestg(e,c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsSetCard(0x166)
end
function c21293424.atkval(e,c)
return c:GetBaseDefense()
end
--六花深々
function c32557233.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(32557233,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,32557233+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c32557233.target)
e1:SetOperation(c32557233.activate)
c:RegisterEffect(e1)
--cost
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(32557233,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,32557233+EFFECT_COUNT_CODE_OATH)
e2:SetCost(c32557233.cost)
e2:SetTarget(c32557233.target2)
e2:SetOperation(c32557233.activate2)
c:RegisterEffect(e2)
end
function c32557233.spfilter(c,e,tp,check)
return c:IsSetCard(0x141) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and (check or Duel.IsExistingMatchingCard(c32557233.spfilter2,tp,LOCATION_GRAVE,0,1,c,e,tp))
end
function c32557233.spfilter2(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c32557233.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c32557233.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,true)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c32557233.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c32557233.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,true)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c32557233.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>1 and (c:IsControler(tp) or c:IsFaceup()) and (c:IsRace(RACE_PLANT) or c:IsHasEffect(101109066))
end
function c32557233.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.CheckReleaseGroup(tp,c32557233.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c32557233.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c32557233.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==1 or Duel.GetLocationCount(tp,LOCATION_MZONE)>1
if chk==0 then
e:SetLabel(0)
return res and e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingMatchingCard(c32557233.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsPlayerCanSpecialSummonCount(tp,2)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE)
end
function c32557233.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c32557233.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,true)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
if e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c32557233.spfilter2),tp,LOCATION_GRAVE,0,1,nil,e,tp) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c32557233.spfilter2),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
end
--六花精スノードロップ
function c33491462.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33491462,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,33491462)
e1:SetCost(c33491462.spcost)
e1:SetTarget(c33491462.sptg)
e1:SetOperation(c33491462.spop)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33491462,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33491463)
e2:SetTarget(c33491462.lvtg)
e2:SetOperation(c33491462.lvop)
c:RegisterEffect(e2)
end
function c33491462.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>1 and (c:IsControler(tp) or c:IsFaceup()) and (c:IsRace(RACE_PLANT) or c:IsHasEffect(101109066))
end
function c33491462.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c33491462.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c33491462.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c33491462.spfilter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33491462.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c33491462.spfilter,tp,LOCATION_HAND,0,1,c,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND)
end
function c33491462.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33491462.spfilter,tp,LOCATION_HAND,0,1,1,c,e,tp)
if g:GetCount()>0 then
g:AddCard(c)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
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(c33491462.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c33491462.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function c33491462.lvfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsLevelAbove(1)
end
function c33491462.lvfilter1(c,tp)
return c33491462.lvfilter(c) and Duel.IsExistingMatchingCard(c33491462.lvfilter2,tp,LOCATION_MZONE,0,1,c,c:GetLevel())
end
function c33491462.lvfilter2(c,lv)
return c33491462.lvfilter(c) and not c:IsLevel(lv)
end
function c33491462.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33491462.lvfilter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c33491462.lvfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c33491462.lvfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c33491462.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
local lv=tc:GetLevel()
local g=Duel.GetMatchingGroup(c33491462.lvfilter,tp,LOCATION_MZONE,0,nil)
local lc=g:GetFirst()
while lc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
lc:RegisterEffect(e1)
lc=g:GetNext()
end
end
--六花精ヘレボラス
function c60880471.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60880471,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,60880471)
e1:SetCondition(c60880471.discon)
e1:SetCost(c60880471.discost)
e1:SetTarget(c60880471.distg)
e1:SetOperation(c60880471.disop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60880471,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60880472)
e2:SetCost(c60880471.spcost)
e2:SetTarget(c60880471.sptg)
e2:SetOperation(c60880471.spop)
c:RegisterEffect(e2)
end
function c60880471.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x141)
end
function c60880471.tfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c60880471.discon(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not re:IsActiveType(TYPE_MONSTER) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not Duel.IsExistingMatchingCard(c60880471.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
return tg and tg:IsExists(c60880471.tfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c60880471.discost(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 c60880471.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c60880471.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c60880471.spfilter(c,tp)
return (c:IsControler(tp) or c:IsFaceup()) and (c:IsRace(RACE_PLANT) or c:IsHasEffect(101109066)) and Duel.GetMZoneCount(tp,c)>0
end
function c60880471.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c60880471.spfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c60880471.spfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c60880471.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c60880471.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=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)
end
end
end
--六花の薄氷
function c68941332.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68941332,0))
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,68941332+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c68941332.target)
e1:SetOperation(c68941332.activate)
c:RegisterEffect(e1)
--cost
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(68941332,1))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,68941332+EFFECT_COUNT_CODE_OATH)
e2:SetCost(c68941332.cost)
e2:SetTarget(c68941332.target2)
e2:SetOperation(c68941332.activate2)
c:RegisterEffect(e2)
end
function c68941332.filter(c,check)
return c:IsFaceup() and (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT)
and (check or c:IsAbleToChangeControler())
end
function c68941332.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c68941332.filter,tp,0,LOCATION_MZONE,1,nil,true) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c68941332.filter,tp,0,LOCATION_MZONE,1,1,nil,true)
end
function c68941332.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true)
end
end
function c68941332.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup()) and (c:IsRace(RACE_PLANT) or c:IsHasEffect(101109066))
and Duel.IsExistingTarget(c68941332.filter,tp,0,LOCATION_MZONE,1,c)
end
function c68941332.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c68941332.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c68941332.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c68941332.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingTarget(c68941332.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c68941332.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c68941332.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and tc:IsAbleToChangeControler() then
Duel.BreakEffect()
if Duel.GetControl(tc,tp,PHASE_END,1)~=0 then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_PLANT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
end
end
--六花絢爛
function c69164989.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69164989,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,69164989+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c69164989.target)
e1:SetOperation(c69164989.activate)
c:RegisterEffect(e1)
--cost
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69164989,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,69164989+EFFECT_COUNT_CODE_OATH)
e2:SetCost(c69164989.cost)
e2:SetTarget(c69164989.target2)
e2:SetOperation(c69164989.activate2)
c:RegisterEffect(e2)
end
function c69164989.thfilter(c,tp,check)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x141) and c:IsAbleToHand()
and (check or Duel.IsExistingMatchingCard(c69164989.thfilter2,tp,LOCATION_DECK,0,1,c,c:GetCode(),c:GetOriginalLevel()))
end
function c69164989.thfilter2(c,code,lv)
return c:IsRace(RACE_PLANT) and not c:IsCode(code) and c:GetOriginalLevel()==lv and c:IsAbleToHand()
end
function c69164989.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69164989.thfilter,tp,LOCATION_DECK,0,1,nil,tp,true) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c69164989.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c69164989.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp,true)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c69164989.costfilter(c,tp)
return (c:IsControler(tp) or c:IsFaceup()) and (c:IsRace(RACE_PLANT) or c:IsHasEffect(101109066))
end
function c69164989.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c69164989.costfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c69164989.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c69164989.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingMatchingCard(c69164989.thfilter,tp,LOCATION_DECK,0,1,nil,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c69164989.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c69164989.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()==0 then
g=Duel.SelectMatchingCard(tp,c69164989.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp,true)
end
local tc=g:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and tc:IsLocation(LOCATION_HAND)
and Duel.IsExistingMatchingCard(c69164989.thfilter2,tp,LOCATION_DECK,0,1,nil,tc:GetCode(),tc:GetOriginalLevel()) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c69164989.thfilter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode(),tc:GetOriginalLevel())
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
--六花精ボタン
function c71002019.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71002019,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,71002019)
e1:SetCost(c71002019.spcost)
e1:SetTarget(c71002019.sptg)
e1:SetOperation(c71002019.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71002019,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,71002020)
e2:SetTarget(c71002019.thtg)
e2:SetOperation(c71002019.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c71002019.thcon)
c:RegisterEffect(e3)
end
function c71002019.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup()) and (c:IsRace(RACE_PLANT) or c:IsHasEffect(101109066))
end
function c71002019.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c71002019.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c71002019.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c71002019.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c71002019.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
end
function c71002019.thfilter(c)
return c:IsSetCard(0x141) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c71002019.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71002019.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71002019.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71002019.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c71002019.thcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)&RACE_PLANT~=0
end
--弩級軍貫-いくら型一番艦
function c75215744.initial_effect(c)
aux.AddCodeList(c,24639891,61027400)
--xyz procedure
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--apply the effect
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c75215744.valcheck)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75215744,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,75215744)
e1:SetCondition(c75215744.effcon)
e1:SetTarget(c75215744.efftg)
e1:SetOperation(c75215744.effop)
c:RegisterEffect(e1)
e0:SetLabelObject(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75215744,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c75215744.descon)
e2:SetTarget(c75215744.destg)
e2:SetOperation(c75215744.desop)
c:RegisterEffect(e2)
end
function c75215744.valcheck(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=0
if c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 then flag=flag|1 end
if c:GetMaterial():FilterCount(Card.IsCode,nil,61027400)>0 then flag=flag|2 end
e:GetLabelObject():SetLabel(flag)
end
function c75215744.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c75215744.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local chk1=e:GetLabel()&1>0
local chk2=e:GetLabel()&2>0
if chk==0 then return (chk1 and Duel.IsPlayerCanDraw(tp,1) or chk2) end
if chk1 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else
e:SetCategory(0)
end
end
function c75215744.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chk1=e:GetLabel()&1>0
local chk2=e:GetLabel()&2>0
if chk1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if chk2 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c75215744.descon(e,tp,eg,ep,ev,re,r,rp)
local rc=eg:GetFirst()
return ep~=tp and rc:IsControler(tp) and rc:IsSetCard(0x166) and rc:IsSummonLocation(LOCATION_EXTRA)
end
function c75215744.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c75215744.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
--超弩級軍貫-うに型二番艦
function c94798725.initial_effect(c)
aux.AddCodeList(c,24639891,42377643)
--xyz summon
aux.AddXyzProcedure(c,nil,5,2)
c:EnableReviveLimit()
--apply the effect
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c94798725.valcheck)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(94798725,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,94798725)
e1:SetCondition(c94798725.effcon)
e1:SetTarget(c94798725.efftg)
e1:SetOperation(c94798725.effop)
c:RegisterEffect(e1)
e0:SetLabelObject(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(94798725,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1)
e2:SetCondition(c94798725.discon)
e2:SetTarget(c94798725.distg)
e2:SetOperation(c94798725.disop)
c:RegisterEffect(e2)
end
function c94798725.valcheck(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=0
if c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 then flag=flag|1 end
if c:GetMaterial():FilterCount(Card.IsCode,nil,42377643)>0 then flag=flag|2 end
e:GetLabelObject():SetLabel(flag)
end
function c94798725.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c94798725.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local chk1=e:GetLabel()&1>0
local chk2=e:GetLabel()&2>0
if chk==0 then return (chk1 and Duel.IsPlayerCanDraw(tp,1) or chk2) end
if chk1 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else
e:SetCategory(0)
end
end
function c94798725.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chk1=e:GetLabel()&1>0
local chk2=e:GetLabel()&2>0
if chk1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if chk2 and c:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c94798725.discon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local turn=Duel.GetTurnPlayer()
return (turn==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) or turn==1-tp and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
end
function c94798725.ctfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsSetCard(0x166)
end
function c94798725.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetMatchingGroupCount(c94798725.ctfilter,tp,LOCATION_ONFIELD,0,nil)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c94798725.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=tg:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
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)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
tc=tg:GetNext()
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment