Commit de9bf820 authored by Nemo Ma's avatar Nemo Ma

upd 0521

parent 6237128d
...@@ -1561,6 +1561,19 @@ ...@@ -1561,6 +1561,19 @@
3076 0 3076 0
3077 0 3077 0
3078 0 3078 0
#230521
42610003 0
91060006 0
2147483640 0
11630204 1
29011741 1
31423201 1
43990008 1
60002125 1
65010099 1
82209010 1
98920104 1
98940002 1
#230514 #230514
88880220 1 88880220 1
88888002 1 88888002 1
...@@ -1568,7 +1581,6 @@ ...@@ -1568,7 +1581,6 @@
88880225 2 88880225 2
88897017 2 88897017 2
98920548 2 98920548 2
98940002 2
#230507 #230507
25000035 0 25000035 0
33330093 0 33330093 0
...@@ -2451,7 +2463,6 @@ ...@@ -2451,7 +2463,6 @@
40006881 0 40006881 0
40008835 0 40008835 0
40009225 0 40009225 0
40009545 0
40009730 0 40009730 0
53796033 0 53796033 0
53796034 0 53796034 0
...@@ -3541,7 +3552,6 @@ ...@@ -3541,7 +3552,6 @@
130001055 0 130001055 0
130006000 0 130006000 0
79034051 1 79034051 1
65010099 2
#210411 #210411
14010079 0 14010079 0
14010153 0 14010153 0
......
No preview for this file type
...@@ -42,16 +42,15 @@ function cm.initial_effect(c) ...@@ -42,16 +42,15 @@ function cm.initial_effect(c)
e5:SetOperation(cm.drop) e5:SetOperation(cm.drop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
-- --
local e2=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e6:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O) e6:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN) e6:SetRange(LOCATION_GRAVE)
e2:SetRange(LOCATION_GRAVE) e6:SetCountLimit(1,13131310)
e2:SetCountLimit(1,13131310) e6:SetCost(aux.bfgcost)
e2:SetCost(aux.bfgcost) e6:SetTarget(cm.settg)
e2:SetTarget(cm.settg) e6:SetOperation(cm.setop)
e2:SetOperation(cm.setop) c:RegisterEffect(e6)
c:RegisterEffect(e2)
end end
function cm.eqlimit(e,c) function cm.eqlimit(e,c)
return c:IsRace(RACE_ZOMBIE) return c:IsRace(RACE_ZOMBIE)
......
--CiNo.1000 梦幻虚光神 原数天灵·原数天地
--CiNo.1000 夢幻虚光神ヌメロニアス・ヌメロニア
function c1586275800.initial_effect(c)
--Xyz Summon
aux.AddXyzProcedure(c,nil,13,5)
c:EnableReviveLimit()
--Gains the following effects
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c1586275800.condition)
e1:SetOperation(c1586275800.operation)
c:RegisterEffect(e1)
--Negate Attack/Gains LP
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1586275800,0))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c1586275800.nacon)
e2:SetCost(c1586275800.nacost)
e2:SetTarget(c1586275800.natg)
e2:SetOperation(c1586275800.naop)
c:RegisterEffect(e2)
end
aux.xyz_number[1586275800]=1000
function c1586275800.condition(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(89477759)
end
function c1586275800.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local turn=c:GetTurnID()
--100,000 ATK
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c1586275800.atkcon)
e1:SetValue(100000)
e1:SetReset(RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--Must attack this card
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_MUST_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c1586275800.effcon)
e2:SetLabel(turn)
e2:SetReset(RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e3:SetValue(c1586275800.atklimit)
c:RegisterEffect(e3)
--Win Condition
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_TURN_END)
e4:SetCondition(c1586275800.wincon)
e4:SetOperation(c1586275800.winop)
e4:SetLabel(turn)
e4:SetReset(RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE)
c:RegisterEffect(e4)
end
function c1586275800.atkcon(e)
return Duel.GetTurnPlayer()==1-e:GetHandlerPlayer()
end
function c1586275800.effcon(e)
return Duel.GetTurnCount()>=e:GetLabel()+1
end
function c1586275800.atklimit(e,c)
return c==e:GetHandler()
end
function c1586275800.wincon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and e:GetHandler():GetBattledGroupCount()==0 and c1586275800.effcon(e)
end
function c1586275800.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_NUMERONIUS_NUMERONIA=0x21
Duel.Win(tp,WIN_REASON_NUMERONIUS_NUMERONIA)
end
function c1586275800.nacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c1586275800.nacost(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 c1586275800.natg(e,tp,eg,ep,ev,re,r,rp,chk)
local b=Duel.GetAttacker()
if chk==0 then return b and b:IsRelateToBattle() and b:IsFaceup() end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,b:GetAttack())
end
function c1586275800.naop(e,tp,eg,ep,ev,re,r,rp)
local b=Duel.GetAttacker()
if Duel.NegateAttack() and b and b:IsRelateToBattle() and b:IsFaceup() then
Duel.Recover(tp,b:GetAttack(),REASON_EFFECT)
end
end
--首言者
local m=180001
local cm=_G["c"..m]
function cm.initial_effect(c)
--code
aux.EnableChangeCode(c,29010023,LOCATION_MZONE+LOCATION_GRAVE)
--link summon
aux.AddLinkProcedure(c,cm.matfilter,1,1)
c:EnableReviveLimit()
--atk
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetOperation(cm.valop)
c:RegisterEffect(e0)
--counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.regcon)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(cm.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e3:SetCode(EFFECT_ADD_CODE)
e3:SetCondition(cm.ctcon)
e3:SetValue(22702055)
c:RegisterEffect(e3)
--Atk/def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(aux.TargetBoolFunction(Card.IsCode,29010023))
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetCondition(cm.ctcon)
e4:SetValue(1000)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,2))
e6:SetCategory(CATEGORY_DISABLE)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetCountLimit(1)
e6:SetCondition(cm.ctcon)
e6:SetCost(cm.cost)
e6:SetTarget(cm.target)
e6:SetOperation(cm.operation)
c:RegisterEffect(e6)
end
function cm.matfilter(c)
return c:IsLinkAttribute(ATTRIBUTE_WATER) and not c:IsLinkType(TYPE_LINK)
end
function cm.valop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_LINK) then return end
local tc=c:GetMaterial():GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(tc:GetPreviousAttackOnField())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function cm.ckfilter(c)
return (c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_FUSION)) or
c:IsCode(29010023)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(cm.ckfilter,1,nil) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.ctcon(e)
return e:GetHandler():GetFlagEffect(m)~=0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,29010023) end
local sg=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,29010023)
Duel.Release(sg,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
local c=e:GetHandler()
if tc then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
\ No newline at end of file
...@@ -20,7 +20,7 @@ function cm.initial_effect(c) ...@@ -20,7 +20,7 @@ function cm.initial_effect(c)
--destroy2 --destroy2
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22348247,1)) e2:SetDescription(aux.Stringid(22348247,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
......
--流星輝巧群
function c22398665.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22398665,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22398665.target)
e1:SetOperation(c22398665.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22398665,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c22398665.thcon)
e2:SetTarget(c22398665.thtg)
e2:SetOperation(c22398665.thop)
c:RegisterEffect(e2)
end
function c22398665.thcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,11612634) then
return true
else return Duel.GetFlagEffect(tp,22398665)<1 end
end
function c22398665.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x154) and c:IsAttackAbove(1000)
end
function c22398665.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c22398665.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22398665.cfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsAbleToHand() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c22398665.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.RegisterFlagEffect(tp,22398665,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c22398665.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsAttackAbove(1000) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
if not tc:IsHasEffect(EFFECT_REVERSE_UPDATE) and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
function c22398665.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterialEx(tp)--:Filter(Card.IsRace,nil,RACE_ALL)
if not Duel.IsPlayerAffectedByEffect(tp,11612607) then
mg=Duel.GetRitualMaterialEx(tp):Filter(Card.IsRace,nil,RACE_MACHINE)
end
return Duel.IsExistingMatchingCard(c22398665.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,nil,e,tp,mg,nil,aux.GetCappedAttack,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c22398665.operation(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterialEx(tp)--:Filter(Card.IsRace,nil,RACE_ALL)
if not Duel.IsPlayerAffectedByEffect(tp,11612607) then
mg=Duel.GetRitualMaterialEx(tp):Filter(Card.IsRace,nil,RACE_MACHINE)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22398665.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,nil,e,tp,mg,nil,aux.GetCappedAttack,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=c22398665.RitualCheckAdditional(tc,tc:GetAttack(),"Greater")
local mat=mg:SelectSubGroup(tp,c22398665.RitualCheck,false,1,#mg,tp,tc,tc:GetAttack(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c22398665.RitualCheckGreater(g,c,atk)
if atk==0 then return false end
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(aux.GetCappedAttack,atk)
end
function c22398665.RitualCheckEqual(g,c,atk)
if atk==0 then return false end
return g:CheckWithSumEqual(aux.GetCappedAttack,atk,#g,#g)
end
function c22398665.RitualCheck(g,tp,c,atk,greater_or_equal)
return c22398665["RitualCheck"..greater_or_equal](g,c,atk) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp))
and (not aux.RCheckAdditional or aux.RCheckAdditional(tp,g,c))
end
function c22398665.RitualCheckAdditional(c,atk,greater_or_equal)
if greater_or_equal=="Equal" then
return function(g)
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g)) and g:GetSum(aux.GetCappedAttack)<=atk
end
else
return function(g,ec)
if atk==0 then return #g<=1 end
if ec then
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g,ec)) and g:GetSum(aux.GetCappedAttack)-aux.GetCappedAttack(ec)<=atk
else
return not aux.RGCheckAdditional or aux.RGCheckAdditional(g)
end
end
end
end
function c22398665.RitualUltimateFilter(c,filter,e,tp,m1,m2,attack_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local atk=attack_function(c)
aux.GCheckAdditional=c22398665.RitualCheckAdditional(c,atk,greater_or_equal)
local res=mg:CheckSubGroup(c22398665.RitualCheck,1,#mg,tp,c,atk,greater_or_equal)
aux.GCheckAdditional=nil
return res
end
--海嗣衍生物
function c29010023.initial_effect(c)
end
--焰之巫女 米玲
if not pcall(function() require("expansions/script/c40009561") end) then require("script/c40009561") end
local m , cm = rscf.DefineCard(40009711,"BlazeMaiden")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),3,2,nil,nil,99)
c:EnableReviveLimit()
local e1 = rsef.SV_Card(c,"ormat",1,"sr",LOCATION_MZONE)
local e2 = rsef.STO(c,EVENT_SPSUMMON_SUCCESS,"tf",{1,m},nil,"de,tg",
rscon.sumtyps("xyz"),nil,
rstg.target(cm.tffilter,"tf",LOCATION_GRAVE),cm.tfop)
local e3 = rsef.STO(c,EVENT_SPSUMMON_SUCCESS,"th",{1,m},"se,th","de",
rscon.sumtyps("xyz"),nil,
rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e4 = rsef.FTF(c,EVENT_PHASE+PHASE_END,"tf",nil,"tg",nil,
LOCATION_MZONE,cm.tgcon,nil,
rsop.target({Card.IsAbleToGrave,"tg"},
{cm.tffilter,"tf",LOCATION_GRAVE }),cm.tgop)
end
function cm.tgcon(e,tp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function cm.tgop(e,tp)
local c = rscf.GetSelf(e)
if not c or Duel.SendtoGrave(c,REASON_EFFECT) <= 0 or not c:IsLocation(LOCATION_GRAVE) then return end
rsop.SelectOperate("tf",tp,aux.NecroValleyFilter(cm.tffilter),tp,LOCATION_GRAVE,0,1,1,nil,{},e,tp)
end
function cm.tffilter(c,e,tp)
return c:CheckSetCard("BlazeTalisman") and c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS) and not c:IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0
end
function cm.tfop(e,tp)
local tc = rscf.GetTargetCard()
if not tc or Duel.GetLocationCount(tp,LOCATION_SZONE) <= 0 then return end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
function cm.thfilter(c)
return c:CheckSetCard("BlazeMaiden") and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectOperate("th",tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
\ No newline at end of file
--焰之巫女 扎拉
if not pcall(function() require("expansions/script/c40009561") end) then require("script/c40009561") end
local m , cm = rscf.DefineCard(40009770,"BlazeMaiden")
function cm.initial_effect(c)
aux.AddCodeList(c,40009579)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,cm.matfilter1,nil,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_FIRE),1,99)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e4 = rsef.FTF(c,EVENT_PHASE+PHASE_END,"tf",nil,"tg",nil,
LOCATION_MZONE,cm.tgcon,nil,
rsop.target({Card.IsAbleToGrave,"tg"},
{cm.tffilter,"tf",LOCATION_GRAVE }),cm.tgop)
end
function cm.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c:CheckSetCard("BlazeMaiden")
end
function cm.costfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsDiscardable()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.spfilter(c,e,tp)
return ((c:CheckSetCard("Vairina") and c:IsType(TYPE_RITUAL)) or c:IsCode(40009579)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
end
tc:CompleteProcedure()
end
function cm.tgcon(e,tp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function cm.tgop(e,tp)
local c = rscf.GetSelf(e)
if not c or Duel.SendtoGrave(c,REASON_EFFECT) <= 0 or not c:IsLocation(LOCATION_GRAVE) then return end
rsop.SelectOperate("tf",tp,aux.NecroValleyFilter(cm.tffilter),tp,LOCATION_GRAVE,0,1,1,nil,{},e,tp)
end
function cm.tffilter(c,e,tp)
return c:CheckSetCard("BlazeTalisman") and c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS) and not c:IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0
end
\ No newline at end of file
--焰之巫女 帕拉玛
if not pcall(function() require("expansions/script/c40009561") end) then require("script/c40009561") end
local m , cm = rscf.DefineCard(40009792,"BlazeMaiden")
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(cm.ffilter),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e4 = rsef.FTF(c,EVENT_PHASE+PHASE_END,"tf",nil,"tg",nil,
LOCATION_MZONE,cm.tgcon,nil,
rsop.target({Card.IsAbleToGrave,"tg"},
{cm.tffilter,"tf",LOCATION_GRAVE }),cm.tgop)
end
function cm.ffilter(c)
return c:CheckSetCard("BlazeMaiden")
end
function cm.thfilter(c)
return c:CheckSetCard("BlazeTalisman") and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.tgcon(e,tp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function cm.tgop(e,tp)
local c = rscf.GetSelf(e)
if not c or Duel.SendtoGrave(c,REASON_EFFECT) <= 0 or not c:IsLocation(LOCATION_GRAVE) then return end
rsop.SelectOperate("tf",tp,aux.NecroValleyFilter(cm.tffilter),tp,LOCATION_GRAVE,0,1,1,nil,{},e,tp)
end
function cm.tffilter(c,e,tp)
return c:CheckSetCard("BlazeTalisman") and c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS) and not c:IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0
end
\ No newline at end of file
--焰之巫女 阿露娜
if not pcall(function() require("expansions/script/c40009561") end) then require("script/c40009561") end
local m , cm = rscf.DefineCard(40009794,"BlazeMaiden")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,cm.lcheck)
c:EnableReviveLimit()
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e4 = rsef.FTF(c,EVENT_PHASE+PHASE_END,"tf",nil,"tg",nil,
LOCATION_MZONE,cm.tgcon,nil,
rsop.target({Card.IsAbleToGrave,"tg"},
{cm.tffilter,"tf",LOCATION_GRAVE }),cm.tgop)
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,"BlazeMaiden")
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function cm.filter(c,tp)
return bit.band(c:GetType(),0x82)==0x82 and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c)
end
function cm.filter2(c,mc)
return bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToHand() and aux.IsCodeListed(mc,c:GetCode())
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,g:GetFirst())
if mg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=mg:Select(tp,1,1,nil)
g:Merge(sg)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
end
function cm.tgcon(e,tp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function cm.tgop(e,tp)
local c = rscf.GetSelf(e)
if not c or Duel.SendtoGrave(c,REASON_EFFECT) <= 0 or not c:IsLocation(LOCATION_GRAVE) then return end
rsop.SelectOperate("tf",tp,aux.NecroValleyFilter(cm.tffilter),tp,LOCATION_GRAVE,0,1,1,nil,{},e,tp)
end
function cm.tffilter(c,e,tp)
return c:CheckSetCard("BlazeTalisman") and c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS) and not c:IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0
end
\ No newline at end of file
--龙武装甲
local m=48000000
local cm=_G["c"..m]
function cm.initial_effect(c)
--level
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.lvtg)
e1:SetOperation(cm.lvop)
c:RegisterEffect(e1)
end
--level
function cm.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.lvfilter(c)
return c:IsFaceup() and c:GetLevel()>0
end
function cm.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
e:SetLabel(Duel.AnnounceLevel(tp,1,3))
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local lvl=(e:GetLabel())
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lvl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local sel=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1),aux.Stringid(m,3))
if sel==0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_RACE)
e1:SetValue(RACE_DRAGON)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if sel==1 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_RACE)
e1:SetValue(RACE_WARRIOR)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--战矛蜥蜴
local m=48000002
local cm=_G["c"..m]
function c48000002.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,48000002)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetAttacker():IsRace(RACE_WARRIOR) or Duel.GetAttacker():IsRace(RACE_DRAGON)) and Duel.GetAttacker():IsControler(tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.thfilter(c)
return c:IsCode(48000000) and c:IsAbleToHand()
end
function cm.cfilter1(c)
return (c:IsRace(RACE_WARRIOR) or c:IsRace(RACE_DRAGON)) and c:IsType(TYPE_MONSTER)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
if Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_GRAVE,0,5,nil) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
Duel.Damage(1-tp,800,REASON_EFFECT)
end
end
--赤拳之龙·多拉格尼尔
local m=48000004
local cm=_G["c"..m]
function cm.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,48000004)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsCode(48000000) and c:IsAbleToHand()
end
function cm.cfilter1(c)
return (c:IsRace(RACE_WARRIOR) or c:IsRace(RACE_DRAGON)) and c:IsType(TYPE_MONSTER)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
if Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_GRAVE,0,5,nil) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local lvl=(Duel.AnnounceLevel(tp,1,4))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lvl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function cm.filter(c)
return c:IsCode(48000000) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--战锤龙人
local m=48000006
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,48000005)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.cfilter1(c)
return (c:IsRace(RACE_WARRIOR) or c:IsRace(RACE_DRAGON)) and c:IsType(TYPE_MONSTER)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_GRAVE,0,5,nil)
end
function cm.thfilter(c)
return c:IsCode(48000010) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--龙之武装
local m=48000008
local cm=_G["c"..m]
function cm.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetCountLimit(1,48000008)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsCode(48000000) and c:IsAbleToHand()
end
function cm.cfilter1(c)
return c:IsSetCard(0xa5f) and c:IsType(TYPE_MONSTER)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
if Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--龙锤碎击
local m=48000010
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.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(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.thfilter(c)
return c:IsCode(48000000) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--灭剑炎龙
local m=48000012
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.flagcon)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetRange(LOCATION_EXTRA)
e3:SetValue(SUMMON_TYPE_SYNCHRO)
e3:SetCondition(cm.sycon)
e3:SetOperation(cm.syop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,48000012)
e1:SetCondition(cm.descon)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
end
function cm.stfilter1(c,tc,g)
local tg=g:Clone()
tg:RemoveCard(c)
return c:IsPosition(POS_FACEUP) and c:IsCanBeSynchroMaterial(tc) and c:IsSynchroType(TYPE_TUNER) and c:IsRace(RACE_DRAGON) and tg:FilterCount(cm.stfilter2,nil,tc)==tg:GetCount()
end
function cm.stfilter2(c,tc)
return c:IsRace(RACE_DRAGON) and c:IsCanBeSynchroMaterial(tc) and c:IsPosition(POS_FACEUP)
end
function cm.stfilterg(g,tp,tc,smat)
if smat then
g:AddCard(smat)
end
return g:GetSum(Card.GetLevel)>=8 and Duel.GetLocationCountFromEx(tp,tp,g,tc)>0 and g:FilterCount(cm.stfilter1,nil,tc,g)>=1
end
function cm.sycon(e,c,smat,mg)
if c==nil then return true end
local tp=c:GetControler()
if not mg then
mg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
end
if smat then
mg:RemoveCard(smat)
return mg:CheckSubGroup(cm.stfilterg,1,nil,tp,c,smat)
else
return mg:CheckSubGroup(cm.stfilterg,2,nil,tp,c,nil)
end
end
function cm.syop(e,tp,eg,ep,ev,re,r,rp,c,smat,mg)
local lv=e:GetLabel()
if not mg then
mg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
end
local g=Group.CreateGroup()
if smat then
mg:RemoveCard(smat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
g:Merge(mg:SelectSubGroup(tp,cm.stfilterg,false,1,nil,tp,c,smat))
g:AddCard(smat)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
g:Merge(mg:SelectSubGroup(tp,cm.stfilterg,false,2,nil,tp,c,nil))
end
c:SetMaterial(g)
local lvt=g:GetSum(Card.GetLevel)
e:GetLabelObject():SetLabel(g:GetSum(Card.GetLevel)-7)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
end
function cm.flagcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()>1
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()>=4 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(ep,0,1)
c:RegisterEffect(e1,true)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end
if e:GetLabel()>=1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.filter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.thfilter(c)
return c:IsCode(48000000) and c:IsAbleToHand()
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
if e:GetHandler():GetFlagEffect(m)~=0 then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--灭剑炎龙·进攻形态
local m=48000014
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.flagcon)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetRange(LOCATION_EXTRA)
e3:SetValue(SUMMON_TYPE_SYNCHRO)
e3:SetCondition(cm.sycon)
e3:SetOperation(cm.syop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,48000014)
e1:SetCondition(cm.descon)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.atkcon)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
end
function cm.stfilter1(c,tc,g)
local tg=g:Clone()
tg:RemoveCard(c)
return c:IsPosition(POS_FACEUP) and c:IsCanBeSynchroMaterial(tc) and c:IsSynchroType(TYPE_TUNER) and c:IsRace(RACE_DRAGON) and tg:FilterCount(cm.stfilter2,nil,tc)==tg:GetCount()
end
function cm.stfilter2(c,tc)
return c:IsCode(48000012) and c:GetFlagEffect(48000012)~=0 and c:IsCanBeSynchroMaterial(tc) and c:IsPosition(POS_FACEUP)
end
function cm.stfilterg(g,tp,tc,smat)
if smat then
g:AddCard(smat)
end
return g:GetSum(Card.GetLevel)>=12 and Duel.GetLocationCountFromEx(tp,tp,g,tc)>0 and g:FilterCount(cm.stfilter1,nil,tc,g)>=1
end
function cm.sycon(e,c,smat,mg)
if c==nil then return true end
local tp=c:GetControler()
if not mg then
mg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
end
if smat then
mg:RemoveCard(smat)
return mg:CheckSubGroup(cm.stfilterg,1,nil,tp,c,smat)
else
return mg:CheckSubGroup(cm.stfilterg,2,nil,tp,c,nil)
end
end
function cm.syop(e,tp,eg,ep,ev,re,r,rp,c,smat,mg)
local lv=e:GetLabel()
if not mg then
mg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
end
local g=Group.CreateGroup()
if smat then
mg:RemoveCard(smat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
g:Merge(mg:SelectSubGroup(tp,cm.stfilterg,false,1,nil,tp,c,smat))
g:AddCard(smat)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
g:Merge(mg:SelectSubGroup(tp,cm.stfilterg,false,2,nil,tp,c,nil))
end
c:SetMaterial(g)
local lvt=g:GetSum(Card.GetLevel)
e:GetLabelObject():SetLabel(g:GetSum(Card.GetLevel)-12)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
end
function cm.flagcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()>1
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()>=6 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(ep,0,1)
c:RegisterEffect(e1,true)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end
if e:GetLabel()>=1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
if e:GetLabel()>=4 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
end
end
function cm.desfilter1(c)
return c:IsFaceup() and (c:IsLevelBelow(4) or c:IsRankBelow(4) or c:IsLinkBelow(2))
end
function cm.desfilter2(c)
return c:IsFaceup() and (c:IsLevelBelow(8) or c:IsRankBelow(8) or c:IsLinkBelow(4))
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter1,tp,0,LOCATION_MZONE,1,nil) or (Duel.IsExistingMatchingCard(cm.desfilter2,tp,0,LOCATION_MZONE,1,nil) and e:GetHandler():GetFlagEffect(48000014)~=0) end
if e:GetHandler():GetFlagEffect(48000014)~=0 then
local g=Duel.GetMatchingGroup(desfilter2,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
else
local g=Duel.GetMatchingGroup(desfilter1,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(48000014)~=0 then
local g=Duel.GetMatchingGroup(desfilter2,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
else
local g=Duel.GetMatchingGroup(desfilter1,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:IsControler(tp) and (at:IsRace(RACE_DRAGON) or at:IsRace(RACE_WARRIOR))
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
if at:IsFaceup() and at:IsRelateToBattle() then
if e:GetHandler():GetFlagEffect(48000014)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
at:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
at:RegisterEffect(e1)
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
at:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
at:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--龙之决斗者-光翔
local m=48000016
local cm=_G["c"..m]
function cm.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_DRAGON) and c:IsLevelBelow(6) and c:IsAbleToGrave()
end
function cm.cfilter1(c)
return (c:IsRace(RACE_WARRIOR) or c:IsRace(RACE_DRAGON)) and c:IsType(TYPE_MONSTER)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xa5f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_GRAVE,0,5,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--坎特伯雷 小公主
function c65110002.initial_effect(c)
aux.AddCodeList(c,65110002)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,65110002)
e1:SetTarget(c65110002.thtg)
e1:SetOperation(c65110002.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c65110002.filter(c)
return c:IsSetCard(0x831) and c:IsAbleToHand() and not c:IsCode(65110002)
end
function c65110002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65110002.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65110002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65110002.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--坎特伯雷 波比
function c65110004.initial_effect(c)
aux.AddCodeList(c,65110005)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65110004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c65110004.spcon)
e1:SetTarget(c65110004.sptg)
e1:SetOperation(c65110004.spop)
c:RegisterEffect(e1)
end
function c65110004.cfilter(c)
return c:IsFaceup() and c:IsCode(65110005)
end
function c65110004.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c65110004.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c65110004.filter(c,e,tp)
return c:IsCode(65110005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65110004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65110004.filter,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 c65110004.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,c65110004.filter,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 c65110005.initial_effect(c)
aux.AddCodeList(c,65110004)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65110005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c65110005.spcon)
e1:SetTarget(c65110005.sptg)
e1:SetOperation(c65110005.spop)
c:RegisterEffect(e1)
end
function c65110005.cfilter(c)
return c:IsFaceup() and c:IsCode(65110004)
end
function c65110005.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c65110005.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c65110005.filter(c,e,tp)
return c:IsCode(65110004) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65110005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65110005.filter,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 c65110005.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,c65110005.filter,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 c65110006.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x831),2,2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x831))
e1:SetValue(400)
c:RegisterEffect(e1)
--Def
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65110006,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,65110006)
e3:SetTarget(c65110006.tg)
e3:SetCost(c65110006.cost)
e3:SetOperation(c65110006.op)
c:RegisterEffect(e3)
end
function c65110006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c65110006.filter(c,e,tp)
return c:IsLevelBelow(1) and c:IsSetCard(0x831) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c65110006.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65110006.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c65110006.splimit(e,c)
return not c:IsSetCard(0x831)
end
function c65110006.op(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,c65110006.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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c65110006.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--坎特伯雷 骑士
function c65110008.initial_effect(c)
aux.AddCodeList(c,65110002)
--link summon
aux.AddLinkProcedure(c,c65110008.mfilter,1,1)
c:EnableReviveLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c65110008.descon)
e1:SetCountLimit(1,65110008)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c65110008.tg)
e1:SetOperation(c65110008.op)
c:RegisterEffect(e1)
--at limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(c65110008.atlimit)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c65110008.atlimit)
e3:SetValue(aux.tgoval)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c65110008.atlimit)
e4:SetValue(1)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
c:RegisterEffect(e4)
end
function c65110008.atlimit(e,c)
return c:IsFaceup() and c:IsCode(65110002)
end
function c65110008.mfilter(c)
return c:IsLinkType(TYPE_NORMAL) and c:IsLinkSetCard(0x831)
end
function c65110008.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c65110008.filter(c,e,tp)
return c:IsCode(65110002) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c65110008.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65110008.filter,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 c65110008.op(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,c65110008.filter,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
\ No newline at end of file
--坎特伯雷王国
function c65110010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x831))
e2:SetValue(c65110010.val)
c:RegisterEffect(e2)
--Def
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_FZONE)
e4:SetTarget(c65110010.reptg)
e4:SetValue(c65110010.repval)
e4:SetOperation(c65110010.repop)
c:RegisterEffect(e4)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,65110010)
e3:SetCondition(c65110010.spcon)
e3:SetTarget(c65110010.sptg)
e3:SetOperation(c65110010.spop)
c:RegisterEffect(e3)
end
function c65110010.val(e,c)
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)*100
end
function c65110010.repfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x831)
and c:IsControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c65110010.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsStatus(STATUS_DESTROY_CONFIRMED)
and eg:IsExists(c65110010.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c65110010.repval(e,c)
return c65110010.repfilter(c,e:GetHandlerPlayer())
end
function c65110010.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function c65110010.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c65110010.filter(c,e,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x831) and c:IsSSetable()
end
function c65110010.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65110010.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
end
function c65110010.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c65110010.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SSet(tp,tc)
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--坎特伯雷森林遇袭
function c65110011.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:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c65110011.remcost)
e1:SetTarget(c65110011.target)
e1:SetOperation(c65110011.operation)
c:RegisterEffect(e1)
end
function c65110011.filter(c,e,tp)
return c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65110011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c65110011.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c65110011.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c65110011.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c65110011.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetValue(aux.imval1)
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:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.imval1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function c65110011.costfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c65110011.remcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c65110011.costfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c65110011.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
if Duel.Remove(g,0,REASON_COST+REASON_TEMPORARY)~=0 then
local rc=g:GetFirst()
if rc:IsType(TYPE_TOKEN) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetLabelObject(rc)
e1:SetCondition(c65110011.rtcon)
e1:SetCountLimit(1)
e1:SetOperation(c65110011.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c65110011.rtcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c65110011.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
--坎特伯雷森林旅馆
function c65110014.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65110014+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c65110014.activate)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c65110014.target)
e2:SetValue(c65110014.indct)
c:RegisterEffect(e2)
end
function c65110014.target(e,c)
return c:IsSetCard(0x831)or c:IsSetCard(0x832)
end
function c65110014.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function c65110014.filter(c)
return c:IsCode(65110015) and c:IsAbleToHand()
end
function c65110014.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c65110014.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
while not Duel.SelectYesNo(tp,aux.Stringid(65110014,0)) do
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
\ No newline at end of file
--旅馆老板娘 罗兰茵
function c65110015.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(c65110015.thtg)
e2:SetOperation(c65110015.thop)
c:RegisterEffect(e2)
end
function c65110015.thfilter(c)
return c:IsSetCard(0xa831) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c65110015.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65110015.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65110015.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65110015.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--坎特伯雷 守护者
function c65110017.initial_effect(c)
aux.AddCodeList(c,65110002)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c65110017.mfilter)
c:EnableReviveLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c65110017.descon)
e1:SetCountLimit(1,65110017)
e1:SetTarget(c65110017.tg)
e1:SetOperation(c65110017.op)
c:RegisterEffect(e1)
--at limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(c65110017.atlimit)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c65110017.atlimit)
e3:SetValue(aux.tgoval)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c65110017.atlimit)
e4:SetValue(1)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
c:RegisterEffect(e4)
end
function c65110017.mfilter(g,lc)
return g:IsExists(Card.IsLinkCode,1,nil,65110008)
end
function c65110017.atlimit(e,c)
return c:IsFaceup() and c:IsCode(65110002)
end
function c65110017.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c65110017.eqfilter(c,equip,tp)
return c:IsCode(65110019)and (c:IsAbleToHand() or equip and c:CheckUniqueOnField(tp)and not c:IsForbidden())
end
function c65110017.filter(c)
return c:IsCode(65110017) and c:IsFaceup()
end
function c65110017.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local equip=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c65110017.filter,tp,LOCATION_MZONE,0,1,nil)
return Duel.IsExistingMatchingCard(c65110017.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,equip,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c65110017.op(e,tp,eg,ep,ev,re,r,rp)
local equip=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c65110017.filter,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c65110017.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,equip,tp)
local tc=g:GetFirst()
if g:GetCount()>0 then
if equip and not tc:IsForbidden() and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,aux.Stringid(65110017,1))==1 and tc:CheckUniqueOnField(tp)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sc=Duel.SelectMatchingCard(tp,c65110017.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Equip(tp,tc,sc:GetFirst())
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--冠军之剑
function c65110019.initial_effect(c)
aux.AddCodeList(c,65110017)
c:SetUniqueOnField(1,0,65110019)
--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+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c65110019.target)
e1:SetOperation(c65110019.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c65110019.atkval)
c:RegisterEffect(e2)
--equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c65110019.eqlimit)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_SZONE)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
end
function c65110019.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x832)
end
function c65110019.atkval(e)
local g=Duel.GetMatchingGroupCount(c65110019.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
return g*500
end
function c65110019.eqlimit(e,c)
return c:IsCode(65110017)
end
function c65110019.filter(c)
return c:IsFaceup() and c:IsCode(65110017)
end
function c65110019.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c65110019.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c65110019.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c65110019.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c65110019.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
\ No newline at end of file
--浮游城
c65110022.dfc_front_side=65110022
c65110022.dfc_back_side=65110032
function c65110022.initial_effect(c)
c:EnableCounterPermit(0x831)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65110022,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,65110022)
e3:SetCondition(c65110022.thcon)
e3:SetTarget(c65110022.thtg)
e3:SetCost(c65110022.thcost)
e3:SetOperation(c65110022.thop)
c:RegisterEffect(e3)
--change
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(65110022,2))
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetRange(LOCATION_FZONE)
e0:SetCost(c65110022.chcost)
e0:SetTarget(c65110022.chtg)
e0:SetOperation(c65110022.chop)
c:RegisterEffect(e0)
end
function c65110022.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x831,4,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x831,4,REASON_COST)
end
function c65110022.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c65110022.chop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,1,65110032)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c65110022.costfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsAbleToDeckAsCost()
end
function c65110022.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
Duel.IsExistingMatchingCard(c65110022.costfilter,tp,LOCATION_ONFIELD+ LOCATION_HAND,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c65110022.costfilter,tp,LOCATION_ONFIELD+ LOCATION_HAND,0,1,1,nil,ft)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c65110022.cfilter(c)
return c:IsFaceup() and c:IsCode(65110019)
end
function c65110022.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65110022.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c65110022.thfilter(c,e,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c65110022.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65110022.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c65110022.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65110022.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
end
\ No newline at end of file
--坎特伯雷森林的鸣动
function c65110025.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c65110025.target)
e1:SetOperation(c65110025.activate)
c:RegisterEffect(e1)
end
function c65110025.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
e:SetCategory(CATEGORY_DISABLE)
end
function c65110025.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
Duel.AdjustInstantly()
if Duel.GetMatchingGroupCount(Card.IsCode,tp,0,LOCATION_GRAVE,nil,tc:GetCode())>0 and tc:IsDisabled() and Duel.SelectYesNo(tp,aux.Stringid(65110025,0)) then
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
--坎特伯雷新兵招募
function c65110026.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65110026)
e1:SetTarget(c65110026.thtg)
e1:SetOperation(c65110026.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65110026,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,65110027)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c65110026.sptg)
e2:SetOperation(c65110026.spop)
c:RegisterEffect(e2)
end
function c65110026.filter(c)
return c:IsLevel(1) and c:IsRace(RACE_WARRIOR) and c:IsSetCard(0x831) and c:IsAbleToHand()
end
function c65110026.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65110026.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65110026.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65110026.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) 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:SetTarget(c65110026.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c65110026.splimit(e,c)
return not c:IsSetCard(0x831)
end
function c65110026.spfilter(c,e,tp)
return c:IsLevel(1) and c:IsRace(RACE_WARRIOR) and c:IsSetCard(0x831) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65110026.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c65110026.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c65110026.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c65110026.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c65110026.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--坎特伯雷传送法阵
function c65110028.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e1:SetCost(c65110028.cost)
e1:SetTarget(c65110028.target)
e1:SetOperation(c65110028.activate)
c:RegisterEffect(e1)
end
function c65110028.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fid=e:GetLabel()
local g=e:GetLabelObject()
if g then
local tc=g:GetFirst()
while tc do
Duel.ReturnToField(tc)
tc=g:GetNext()
end
end
end
function c65110028.costfilter(c)
return c:IsAbleToRemoveAsCost()
end
function c65110028.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65110028.costfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c65110028.costfilter,tp,LOCATION_MZONE,0,1,5,e:GetHandler())
g:KeepAlive()
if Duel.Remove(g,0,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(g)
e1:SetCountLimit(1)
e1:SetOperation(c65110028.retop)
Duel.RegisterEffect(e1,tp)
end
e:SetLabel(g:GetCount())
end
function c65110028.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
end
function c65110028.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
local ct=e:GetLabel()*100
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--坎特伯雷森林惊喜?
function c65110029.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e1:SetCondition(c65110029.condition)
e1:SetTarget(c65110029.target)
e1:SetOperation(c65110029.operation)
c:RegisterEffect(e1)
end
function c65110029.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x831)
end
function c65110029.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
local sg=g:Filter(Card.IsFaceup,nil)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.GetMatchingGroupCount(c65110029.cfilter,tp,LOCATION_MZONE,0,nil)>0
end
function c65110029.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and c65110029.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c65110029.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c65110029.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c65110029.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(g,REASON_EFFECT)
local dg=Duel.GetOperatedGroup()
local ct1=dg:FilterCount(Card.IsControler,nil,tp)
local ct2=dg:GetCount()-ct1
Duel.BreakEffect()
if ct1~=0 then Duel.Draw(tp,ct1,REASON_EFFECT) end
if ct2~=0 then Duel.Draw(1-tp,ct2,REASON_EFFECT) end
end
function c65110029.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
\ No newline at end of file
--坎特伯雷森林的白兽
function c65110030.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65110030,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_END_PHASE+TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,65110030)
e1:SetCost(c65110030.cost)
e1:SetTarget(c65110030.sptg)
e1:SetOperation(c65110030.spop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c65110030.atkcon)
e2:SetTarget(c65110030.atktg)
e2:SetValue(700)
c:RegisterEffect(e2)
end
function c65110030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and c:GetFlagEffect(65110030)==0 end
c:RegisterFlagEffect(65110030,RESET_CHAIN,0,1)
end
function c65110030.filter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:GetBaseAttack()==1000 and c:IsFaceup()
end
function c65110030.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c65110030.filter(chkc) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c65110030.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c65110030.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c65110030.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(-300)
tc:RegisterEffect(e1)
end
end
end
function c65110030.atkcon(e)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL
end
function c65110030.atktg(e,c)
local tp=e:GetHandlerPlayer()
local a,d=Duel.GetBattleMonster(tp)
return c==a and c~=e:GetHandler()
end
\ No newline at end of file
--未踏之地 坎特伯雷
function c65110901.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65110901+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c65110901.target)
e1:SetOperation(c65110901.activate)
c:RegisterEffect(e1)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c65110901.spcon)
e4:SetTarget(c65110901.sptg)
e4:SetOperation(c65110901.spop)
c:RegisterEffect(e4)
end
function c65110901.filter(c,e,tp)
return c:IsCode(65110917) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c65110901.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65110901.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c65110901.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65110901.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(65110901,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c65110901.retcon)
e1:SetOperation(c65110901.retop)
Duel.RegisterEffect(e1,tp)
end
function c65110901.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(65110901)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c65110901.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function c65110901.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
end
function c65110901.spfilter(c,e,tp)
return c:IsCode(65110002) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c65110901.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65110901.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function c65110901.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,aux.NecroValleyFilter(c65110901.spfilter),tp,LOCATION_GRAVE+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
\ No newline at end of file
--坎特伯雷 未来白兽
function c65110902.initial_effect(c)
aux.AddCodeList(c,65110002)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65110902,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,65110902+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c65110902.spcon)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65110902,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,65110903)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCondition(c65110902.decon)
e2:SetTarget(c65110902.detg)
e2:SetOperation(c65110902.deop)
c:RegisterEffect(e2)
end
function c65110902.filter(c)
return aux.IsCodeListed(c,65110002) and c:IsFaceup()
end
function c65110902.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65110902.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c65110902.decon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()~=nil
end
function c65110902.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c65110902.deop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--坎特伯雷 未来公主
function c65110917.initial_effect(c)
aux.AddCodeList(c,65110002)
c:EnableReviveLimit()
--cannot special summon
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(aux.FALSE)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,65110917)
e2:SetCondition(c65110917.drcon)
e2:SetTarget(c65110917.drtg)
e2:SetOperation(c65110917.drop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(1)
c:RegisterEffect(e3)
--todeck
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,65110918)
e4:SetTarget(c65110917.target)
e4:SetOperation(c65110917.activate)
c:RegisterEffect(e4)
end
function c65110917.cfilter(c)
return c:IsFaceup() and c:IsCode(65110002)
end
function c65110917.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65110917.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c65110917.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 c65110917.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
Duel.Draw(p,d,REASON_EFFECT)
end
function c65110917.grfilter(c,check)
return c:IsType(TYPE_MONSTER) and ((check and c:IsAbleToHand()) or c:IsAbleToDeck())
end
function c65110917.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local check=Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c65110917.grfilter(chkc,check)end
if chk==0 then return Duel.IsExistingTarget(c65110917.grfilter,tp,LOCATION_GRAVE,0,1,nil,check) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c65110917.grfilter,tp,LOCATION_GRAVE,0,1,1,nil,check)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c65110917.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil) and tc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(65110917,0)) then
Duel.SendtoHand(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
elseif tc:IsAbleToDeck() then Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
\ No newline at end of file
--坎特伯雷的最后防线
function c65110919.initial_effect(c)
aux.AddCodeList(c,65110002)
--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:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,65110919)
e1:SetCondition(c65110919.con)
e1:SetTarget(c65110919.target)
e1:SetOperation(c65110919.activate)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65110919,1))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,65110920)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c65110919.eqtg)
e2:SetOperation(c65110919.eqop)
c:RegisterEffect(e2)
if not c65110919.global_check then
c65110919.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD)
ge1:SetCondition(c65110919.checkcon)
ge1:SetOperation(c65110919.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c65110919.spcfilter(c,tp)
return c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsType(TYPE_MONSTER)
end
function c65110919.checkcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c65110919.spcfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c65110919.spcfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c65110919.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsType,nil,TYPE_MONSTER)
local tc=g:GetFirst()
while tc do
if Duel.GetFlagEffect(tc:GetControler(),65110919)==0 then
Duel.RegisterFlagEffect(tc:GetControler(),65110919,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(0,65110919)>0 and Duel.GetFlagEffect(1,65110919)>0 then
break
end
tc=g:GetNext()
end
end
function c65110919.con(e,tp,eg,ep,ev,re,r,rp)
--Debug.Message(Duel.GetFlagEffect(tp,65110919))
return Duel.GetFlagEffect(tp,65110919)>0
end
function c65110919.spfilter(c,e,tp)
return c:IsCode(65110917) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c65110919.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,65110002) and Duel.IsExistingMatchingCard(c65110919.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,Card.IsCode,tp,LOCATION_MZONE,0,1,1,nil,65110002)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c65110919.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoGrave(tc,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local th=Duel.GetFirstMatchingCard(c65110919.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if th then
Duel.BreakEffect()
Duel.SpecialSummon(th,0,tp,tp,true,false,POS_FACEUP)
th:CompleteProcedure()
end
end
function c65110919.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,65110917) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,65110921) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
end
end
function c65110919.eqop(e,tp,eg,ep,ev,re,r,rp)
local equip=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,65110917)
local tc=Duel.GetFirstMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,65110921)
if tc then
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)>0 and equip and not tc:IsForbidden() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sc=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_MZONE,0,1,1,nil,65110917)
Duel.Equip(tp,tc,sc:GetFirst())
end
end
end
\ No newline at end of file
--解放者
function c65110921.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+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c65110921.target)
e1:SetOperation(c65110921.activate)
c:RegisterEffect(e1)
--Equip Limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c65110921.eqlimit)
c:RegisterEffect(e2)
--atk target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(c65110921.atktg)
c:RegisterEffect(e3)
--atkdown
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,65110921)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c65110921.atcon)
e4:SetTarget(c65110921.attg)
e4:SetOperation(c65110921.atop)
c:RegisterEffect(e4)
end
function c65110921.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c65110921.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c65110921.eqlimit(e,c)
return c:IsControler(e:GetHandlerPlayer())
end
function c65110921.atktg(e,c)
return c~=e:GetHandler():GetEquipTarget()
end
function c65110921.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler():GetEquipTarget()
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(9) and not c:IsSummonableCard()
end
function c65110921.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c65110921.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(-2000)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_TRIGGER)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(c65110921.actfilter)
Duel.RegisterEffect(e3,tp)
end
function c65110921.actfilter(e,c)
return c:IsAttack(0) or c:IsDefense(0)
end
\ No newline at end of file
--坎特伯雷 未来骑士
function c65111017.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,3,c65111017.lcheck)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c65111017.indtg)
e1:SetValue(1)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,65111017)
e2:SetCondition(c65111017.atkcon)
e2:SetTarget(c65111017.atktg)
e2:SetOperation(c65111017.atkop)
c:RegisterEffect(e2)
end
function c65111017.lcheck(g)
return g:IsExists(c65111017.lcfilter,1,nil)
end
function c65111017.lcfilter(c)
return c:IsLinkType(TYPE_LINK) and c:IsLinkSetCard(0x831)
end
function c65111017.indtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c65111017.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c65111017.atkval(e,c)
local g=e:GetHandler():GetLinkedGroup():Filter(Card.IsFaceup,nil)
return g:GetSum(Card.GetBaseAttack)
end
function c65111017.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c65111017.atkval(e,e:GetHandler())>0 end
end
function c65111017.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atkval=c65111017.atkval(e,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atkval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if c:RegisterEffect(e1) then
local dg=Duel.GetMatchingGroup(Card.IsAttackBelow,tp,0,LOCATION_MZONE,nil,c:GetAttack())
if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(65111017,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local des=dg:Select(tp,1,1,nil)
Duel.HintSelection(des)
Duel.BreakEffect()
Duel.Destroy(des,REASON_EFFECT)
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c65111017.ftarget)
e2:SetLabel(e:GetHandler():GetFieldID())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c65111017.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
\ No newline at end of file
--坎特伯雷 原爆点骑士
function c65111217.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--code
aux.EnableChangeCode(c,65110017,LOCATION_MZONE)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(65111217,0))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_START)
e4:SetCondition(c65111217.tgcon)
e4:SetTarget(c65111217.tgtg)
e4:SetOperation(c65111217.tgop)
c:RegisterEffect(e4)
--remove
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(65111217,1))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCondition(c65111217.recon)
e5:SetTarget(c65111217.retg)
e5:SetOperation(c65111217.reop)
c:RegisterEffect(e5)
--disable summon
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_CANNOT_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,0)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e7)
end
function c65111217.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:GetBaseAttack()>=3000
end
function c65111217.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetBattleTarget(),1,0,0)
end
function c65111217.tgop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.SendtoGrave(bc,REASON_EFFECT)
end
end
function c65111217.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c65111217.recon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0
end
function c65111217.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c65111217.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c65111217.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(65111217,2)) then
local sg=Duel.SelectMatchingCard(tp,c65111217.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,150,nil)
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
\ No newline at end of file
--夏日旅馆老板娘 罗兰茵
function c65130102.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c65130102.thtg)
e1:SetOperation(c65130102.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c65130102.thfilter(c)
return ((c:IsSetCard(0xa831) and c:IsType(TYPE_SPELL+TYPE_TRAP)) or c:IsCode(65110022)) and c:IsAbleToHand()
end
function c65130102.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c65130102.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c65130102.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c65130102.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c65130102.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
\ No newline at end of file
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