Commit 0a7fab2e authored by mercury233's avatar mercury233

update new cards

parent 56c94b03
#created by ...
#main
100415001
100415003
100415004
100415005
100415006
100415007
100415008
100415009
100415010
100415011
100415012
100311024
100311034
100200188
......
......@@ -7,3 +7,4 @@
!setname 0x114e 电脑堺门 電脳堺門
!setname 0x14f 双天
!setname 0x250 龙辉巧
!setname 0x251 法典贤者
--法典の大賢者クロウリー
--Scripted by mallu11
function c100415001.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100415001)
e1:SetCost(c100415001.spcost)
e1:SetTarget(c100415001.sptg)
e1:SetOperation(c100415001.spop)
c:RegisterEffect(e1)
--att change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100415001,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100415101)
e2:SetTarget(c100415001.atttg)
e2:SetOperation(c100415001.attop)
c:RegisterEffect(e2)
--equip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100415001,2))
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100415201)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c100415001.eqtg)
e3:SetOperation(c100415001.eqop)
c:RegisterEffect(e3)
end
function c100415001.costfilter(c,tp)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function c100415001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100415001.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100415001.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c100415001.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 c100415001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c100415001.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,0xff-e:GetHandler():GetAttribute())
e:SetLabel(aat)
end
function c100415001.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c100415001.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x251)
end
function c100415001.eqfilter(c)
return c:IsSetCard(0x251) and c:IsType(TYPE_MONSTER) and not c:IsLevel(4)
end
function c100415001.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100415001.tgfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c100415001.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c100415001.eqfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c100415001.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function c100415001.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100415001.eqfilter),tp,LOCATION_GRAVE,0,1,1,nil)
local ec=g:GetFirst()
if ec then
if not Duel.Equip(tp,ec,tc) then return end
--equip limit
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c100415001.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1)
end
end
end
function c100415001.eqlimit(e,c)
return c==e:GetLabelObject()
end
--結晶の大賢者サンドリヨン
--Scripted by mallu11
function c100415003.initial_effect(c)
--to hand/to grave
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100415003)
e1:SetTarget(c100415003.target)
e1:SetOperation(c100415003.operation)
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(100415003,2))
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100415103)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c100415003.eqtg)
e3:SetOperation(c100415003.eqop)
c:RegisterEffect(e3)
end
function c100415003.thfilter(c)
return c:IsSetCard(0x251) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100415003.rtfilter(c)
return c:IsFaceup() and c:IsLevelBelow(4) and c:IsRace(RACE_SPELLCASTER)
end
function c100415003.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.IsExistingMatchingCard(c100415003.thfilter,tp,LOCATION_DECK,0,1,nil) then sel=sel+1 end
if Duel.IsExistingMatchingCard(c100415003.rtfilter,tp,LOCATION_REMOVED,0,1,nil) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
local sel=e:GetLabel()
if sel==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
sel=Duel.SelectOption(tp,aux.Stringid(100415003,0),aux.Stringid(100415003,1))+1
elseif sel==1 then
Duel.SelectOption(tp,aux.Stringid(100415003,0))
else
Duel.SelectOption(tp,aux.Stringid(100415003,1))
end
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
else
e:SetCategory(CATEGORY_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED)
end
end
function c100415003.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100415003.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100415003.rtfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT+REASON_RETURN)
end
end
end
function c100415003.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x251)
end
function c100415003.eqfilter(c)
return c:IsSetCard(0x251) and c:IsType(TYPE_MONSTER) and not c:IsLevel(4)
end
function c100415003.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100415003.tgfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c100415003.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c100415003.eqfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c100415003.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function c100415003.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100415003.eqfilter),tp,LOCATION_GRAVE,0,1,1,nil)
local ec=g:GetFirst()
if ec then
if not Duel.Equip(tp,ec,tc) then return end
--equip limit
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c100415003.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1)
end
end
end
function c100415003.eqlimit(e,c)
return c==e:GetLabelObject()
end
--聖魔の大賢者エンディミオン
--Scripted by mallu11
function c100415004.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415004,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100415004)
e1:SetTarget(c100415004.eqtg)
e1:SetOperation(c100415004.eqop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100415004,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100415104)
e2:SetTarget(c100415004.drtg)
e2:SetOperation(c100415004.drop)
c:RegisterEffect(e2)
end
function c100415004.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x251)
end
function c100415004.eqfilter(c)
return c:IsSetCard(0x251) and c:IsType(TYPE_MONSTER)
end
function c100415004.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100415004.tgfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c100415004.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c100415004.eqfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c100415004.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_EXTRA)
end
function c100415004.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c100415004.eqfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local ec=g:GetFirst()
if ec then
if not Duel.Equip(tp,ec,tc) then return end
--equip limit
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c100415004.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1)
end
end
end
function c100415004.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c100415004.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
function c100415004.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c100415004.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100415004.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c100415004.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c100415004.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.Draw(tp,1,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
--法典の守護者アイワス
--Scripted by mallu11
function c100415005.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x251),aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),true)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415005,0))
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,100415005)
e1:SetCondition(c100415005.eqcon)
e1:SetTarget(c100415005.eqtg)
e1:SetOperation(c100415005.eqop)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function c100415005.eqcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c100415005.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=e:GetHandler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,0,0,0)
end
function c100415005.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or not c:IsControler(tp) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c100415005.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
if tc:IsControler(1-tp) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_SET_CONTROL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetOwnerPlayer(tp)
e3:SetValue(c100415005.ctval)
c:RegisterEffect(e3)
end
end
function c100415005.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c100415005.ctval(e,c)
return e:GetOwnerPlayer()
end
--絶火の竜神ヴァフラム
--Scripted by mallu11
function c100415006.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destroy(destroyed)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415006,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100415006)
e1:SetCondition(c100415006.descon)
e1:SetTarget(c100415006.destg)
e1:SetOperation(c100415006.desop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c100415006.indesval)
c:RegisterEffect(e2)
--destroy(equip)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100415006,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_START)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,100415106)
e3:SetCondition(c100415006.descon2)
e3:SetTarget(c100415006.destg2)
e3:SetOperation(c100415006.desop2)
c:RegisterEffect(e3)
end
function c100415006.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c100415006.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100415006.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c100415006.indesval(e,re,rp)
return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c100415006.descon2(e,tp,eg,ep,ev,re,r,rp)
local etc=e:GetHandler():GetEquipTarget()
if not etc then return false end
local bc=etc:GetBattleTarget()
e:SetLabelObject(bc)
return bc and bc:IsControler(1-tp) and bc:IsRelateToBattle()
end
function c100415006.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function c100415006.desop2(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc and bc:IsControler(1-tp) and bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
--結晶の女神ニンアルル
--Scripted by mallu11
function c100415007.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),4,2)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415007,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100415007)
e1:SetCost(c100415007.thcost)
e1:SetTarget(c100415007.thtg)
e1:SetOperation(c100415007.thop)
c:RegisterEffect(e1)
--extra attack monster
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e2:SetValue(1)
c:RegisterEffect(e2)
--destroy(equip)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100415007,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,100415107)
e3:SetCondition(c100415007.descon)
e3:SetTarget(c100415007.destg)
e3:SetOperation(c100415007.desop)
c:RegisterEffect(e3)
end
function c100415007.thcost(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 c100415007.thfilter(c)
return c:IsLevelAbove(4) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function c100415007.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100415007.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100415007.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100415007.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100415007.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 c100415007.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function c100415007.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x251) and c:GetSequence()<5
end
function c100415007.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c100415007.desfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c100415007.desfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
g:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100415007.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--聖魔の乙女アルテミス
--Scripted by mallu11
function c100415008.initial_effect(c)
c:SetSPSummonOnce(100415008)
--link summon
aux.AddLinkProcedure(c,c100415008.mfilter,1,1)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100415008,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100415008)
e1:SetCondition(c100415008.eqcon)
e1:SetTarget(c100415008.eqtg)
e1:SetOperation(c100415008.eqop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to hand(equip)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100415008,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,100415108)
e3:SetCondition(c100415008.thcon)
e3:SetTarget(c100415008.thtg)
e3:SetOperation(c100415008.thop)
c:RegisterEffect(e3)
end
function c100415008.mfilter(c)
return c:IsLevelBelow(4) and c:IsLinkRace(RACE_SPELLCASTER)
end
function c100415008.confilter(c)
return c:IsFaceup() and c:IsSetCard(0x251)
end
function c100415008.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100415008.confilter,1,nil) and not eg:IsContains(e:GetHandler())
end
function c100415008.eqfilter(c,g)
return g:IsContains(c)
end
function c100415008.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c100415008.confilter,nil)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100415008.eqfilter(chkc,g) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c100415008.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,g) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c100415008.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c100415008.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or not c:IsControler(tp) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c100415008.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c100415008.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c100415008.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function c100415008.thfilter(c)
return c:IsSetCard(0x251) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100415008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100415008.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100415008.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100415008.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--三賢者の書
--Scripted by mallu11
function c100415009.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c100415009.indtg)
e1:SetValue(c100415009.indct)
c:RegisterEffect(e1)
--special summon(spellcaster)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100415009,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100415009)
e2:SetTarget(c100415009.sptg)
e2:SetOperation(c100415009.spop)
c:RegisterEffect(e2)
--special summon(マギストス)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100415009,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,100415009)
e3:SetCost(c100415009.spcost2)
e3:SetTarget(c100415009.sptg2)
e3:SetOperation(c100415009.spop2)
c:RegisterEffect(e3)
end
function c100415009.indtg(e,c)
return c:IsSetCard(0x251) and c:GetEquipCount()>0
end
function c100415009.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
function c100415009.spfilter(c,e,tp)
return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100415009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c100415009.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100415009.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,c100415009.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100415009.spcost2(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 c100415009.spfilter2(c,e,tp)
return c:IsSetCard(0x251) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100415009.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c100415009.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100415009.spop2(e,tp,eg,ep,ev,re,r,rp)
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(c100415009.spfilter2,tp,LOCATION_HAND,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if sg and #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--大いなる魔導
--Scripted by mallu11
function c100415010.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:SetCountLimit(1,100415010+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100415010.target)
e1:SetOperation(c100415010.activate)
c:RegisterEffect(e1)
end
function c100415010.filter(c,tp,check)
return c:IsFaceup() and c:IsSetCard(0x251) and Duel.IsExistingMatchingCard(c100415010.eqfilter,tp,LOCATION_EXTRA+LOCATION_MZONE+LOCATION_GRAVE,0,1,c,check)
end
function c100415010.eqfilter(c,check)
return (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsSetCard(0x251) and c:IsType(TYPE_MONSTER) and not c:IsLevel(4) or check and c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x251) and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function c100415010.gfilter(c,type)
return c:IsSetCard(0x251) and c:IsType(type)
end
function c100415010.chkfilter(tp,type)
return Duel.IsExistingMatchingCard(c100415010.gfilter,tp,LOCATION_GRAVE,0,1,nil,type)
end
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)
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
and Duel.IsExistingTarget(c100415010.filter,tp,LOCATION_MZONE,0,1,nil,tp,check) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c100415010.filter,tp,LOCATION_MZONE,0,1,1,nil,tp,check)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_EXTRA+LOCATION_MZONE+LOCATION_GRAVE)
end
function c100415010.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
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)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100415010.eqfilter),tp,LOCATION_EXTRA+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,c,check)
local ec=g:GetFirst()
if ec then
if not Duel.Equip(tp,ec,tc) then return end
--equip limit
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c100415010.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1)
end
end
end
function c100415010.eqlimit(e,c)
return c==e:GetLabelObject()
end
--聖なる法典
--Scripted by mallu11
function c100415011.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100415011+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100415011.target)
e1:SetOperation(c100415011.activate)
c:RegisterEffect(e1)
end
function c100415011.mttg(e,c)
local tc=c:GetEquipTarget()
return tc and tc:IsSetCard(0x251)
end
function c100415011.mtval(e,c)
if not c then return false end
return c:IsSetCard(0x251)
end
function c100415011.filter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c100415011.filter2(c,e)
return not c:IsImmuneToEffect(e)
end
function c100415011.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsRace,nil,1,RACE_SPELLCASTER)
end
function c100415011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local me=Effect.CreateEffect(e:GetHandler())
me:SetType(EFFECT_TYPE_FIELD)
me:SetCode(EFFECT_EXTRA_FUSION_MATERIAL)
me:SetTargetRange(LOCATION_SZONE,0)
me:SetTarget(c100415011.mttg)
me:SetValue(c100415011.mtval)
Duel.RegisterEffect(me,tp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
Auxiliary.FCheckAdditional=c100415011.fcheck
local res=Duel.IsExistingMatchingCard(c100415011.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c100415011.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
Auxiliary.FCheckAdditional=nil
me:Reset()
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100415011.activate(e,tp,eg,ep,ev,re,r,rp)
local me=Effect.CreateEffect(e:GetHandler())
me:SetType(EFFECT_TYPE_FIELD)
me:SetCode(EFFECT_EXTRA_FUSION_MATERIAL)
me:SetTargetRange(LOCATION_SZONE,0)
me:SetTarget(c100415011.mttg)
me:SetValue(c100415011.mtval)
Duel.RegisterEffect(me,tp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c100415011.filter2,nil,e)
Auxiliary.FCheckAdditional=c100415011.fcheck
local sg1=Duel.GetMatchingGroup(c100415011.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c100415011.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,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,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
Auxiliary.FCheckAdditional=nil
me:Reset()
end
--絶火の祆現
--Scripted by mallu11
function c100415012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100415012)
e1:SetTarget(c100415012.target)
e1:SetOperation(c100415012.activate)
c:RegisterEffect(e1)
--Destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100415112)
e2:SetTarget(c100415012.reptg)
e2:SetValue(c100415012.repval)
c:RegisterEffect(e2)
end
function c100415012.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x251) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100415012.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100415012.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100415012.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100415012.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100415012.activate(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 c100415012.repfilter(c,tp)
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x251) and c:GetReasonPlayer()==1-tp
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c100415012.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c100415012.repfilter,1,nil,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
return true
else return false end
end
function c100415012.repval(e,c)
return c100415012.repfilter(c,e:GetHandlerPlayer())
end
......@@ -10,7 +10,7 @@ function c101102020.initial_effect(c)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCondition(c101102020.spcon)
e1:SetOperation(c101102020.spop)
e1:SetValue(SUMMON_VALUE_SELF)
e1:SetValue(1)
c:RegisterEffect(e1)
--discard & draw
local e2=Effect.CreateEffect(c)
......@@ -58,7 +58,7 @@ function c101102020.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoGrave(g1,REASON_COST)
end
function c101102020.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c101102020.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
......
......@@ -10,7 +10,7 @@ function c101102021.initial_effect(c)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCondition(c101102021.spcon)
e1:SetOperation(c101102021.spop)
e1:SetValue(SUMMON_VALUE_SELF)
e1:SetValue(1)
c:RegisterEffect(e1)
--return to hand
local e2=Effect.CreateEffect(c)
......@@ -58,7 +58,7 @@ function c101102021.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoGrave(g1,REASON_COST)
end
function c101102021.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c101102021.rthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) 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