Commit f241c1da authored by Nemo Ma's avatar Nemo Ma

upd wd

parent b9b307d4
No preview for this file type
expansions/pics/65123333.jpg

106 KB | W: | H:

expansions/pics/65123333.jpg

105 KB | W: | H:

expansions/pics/65123333.jpg
expansions/pics/65123333.jpg
expansions/pics/65123333.jpg
expansions/pics/65123333.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65123334.jpg

93.5 KB | W: | H:

expansions/pics/65123334.jpg

92.6 KB | W: | H:

expansions/pics/65123334.jpg
expansions/pics/65123334.jpg
expansions/pics/65123334.jpg
expansions/pics/65123334.jpg
  • 2-up
  • Swipe
  • Onion skin
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
local s,id,o=GetID()
function s.initial_effect(c)
end
......@@ -14,6 +14,100 @@ local _Effect=tableclone(Effect)
local _Group=tableclone(Group)
local _Debug=tableclone(Debug)
function s.initial_effect(c)
local control_player=0
if _Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end
local CardCount=_Duel.GetMatchingGroupCount(s.cfilter,control_player,LOCATION_EXTRA,0,nil,id)
if _Duel.GetMatchingGroupCount(s.cfilter,control_player,LOCATION_DECK,0,nil,id+2)>0 and KOISHI_CHECK then
s.globle_check=true
_G.dealerplayer=control_player
_Debug.SetPlayerInfo(control_player,8000,0,0)
_Debug.SetPlayerInfo(1-control_player,8000,0,0)
elseif CardCount==1 then
s.Wild_Mode=true
if KOISHI_CHECK then
function Card.RegisterEffect(ec,e,bool)
if s.cfilter(ec,id) then
return _Card.RegisterEffect(ec,e,bool)
else
local ge0=Effect.CreateEffect(ec)
ge0:SetType(EFFECT_TYPE_SINGLE)
ge0:SetCode(EFFECT_CANNOT_SSET)
_Card.RegisterEffect(ec,ge0,true)
local ge1=Effect.CreateEffect(ec)
ge1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DRAW)
ge1:SetOperation(s.changecardcode)
return _Card.RegisterEffect(ec,ge1,true)
end
end
local dg=_Duel.GetFieldGroup(control_player,0,LOCATION_DECK)
for tc in aux.Next(dg) do
s.resetcard(tc)
end
local ge0=Effect.GlobalEffect()
ge0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_DRAW)
ge0:SetOperation(s.changecardcode)
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge1:SetTargetRange(0,LOCATION_DECK+LOCATION_HAND)
ge1:SetLabelObject(ge0)
_Duel.RegisterEffect(ge1,control_player)
end
elseif CardCount==2 and KOISHI_CHECK then
_Duel.DisableActionCheck(true)
_Debug.SetPlayerInfo(control_player,8000,0,1)
_Debug.SetPlayerInfo(1-control_player,0,0,1)
if Duel.GetLP(1-control_player)>0 then
--local sl = coroutine.create(Duel.SetLP)
--coroutine.resume(sl,1-control_player,0)
pcall(Duel.SetLP,1-control_player,0)
end
function Duel.RegisterEffect(re,rp)
if re:GetCode()==37564153 then return end
_Duel.RegisterEffect(re,rp)
end
--local movet = coroutine.create(Duel.MoveTurnCount)
--coroutine.resume(movet)
--local move1 = coroutine.create(Duel.MoveToField)
--coroutine.resume(move1,c,control_player,control_player,LOCATION_MZONE,POS_FACEUP_ATTACK,true,0x20)
--local re = coroutine.create(Duel.Recover)
--coroutine.resume(re,1-control_player,2147483647,REASON_RULE)
--local pl = coroutine.create(Duel.PayLPCost)
--coroutine.resume(pl,1-control_player,2147483647,true)
--local dam = coroutine.create(Duel.Damage)
--coroutine.resume(dam,1-control_player,2147483647,REASON_RULE)
pcall(_Duel.MoveTurnCount)
pcall(_Duel.MoveToField,c,control_player,control_player,LOCATION_MZONE,POS_FACEUP_ATTACK,true,0x20)
local atke=Effect.CreateEffect(c)
atke:SetType(EFFECT_TYPE_SINGLE)
atke:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
atke:SetCode(EFFECT_SET_BATTLE_ATTACK)
atke:SetValue(2147483647)
_Card.RegisterEffect(c,atke,true)
local atke2=Effect.CreateEffect(c)
atke2:SetType(EFFECT_TYPE_SINGLE)
atke2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
atke2:SetCode(EFFECT_MATCH_KILL)
_Card.RegisterEffect(c,atke2,true)
--local cd = coroutine.create(Duel.CalculateDamage)
--coroutine.resume(cd,c,nil)
--local dr1 = coroutine.create(Duel.Draw)
--coroutine.resume(dr1,control_player,5,REASON_RULE)
--local dr2 = coroutine.create(Duel.Draw)
--coroutine.resume(dr2,1-control_player,2147483647,REASON_RULE)
--pcall(Duel.CalculateDamage,c,nil)
--
if control_player==0 then
--s.Administrator(5)
else
end
pcall(_Duel.CalculateDamage,c,nil)
pcall(dr1,control_player,5,REASON_RULE)
pcall(dr1,1-control_player,2147483647,REASON_RULE)
--Debug.AddCard(id+2,1-control_player,1-control_player,LOCATION_DECK,1,POS_FACEDOWN)
_Duel.DisableActionCheck(false)
end
if not s.globle_check then
s.autodata={
lp={8000,8000},
......@@ -115,92 +209,6 @@ function s.initial_effect(c)
sge6:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(sge6,0)
end
local control_player=0
if _Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end
if _Duel.GetMatchingGroupCount(s.cfilter,control_player,LOCATION_EXTRA,0,nil,id)==1 then
s.Wild_Mode=true
if KOISHI_CHECK then
function Card.RegisterEffect(ec,e,bool)
if s.cfilter(ec) then
return _cRegisterEffect(ec,e,bool)
else
local ge0=Effect.CreateEffect(ec)
ge0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_DRAW)
ge0:SetOperation(s.changecardcode)
return _Card.RegisterEffect(ec,ge0,true)
end
end
local dg=_Duel.GetFieldGroup(control_player,0,LOCATION_DECK)
for tc in aux.Next(dg) do
_Card.RegisterEffect(tc)
end
local ge0=Effect.GlobalEffect()
ge0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_DRAW)
ge0:SetOperation(s.changecardcode)
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge1:SetTargetRange(0,LOCATION_DECK+LOCATION_HAND)
ge1:SetLabelObject(ge0)
_Duel.RegisterEffect(ge1,control_player)
end
end
if _Duel.GetMatchingGroupCount(s.cfilter,control_player,0x7f,0,nil,id)==2 and KOISHI_CHECK then
_Duel.DisableActionCheck(true)
_Debug.SetPlayerInfo(control_player,8000,0,1)
_Debug.SetPlayerInfo(1-control_player,0,0,1)
if Duel.GetLP(1-control_player)>0 then
--local sl = coroutine.create(Duel.SetLP)
--coroutine.resume(sl,1-control_player,0)
pcall(Duel.SetLP,1-control_player,0)
end
function Duel.RegisterEffect(re,rp)
if re:GetCode()==37564153 then return end
_Duel.RegisterEffect(re,rp)
end
--local movet = coroutine.create(Duel.MoveTurnCount)
--coroutine.resume(movet)
--local move1 = coroutine.create(Duel.MoveToField)
--coroutine.resume(move1,c,control_player,control_player,LOCATION_MZONE,POS_FACEUP_ATTACK,true,0x20)
--local re = coroutine.create(Duel.Recover)
--coroutine.resume(re,1-control_player,2147483647,REASON_RULE)
--local pl = coroutine.create(Duel.PayLPCost)
--coroutine.resume(pl,1-control_player,2147483647,true)
--local dam = coroutine.create(Duel.Damage)
--coroutine.resume(dam,1-control_player,2147483647,REASON_RULE)
pcall(_Duel.MoveTurnCount)
pcall(_Duel.MoveToField,c,control_player,control_player,LOCATION_MZONE,POS_FACEUP_ATTACK,true,0x20)
local atke=Effect.CreateEffect(c)
atke:SetType(EFFECT_TYPE_SINGLE)
atke:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
atke:SetCode(EFFECT_SET_BATTLE_ATTACK)
atke:SetValue(2147483647)
_Card.RegisterEffect(c,atke,true)
local atke2=Effect.CreateEffect(c)
atke2:SetType(EFFECT_TYPE_SINGLE)
atke2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
atke2:SetCode(EFFECT_MATCH_KILL)
_Card.RegisterEffect(c,atke2,true)
--local cd = coroutine.create(Duel.CalculateDamage)
--coroutine.resume(cd,c,nil)
--local dr1 = coroutine.create(Duel.Draw)
--coroutine.resume(dr1,control_player,5,REASON_RULE)
--local dr2 = coroutine.create(Duel.Draw)
--coroutine.resume(dr2,1-control_player,2147483647,REASON_RULE)
--pcall(Duel.CalculateDamage,c,nil)
--
if control_player==0 then
--s.Administrator(5)
else
end
pcall(_Duel.CalculateDamage,c,nil)
pcall(dr1,control_player,5,REASON_RULE)
pcall(dr1,1-control_player,2147483647,REASON_RULE)
--Debug.AddCard(id+2,1-control_player,1-control_player,LOCATION_DECK,1,POS_FACEDOWN)
_Duel.DisableActionCheck(false)
end
end
local msg_map = {
[1] = "MSG_RETRY",
......@@ -308,22 +316,46 @@ function s.Administrator(number)
_Debug.Message(s.get_msg_name(number))
_Debug.ShowHint(result)
end
local A=1103515245
local B=12345
local M=32767
function s.rollrandom(min,max)
if not s.random then
local g=Duel.GetFieldGroup(0,0xff,0xff):RandomSelect(2,1)
s.random=g:GetFirst():GetCode()+Duel.GetTurnCount()+Duel.GetFieldGroupCount(1,LOCATION_GRAVE,0)
end
min=tonumber(min)
max=tonumber(max)
s.random=((s.random*A+B)%M)/M
if min~=nil then
if max==nil then
return math.floor(s.random*min)+1
else
max=max-min+1
return math.floor(s.random*max+min)
end
end
return s.random
end
function s.changecardcode(e,tp)
local cardtable={27520594,95511642,22916281,58400390,4392470,62514770,46986414,89631139}
local c=e:GetHandler()
math.randomseed(c:GetCode())
local code=cardtable[math.random(8)]
c:SetEntityCode(code,true)
if not s.random then
s.random=c:GetCode()
end
local code=65123100+s.rollrandom(0,3)*20+s.rollrandom(1,13)
c:SetEntityCode(id+2,true)
c:SetCardData(CARDDATA_CODE,code)
c:ReplaceEffect(code,0)
end
function s.cfilter(c)
return c:GetOriginalCode()==id
function s.cfilter(c,cid)
return c:GetOriginalCode()==cid
end
function s.startop(e,tp,eg,ep,ev,re,r,rp)
s.initial_effect=function() end
local g=Duel.GetFieldGroup(0,0x7f,0x7f)
local xg=Duel.GetOverlayGroup(0,0x7f,0x7f)
g:Merge(xg)
g=g:Filter(s.cfilter,nil)
g=g:Filter(s.cfilter,nil,id)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -538,6 +570,7 @@ function s.menuop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
end
if s.password[4] then
s.Developer_Mode=true
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(id+2,0))
end
page=0
elseif ot==4 then
......@@ -573,7 +606,7 @@ function s.menuop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local desc1=s.Wild_Mode and 11 or 10
local desc2=s.Random_Mode and 13 or 12
local desc3=s.Theworld_Mode and 10 or 9
local desc4=s.Developer_Mode and 1255 or 1212
local desc4=s.Developer_Mode and aux.Stringid(id+2,1) or 1212
ot=_Duel.SelectOption(tp,1360,aux.Stringid(id,desc1),aux.Stringid(id,desc2),aux.Stringid(id,14),desc4)
if ot==0 then
page=page-1
......@@ -1198,8 +1231,10 @@ function s.get_save_location(c)
else return c:GetLocation() end
end
function s.get_save_sequence(c)
if c:IsOnField() then return c:GetSequence()
else return 0 end
if c:IsLocation(LOCATION_PZONE) and c:GetSequence()==0 then return 0 end
if c:IsLocation(LOCATION_PZONE) and c:GetSequence()==4 then return 1 end
if c:IsOnField() then return c:GetSequence() end
return 0
end
function s.save()
local data={
......@@ -1270,6 +1305,8 @@ function s.loadcard(c,data)
Duel.Remove(tc,cdata.position,REASON_RULE)
elseif cdata.location==LOCATION_EXTRA then
if tc:IsLocation(LOCATION_DECK) then Duel.SendtoExtraP(tc,p,REASON_RULE) end
elseif cdata.location==LOCATION_PZONE then
Duel.MoveToField(tc,p,p,cdata.location,cdata.position,true,cdata.sequence)
elseif cdata.location&LOCATION_ONFIELD>0 then
if cdata.sequence>=5 then Duel.SendtoExtraP(tc,p,REASON_RULE) end
if not Duel.MoveToField(tc,p,p,cdata.location,cdata.position,true,2^cdata.sequence) then Duel.SendtoGrave(tc,REASON_RULE) end
......@@ -2262,9 +2299,9 @@ function s.toolop(tp)
end
end
function s.testop(e,tp)
local op1=_Duel.SelectOption(tp,1294,1216)
local op1=_Duel.SelectOption(tp,aux.Stringid(id+2,2),aux.Stringid(id+2,3),1212)
if op1==0 then
local op2=_Duel.SelectOption(tp,1151,1350)
local op2=_Duel.SelectOption(tp,1151,aux.Stringid(id+2,6))
if op2==0 then
local op3=_Duel.SelectOption(tp,4,5,6)
if op3==0 then
......@@ -2292,7 +2329,7 @@ function s.testop(e,tp)
Duel.RaiseEvent(eg,EVENT_FLIP,e,0,tp,tp,0)
end
elseif op2==1 then
local op3=_Duel.SelectOption(tp,1103,1102,1101,500)
local op3=_Duel.SelectOption(tp,1103,1102,aux.Stringid(id+2,7),aux.Stringid(id+2,8))
if op3==0 then
local eg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE,LOCATION_GRAVE,0,99,nil)
if eg:GetCount()==0 then return end
......@@ -2326,5 +2363,7 @@ function s.testop(e,tp)
elseif op1==1 then
local msg=_Duel.AnnounceNumber(tp,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,18,19,20,22,23,24,25,26,30,31,32,33,34,35,36,37,38,39,40,41,42,50,53,54,55,56,60,61,62,63,64,65,70,71,72,73,74,75,76,80,81,83,90,91,92,93,94,95,96,97,100,101,102,110,111,112,113,114,120,121,122,123,130,131,132,133,140,141,142,143,160,161,162,163,164,165,170,180)
s.Administrator(msg)
else
return
end
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
if not s.globle_check then
s.globle_check=true
local ge0=Effect.GlobalEffect()
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_DRAW)
ge0:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
ge0:SetOperation(s.startop)
Duel.RegisterEffect(ge0,0)
local cge0=ge0:Clone()
cge0:SetCode(EVENT_PREDRAW)
Duel.RegisterEffect(cge0,0)
end
end
function s.startop(e,tp,eg,ep,ev,re,r,rp)
if _G.dealerplayer then
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CUSTOM+id)
e1:SetOperation(s.adjust)
Duel.RegisterEffect(e1,0)
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CUSTOM+id+1)
e2:SetOperation(s.iswin1)
Duel.RegisterEffect(e2,0)
local e3=Effect.GlobalEffect()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CUSTOM+id+2)
e3:SetOperation(s.adjust)
Duel.RegisterEffect(e3,0)
s.carddeck={}
s.drawnIndexes={}
s.step=1
for i=0,3 do
for j=1,13 do
table.insert(s.carddeck,65123100+20*i+j)
end
end
s.dealcard(0,false)
s.dealcard(0,false)
s.dealcard(1,false)
s.dealcard(1,false)
local pg=Group.FromCards(Duel.GetFieldCard(0,LOCATION_MZONE,1),Duel.GetFieldCard(1,LOCATION_MZONE,0),Duel.GetFieldCard(1,LOCATION_MZONE,1))
Duel.ChangePosition(pg,POS_FACEUP_ATTACK)
s.iswin1()
end
end
local A=1103515245
local B=12345
local M=32767
function s.rollrandom(min,max)
if not s.random then
local g=Duel.GetFieldGroup(0,0xff,0xff):RandomSelect(2,1)
s.random=g:GetFirst():GetCode()+Duel.GetTurnCount()+Duel.GetFieldGroupCount(1,LOCATION_GRAVE,0)
end
min=tonumber(min)
max=tonumber(max)
s.random=((s.random*A+B)%M)/M
if min~=nil then
if max==nil then
return math.floor(s.random*min)+1
else
max=max-min+1
return math.floor(s.random*max+min)
end
end
return s.random
end
function s.changecardcode(c)
local availableIndexes={}
for i=1,#s.carddeck do
if not s.drawnIndexes[i] then
table.insert(availableIndexes,i)
end
end
if #availableIndexes==0 then
Debug.Message("卡组已经空了")
s.drawnIndexes={}
for i=1,#s.carddeck do
if not s.drawnIndexes[i] then
table.insert(availableIndexes,i)
end
end
end
local randIndex=s.rollrandom(1,#availableIndexes)
local chosenIndex=availableIndexes[randIndex]
s.drawnIndexes[chosenIndex]=true
local code=s.carddeck[chosenIndex]
c:SetEntityCode(id,true)
c:SetCardData(CARDDATA_CODE,code)
c:ReplaceEffect(code,0)
end
function s.dealcard(tp,bool)
local loc=LOCATION_MZONE
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then loc=LOCATION_SZONE end
local seq=0
for i=0,4 do
if Duel.CheckLocation(tp,loc,i) then
seq=i
break
end
end
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then
Duel.SendtoDeck(Duel.CreateToken(tp,id),tp,0,REASON_RULE)
end
local mc=Duel.GetFieldGroup(tp,LOCATION_DECK,0):GetFirst()
Duel.MoveToField(mc,tp,tp,loc,POS_FACEDOWN_ATTACK,false,2^seq)
s.changecardcode(mc)
if bool then Duel.ChangePosition(mc,POS_FACEUP_ATTACK) end
local e0=Effect.CreateEffect(mc)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_TYPE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetValue(TYPE_NORMAL+TYPE_MONSTER)
mc:RegisterEffect(e0,true)
local e1=e0:Clone()
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
mc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_REMOVE_RACE)
e2:SetValue(RACE_ALL)
mc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_REMOVE_ATTRIBUTE)
e3:SetValue(0xff)
mc:RegisterEffect(e3,true)
local lv=mc:GetOriginalCode()%20
if lv>10 then
lv=10
elseif lv==1 then
lv=11
end
local e1=Effect.CreateEffect(mc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetLabel(lv)
e1:SetValue(s.getlv)
mc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
mc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
mc:RegisterEffect(e3,true)
end
function s.getlv(e,c)
local lv=e:GetLabel()
if lv==11 and s.getscore(c:GetControler(),c)>=11 then return 1 end
return lv
end
function s.cfilter(c)
return c:GetOriginalCode()%20~=1
end
function s.adjust(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
local g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_ONFIELD,0,nil)
local g1=g:Filter(s.cfilter,nil)
local g2=g:Filter(aux.TRUE,g1)
local num=0
for tc in aux.Next(g1) do
local lv=tc:GetOriginalCode()%20
if lv>10 then lv=10 end
num=num+lv
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(lv)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
tc:RegisterEffect(e3,true)
end
for tc in aux.Next(g2) do
local lv=1
if num+g2:GetCount()<=11 then
lv=11
end
num=num+lv
end
end
--Duel.RaiseEvent(Group.CreateGroup(),EVENT_CUSTOM+id+s.step,e,0,1,1,0)
end
function s.getscore(tp,c)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,c)
local g1=g:Filter(s.cfilter,nil)
local g2=g:Filter(aux.TRUE,g1)
local num=0
for tc in aux.Next(g1) do
local lv=tc:GetOriginalCode()%20
if lv>10 then lv=10 end
num=num+lv
end
for tc in aux.Next(g2) do
local lv=1
if num+g2:GetCount()<=11 then
lv=11
end
num=num+lv
end
return num
end
function s.iswin1()
local iscontinue=true
while iscontinue do
local score=s.getscore(1)
if score>21 then
iscontinue=false
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(id,10))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(id,10))
Duel.Win(0,0x0)
elseif score~=21 and Duel.SelectYesNo(1,aux.Stringid(id,9)) then
s.dealcard(1,true)
--Duel.RaiseEvent(Group.CreateGroup(),EVENT_CUSTOM+id+1,e,0,1,1,0)
else
iscontinue=false
--Debug.ShowHint(".达拉崩巴斑得贝迪卜多比鲁翁>")
Duel.ChangePosition(Duel.GetFieldCard(0,LOCATION_MZONE,0),POS_FACEUP_ATTACK)
s.iswin2()
end
end
end
function s.iswin2()
local iscontinue=true
while iscontinue do
local score=s.getscore(0)
if score>21 then
iscontinue=false
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(id,10))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(id,10))
Duel.Win(1,0x0)
elseif score<17 then
s.dealcard(0,true)
else
iscontinue=false
if s.getscore(1)>s.getscore(0) then
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(id,11))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(id,12))
Duel.Win(1,0x0)
elseif s.getscore(1)<s.getscore(0) then
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(id,12))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(id,11))
Duel.Win(0,0x0)
else
--Debug.ShowHint("达拉崩巴斑得贝迪卜多比鲁翁>")
Duel.SendtoDeck(Duel.GetFieldGroup(0,LOCATION_ONFIELD,LOCATION_ONFIELD),tp,0,REASON_RULE)
s.dealcard(0,false)
s.dealcard(0,false)
s.dealcard(1,false)
s.dealcard(1,false)
local pg=Group.FromCards(Duel.GetFieldCard(0,LOCATION_MZONE,1),Duel.GetFieldCard(1,LOCATION_MZONE,0),Duel.GetFieldCard(1,LOCATION_MZONE,1))
Duel.ChangePosition(pg,POS_FACEUP_ATTACK)
s.iswin1()
--Duel.Win(PLAYER_NONE,0x0)
end
end
end
end
\ No newline at end of file
......@@ -5,45 +5,23 @@ function c65810025.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65810025+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c65810025.cost)
e1:SetCountLimit(1,65810025)
e1:SetTarget(c65810025.target)
e1:SetOperation(c65810025.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(65810025,ACTIVITY_SPSUMMON,c65810025.counterfilter)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65810025,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,65810025+EFFECT_COUNT_CODE_OATH)
e2:SetCost(c65810025.cost)
e2:SetCountLimit(1,65810026)
e2:SetTarget(c65810025.target1)
e2:SetOperation(c65810025.activate1)
c:RegisterEffect(e2)
end
--自诉
function c65810025.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
function c65810025.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(65810025,tp,ACTIVITY_SPSUMMON)==0 end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c65810025.sumlimit)
Duel.RegisterEffect(e2,tp)
end
function c65810025.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
function c65810025.filter(c)
return c:IsSetCard(0xa31) and c:IsAbleToHand()
......
--盛夏回忆·飞蛾
function c65810050.initial_effect(c)
c:SetSPSummonOnce(65810050)
--特招手续
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c65810050.ffilter,4,false)
aux.AddFusionProcFunRep(c,c65810050.ffilter,4,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST)
--不能融合
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--护航
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e2:SetCondition(c65810050.condition)
e2:SetTarget(c65810050.limtg)
e2:SetOperation(c65810050.limop)
c:RegisterEffect(e2)
......@@ -51,7 +45,10 @@ function c65810050.ffilter(c,fc,sub,mg,sg)
end
function c65810050.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonLocation(LOCATION_EXTRA) and Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
function c65810050.limtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(c65810050.chainlm)
......
......@@ -5,35 +5,13 @@ function c65810090.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65810090+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c65810090.cost)
e1:SetTarget(c65810090.target)
e1:SetOperation(c65810090.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(65810090,ACTIVITY_SPSUMMON,c65810090.counterfilter)
end
--自诉
function c65810090.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
function c65810090.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(65810090,tp,ACTIVITY_SPSUMMON)==0 end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c65810090.sumlimit)
Duel.RegisterEffect(e2,tp)
end
function c65810090.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
--检测
function c65810090.filter1(c)
return c:IsAbleToGrave(REASON_EFFECT) and c:IsSetCard(0xa31)
......@@ -46,6 +24,7 @@ function c65810090.spfilter(c,e,tp)
return c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65810090.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c65810090.filter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......@@ -62,5 +41,16 @@ function c65810090.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c65810090.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c65810090.splimit(e,c)
return not c:IsRace(RACE_INSECT)
end
\ No newline at end of file
......@@ -6,6 +6,7 @@ function c65810095.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,65810095+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c65810095.spcon)
e1:SetOperation(c65810095.spop)
c:RegisterEffect(e1)
......
......@@ -2,7 +2,7 @@
function c65810110.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon
aux.AddXyzProcedure(c,nil,2,3,c65810110.ovfilter,aux.Stringid(65810110,0),99,c65810110.xyzop)
aux.AddXyzProcedure(c,nil,2,2,c65810110.ovfilter,aux.Stringid(65810110,0),2,c65810110.xyzop)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
......
......@@ -40,7 +40,7 @@ function c65810115.lcheck(g,lc)
end
function c65810115.chcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c65810115.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65810115.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
......@@ -57,7 +57,7 @@ function c65810115.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,c65810115.repop)
end
function c65810115.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
Duel.Destroy(e:GetHandler(),REASON_RULE)
end
function c65810115.setfilter(c)
......
......@@ -3,6 +3,7 @@ local s,id,o=GetID()
function c65810120.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa31),aux.FilterBoolFunction(Card.IsRace,RACE_INSECT),1)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_INSECT),aux.FilterBoolFunction(Card.IsSetCard,0xa31),1)
c:EnableReviveLimit()
--
local e2=Effect.CreateEffect(c)
......@@ -42,7 +43,7 @@ function c65810120.disfilter(c)
end
function c65810120.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and Duel.IsChainDisablable(ev) and (re:IsActiveType(TYPE_SPELL) or re:IsActiveType(TYPE_TRAP)) and Duel.CheckReleaseGroupEx(c:GetControler(),c65810120.disfilter,1,REASON_EFFECT,true,nil) and e:GetHandler():GetFlagEffect(id)<=0
return rp==1-tp and Duel.IsChainDisablable(ev) and (re:IsActiveType(TYPE_SPELL) or re:IsActiveType(TYPE_TRAP)) and Duel.CheckReleaseGroupEx(c:GetControler(),c65810120.disfilter,1,REASON_EFFECT,true,nil) and e:GetHandler():GetFlagEffect(id)<=0 and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c65810120.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
--盛夏回忆·牛虻
function c65810125.initial_effect(c)
aux.AddCodeList(c,65810125)
--replace
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(65810125,0))
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetRange(LOCATION_DECK)
e0:SetCode(EFFECT_SEND_REPLACE)
e0:SetTarget(c65810125.reptg)
e0:SetValue(function(e,c) return c:GetFlagEffect(65810125)>0 end)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65810125,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,65810126)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c65810125.spcon)
e1:SetTarget(c65810125.sptg)
e1:SetOperation(c65810125.spop)
c:RegisterEffect(e1)
--攻宣无效
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetCondition(c65810125.condition3)
e3:SetCost(c65810125.cost3)
e3:SetOperation(c65810125.activate3)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_GRAVE_SPSUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCountLimit(1,65810127)
e4:SetTarget(c65810125.target4)
e4:SetOperation(c65810125.activate4)
c:RegisterEffect(e4)
local e2=e4:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c65810125.filter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_DECK) and c:GetDestination()==LOCATION_HAND and c:IsRace(RACE_INSECT) and c:IsAbleToHand() and not c:IsCode(65810125)
end
function c65810125.filter1(c,e,g)
return (c:GetOriginalCode()==65810125 or c==e:GetHandler()) and c:IsAbleToHand() and not g:IsContains(c)
end
function c65810125.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c65810125.filter1,tp,LOCATION_DECK,0,nil,e,eg)
if chk==0 then return eg:IsExists(c65810125.filter,1,nil,tp) and c==g:GetFirst() end
if Duel.SelectYesNo(tp,aux.Stringid(65810125,0)) then
local g=eg:Filter(c65810125.filter,nil,tp)
local ttc=g:GetFirst()
while ttc do
Card.RegisterFlagEffect(ttc,65810125,RESET_CHAIN,0,1,e)
ttc=g:GetNext()
end
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
return true
else return false end
end
function c65810125.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
end
function c65810125.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c65810125.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
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c65810125.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c65810125.splimit(e,c)
return not c:IsRace(RACE_INSECT)
end
function c65810125.condition3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c65810125.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost()
end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c65810125.activate3(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
function c65810125.spfilter(c,e,tp)
return c:IsCode(65810125)
end
function c65810125.target4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65810125.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND+LOCATION_REMOVED)
end
function c65810125.activate4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65810125.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c65810125.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c65810125.splimit(e,c)
return not c:IsRace(RACE_INSECT)
end
\ No newline at end of file
--红色战钢 初级技师
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id+1)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(CATEGORY_RECOVER+EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.rectg)
e2:SetOperation(s.recop)
c:RegisterEffect(e2)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function s.rmfilter(c)
return c:IsSetCard(0xc00) and c:IsAbleToRemove()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.rmfilter),tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc00) and c:IsLocation(LOCATION_EXTRA)
end
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1800)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1800)
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--超战钢 残酷铣削神
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xc00),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.rectg)
e2:SetOperation(s.recop)
c:RegisterEffect(e2)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function s.thfilter(c)
return c:IsCode(88880014) and c:IsAbleToHand()
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
if Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
end
Duel.RegisterEffect(e1,tp)
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xc00) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,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
--红色战钢 技师
local m=88897051
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--cannot remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,1)
e2:SetCondition(cm.spcon1)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,m+1)
e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
end
function cm.tgfilter(c)
return c:IsSetCard(0xc00) and c:IsAbleToGrave()
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+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
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+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc00) and not c:IsCode(m)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0xc00) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.activate(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,cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--既得利益者群体
function c88897053.initial_effect(c)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCondition(c88897053.spcon)
e2:SetOperation(c88897053.spop)
c:RegisterEffect(e2)
--attack all
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ATTACK_ALL)
e4:SetValue(1)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(88897053,1))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_HAND)
e5:SetCountLimit(1,88897053)
e5:SetCost(c88897053.thcost)
e5:SetTarget(c88897053.thtg)
e5:SetOperation(c88897053.thop)
c:RegisterEffect(e5)
end
function c88897053.spfilter(c)
return c:IsSetCard(0xc00) and c:IsAbleToRemoveAsCost()
end
function c88897053.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c88897053.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_ONFIELD,0,3,c)
end
function c88897053.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c88897053.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_ONFIELD,0,3,3,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c88897053.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() and Duel.CheckLPCost(tp,500) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
Duel.PayLPCost(tp,500)
end
function c88897053.thfilter(c)
return c:IsSetCard(0xc00) and not c:IsCode(88897053) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c88897053.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88897053.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88897053.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88897053.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
--径极雷火沸动机
local s,id,o=GetID()
function c98920746.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id+o)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.spfilter(c)
return c:IsRace(RACE_PYRO) and c:IsFaceupEx() and c:IsType(TYPE_MONSTER)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetMatchingGroupCount(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)>0
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not (c:IsType(TYPE_XYZ) and c:IsRank(4)) and c:IsLocation(LOCATION_EXTRA)
end
function s.filter(c)
return c:IsSetCard(0x1be) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--恶沼的泥龙王
function c98920758.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c98920758.lcheck)
c:EnableReviveLimit()
--fusion substitute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_FUSION_SUBSTITUTE)
e2:SetCondition(c98920758.subcon)
c:RegisterEffect(e2)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920758,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,98920758)
e1:SetTarget(c98920758.target)
e1:SetOperation(c98920758.operation)
c:RegisterEffect(e1)
end
function c98920758.lcheck(g)
local tc=g:GetFirst()
return aux.SameValueCheck(g,Card.GetLinkAttribute) and g:GetClassCount(Card.GetLinkRace)==#g
end
function c98920758.subcon(e)
return e:GetHandler():IsLocation(LOCATION_MZONE+LOCATION_GRAVE)
end
function c98920758.tgfilter(c,lg)
return lg:IsContains(c)
end
function c98920758.thfilter(c)
return c:IsSetCard(0x46) and c:GetType()==TYPE_SPELL and c:IsAbleToHand()
end
function c98920758.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98920758.tgfilter(chkc,lg) end
if chk==0 then return Duel.IsExistingTarget(c98920758.tgfilter,tp,LOCATION_MZONE,0,1,nil,lg) and Duel.IsExistingMatchingCard(c98920758.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c98920758.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,lg)
end
function c98920758.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98920758.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
local c=e:GetHandler()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(c98920758.damcon)
e3:SetOperation(c98920758.damop)
e3:SetReset(RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c98920758.damcon1)
e2:SetOperation(c98920758.damop1)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetLabelObject(e3)
Duel.RegisterEffect(e2,tp)
end
function c98920758.damcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()~=1
end
function c98920758.damop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,2000,REASON_EFFECT)
end
function c98920758.damcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_FUSION
end
function c98920758.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(1)
end
\ No newline at end of file
--灿幻天龙 穿刺戟龙军王
function c98920770.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),aux.NonTuner(Card.IsRace,RACE_DRAGON),1)
c:EnableReviveLimit()
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c98920770.sylimit)
c:RegisterEffect(e0)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c98920770.sprcon)
e2:SetTarget(c98920770.sprtg)
e2:SetOperation(c98920770.sprop)
c:RegisterEffect(e2)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920770,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,98920770)
e2:SetTarget(c98920770.sptg2)
e2:SetOperation(c98920770.spop2)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(98920770,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_BATTLE_START+TIMING_ATTACK+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,98930770+EFFECT_COUNT_CODE_DUEL)
e4:SetCondition(c98920770.spcon1)
e4:SetCost(c98920770.spcost1)
e4:SetTarget(c98920770.sptg1)
e4:SetOperation(c98920770.spop1)
c:RegisterEffect(e4)
if not c98920770.global_check then
c98920770.global_check=true
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetOperation(c98920770.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c98920770.sylimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.synlimit(e,se,sp,st)
end
function c98920770.tgrfilter(c)
return c:IsLevelAbove(1) and c:IsAbleToRemoveAsCost()
end
function c98920770.sfilter1(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_TUNER)
end
function c98920770.sfilter2(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() and not c:IsType(TYPE_TUNER)
end
function c98920770.mnfilter(c,g)
return g:IsExists(c98920770.mnfilter2,1,c,c)
end
function c98920770.mnfilter2(c,mc)
return c:GetLevel()+mc:GetLevel()==7
end
function c98920770.fselect(g,tp,sc)
return g:GetCount()==2
and g:IsExists(c98920770.sfilter1,1,nil) and g:IsExists(c98920770.sfilter2,1,nil) and g:IsExists(aux.NOT(Card.IsType),1,nil,TYPE_TUNER)
and g:IsExists(c98920770.mnfilter,1,nil,g) and g:GetClassCount(Card.GetLocation)==2
and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
end
function c98920770.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c98920770.tgrfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
return g:CheckSubGroup(c98920770.fselect,2,2,tp,c)
end
function c98920770.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c98920770.tgrfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,c98920770.fselect,true,2,2,tp,c)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c98920770.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local tg=e:GetLabelObject()
Duel.Remove(tg,POS_FACEUP,REASON_SPSUMMON)
tg:DeleteGroup()
end
function c98920770.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c98920770.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c98920770.eqfilter(c,cd)
return c:IsCode(cd) and (c:IsFaceup() or not c:IsOnField())
end
function c98920770.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(c98920770.eqfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function c98920770.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98920770.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c98920770.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,98920770,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,98920770,RESET_PHASE+PHASE_END,0,1)
end
function c98920770.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,98920770)>=3
end
function c98920770.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920770,4))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c98920770.sptg1(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 c98920770.spop1(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
\ No newline at end of file
--银河眼时空龙影
local s,id,o=GetID()
function c98920780.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+LOCATION_DECK)
e1:SetCondition(c98920780.spcon)
e1:SetOperation(c98920780.spop)
e1:SetValue(SUMMON_VALUE_SELF)
e1:SetCountLimit(1,98920780)
c:RegisterEffect(e1)
--disable
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+o)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCondition(s.discon)
e4:SetTarget(s.distg)
e4:SetOperation(s.disop)
c:RegisterEffect(e4)
end
function c98920780.disfilter(c)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0x307b) and c:IsFaceup() and c:CheckRemoveOverlayCard(c:GetControler(),1,REASON_COST)
end
function c98920780.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98920780.disfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c98920780.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=Duel.SelectMatchingCard(tp,s.disfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
tc:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c98920780.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98920780.splimit(e,c)
return not c:IsRace(RACE_DRAGON) and c:IsLocation(LOCATION_EXTRA)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x307b) and c:IsType(TYPE_XYZ)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if Duel.NegateEffect(ev)~=0 and tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
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