Commit 554edd58 authored by POLYMER's avatar POLYMER

update 230926 2nd

parent dad45449
......@@ -5256,6 +5256,48 @@
4875078 0
33701122 0
45745915 0
98920054 0
12070000 0
12070001 0
12070002 0
12070003 0
12070004 0
12070005 0
12070006 0
65130475 0
77000501 0
77000502 0
77000503 0
77000504 0
77000505 0
77000506 0
77000508 0
77000509 0
77000510 0
77000511 0
77000512 0
77000513 0
77000515 0
77000516 0
77000517 0
77000518 0
77000519 0
77000520 0
77000521 0
77000522 0
77000523 0
77000524 0
77000525 0
77000526 0
77000527 0
77000528 0
77000529 0
77014514 0
77014515 0
98920146 0
98920215 0
98920253 0
98920273 0
#limit
33403513 1
82204250 1
......
No preview for this file type
No preview for this file type
expansions/pics/88880043.jpg

331 KB | W: | H:

expansions/pics/88880043.jpg

17.3 KB | W: | H:

expansions/pics/88880043.jpg
expansions/pics/88880043.jpg
expansions/pics/88880043.jpg
expansions/pics/88880043.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -65,4 +65,14 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
else
Duel.Hint(HINT_CARD,0,m)
end
end
if not require and Duel.LoadScript then
function require(str)
local name=str
for word in string.gmatch(str,"%w+") do
name=word
end
Duel.LoadScript(name..".lua")
return true
end
end
\ No newline at end of file
--parasomnia
--22.05.18
local m=11450000
local cm=_G["c"..m]
local cm,m=GetID()
local tableclone=function(tab,mytab)
local res=mytab or {}
for i,v in pairs(tab) do res[i]=v end
......@@ -34,7 +33,19 @@ function cm.initial_effect(c)
local e1=_Effect.CreateEffect(c)
c:RegisterEffect(e1)
end
function read111(tab)
for k,v in pairs(tab) do
Debug.Message(k)
local sel=Duel.SelectOption(0,aux.Stringid(m,0),aux.Stringid(m,1),aux.Stringid(m,2))
if sel==0 and aux.GetValueType(v)=="table" then
read111(v)
end
if sel==2 then return end
end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
read111(package.loaded)
_Duel.Hint(HINT_CARD,0,m)
_Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,1))
local ct0=_Duel.GetMatchingGroupCount(_Card.IsCode,0,0xff,0,nil,m)
......
......@@ -187,7 +187,7 @@ function cm.scop(e,tp,eg,ep,ev,re,r,rp)
end
local A=1103515245
local B=12345
local M=32767
local M=1073741824 --32767
function cm.roll(min,max)
min=tonumber(min)
max=tonumber(max)
......@@ -280,6 +280,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
table.insert(tab1,ac)
table.insert(cm.blacklist,ac)
ac=nil
end
for i=1,ct1 do
......@@ -356,6 +357,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
table.insert(tab2,ac)
table.insert(cm.blacklist,ac)
ac=nil
end
for i=1,ct2 do
......
......@@ -89,7 +89,9 @@ function cm.actarget(e,te,tp)
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,false)
local loc=LOCATION_SZONE
if e:GetHandler():IsType(TYPE_FIELD) then loc=LOCATION_FZONE end
Duel.MoveToField(e:GetHandler(),tp,tp,loc,POS_FACEUP,false)
cm.activate_sequence[te]=e:GetHandler():GetSequence()
e:GetHandler():CreateEffectRelation(te)
local c=e:GetHandler()
......
......@@ -61,16 +61,19 @@ function c11561016.hxop(e,tp,eg,ep,ev,re,r,rp)
local d=math.floor(flag/4)
local chk=0
local a=0
local msg=Group.CreateGroup()
for i=1,d do
if chk==0 and g:IsExists(Card.IsAbleToHand,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11561016,0)) then
local sg=g:Filter(Card.IsAbleToHand,nil):Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
g:Sub(sg)
msg:Merge(sg)
a=a+1
else
chk=1
end
end
Duel.SendtoHand(msg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,msg)
if a>0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,a,nil) then
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,a,a,nil)
......
......@@ -78,19 +78,19 @@ end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.lvfilter(c)
function cm.lvfilter1(c)
return c:IsFaceup() and (c:IsType(TYPE_RITUAL) or c:IsSetCard(0x154))
and c:IsLevelAbove(1)
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,2,nil) end
if chk==0 then return Duel.IsExistingTarget(cm.lvfilter1,tp,LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.lvfilter,tp,LOCATION_MZONE,0,2,99,nil)
Duel.SelectTarget(tp,cm.lvfilter1,tp,LOCATION_MZONE,0,2,99,nil)
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(cm.lvfilter,nil,e)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(cm.lvfilter1,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
local lv=Duel.AnnounceLevel(tp,1,12)
local tc=g:GetFirst()
......
......@@ -156,23 +156,11 @@ function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
c:AddCounter(0x1161,1,REASON_EFFECT)
local seq=c:GetSequence()
local dg=Duel.GetMatchingGroup(cm.desfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,seq,c:GetControler())
if seq<5 and dg:GetCount()>0 then
if seq<5 and dg:GetCount()>0 then
local dgc=dg:GetFirst()
while dgc do
if dgc:GetCounter(0x1161)<=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(cm.atkva)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
dgc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_SELF_DESTROY)
e3:SetCondition(cm.descon)
dgc:RegisterEffect(e3)
cm.counter(dgc,c)
end
dgc:AddCounter(0x1161,1,REASON_EFFECT)
dgc=dg:GetNext()
......
--永燃的薪炎 薪炎之律者
function c12070000.initial_effect(c)
c:SetUniqueOnField(1,0,12070000)
--xyz summon
aux.AddXyzProcedure(c,nil,7,5,c12070000.ovfilter,aux.Stringid(12070000,0))
c:EnableReviveLimit()
--ov
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12070000,5))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c12070000.ovtg)
e1:SetOperation(c12070000.ovop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c12070000.tdcon)
e2:SetTarget(c12070000.tdtg)
e2:SetOperation(c12070000.tdop)
c:RegisterEffect(e2)
--xx
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,32070000)
e3:SetCondition(c12070000.xxcon)
e3:SetOperation(c12070000.xxop)
c:RegisterEffect(e3)
end
c12070000.SetCard_NeoK_Flame=true
function c12070000.ovfilter(c)
return c.SetCard_NeoK_Flame and c:IsLevel(7) and c:IsFaceup()
end
function c12070000.ovfil(c)
return c.SetCard_NeoK_Flame and c:IsCanOverlay()
end
function c12070000.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12070000.ovfil,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetChainLimit(c12070000.chlimit)
end
function c12070000.chlimit(e,ep,tp)
return tp==ep
end
function c12070000.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c12070000.ovfil,tp,LOCATION_GRAVE,0,nil)
if c:IsRelateToEffect(e) and c:IsFaceup() and g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
function c12070000.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetReasonPlayer()==1-tp and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c12070000.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function c12070000.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
function c12070000.xxcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c12070000.xxop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(Group.FromCards(e:GetHandler()))
Duel.Hint(HINT_CARD,0,12070000)
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(12070000,1))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(12070000,1))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(12070000,2))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(12070000,2))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(12070000,3))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(12070000,3))
end
--永燃的薪炎 无名游侠的旅途
function c12070001.initial_effect(c)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12070001,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c12070001.ntcon)
c:RegisterEffect(e1)
--Gains Effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c12070001.efcon)
e2:SetOperation(c12070001.efop)
c:RegisterEffect(e2)
end
c12070001.SetCard_NeoK_Flame=true
function c12070001.cfilter(c)
return c:IsFaceup() and c.SetCard_NeoK_Flame
end
function c12070001.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and not Duel.IsExistingMatchingCard(c12070001.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c12070001.efcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_XYZ and c:GetReasonCard().SetCard_NeoK_Flame and c:GetReasonCard():IsType(TYPE_XYZ)
end
function c12070001.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(12070001,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c12070001.thtg)
e1:SetOperation(c12070001.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function c12070001.thfilter(c)
return c.SetCard_NeoK_Flame and (c:IsAbleToHand() or c:IsCanOverlay())
end
function c12070001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12070001.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c12070001.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c12070001.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local op=0
if tc:IsAbleToHand() and tc:IsCanOverlay() then
op=Duel.SelectOption(tp,aux.Stringid(12070001,2),aux.Stringid(12070001,3))
elseif tc:IsAbleToHand() then
op=Duel.SelectOption(tp,aux.Stringid(12070001,2))
elseif tc:IsCanOverlay() then
op=Duel.SelectOption(tp,aux.Stringid(12070001,3))+1
end
if op==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
elseif op==1 then
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Overlay(c,tc)
end
end
end
end
--永燃的薪炎 遗世火鸟的燃羽
function c12070002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12070002)
e1:SetCost(c12070002.cost)
e1:SetTarget(c12070002.target)
e1:SetOperation(c12070002.operation)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12070002,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c12070002.rmcost)
e2:SetTarget(c12070002.rmtg)
e2:SetOperation(c12070002.rmop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c12070002.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVED)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c12070002.damcon)
e4:SetOperation(c12070002.damop)
c:RegisterEffect(e4)
end
c12070002.SetCard_NeoK_Flame=true
function c12070002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c12070002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function c12070002.filter(c)
return c.SetCard_NeoK_Flame and c:IsAbleToHand()
end
function c12070002.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5):Filter(c12070002.filter,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12070002,0)) then
local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
function c12070002.rmcost(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 c12070002.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and c:IsAbleToRemove() and c:GetFlagEffect(12070002)==0 and Duel.IsPlayerCanDraw(tp,1) end
c:RegisterFlagEffect(12070002,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c12070002.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local pos=c:GetPosition()
Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)
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(c)
e1:SetLabel(pos)
e1:SetCountLimit(1)
e1:SetOperation(c12070002.xretop)
Duel.RegisterEffect(e1,tp)
if Duel.IsPlayerCanDraw(tp,1) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c12070002.xretop(e,tp,eg,ep,ev,re,r,rp)
local pos=e:GetLabel()
Duel.Hint(HINT_CARD,0,12070002)
Duel.MoveToField(e:GetLabelObject(),tp,tp,LOCATION_MZONE,pos,true)
end
function c12070002.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(12070002,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
function c12070002.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetFlagEffect(12070002)~=0 and e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ)
end
function c12070002.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,12070002)
Duel.Damage(1-tp,500,REASON_EFFECT)
end
--永燃的薪炎 淬火骑士的剑袭
function c12070003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12070003)
e1:SetCost(c12070003.cost)
e1:SetTarget(c12070003.target)
e1:SetOperation(c12070003.operation)
c:RegisterEffect(e1)
--dam
--local e2=Effect.CreateEffect(c)
--e2:SetDescription(aux.Stringid(12070003,1))
--e2:SetCategory(CATEGORY_DAMAGE)
--e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
--e2:SetCode(EVENT_CHAINING)
--e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
--e2:SetRange(LOCATION_MZONE)
--e2:SetCountLimit(1)
--e2:SetCondition(c12070003.damcon)
--e2:SetCost(c12070003.damcost)
--e2:SetTarget(c12070003.damtg)
--e2:SetOperation(c12070003.damop)
--c:RegisterEffect(e2)
--all
--local e3=Effect.CreateEffect(c)
--e3:SetType(EFFECT_TYPE_XMATERIAL)
--e3:SetCode(EFFECT_ATTACK_ALL)
--e3:SetValue(1)
--e3:SetCondition(c12070003.alcon)
--c:RegisterEffect(e3)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e)
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end)
e2:SetValue(function(e,c)
return c:GetOverlayCount()*100 end)
c:RegisterEffect(e2)
--dam cal
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_XMATERIAL)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(function(e)
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end)
e3:SetCost(c12070003.damccost)
e3:SetTarget(c12070003.damctg)
e3:SetOperation(c12070003.damcop)
c:RegisterEffect(e3)
end
c12070003.SetCard_NeoK_Flame=true
function c12070003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c12070003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function c12070003.filter(c)
return c.SetCard_NeoK_Flame and c:IsAbleToHand()
end
function c12070003.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5):Filter(c12070003.filter,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12070003,0)) then
local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
function c12070003.damcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and bit.band(re:GetActivateLocation(),LOCATION_MZONE)~=0
end
function c12070003.damcost(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 c12070003.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) and re:GetHandler():GetBaseAttack()>0 end
local atk=re:GetHandler():GetBaseAttack()
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c12070003.damop(e,tp,eg,ep,ev,re,r,rp)
local atk=re:GetHandler():GetBaseAttack()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,atk,REASON_EFFECT)
end
function c12070003.alcon(e)
local tp=e:GetHandlerPlayer()
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) and Duel.GetLP(tp)<=Duel.GetLP(1-tp)
end
function c12070003.damccost(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 c12070003.damctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function c12070003.damcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.CalculateDamage(c,tc)
end
end
--永燃的薪炎 烈焰圣歌的誓约
function c12070004.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12070004)
e1:SetCost(c12070004.cost)
e1:SetTarget(c12070004.target)
e1:SetOperation(c12070004.operation)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c12070004.reptg)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCondition(c12070004.atkcon)
e3:SetValue(c12070004.atkval)
c:RegisterEffect(e3)
end
c12070004.SetCard_NeoK_Flame=true
function c12070004.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c12070004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function c12070004.filter(c)
return c.SetCard_NeoK_Flame and c:IsAbleToHand()
end
function c12070004.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5):Filter(c12070004.filter,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12070004,0)) then
local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
function c12070004.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
else return false end
end
function c12070004.atkcon(e)
local tp=e:GetHandlerPlayer()
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) and Duel.GetLP(tp)<=Duel.GetLP(1-tp)
end
function c12070004.atkval(e,c)
return c:GetOverlayCount()*500
end
--永燃的薪炎 薪炎王剑的凯旋
function c12070005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12070005)
e1:SetCost(c12070005.cost)
e1:SetTarget(c12070005.target)
e1:SetOperation(c12070005.operation)
c:RegisterEffect(e1)
--destroy
--local e2=Effect.CreateEffect(c)
--e2:SetDescription(aux.Stringid(12070005,1))
--e2:SetCategory(CATEGORY_DESTROY)
--e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
--e2:SetRange(LOCATION_MZONE)
--e2:SetCountLimit(1)
--e2:SetCost(c12070005.descost)
--e2:SetTarget(c12070005.destg)
--e2:SetOperation(c12070005.desop)
--c:RegisterEffect(e2)
--dam
--local e3=Effect.CreateEffect(c)
--e3:SetDescription(aux.Stringid(12070005,2))
--e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_NEGATE)
--e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
--e3:SetCode(EVENT_CHAINING)
--e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
--e3:SetRange(LOCATION_MZONE)
--e3:SetCountLimit(1)
--e3:SetCondition(c12070005.damcon)
--e3:SetCost(c12070005.damcost)
--e3:SetTarget(c12070005.damtg)
--e3:SetOperation(c12070005.damop)
--c:RegisterEffect(e3)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e)
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end)
e2:SetValue(function(e,c)
return c:GetOverlayCount()*100 end)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION+EFFECT_TYPE_XMATERIAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(function(e)
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end)
e3:SetCost(c12070005.xdescost)
e3:SetTarget(c12070005.xdestg)
e3:SetOperation(c12070005.xdesop)
c:RegisterEffect(e3)
end
c12070005.SetCard_NeoK_Flame=true
function c12070005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c12070005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function c12070005.filter(c)
return c.SetCard_NeoK_Flame and c:IsAbleToHand()
end
function c12070005.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5):Filter(c12070005.filter,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12070005,0)) then
local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
function c12070005.desfil(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c12070005.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c12070005.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c12070005.desfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack()) end
local g=Duel.GetMatchingGroup(c12070005.desfil,tp,LOCATION_MZONE,LOCATION_MZONE,c,c:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c12070005.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local g=Duel.GetMatchingGroup(c12070005.desfil,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e),c:GetAttack())
Duel.Destroy(g,REASON_EFFECT)
end
end
function c12070005.damcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and bit.band(re:GetActivateLocation(),LOCATION_MZONE)~=0 and Duel.IsChainNegatable(ev)
end
function c12070005.damcost(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 c12070005.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end
local atk=re:GetHandler():GetBaseAttack()
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c12070005.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) then
local atk=re:GetHandler():GetBaseAttack()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
function c12070005.xdescost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function c12070005.xdesfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c12070005.xdestg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c12070005.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack()) end
local g=Duel.GetMatchingGroup(c12070005.xdesfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,c:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c12070005.xdesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c12070005.xdesfilter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e),c:GetAttack())
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--永燃的薪炎 燎原炎车的狼烟
function c12070006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12070006)
e1:SetCost(c12070006.cost)
e1:SetTarget(c12070006.target)
e1:SetOperation(c12070006.operation)
c:RegisterEffect(e1)
--atk up
--local e2=Effect.CreateEffect(c)
--e2:SetCategory(CATEGORY_ATKCHANGE)
--e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
--e2:SetRange(LOCATION_MZONE)
--e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
--e2:SetCondition(c12070006.atkcon)
--e2:SetCost(c12070006.atkcost)
--e2:SetOperation(c12070006.atkop)
--c:RegisterEffect(e2)
--immune
--local e3=Effect.CreateEffect(c)
--e3:SetType(EFFECT_TYPE_XMATERIAL)
--e3:SetCode(EFFECT_IMMUNE_EFFECT)
--e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
--e3:SetRange(LOCATION_MZONE)
--e3:SetCondition(c12070006.imcon)
--e3:SetValue(c12070006.efilter)
--c:RegisterEffect(e3)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e)
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end)
e2:SetValue(function(e,c)
return c:GetOverlayCount()*100 end)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12070006,1))
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_XMATERIAL)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c12070006.discon)
e3:SetCost(c12070006.discost)
e3:SetTarget(c12070006.distg)
e3:SetOperation(c12070006.disop)
c:RegisterEffect(e3)
end
c12070006.SetCard_NeoK_Flame=true
function c12070006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c12070006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function c12070006.filter(c)
return c.SetCard_NeoK_Flame and c:IsAbleToHand()
end
function c12070006.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5):Filter(c12070006.filter,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12070006,0)) then
local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
function c12070006.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL) and bc:GetAttack()>0 and e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ)
end
function c12070006.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(12070006)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
c:RegisterFlagEffect(12070006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c12070006.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() and bc: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_DAMAGE_CAL)
e1:SetValue(bc:GetAttack())
c:RegisterEffect(e1)
end
end
function c12070006.imcon(e)
local tp=e:GetHandlerPlayer()
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) and Duel.GetLP(tp)<=Duel.GetLP(1-tp)
end
function c12070006.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetOwnerPlayer() and te:IsActivated()
end
function c12070006.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and re:GetHandler():IsOnField() and re:IsActiveType(TYPE_MONSTER) and e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ)
end
function c12070006.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c12070006.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c12070006.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=re:GetHandler():GetBaseAttack()
if Duel.NegateActivation(ev) and atk and atk>0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
--永燃的薪炎 淬火骑士的剑袭
function c12071003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12071003)
e1:SetCost(c12071003.cost)
e1:SetTarget(c12071003.target)
e1:SetOperation(c12071003.operation)
c:RegisterEffect(e1)
--dam
--local e2=Effect.CreateEffect(c)
--e2:SetDescription(aux.Stringid(12071003,1))
--e2:SetCategory(CATEGORY_DAMAGE)
--e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
--e2:SetCode(EVENT_CHAINING)
--e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
--e2:SetRange(LOCATION_MZONE)
--e2:SetCountLimit(1)
--e2:SetCondition(c12071003.damcon)
--e2:SetCost(c12071003.damcost)
--e2:SetTarget(c12071003.damtg)
--e2:SetOperation(c12071003.damop)
--c:RegisterEffect(e2)
--all
--local e3=Effect.CreateEffect(c)
--e3:SetType(EFFECT_TYPE_XMATERIAL)
--e3:SetCode(EFFECT_ATTACK_ALL)
--e3:SetValue(1)
--e3:SetCondition(c12071003.alcon)
--c:RegisterEffect(e3)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e)
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end)
e2:SetValue(function(e,c)
return c:GetOverlayCount()*100 end)
c:RegisterEffect(e2)
--dam cal
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_XMATERIAL)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(function(e)
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end)
e3:SetCost(c12071003.damccost)
e3:SetTarget(c12071003.damctg)
e3:SetOperation(c12071003.damcop)
c:RegisterEffect(e3)
end
c12071003.SetCard_NeoK_Flame=true
function c12071003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c12071003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function c12071003.filter(c)
return c.SetCard_NeoK_Flame and c:IsAbleToHand()
end
function c12071003.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5):Filter(c12071003.filter,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12071003,0)) then
local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
function c12071003.damcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and bit.band(re:GetActivateLocation(),LOCATION_MZONE)~=0
end
function c12071003.damcost(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 c12071003.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) and re:GetHandler():GetBaseAttack()>0 end
local atk=re:GetHandler():GetBaseAttack()
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c12071003.damop(e,tp,eg,ep,ev,re,r,rp)
local atk=re:GetHandler():GetBaseAttack()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,atk,REASON_EFFECT)
end
function c12071003.alcon(e)
local tp=e:GetHandlerPlayer()
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) and Duel.GetLP(tp)<=Duel.GetLP(1-tp)
end
function c12071003.damccost(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 c12071003.damctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function c12071003.damcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.CalculateDamage(c,tc)
end
end
--永燃的薪炎 薪炎王剑的凯旋
function c12071005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12071005)
e1:SetCost(c12071005.cost)
e1:SetTarget(c12071005.target)
e1:SetOperation(c12071005.operation)
c:RegisterEffect(e1)
--destroy
--local e2=Effect.CreateEffect(c)
--e2:SetDescription(aux.Stringid(12071005,1))
--e2:SetCategory(CATEGORY_DESTROY)
--e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
--e2:SetRange(LOCATION_MZONE)
--e2:SetCountLimit(1)
--e2:SetCost(c12071005.descost)
--e2:SetTarget(c12071005.destg)
--e2:SetOperation(c12071005.desop)
--c:RegisterEffect(e2)
--dam
--local e3=Effect.CreateEffect(c)
--e3:SetDescription(aux.Stringid(12071005,2))
--e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_NEGATE)
--e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
--e3:SetCode(EVENT_CHAINING)
--e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
--e3:SetRange(LOCATION_MZONE)
--e3:SetCountLimit(1)
--e3:SetCondition(c12071005.damcon)
--e3:SetCost(c12071005.damcost)
--e3:SetTarget(c12071005.damtg)
--e3:SetOperation(c12071005.damop)
--c:RegisterEffect(e3)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e)
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end)
e2:SetValue(function(e,c)
return c:GetOverlayCount()*100 end)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION+EFFECT_TYPE_XMATERIAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(function(e)
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end)
e3:SetCost(c12071005.xdescost)
e3:SetTarget(c12071005.xdestg)
e3:SetOperation(c12071005.xdesop)
c:RegisterEffect(e3)
end
c12071005.SetCard_NeoK_Flame=true
function c12071005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c12071005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function c12071005.filter(c)
return c.SetCard_NeoK_Flame and c:IsAbleToHand()
end
function c12071005.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5):Filter(c12071005.filter,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12071005,0)) then
local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
function c12071005.desfil(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c12071005.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c12071005.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c12071005.desfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack()) end
local g=Duel.GetMatchingGroup(c12071005.desfil,tp,LOCATION_MZONE,LOCATION_MZONE,c,c:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c12071005.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local g=Duel.GetMatchingGroup(c12071005.desfil,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e),c:GetAttack())
Duel.Destroy(g,REASON_EFFECT)
end
end
function c12071005.damcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and bit.band(re:GetActivateLocation(),LOCATION_MZONE)~=0 and Duel.IsChainNegatable(ev)
end
function c12071005.damcost(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 c12071005.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end
local atk=re:GetHandler():GetBaseAttack()
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c12071005.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) then
local atk=re:GetHandler():GetBaseAttack()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
function c12071005.xdescost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function c12071005.xdesfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c12071005.xdestg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c12071005.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack()) end
local g=Duel.GetMatchingGroup(c12071005.xdesfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c,c:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c12071005.xdesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c12071005.xdesfilter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e),c:GetAttack())
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--永燃的薪炎 燎原炎车的狼烟
function c12071006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12071006)
e1:SetCost(c12071006.cost)
e1:SetTarget(c12071006.target)
e1:SetOperation(c12071006.operation)
c:RegisterEffect(e1)
--atk up
--local e2=Effect.CreateEffect(c)
--e2:SetCategory(CATEGORY_ATKCHANGE)
--e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
--e2:SetRange(LOCATION_MZONE)
--e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
--e2:SetCondition(c12071006.atkcon)
--e2:SetCost(c12071006.atkcost)
--e2:SetOperation(c12071006.atkop)
--c:RegisterEffect(e2)
--immune
--local e3=Effect.CreateEffect(c)
--e3:SetType(EFFECT_TYPE_XMATERIAL)
--e3:SetCode(EFFECT_IMMUNE_EFFECT)
--e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
--e3:SetRange(LOCATION_MZONE)
--e3:SetCondition(c12071006.imcon)
--e3:SetValue(c12071006.efilter)
--c:RegisterEffect(e3)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e)
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) end)
e2:SetValue(function(e,c)
return c:GetOverlayCount()*100 end)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12071006,1))
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_XMATERIAL)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c12071006.discon)
e3:SetCost(c12071006.discost)
e3:SetTarget(c12071006.distg)
e3:SetOperation(c12071006.disop)
c:RegisterEffect(e3)
end
c12071006.SetCard_NeoK_Flame=true
function c12071006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c12071006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function c12071006.filter(c)
return c.SetCard_NeoK_Flame and c:IsAbleToHand()
end
function c12071006.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5):Filter(c12071006.filter,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12071006,0)) then
local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
function c12071006.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL) and bc:GetAttack()>0 and e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ)
end
function c12071006.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(12071006)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
c:RegisterFlagEffect(12071006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c12071006.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() and bc: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_DAMAGE_CAL)
e1:SetValue(bc:GetAttack())
c:RegisterEffect(e1)
end
end
function c12071006.imcon(e)
local tp=e:GetHandlerPlayer()
return e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ) and Duel.GetLP(tp)<=Duel.GetLP(1-tp)
end
function c12071006.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetOwnerPlayer() and te:IsActivated()
end
function c12071006.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and re:GetHandler():IsOnField() and re:IsActiveType(TYPE_MONSTER) and e:GetHandler().SetCard_NeoK_Flame and e:GetHandler():IsType(TYPE_XYZ)
end
function c12071006.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c12071006.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c12071006.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=re:GetHandler():GetBaseAttack()
if Duel.NegateActivation(ev) and atk and atk>0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
This diff is collapsed.
--尤格·萨隆
local cm,m,o=GetID()
function cm.initial_effect(c)
Yogg_g=Group.CreateGroup()
Yogg_g:KeepAlive()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCondition(cm.rmcon)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
local A=1103515245
local B=12345
local M=32767
local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end
cm.blacklist={}
local _SelectMatchingCard=Duel.SelectMatchingCard
local _SelectReleaseGroup=Duel.SelectReleaseGroup
local _SelectReleaseGroupEx=Duel.SelectReleaseGroupEx
local _SelectTarget=Duel.SelectTarget
local _SelectTribute=Duel.SelectTribute
local _DiscardHand=Duel.DiscardHand
local _DRemoveOverlayCard=Duel.RemoveOverlayCard
local _CRemoveOverlayCard=Card.RemoveOverlayCard
local _FilterSelect=Group.FilterSelect
local _Select=Group.Select
function cm.roll(min,max)
min=tonumber(min)
max=tonumber(max)
cm.r=((cm.r*A+B)%M)/M
if min~=nil then
if max==nil then
return math.floor(cm.r*min)+1
else
max=max-min+1
return math.floor(cm.r*max+min)
end
end
return cm.r
end
function cm.list(code)
for _,codes in pairs(cm.blacklist) do
if codes==code then return true end
end
return false
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
if not cm.r then
cm.r=Duel.GetFieldGroup(0,LOCATION_DECK+LOCATION_HAND,LOCATION_DECK+LOCATION_EXTRA):GetSum(Card.GetCode)
end
local g1=Group.CreateGroup()
local g2=Group.CreateGroup()
local ng1=Group.CreateGroup()
local ng2=Group.CreateGroup()
local ac=nil
local _TGetID=GetID
if Yogg_g:GetCount()>0 then
ct1=math.min(Yogg_g:GetCount(),85)
local tab1={}
for i=1,ct1 do
while not ac do
local int=cm.roll(1,132000016)
--continuously updated
if int>132000000 and int<132000014 then int=int+739100000 end
if int==132000014 then int=460524290 end
if int==132000015 then int=978210027 end
if int==132000016 then int=250000000 end
if KOISHI_CHECK then
local cc,ca,ctype=Duel.ReadCard(int,CARDDATA_CODE,CARDDATA_ALIAS,CARDDATA_TYPE)
if cc then
local dif=cc-ca
local real=0
if dif>-10 and dif<10 then
real=ca
else
real=cc
end
local prec=Duel.CreateToken(tp,real)
if ctype&TYPE_TOKEN==0 and not cm.list(real) and (ctype&TYPE_SPELL~=0 or ctype&TYPE_TRAP~=0) and prec:CheckActivateEffect(false,false,false)~=nil then
ac=real
end
end
else
if not _G["c"..int] then
_G["c"..int]={}
_G["c"..int].__index=_G["c"..int]
end
GetID=function()
return _G["c"..int],int
end
if pcall(function() require("expansions/script/c"..int) end) or pcall(function() require("script/c"..int) end) then
_G["c"..int]=nil
local bool,token=pcall(Duel.CreateToken,tp,int)
if bool and not token:IsType(TYPE_TOKEN) and (token:IsType(TYPE_SPELL) or token:IsType(TYPE_SPELL)) and token:CheckActivateEffect(false,false,false)~=nil then
ac=token:GetCode()
end
end
end
end
table.insert(tab1,ac)
table.insert(cm.blacklist,ac)
ac=nil
end
for i=1,ct1 do
g1:AddCard(Duel.CreateToken(tp,tab1[i]))
end
if #g1>0 then
local codes={}
for tc in aux.Next(g1) do
local code=tc:GetCode()
table.insert(codes,code)
end
table.sort(codes)
if aux.GetValueType(codes[1])=="number" then
local afilter={codes[1],OPCODE_ISCODE}
if #codes>1 then
for i=2,#codes do
table.insert(afilter,codes[i])
table.insert(afilter,OPCODE_ISCODE)
table.insert(afilter,OPCODE_OR)
end
end
local ac=g1:GetFirst()
while ac do
if ac:IsType(TYPE_FIELD) then
Duel.MoveToField(ac,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
Duel.RaiseEvent(ac,4179255,te,0,tp,tp,Duel.GetCurrentChain())
else
Duel.MoveToField(ac,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
local te=ac:GetActivateEffect()
te:UseCountLimit(tp,1,true)
cm.ActivateCard(ac,tp,e)
if not (ac:IsType(TYPE_CONTINUOUS) or ac:IsType(TYPE_FIELD) or ac:IsType(TYPE_EQUIP)) then
Duel.SendtoGrave(ac,REASON_RULE)
end
ac=g1:GetNext()
end
end
end
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Yogg_g:AddCard(re:GetHandler())
end
function cm.ActivateCard(c,tp,oe)
local e=c:GetActivateEffect()
local cos,tg,op=e:GetCost(),e:GetTarget(),e:GetOperation()
if e and (not cos or cos(e,tp,eg,ep,ev,re,r,rp,0)) and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)) then
oe:SetProperty(e:GetProperty())
local code=c:GetOriginalCode()
Duel.Hint(HINT_CARD,tp,code)
Duel.Hint(HINT_CARD,1-tp,code)
e:UseCountLimit(tp,1,true)
c:CreateEffectRelation(e)
if cos then cos(e,p,eg,ep,ev,re,r,rp,1) end
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g and #g~=0 then
local tg=g:GetFirst()
while tg do
tg:CreateEffectRelation(e)
tg=g:GetNext()
end
end
if op then op(e,tp,eg,ep,ev,re,r,rp) end
c:ReleaseEffectRelation(e)
if g then
tg=g:GetFirst()
while tg do
tg:ReleaseEffectRelation(e)
tg=g:GetNext()
end
end
end
end
--苔丝·格雷迈恩
local cm,m,o=GetID()
function cm.initial_effect(c)
Tess_g=Group.CreateGroup()
Tess_g:KeepAlive()
GM_g=Group.CreateGroup()
GM_g:KeepAlive()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCondition(cm.con2)
e1:SetOperation(cm.op2)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCondition(cm.rmcon)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.con2(e,tp)
return Duel.GetFlagEffect(tp,m)==0
end
function cm.op2(e,tp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND+LOCATION_DECK,LOCATION_HAND+LOCATION_DECK,nil)
GM_g:Merge(g)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1000)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
if Tess_g:GetCount()~=0 then
local bc=Tess_g:GetFirst()
while bc do
if not GM_g:IsContains(bc) then
local ac=Duel.CreateToken(tp,bc:GetCode())
if ac:CheckActivateEffect(false,false,false)~=nil then
if ac:IsType(TYPE_FIELD) then
Duel.MoveToField(ac,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
Duel.RaiseEvent(ac,4179255,te,0,tp,tp,Duel.GetCurrentChain())
else
Duel.MoveToField(ac,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
local te=ac:GetActivateEffect()
te:UseCountLimit(tp,1,true)
cm.ActivateCard(ac,tp,e)
if not (ac:IsType(TYPE_CONTINUOUS) or ac:IsType(TYPE_FIELD) or ac:IsType(TYPE_EQUIP)) then
Duel.SendtoGrave(ac,REASON_RULE)
end
end
end
bc=Tess_g:GetNext()
end
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Tess_g:AddCard(re:GetHandler())
end
function cm.ActivateCard(c,tp,oe)
local e=c:GetActivateEffect()
local cos,tg,op=e:GetCost(),e:GetTarget(),e:GetOperation()
if e and (not cos or cos(e,tp,eg,ep,ev,re,r,rp,0)) and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)) then
oe:SetProperty(e:GetProperty())
local code=c:GetOriginalCode()
Duel.Hint(HINT_CARD,tp,code)
Duel.Hint(HINT_CARD,1-tp,code)
e:UseCountLimit(tp,1,true)
c:CreateEffectRelation(e)
if cos then cos(e,p,eg,ep,ev,re,r,rp,1) end
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g and #g~=0 then
local tg=g:GetFirst()
while tg do
tg:CreateEffectRelation(e)
tg=g:GetNext()
end
end
if op then op(e,tp,eg,ep,ev,re,r,rp) end
c:ReleaseEffectRelation(e)
if g then
tg=g:GetFirst()
while tg do
tg:ReleaseEffectRelation(e)
tg=g:GetNext()
end
end
end
end
--清流淌我心
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
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) and aux.NegateMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.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)
if Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,7,nil,ATTRIBUTE_WATER) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) then
Duel.Draw(tp,Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0),REASON_EFFECT)
elseif Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) then
for i=1,Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) do
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil):RandomSelect(tp,1)
Duel.Remove(g1,REASON_EFFECT)
end
end
end
end
end
\ No newline at end of file
--微风入我怀
local cm,m,o=GetID()
function cm.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:SetCondition(cm.spcon)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return #g>0 and g:FilterCount(cm.cfilter,nil)==#g
end
function cm.filter(c)
return ((c:IsAttack(1320) and c:IsDefense(1450)) or (c:IsRace(RACE_SPELLCASTER) and c:GetBaseAttack()==1850) or (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER))) 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.activate(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)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--神光耀我瞳
local cm,m,o=GetID()
function cm.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:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
local endcount=0
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
endcount=endcount+g:GetCount()
local g2=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_HAND,1,nil)
if g2~=0 then
Duel.ConfirmCards(tp,g2)
endcount=endcount+g2:GetCount()
if endcount>=1 then
Duel.Recover(tp,500,REASON_EFFECT)
end
if endcount>=3 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if endcount>=5 then
local uc=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil):RandomSelect(tp,1)
Duel.Remove(uc,POS_FACEUP,REASON_EFFECT)
end
if endcount>=7 then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_REVERSE_DECK)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
Duel.RegisterEffect(e2,tp)
end
end
end
end
\ No newline at end of file
--煌炎化我牙
local cm,m,o=GetID()
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target1)
e1:SetOperation(cm.activate1)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsCode(759393,4376658,76615300,92518817) 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.spcheck(g)
return g:GetClassCount(Card.GetCode)==1
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
local ft=math.min(3,#g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=g:SelectSubGroup(tp,cm.spcheck,false,1,ft)
if #hg>0 and Duel.SendtoHand(hg,nil,REASON_EFFECT)>0 and hg:Filter(Card.IsLocation,nil,LOCATION_HAND):FilterCount(Card.IsControler,nil,tp)>0 then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_HAND):Filter(Card.IsControler,nil,tp)
Duel.ConfirmCards(1-tp,og)
end
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,759393):RandomSelect(tp,1)
g1:Merge(Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,4376658):RandomSelect(tp,1))
g1:Merge(Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,76615300):RandomSelect(tp,1))
g1:Merge(Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,92518817):RandomSelect(tp,1))
g1:Merge(Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,48815792):RandomSelect(tp,1))
if chk==0 then return g1:GetCount()>=5 end
Duel.SendtoGrave(g1,REASON_RULE)
end
function cm.filter2(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
local ft=math.min(3,#g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=g:SelectSubGroup(tp,cm.spcheck,false,1,ft)
if #hg>0 and Duel.SendtoHand(hg,nil,REASON_EFFECT)>0 and hg:Filter(Card.IsLocation,nil,LOCATION_HAND):FilterCount(Card.IsControler,nil,tp)>0 then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_HAND):Filter(Card.IsControler,nil,tp)
Duel.ConfirmCards(1-tp,og)
end
end
end
\ No newline at end of file
--自奏圣乐·伽拉忒莉
local cm,m,o=GetID()
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,cm.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.drcon1)
e1:SetOperation(cm.drop1)
c:RegisterEffect(e1)
--sp_summon effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(cm.drcon2)
e3:SetOperation(cm.drop2)
c:RegisterEffect(e3)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30741503,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.tdcon1)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(cm.tdcon2)
c:RegisterEffect(e3)
end
function cm.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x11b)
end
function cm.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function cm.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.setfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave()
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
local xg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,tc:GetCode())
local g=Duel.GetMatchingGroup(cm.setfilter,tp,LOCATION_DECK,0,xg)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
function cm.filter(c,sp)
return c:IsSummonPlayer(sp)
end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-tp) and e:GetHandler():IsLinkState()
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function cm.drop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m)<3 then
Duel.Draw(tp,1,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-tp) and e:GetHandler():IsLinkState()
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m+10000000,RESET_CHAIN,0,1)
end
function cm.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m+10000000)>0
end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,m+10000000)
local abled=3-Duel.GetFlagEffect(tp,m)
if abled>0 then
local tn=math.min(n,abled)
Duel.ResetFlagEffect(tp,m+10000000)
Duel.Draw(tp,tn,REASON_EFFECT)
for i=1,tn do
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment