Commit eeb10506 authored by mercury233's avatar mercury233

update new cards

parent 7ddfd1b6
#created by ... #created by ...
#main #main
100200189
100311025
100415002
100415013
100415014
100415017
100415018
100415019
100415021
100415022
100415023
100415030
100415001 100415001
100415003 100415003
100415004 100415004
100415005
100415006
100415007
100415008
100415009 100415009
100415010 100415010
100415011 100415011
...@@ -32,12 +40,17 @@ ...@@ -32,12 +40,17 @@
100311001 100311001
100311026 100311026
#extra #extra
100415015
100415016
100415005
100415006
100415007
100415008
100311051 100311051
!side !side
100267001 100271246
100267002 100271247
100267003 100271248
100200184 100200184
100200185 100200185
100200186 100200186
100200187
#The first line is used for comment #The first line is used for comment
!setname 0x250 龙辉巧 !setname 0x250 龙辉巧
!setname 0x251 法典贤者 !setname 0x251 大贤者
!setname 0x252 姬丝基勒
!setname 0x253 璃拉
!setname 0x254 邪恶★双子
--カオス・グレファー
--
--Script by JoyJ
function c100200189.initial_effect(c)
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200189,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,100200189)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c100200189.sgcost)
e2:SetTarget(c100200189.sgtg)
e2:SetOperation(c100200189.sgop)
c:RegisterEffect(e2)
end
function c100200189.sgcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c100200189.tgfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsDiscardable()
and Duel.IsExistingMatchingCard(c100200189.tgfilter2,tp,LOCATION_DECK,0,1,nil,c:GetAttribute())
end
function c100200189.tgfilter2(c,attr)
return c:IsAbleToGrave() and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT)
and not c:IsAttribute(attr)
end
function c100200189.sgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c100200189.tgfilter,tp,LOCATION_HAND,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=Duel.SelectMatchingCard(tp,c100200189.tgfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
e:SetLabel(tc:GetAttribute())
Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100200189.sgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100200189.tgfilter2,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
local tc=g:GetFirst()
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
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:SetLabel(tc:GetCode())
e1:SetTarget(c100200189.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c100200189.splimit(e,c)
return c:IsCode(e:GetLabel())
end
--Successor Soul
--Scripted by TOP
function c100271246.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100271246,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100271246+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100271246.cost)
e1:SetTarget(c100271246.target)
e1:SetOperation(c100271246.activate)
c:RegisterEffect(e1)
if not c100271246.global_check then
c100271246.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetOperation(c100271246.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c100271246.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p=tc:GetControler()
if tc:GetFlagEffect(100271246)==0 then
tc:RegisterFlagEffect(100271246,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(p,100271246)==0 then
Duel.RegisterFlagEffect(p,100271246,RESET_PHASE+PHASE_END,0,1)
else
Duel.RegisterFlagEffect(p,100271246+100,RESET_PHASE+PHASE_END,0,1)
end
end
end
function c100271246.costfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_EFFECT) and (c:IsFaceup() or c:IsControler(tp))
end
function c100271246.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,100271246+100)==0
and Duel.CheckReleaseGroup(tp,c100271246.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c100271246.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
--cannot attack
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c100271246.atkcon)
e1:SetTarget(c100271246.atktg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100271246.atkcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),100271246)~=0
end
function c100271246.atktg(e,c)
return c:GetFlagEffect(100271246)==0
end
function c100271246.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToGrave()
end
function c100271246.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevelAbove(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100271246.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c100271246.filter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c100271246.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c100271246.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND+LOCATION_DECK)
end
function c100271246.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100271246.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--Strength in Unity
--Scripted by TOP
function c100271247.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100271247,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,100271247)
e2:SetCondition(c100271247.rmcon)
e2:SetTarget(c100271247.rmtg)
e2:SetOperation(c100271247.rmop)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c100271247.valcheck)
c:RegisterEffect(e4)
--Recover
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(100271247,1))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,100271247+100)
e5:SetCost(c100271247.thcost)
e5:SetTarget(c100271247.thtg)
e5:SetOperation(c100271247.thop)
c:RegisterEffect(e5)
end
function c100271247.mtfilter1(c)
return c:IsCode(89631139,46986414)
end
function c100271247.mtfilter2(c)
return c:IsFusionCode(89631139) or c:IsFusionCode(46986414)
end
function c100271247.valcheck(e,c)
local g=c:GetMaterial()
if c:IsType(TYPE_RITUAL) and g:IsExists(c100271247.mtfilter1,1,nil) then
c:RegisterFlagEffect(100271247,RESET_EVENT+0x4fe0000+RESET_PHASE+PHASE_END,0,1)
elseif c:IsType(TYPE_FUSION) and g:IsExists(c100271247.mtfilter2,1,nil) then
c:RegisterFlagEffect(100271247,RESET_EVENT+0x4fe0000+RESET_PHASE+PHASE_END,0,1)
end
end
function c100271247.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():GetFlagEffect(100271247)~=0
end
function c100271247.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return (chkc:IsOnField() or chkc:IsLocation(LOCATION_GRAVE)) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_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 c100271247.rmop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c100271247.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c100271247.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsLevelAbove(7) and (c:IsAbleToHand() or c:IsAbleToDeck())
end
function c100271247.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100271247.thfilter(c) end
if chk==0 then return Duel.IsExistingTarget(c100271247.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100271247.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND+CATEGORY_TODECK,g,1,0,0)
end
function c100271247.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsAbleToDeck() and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,aux.Stringid(100271247,2))==1) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
--Destined Rivals
--Scripted by TOP
function c100271248.initial_effect(c)
aux.AddCodeList(c,89631139,46986414)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100271248+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCondition(c100271248.condition)
e1:SetTarget(c100271248.target)
e1:SetOperation(c100271248.activate)
c:RegisterEffect(e1)
end
function c100271248.cfilter(c)
return c:IsFaceup() and c:IsCode(89631139,46986414)
end
function c100271248.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100271248.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c100271248.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c100271248.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
--疾風のドラグニティ
--
--Script by JoyJ
function c100311025.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100311025+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100311025.condition)
e1:SetTarget(c100311025.target)
e1:SetOperation(c100311025.activate)
c:RegisterEffect(e1)
end
function c100311025.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c100311025.filter(c,e,tp)
return c:IsSetCard(0x29) and (c:IsType(TYPE_TUNER) or c:IsRace(RACE_WINDBEAST)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100311025.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c100311025.filter,tp,LOCATION_DECK,0,nil,e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and g:CheckSubGroup(aux.gffcheck,2,2,Card.IsType,TYPE_TUNER,Card.IsRace,RACE_WINDBEAST)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c100311025.cfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsPreviousLocation(LOCATION_EXTRA)
end
function c100311025.matfilter(c)
return c:IsFaceup() and c:IsSetCard(0x29)
end
function c100311025.scfilter(c,mg)
return c:IsRace(RACE_DRAGON) and c:IsSynchroSummonable(nil,mg)
end
function c100311025.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTargetRange(1,0)
e3:SetTarget(c100311025.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetMatchingGroup(c100311025.filter,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.gffcheck,false,2,2,Card.IsType,TYPE_TUNER,Card.IsRace,RACE_WINDBEAST)
if not sg then return end
local ca=sg:GetFirst()
local cb=sg:GetNext()
local success=false
if Duel.SpecialSummonStep(ca,0,tp,tp,false,false,POS_FACEUP) and Duel.SpecialSummonStep(cb,0,tp,tp,false,false,POS_FACEUP) then
success=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ca:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
ca:RegisterEffect(e2)
local e3=e1:Clone()
cb:RegisterEffect(e3)
local e4=e2:Clone()
cb:RegisterEffect(e4)
end
Duel.SpecialSummonComplete()
local mg=Duel.GetMatchingGroup(c100311025.matfilter,tp,LOCATION_MZONE,0,nil)
if success and Duel.IsExistingMatchingCard(c100311025.cfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c100311025.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
and Duel.SelectYesNo(tp,aux.Stringid(100311025,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c100311025.scfilter,tp,LOCATION_EXTRA,0,1,1,nil,mg):GetFirst()
Duel.SynchroSummon(tp,tc,nil,mg)
end
end
function c100311025.splimit(e,c)
return not c:IsRace(RACE_DRAGON) and c:IsLocation(LOCATION_EXTRA)
end
--絶火の大賢者ゾロア
--
--Script by JoyJ
function c100415002.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415002,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100415002)
e1:SetTarget(c100415002.eqtg)
e1:SetOperation(c100415002.eqop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100415002,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_EQUIP)
e2:SetCountLimit(1,100415002+100)
e2:SetCondition(c100415002.spcon)
e2:SetTarget(c100415002.sptg)
e2:SetOperation(c100415002.spop)
c:RegisterEffect(e2)
end
function c100415002.eqfilter(c,tp)
return c:IsSetCard(0x251) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c100415002.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x251)
end
function c100415002.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100415002.cfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c100415002.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c100415002.eqfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100415002.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_EXTRA)
end
function c100415002.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c100415002.eqfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local sc=g:GetFirst()
if not Duel.Equip(tp,sc,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(c100415002.eqlimit)
sc:RegisterEffect(e1)
end
end
function c100415002.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c100415002.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSetCard,1,nil,0x251)
end
function c100415002.spfilter(c,e,tp)
return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(100415002)
end
function c100415002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100415002.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 c100415002.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100415002.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g<1 then return end
local tc=g:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) 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)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
...@@ -29,7 +29,10 @@ end ...@@ -29,7 +29,10 @@ end
function c100415010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100415010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local check=c100415010.chkfilter(tp,TYPE_FUSION) and c100415010.chkfilter(tp,TYPE_SYNCHRO) and c100415010.chkfilter(tp,TYPE_XYZ) and c100415010.chkfilter(tp,TYPE_LINK) local check=c100415010.chkfilter(tp,TYPE_FUSION) and c100415010.chkfilter(tp,TYPE_SYNCHRO) and c100415010.chkfilter(tp,TYPE_XYZ) and c100415010.chkfilter(tp,TYPE_LINK)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100415010.filter(chkc,tp,check) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100415010.filter(chkc,tp,check) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 local b=e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if b then ft=ft-1 end
if chk==0 then return ft>0
and Duel.IsExistingTarget(c100415010.filter,tp,LOCATION_MZONE,0,1,nil,tp,check) end and Duel.IsExistingTarget(c100415010.filter,tp,LOCATION_MZONE,0,1,nil,tp,check) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c100415010.filter,tp,LOCATION_MZONE,0,1,1,nil,tp,check) Duel.SelectTarget(tp,c100415010.filter,tp,LOCATION_MZONE,0,1,1,nil,tp,check)
......
--Live☆Twin キスキル
--
--Script by JustFish
function c100415013.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100415013)
e1:SetCondition(c100415013.spcon)
e1:SetTarget(c100415013.sptg)
e1:SetOperation(c100415013.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Recover
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100415013.reccon)
e3:SetOperation(c100415013.recop)
c:RegisterEffect(e3)
end
function c100415013.spcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==1
end
function c100415013.spfilter(c,e,tp)
return c:IsSetCard(0x253) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100415013.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100415013.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c100415013.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,c100415013.spfilter,tp,LOCATION_HAND+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 c100415013.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
function c100415013.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,100415013)
Duel.Recover(tp,500,REASON_EFFECT)
end
--Live☆Twin リィラ
--
--Script by JustFish
function c100415014.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415014,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100415014)
e1:SetCondition(c100415014.spcon)
e1:SetTarget(c100415014.sptg)
e1:SetOperation(c100415014.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--attack cost
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ATTACK_COST)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetCost(c100415014.atcost)
e3:SetOperation(c100415014.atop)
c:RegisterEffect(e3)
end
function c100415014.spcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==1
end
function c100415014.spfilter(c,e,tp)
return c:IsSetCard(0x252) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100415014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100415014.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c100415014.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,c100415014.spfilter,tp,LOCATION_HAND+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 c100415014.atcost(e,c)
local tp=e:GetHandlerPlayer()
return Duel.CheckLPCost(1-tp,500)
end
function c100415014.atop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
Duel.Hint(HINT_CARD,0,100415014)
Duel.PayLPCost(1-tp,500)
end
--Evil★Twin キスキル
--
--Script by JustFish
function c100415015.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c100415015.lcheck)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415015,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,100415015)
e1:SetCondition(c100415015.drcon)
e1:SetTarget(c100415015.drtg)
e1:SetOperation(c100415015.drop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100415015,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,100415015+100)
e2:SetCondition(c100415015.spcon)
e2:SetTarget(c100415015.sptg)
e2:SetOperation(c100415015.spop)
c:RegisterEffect(e2)
end
function c100415015.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x252)
end
function c100415015.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x253)
end
function c100415015.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100415015.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100415015.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 c100415015.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c100415015.spcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and not Duel.IsExistingMatchingCard(c100415015.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100415015.spfilter(c,e,tp)
return c:IsSetCard(0x253) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100415015.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100415015.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100415015.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100415015.spfilter),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
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(c100415015.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100415015.splimit(e,c)
return not c:IsRace(RACE_FIEND) and c:IsLocation(LOCATION_EXTRA)
end
--Evil★Twin リィラ
--
--Script by JustFish
function c100415016.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c100415016.lcheck)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415016,0))
e1:SetCategory(CATEGORY_DESTROY)
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,100415016)
e1:SetCondition(c100415016.descon)
e1:SetTarget(c100415016.destg)
e1:SetOperation(c100415016.desop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100415016,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,100415016+100)
e2:SetCondition(c100415016.spcon)
e2:SetTarget(c100415016.sptg)
e2:SetOperation(c100415016.spop)
c:RegisterEffect(e2)
end
function c100415016.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x253)
end
function c100415016.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x252)
end
function c100415016.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100415016.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100415016.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(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100415016.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 c100415016.spcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and not Duel.IsExistingMatchingCard(c100415016.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100415016.spfilter(c,e,tp)
return c:IsSetCard(0x252) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100415016.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100415016.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100415016.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100415016.spfilter),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
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(c100415016.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100415016.splimit(e,c)
return not c:IsRace(RACE_FIEND) and c:IsLocation(LOCATION_EXTRA)
end
--Evil★Twins キスキル・リィラ
--
--Script by JustFish
function c100415017.initial_effect(c)
c:EnableReviveLimit()
--special summon 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)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(c100415017.sprcon)
e1:SetTarget(c100415017.sprtg)
e1:SetOperation(c100415017.sprop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100415017,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,100415017)
e2:SetTarget(c100415017.tgtg)
e2:SetOperation(c100415017.tgop)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100415017.con)
e3:SetValue(2200)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
end
function c100415017.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp):Filter(Card.IsType,nil,TYPE_LINK)
return rg:CheckSubGroup(aux.mzctcheckrel,2,2,tp)
end
function c100415017.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetReleaseGroup(tp):Filter(Card.IsType,nil,TYPE_LINK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,aux.mzctcheckrel,true,2,2,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c100415017.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_COST)
g:DeleteGroup()
end
function c100415017.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()-2
if ct<1 then return end
if chk==0 then return Duel.IsPlayerCanSendtoGrave(1-tp) and g:IsExists(Card.IsAbleToGrave,1,nil,1-tp,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,ct,0,0)
end
function c100415017.tgop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSendtoGrave(1-tp) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()-2
if ct>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(1-tp,Card.IsAbleToGrave,ct,ct,nil,1-tp,nil)
Duel.SendtoGrave(sg,REASON_RULE)
end
end
function c100415017.cfilter(c,setcode)
return c:IsFaceup() and c:IsSetCard(setcode)
end
function c100415017.con(e)
local tp=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(c100415017.cfilter,tp,LOCATION_MZONE,0,1,nil,0x252)
and Duel.IsExistingMatchingCard(c100415017.cfilter,tp,LOCATION_MZONE,0,1,nil,0x253)
end
--Live☆Twin エントランス
--
--Script by JoyJ
function c100415018.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415018,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100415018+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100415018.cost)
e1:SetTarget(c100415018.target)
e1:SetOperation(c100415018.activate)
c:RegisterEffect(e1)
end
function c100415018.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c100415018.filter(c,e,tp)
return c:IsSetCard(0x252,0x253) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100415018.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100415018.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100415018.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100415018.filter,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
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(c100415018.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100415018.splimit(e,c)
return not c:IsSetCard(0x254) and c:IsLocation(LOCATION_EXTRA)
end
--Live☆Twin チャンネル
--
--Script by JoyJ
function c100415019.initial_effect(c)
--Activate(no effect)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--negate attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100415019,0))
e2:SetCountLimit(1,100415019)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_FZONE)
e2:SetCost(c100415019.cost1)
e2:SetOperation(c100415019.operation1)
c:RegisterEffect(e2)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100415019,1))
e3:SetCountLimit(1,100415019+100)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCondition(c100415019.condition2)
e3:SetTarget(c100415019.target2)
e3:SetOperation(c100415019.operation2)
c:RegisterEffect(e3)
end
function c100415019.cfilter1(c,tp)
return c:IsSetCard(0x252,0x253)
and (c:IsControler(tp) or c:IsFaceup()) and c:IsReleasable()
end
function c100415019.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100415019.cfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,c100415019.cfilter1,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
function c100415019.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
function c100415019.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END
end
function c100415019.tgfilter2(c,check)
return c:IsSetCard(0x252,0x253) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToDeck() or (check and c:IsAbleToHand()))
end
function c100415019.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local check=Duel.GetMatchingGroupCount(nil,tp,LOCATION_MZONE,0,nil)==0
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100415019.tgfilter2(chkc,check) end
if chk==0 then return Duel.IsExistingTarget(c100415019.tgfilter2,tp,LOCATION_GRAVE,0,1,nil,check) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100415019.tgfilter2,tp,LOCATION_GRAVE,0,1,1,nil,check)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c100415019.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if Duel.GetMatchingGroupCount(nil,tp,LOCATION_MZONE,0,nil)==0 and tc:IsAbleToHand()
and (not tc:IsAbleToDeck() or Duel.SelectOption(tp,1190,aux.Stringid(100415019,2))==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
else
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
--Evil★Twin チャレンジ
--
--Script by JoyJ
function c100415021.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100415021+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100415021.target)
e1:SetOperation(c100415021.activate)
c:RegisterEffect(e1)
end
function c100415021.tgfilter(c,e,tp)
return c:IsSetCard(0x252,0x253) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100415021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp)
and c100415021.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c100415021.tgfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c100415021.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100415021.linkfilter(c)
return c:IsLinkSummonable(nil) and c:IsSetCard(0x254)
end
function c100415021.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.GetMZoneCount(tp)<1
or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local g=Duel.GetMatchingGroup(c100415021.linkfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100415021,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.LinkSummon(tp,sg:GetFirst(),nil)
end
end
--Evil★Twin イージーゲーム
--
--Script by JoyJ
function c100415022.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(100415022,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCost(aux.TRUE)
c:RegisterEffect(e0)
--attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415022,1))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,100415022)
e1:SetCost(c100415022.cost1)
e1:SetTarget(c100415022.target1)
e1:SetOperation(c100415022.activate1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100415022,2))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,100415022)
e3:SetCondition(c100415022.condition2)
e3:SetCost(c100415022.cost2)
e3:SetTarget(c100415022.target2)
e3:SetOperation(c100415022.activate2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
c:RegisterEffect(e4)
end
function c100415022.tgfilter1(c)
return c:IsSetCard(0x252,0x253) and c:IsFaceup()
end
function c100415022.cfilter1(c,tp)
return c:IsSetCard(0x252,0x253)
and (c:IsControler(tp) or c:IsFaceup()) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsExistingTarget(c100415022.tgfilter1,tp,LOCATION_MZONE,0,1,c)
end
function c100415022.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100415022.cfilter1,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,c100415022.cfilter1,1,1,nil,tp)
e:SetLabel(sg:GetFirst():GetBaseAttack())
Duel.Release(sg,REASON_COST)
end
function c100415022.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100415022.tgfilter1(c) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100415022.tgfilter1,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100415022.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c100415022.condition2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end
function c100415022.cfilter2(c,tp)
return c:IsSetCard(0x252,0x253)
and (c:IsControler(tp) or c:IsFaceup()) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c100415022.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100415022.cfilter2,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,c100415022.cfilter2,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
function c100415022.target2(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 c100415022.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--Evil★Twin プレゼント
--
--Script by JoyJ
function c100415023.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415023,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100415023+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100415023.condition)
e1:SetTarget(c100415023.target1)
e1:SetOperation(c100415023.activate1)
c:RegisterEffect(e1)
--Activate2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100415023,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100415023+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c100415023.condition)
e2:SetTarget(c100415023.target2)
e2:SetOperation(c100415023.activate2)
c:RegisterEffect(e2)
end
function c100415023.cfilter(c,setcode)
return c:IsSetCard(setcode) and c:IsFaceup()
end
function c100415023.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100415023.cfilter,tp,LOCATION_MZONE,0,1,nil,0x252)
and Duel.IsExistingMatchingCard(c100415023.cfilter,tp,LOCATION_MZONE,0,1,nil,0x253)
end
function c100415023.tgfilter1a(c)
local tp=c:GetControler()
return c:IsSetCard(0x252,0x253)
and c:IsFaceup() and c:IsAbleToChangeControler()
and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function c100415023.tgfilter1b(c)
local tp=c:GetControler()
return c:IsFaceup() and c:IsAbleToChangeControler()
and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function c100415023.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c100415023.tgfilter1a,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c100415023.tgfilter1b,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g1=Duel.SelectTarget(tp,c100415023.tgfilter1a,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g2=Duel.SelectTarget(tp,c100415023.tgfilter1b,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0)
end
function c100415023.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local a=g:GetFirst()
local b=g:GetNext()
if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then
Duel.SwapControl(a,b)
end
end
function c100415023.tgfilter2(c)
return c:IsFacedown() and c:IsAbleToDeck()
end
function c100415023.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c100415023.tgfilter1(chkc) and chkc:IsLocation(LOCATION_SZONE)
and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c100415023.tgfilter2,tp,0,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100415023.tgfilter2,tp,0,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c100415023.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
--竜儀巧-メテオニス=QUA
--Scripted by mallu11
function c100415030.initial_effect(c)
c:EnableReviveLimit()
--cannot be effect target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c100415030.efilter)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100415030,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100415030)
e2:SetCondition(c100415030.descon)
e2:SetTarget(c100415030.destg)
e2:SetOperation(c100415030.desop)
c:RegisterEffect(e2)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c100415030.matcon)
e0:SetOperation(c100415030.matop)
c:RegisterEffect(e0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c100415030.valcheck)
e3:SetLabelObject(e0)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100415030,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,100415130)
e4:SetCondition(c100415030.spcon)
e4:SetTarget(c100415030.sptg)
e4:SetOperation(c100415030.spop)
c:RegisterEffect(e4)
end
function c100415030.efilter(e,re,rp)
return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c100415030.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function c100415030.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(100415030,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(100415030,2))
end
function c100415030.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function c100415030.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(c100415030.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c100415030.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(100415030)>0
end
function c100415030.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100415030.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c100415030.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function c100415030.spfilter(c,e,tp)
return c:IsSetCard(0x250) and c:IsAttackAbove(1) and not c:IsCode(100415030) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100415030.fselect(g)
return g:GetSum(Card.GetAttack)==4000
end
function c100415030.gcheck(g)
return g:GetSum(Card.GetAttack)<=4000
end
function c100415030.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100415030.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if chk==0 then
if ft<=0 then return false end
local ct=math.min(ft,#g)
aux.GCheckAdditional=c100415030.gcheck
local res=g:CheckSubGroup(c100415030.fselect,1,ct)
aux.GCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100415030.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100415030.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if ft<=0 then return end
local ct=math.min(ft,#g)
aux.GCheckAdditional=c100415030.gcheck
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c100415030.fselect,false,1,ct)
aux.GCheckAdditional=nil
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
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