Commit f389d3a1 authored by nanahira's avatar nanahira

clean

parent 76682cfa
......@@ -27,11 +27,11 @@ local function grantDecktop(e)
Duel.RegisterEffect(e3,0)
end
local function fieldEffect(r)
local function fieldEffectTemplate(r)
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE,EFFECT_FLAG2_CONTINUOUS_OPPOTURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(r)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentChain()==0 end
......@@ -41,13 +41,13 @@ local function fieldEffect(r)
return e1
end
local function deckEffect()
return fieldEffect(LOCATION_DECK)
local function deckEffectTemplate()
return fieldEffectTemplate(LOCATION_DECK)
end
function Auxiliary.PreloadUds()
--deck effects for card
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1105)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,0xff-LOCATION_DECK,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,99,nil)
......@@ -57,7 +57,7 @@ function Auxiliary.PreloadUds()
end
end)
grantDecktop(e1)
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1104)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,0xff-LOCATION_HAND,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,99,nil)
......@@ -66,7 +66,7 @@ function Auxiliary.PreloadUds()
end
end)
grantDecktop(e1)
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1103)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,0xff-LOCATION_GRAVE,0,1,99,nil)
......@@ -75,7 +75,7 @@ function Auxiliary.PreloadUds()
end
end)
grantDecktop(e1)
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1102)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,0xff-LOCATION_REMOVED,0,1,99,nil)
......@@ -85,7 +85,7 @@ function Auxiliary.PreloadUds()
end
end)
grantDecktop(e1)
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1118)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,0xff-LOCATION_MZONE,LOCATION_GRAVE+LOCATION_REMOVED,1,99,nil)
......@@ -94,7 +94,7 @@ function Auxiliary.PreloadUds()
end
end)
grantDecktop(e1)
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1159)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,0xff-LOCATION_SZONE,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
......@@ -111,7 +111,7 @@ function Auxiliary.PreloadUds()
end
end)
grantDecktop(e1)
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1111)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
......@@ -123,14 +123,14 @@ function Auxiliary.PreloadUds()
end)
grantDecktop(e1)
--deck effects for global
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1297)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
end)
grantDecktop(e1)
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1123)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local acs={}
......@@ -148,14 +148,14 @@ function Auxiliary.PreloadUds()
end
end)
grantDecktop(e1)
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1108)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.AnnounceNumber(tp,1,2,3,4,5,6,7,8,9,10,11,12)
Duel.Draw(tp,ac,REASON_RULE)
end)
grantDecktop(e1)
local e1=deckEffect()
local e1=deckEffectTemplate()
e1:SetDescription(1119)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.AnnounceCard(tp)
......@@ -165,7 +165,7 @@ function Auxiliary.PreloadUds()
grantDecktop(e1)
--single card effects
local e1=fieldEffect(LOCATION_ONFIELD)
local e1=fieldEffectTemplate(LOCATION_ONFIELD)
e1:SetDescription(1111)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -174,7 +174,7 @@ function Auxiliary.PreloadUds()
end)
grantAll(e1,nil,LOCATION_ONFIELD)
local e1=fieldEffect(LOCATION_MZONE)
local e1=fieldEffectTemplate(LOCATION_MZONE)
e1:SetDescription(1112)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -182,7 +182,7 @@ function Auxiliary.PreloadUds()
end)
grantAll(e1,nil,LOCATION_MZONE)
local e1=fieldEffect(LOCATION_MZONE)
local e1=fieldEffectTemplate(LOCATION_MZONE)
e1:SetDescription(1113)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -209,7 +209,7 @@ function Auxiliary.PreloadUds()
end)
grantAll(e1,nil,LOCATION_MZONE)
local e1=fieldEffect(LOCATION_MZONE)
local e1=fieldEffectTemplate(LOCATION_MZONE)
e1:SetDescription(1130)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -231,7 +231,7 @@ function Auxiliary.PreloadUds()
end)
grantAll(e1,function(e,c) return c:IsType(TYPE_XYZ) end,LOCATION_MZONE)
local loc=LOCATION_HAND+LOCATION_ONFIELD
local e1=fieldEffect(loc)
local e1=fieldEffectTemplate(loc)
e1:SetDescription(1105)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(e:GetHandler())
......@@ -242,7 +242,7 @@ function Auxiliary.PreloadUds()
end)
grantAll(e1,nil,loc)
local loc=LOCATION_ONFIELD
local e1=fieldEffect(loc)
local e1=fieldEffectTemplate(loc)
e1:SetDescription(1104)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(e:GetHandler())
......@@ -252,7 +252,7 @@ function Auxiliary.PreloadUds()
end)
grantAll(e1,nil,loc)
local loc=LOCATION_HAND+LOCATION_ONFIELD
local e1=fieldEffect(loc)
local e1=fieldEffectTemplate(loc)
e1:SetDescription(1103)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(e:GetHandler())
......@@ -262,7 +262,7 @@ function Auxiliary.PreloadUds()
end)
grantAll(e1,nil,loc)
local loc=LOCATION_HAND+LOCATION_ONFIELD
local e1=fieldEffect(loc)
local e1=fieldEffectTemplate(loc)
e1:SetDescription(1102)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(e:GetHandler())
......@@ -273,7 +273,7 @@ function Auxiliary.PreloadUds()
end)
grantAll(e1,nil,loc)
local loc=LOCATION_HAND+LOCATION_SZONE
local e1=fieldEffect(loc)
local e1=fieldEffectTemplate(loc)
e1:SetDescription(1118)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(e:GetHandler())
......@@ -283,7 +283,7 @@ function Auxiliary.PreloadUds()
end)
grantAll(e1,function(e,c) return c:IsType(TYPE_MONSTER) or (c:GetOriginalType()&TYPE_MONSTER)>0 end,loc)
local loc=LOCATION_HAND+LOCATION_MZONE
local e1=fieldEffect(loc)
local e1=fieldEffectTemplate(loc)
e1:SetDescription(1159)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(e:GetHandler())
......
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