Commit 9ee6bcc2 authored by JoyJ's avatar JoyJ

finish change and delete random.sh

parent ee286b9c
while :
do
R=$(od -A n -t d -N 4 /dev/urandom)
echo $R
echo "_G.RANDOMSEED = $R" > random.lua
read -p "" -t 0.1 > /dev/null
done
--【请务必先pm start random.sh】
--【或者nohup random.sh也可以】
--村规决斗:时空乱流EX --村规决斗:时空乱流EX
--双方每个回合的回合时间都会随机变化,从30~300秒不等。 --双方每个回合的回合时间都会随机变化,从30~300秒不等。
--开局时,双方将1张【所罗门的律法书】(23471572)从卡组外除外。这张卡不在除外状态的场合立刻除外。 --开局时,双方将1张【所罗门的律法书】(23471572)从卡组外除外。这张卡不在除外状态的场合立刻除外。
...@@ -30,9 +27,7 @@ function Auxiliary.PreloadUds() ...@@ -30,9 +27,7 @@ function Auxiliary.PreloadUds()
if not CUNGUI.InitRandomSeed then if not CUNGUI.InitRandomSeed then
CUNGUI.InitRandomSeed = true CUNGUI.InitRandomSeed = true
Duel.LoadScript("random.lua") math.random = Duel.GetRandomNumber
math.randomseed(_G.RANDOMSEED)
for i=1,10 do math.random(1000) end
end end
--adjust --adjust
local e2=Effect.GlobalEffect() local e2=Effect.GlobalEffect()
......
...@@ -21,9 +21,7 @@ function CUNGUI.AdjustOperation() ...@@ -21,9 +21,7 @@ function CUNGUI.AdjustOperation()
CUNGUI.INIT = true CUNGUI.INIT = true
CUNGUI.RegisterCardRule(0) CUNGUI.RegisterCardRule(0)
CUNGUI.RegisterCardRule(1) CUNGUI.RegisterCardRule(1)
Duel.LoadScript("random.lua") math.random = Duel.GetRandomNumber
math.randomseed(_G.RANDOMSEED)
for i=1,10 do math.random(1000) end
end end
if CUNGUI.RuleCard[0] and (not CUNGUI.RuleCard[0]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[0]:IsFaceup()) then if CUNGUI.RuleCard[0] and (not CUNGUI.RuleCard[0]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[0]:IsFaceup()) then
Duel.Remove(CUNGUI.RuleCard[0],POS_FACEUP,REASON_RULE) Duel.Remove(CUNGUI.RuleCard[0],POS_FACEUP,REASON_RULE)
......
...@@ -23,9 +23,7 @@ function CUNGUI.AdjustOperation() ...@@ -23,9 +23,7 @@ function CUNGUI.AdjustOperation()
CUNGUI.INIT = true CUNGUI.INIT = true
CUNGUI.RegisterCardRule(0) CUNGUI.RegisterCardRule(0)
CUNGUI.RegisterCardRule(1) CUNGUI.RegisterCardRule(1)
Duel.LoadScript("random.lua") math.random = Duel.GetRandomNumber
math.randomseed(_G.RANDOMSEED)
for i=1,10 do math.random(1000) end
end end
if CUNGUI.RuleCard[0] and (not CUNGUI.RuleCard[0]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[0]:IsFaceup()) then if CUNGUI.RuleCard[0] and (not CUNGUI.RuleCard[0]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[0]:IsFaceup()) then
Duel.Remove(CUNGUI.RuleCard[0],POS_FACEUP,REASON_RULE) Duel.Remove(CUNGUI.RuleCard[0],POS_FACEUP,REASON_RULE)
......
...@@ -9,6 +9,7 @@ CUNGUI = {} ...@@ -9,6 +9,7 @@ CUNGUI = {}
CUNGUI.RandomCard = {7986397,8198712,8955148,9236985,9786492,9845733,11398951,14094090,14735698,16494704,17888577,18803791,20071842,21082832,22398665,23459650,23965037,27383110,28429121,30392583,31002402,31066283,32828635,33031674,34767865,34834619,36350300,37626500,38784726,39399168,39996157,41182875,41426869,43417563,43694075,44221928,45410988,45948430,46052429,46159582,47435107,51124303,52913738,54539105,55761792,58827995,59820352,60234913,60365591,60369732,60921537,62835876,69035382,72446038,73055622,76792184,76806714,77454922,78577570,79306385,80566312,80811661,81756897,81933259,85327820,86758915,94377247,94666032,96420087,97211663} CUNGUI.RandomCard = {7986397,8198712,8955148,9236985,9786492,9845733,11398951,14094090,14735698,16494704,17888577,18803791,20071842,21082832,22398665,23459650,23965037,27383110,28429121,30392583,31002402,31066283,32828635,33031674,34767865,34834619,36350300,37626500,38784726,39399168,39996157,41182875,41426869,43417563,43694075,44221928,45410988,45948430,46052429,46159582,47435107,51124303,52913738,54539105,55761792,58827995,59820352,60234913,60365591,60369732,60921537,62835876,69035382,72446038,73055622,76792184,76806714,77454922,78577570,79306385,80566312,80811661,81756897,81933259,85327820,86758915,94377247,94666032,96420087,97211663}
function Auxiliary.PreloadUds() function Auxiliary.PreloadUds()
math.random = Duel.GetRandomNumber
--adjust --adjust
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -16,11 +17,6 @@ function Auxiliary.PreloadUds() ...@@ -16,11 +17,6 @@ function Auxiliary.PreloadUds()
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
e1:SetOperation(CUNGUI.AdjustOperation) e1:SetOperation(CUNGUI.AdjustOperation)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
Duel.LoadScript("random.lua")
math.randomseed(_G.RANDOMSEED)
for i=1,10 do
math.random(1000)
end
end end
function CUNGUI.AdjustOperation() function CUNGUI.AdjustOperation()
if not CUNGUI.INIT then if not CUNGUI.INIT then
......
...@@ -93,9 +93,7 @@ end ...@@ -93,9 +93,7 @@ end
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
if not CUNGUI.INIT then if not CUNGUI.INIT then
CUNGUI.INIT = true CUNGUI.INIT = true
Duel.LoadScript("random.lua") math.random = Duel.GetRandomNumber
math.randomseed(_G.RANDOMSEED)
for i=1,10 do math.random(1000) end
end end
local g = Duel.GetMatchingGroup(nil,0,0x7f,0x7f,nil) local g = Duel.GetMatchingGroup(nil,0,0x7f,0x7f,nil)
g:ForEach(CUNGUI.RegisterMonsterSpecialEffects) g:ForEach(CUNGUI.RegisterMonsterSpecialEffects)
......
...@@ -22,9 +22,7 @@ function CUNGUI.AdjustOperation() ...@@ -22,9 +22,7 @@ function CUNGUI.AdjustOperation()
CUNGUI.INIT = true CUNGUI.INIT = true
CUNGUI.RegisterCardRule(0) CUNGUI.RegisterCardRule(0)
CUNGUI.RegisterCardRule(1) CUNGUI.RegisterCardRule(1)
Duel.LoadScript("random.lua") math.random = Duel.GetRandomNumber
math.randomseed(_G.RANDOMSEED)
for i=1,10 do math.random(1000) end
end end
if CUNGUI.RuleCard[0] and (not CUNGUI.RuleCard[0]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[0]:IsFaceup()) then if CUNGUI.RuleCard[0] and (not CUNGUI.RuleCard[0]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[0]:IsFaceup()) then
Duel.Remove(CUNGUI.RuleCard[0],POS_FACEUP,REASON_RULE) Duel.Remove(CUNGUI.RuleCard[0],POS_FACEUP,REASON_RULE)
......
...@@ -7,9 +7,7 @@ CUNGUI = {} ...@@ -7,9 +7,7 @@ CUNGUI = {}
function Auxiliary.PreloadUds() function Auxiliary.PreloadUds()
if not CUNGUI.InitRandomSeed then if not CUNGUI.InitRandomSeed then
CUNGUI.InitRandomSeed = true CUNGUI.InitRandomSeed = true
Duel.LoadScript("random.lua") math.random = Duel.GetRandomNumber
math.randomseed(_G.RANDOMSEED)
for i=1,10 do math.random(1000) end
end end
--adjust --adjust
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
......
...@@ -27,9 +27,7 @@ CUNGUI.RegisteredMonsters = Group.CreateGroup() ...@@ -27,9 +27,7 @@ CUNGUI.RegisteredMonsters = Group.CreateGroup()
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
if not CUNGUI.RandomSeedInit then if not CUNGUI.RandomSeedInit then
CUNGUI.RandomSeedInit = true CUNGUI.RandomSeedInit = true
Duel.LoadScript("random.lua") math.random = Duel.GetRandomNumber
math.randomseed(_G.RANDOMSEED)
for i=1,10 do math.random(1000) end
CUNGUI.Used={} CUNGUI.Used={}
CUNGUI.Used[0]=0 CUNGUI.Used[0]=0
CUNGUI.Used[1]=0 CUNGUI.Used[1]=0
......
while :
do
R=$(od -A n -t d -N 4 /dev/urandom)
echo $R
echo "_G.RANDOMSEED = $R" > random.lua
read -p "" -t 0.1 > /dev/null
done
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