Commit 2afce688 authored by Vury Leo's avatar Vury Leo

Add LockedCodes

parent 9150d818
--ブルーアイズ・タイラント・ドラゴン
function c11443677.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,89631139,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),1,true,true)
-- aux.AddFusionProcCodeFun(c,89631139,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),1,true,true)
Fusion.AddFusionProcedure(c,{
slots={
Fusion.Slot.Code(89631139),
Fusion.Slot.Filter(function(mc,tc) return mc:IsRace(RACE_DRAGON) end),
}
})
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -17,9 +24,9 @@ function c11443677.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c11443677.sprcon)
e2:SetTarget(c11443677.sprtg)
e2:SetOperation(c11443677.sprop)
e2:SetCondition(s.sprcon)
e2:SetTarget(s.sprtg)
e2:SetOperation(s.sprop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
......@@ -27,7 +34,7 @@ function c11443677.initial_effect(c)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c11443677.efilter)
e3:SetValue(s.efilter)
c:RegisterEffect(e3)
--attack all
local e4=Effect.CreateEffect(c)
......@@ -37,32 +44,32 @@ function c11443677.initial_effect(c)
c:RegisterEffect(e4)
--set trap
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(11443677,0))
e5:SetDescription(aux.Stringid(id,0))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DAMAGE_STEP_END)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCondition(c11443677.setcon)
e5:SetTarget(c11443677.settg)
e5:SetOperation(c11443677.setop)
e5:SetCondition(s.setcon)
e5:SetTarget(s.settg)
e5:SetOperation(s.setop)
c:RegisterEffect(e5)
end
function c11443677.ultimate_fusion_check(tp,sg,fc)
function s.ultimate_fusion_check(tp,sg,fc)
return aux.gffcheck(sg,Card.IsFusionCode,89631139,Card.IsRace,RACE_DRAGON)
end
function c11443677.cfilter(c)
function s.cfilter(c)
return c:IsFaceup() and c:GetOriginalType()&TYPE_FUSION~=0
end
function c11443677.sprfilter(c,tp,sc)
local eqc=c:GetEquipGroup():FilterCount(c11443677.cfilter,nil)
function s.sprfilter(c,tp,sc)
local eqc=c:GetEquipGroup():FilterCount(s.cfilter,nil)
return c:IsFusionCode(89631139) and eqc>0 and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function c11443677.sprcon(e,c)
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(tp,c11443677.sprfilter,1,REASON_SPSUMMON,false,nil,tp,c)
return Duel.CheckReleaseGroupEx(tp,s.sprfilter,1,REASON_SPSUMMON,false,nil,tp,c)
end
function c11443677.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c11443677.sprfilter,nil,tp,c)
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(s.sprfilter,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
......@@ -70,31 +77,31 @@ function c11443677.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
return true
else return false end
end
function c11443677.sprop(e,tp,eg,ep,ev,re,r,rp,c)
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=e:GetLabelObject()
c:SetMaterial(Group.FromCards(tc))
Duel.Release(tc,REASON_SPSUMMON)
end
function c11443677.efilter(e,te)
function s.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function c11443677.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(11443677)==0 and aux.dsercon(e,tp,eg,ep,ev,re,r,rp)
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)==0 and aux.dsercon(e,tp,eg,ep,ev,re,r,rp)
end
function c11443677.setfilter(c)
function s.setfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c11443677.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11443677.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11443677.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c11443677.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
if e:IsCostChecked() then
e:GetHandler():RegisterFlagEffect(11443677,RESET_EVENT|RESET_TOFIELD|RESET_TURN_SET|RESET_PHASE|PHASE_END,0,0,1)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESET_TOFIELD|RESET_TURN_SET|RESET_PHASE|PHASE_END,0,0,1)
end
end
function c11443677.setop(e,tp,eg,ep,ev,re,r,rp)
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
......
--青眼の双爆裂龍
function c2129638.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeRep(c,89631139,2,true,true)
-- aux.AddFusionProcCodeRep(c,89631139,2,true,true)
Fusion.AddFusionProcedure(c,{
slots={
Fusion.Slot.Code(89631139),
Fusion.Slot.Code(89631139),
}
})
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c2129638.splimit)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
......@@ -29,30 +36,30 @@ function c2129638.initial_effect(c)
c:RegisterEffect(e4)
--remove
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(2129638,0))
e7:SetDescription(aux.Stringid(id,0))
e7:SetCategory(CATEGORY_REMOVE)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetCode(EVENT_DAMAGE_STEP_END)
e7:SetCondition(c2129638.rmcon)
e7:SetTarget(c2129638.rmtg)
e7:SetOperation(c2129638.rmop)
e7:SetCondition(s.rmcon)
e7:SetTarget(s.rmtg)
e7:SetOperation(s.rmop)
c:RegisterEffect(e7)
end
function c2129638.splimit(e,se,sp,st)
function s.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c2129638.rmcon(e,tp,eg,ep,ev,re,r,rp)
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
e:SetLabelObject(bc)
return c==Duel.GetAttacker() and aux.dsercon(e,tp,eg,ep,ev,re,r,rp)
and bc and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsOnField() and bc:IsRelateToBattle()
end
function c2129638.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabelObject():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetLabelObject(),1,0,0)
end
function c2129638.rmop(e,tp,eg,ep,ev,re,r,rp)
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsRelateToBattle() then
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
......
......@@ -6,7 +6,8 @@ function s.initial_effect(c)
local e1=FusionSpell.CreateSummonEffect(c,{
fusfilter=s.fusfilter,
pre_select_mat_location=LOCATION_HAND|LOCATION_DECK|LOCATION_MZONE,
additional_fcheck=s.fcheck
additional_fcheck=s.fcheck,
locked_codes={68468459},
})
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
......@@ -44,14 +45,14 @@ function s.fcheck(tp,mg,fc,mg_all)
if #mg_all>2 then
return false
end
if fc.branded_fusion_check~=nil then
if fc.branded_fusion_check(tp,mg_all,fc)==false then
return false
end
else
if not mg_all:IsExists(function(c) return c:IsFusionCode(68468459) end,1,nil) then
return false
end
end
-- if fc.branded_fusion_check~=nil then
-- if fc.branded_fusion_check(tp,mg_all,fc)==false then
-- return false
-- end
-- else
-- if not mg_all:IsExists(function(c) return c:IsFusionCode(68468459) end,1,nil) then
-- return false
-- end
-- end
return true
end
......@@ -3,7 +3,13 @@ local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,68468459,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),1,true,true)
-- aux.AddFusionProcCodeFun(c,68468459,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),1,true,true)
Fusion.AddFusionProcedure(c,{
slots={
Fusion.Slot.Code(68468459),
Fusion.Slot.Filter(function(mc,tc) return mc:IsFusionAttribute(ATTRIBUTE_DARK,tc:GetOwner()) end),
}
})
--spsummon
local e1=FusionSpell.CreateSummonEffect(c,{
fusfilter=s.fusfilter,
......
......@@ -10,7 +10,8 @@ function s.initial_effect(c)
{ [LOCATION_DECK]=FusionSpell.FUSION_OPERATION_GRAVE },
{ [0xff]=FusionSpell.FUSION_OPERATION_SHUFFLE }
},
stage_x_operation=s.stage_x_operation
stage_x_operation=s.stage_x_operation,
locked_codes={89631139,23995346}
})
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
......@@ -34,9 +35,9 @@ function s.fcheck(tp,mg,fc,mg_all)
if fc.ultimate_fusion_check(tp,mg_all,fc)==false then
return false
end
elseif not (mg_all:IsExists(function(c) return c:IsFusionCode(89631139) end,1,nil) and aux.IsMaterialListCode(fc,89631139)==true
or mg_all:IsExists(function(c) return c:IsFusionCode(23995346) end,1,nil) and aux.IsMaterialListCode(fc,23995346)==true) then
return false
-- elseif not (mg_all:IsExists(function(c) return c:IsFusionCode(89631139) end,1,nil) and aux.IsMaterialListCode(fc,89631139)==true
-- or mg_all:IsExists(function(c) return c:IsFusionCode(23995346) end,1,nil) and aux.IsMaterialListCode(fc,23995346)==true) then
-- return false
end
return true
end
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment