From d30aa1abd2819c46428068a21e98a1da2379efe5 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 30 Dec 2018 11:13:04 -0200 Subject: Split hpsp_tables in two files with current rules for each one This way, we can have better control of HP/SP table rules generation --- misc/hp_table.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ misc/hpsp_tables.py | 46 ---------------------------------------------- misc/sp_table.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 46 deletions(-) create mode 100755 misc/hp_table.py delete mode 100755 misc/hpsp_tables.py create mode 100755 misc/sp_table.py diff --git a/misc/hp_table.py b/misc/hp_table.py new file mode 100755 index 0000000..1a59f00 --- /dev/null +++ b/misc/hp_table.py @@ -0,0 +1,46 @@ +#!/usr/bin/python2.7 +# it: Initial Value +# v: Basic Increment +# i: Initial level (minus one) +# s: steps to increase (default 10) +# t: increase on each step (default 1) +# m: Maximum level +# b: Base Value Boost (raises it) +it=400 +v=50 +i=0 +s=10 +t=0 +b=0 +m=160 + +# head: tabulation on each line +# h1: header on first line, can be HPTable or SPTable +# tail: Comment after each line, will be followed by the level range +head=" " +h1=" HPTable:[ " +tail=" // " + +# The code begins here (bf: buffer) +bf="" +print "" +while (i <= m): + i+=1 + if i==1: + bf+=h1 + elif i % 10 == 1: + bf+=tail + bf+=str(i-10) + bf+=" - " + bf+=str(i-1) + print bf + bf="" + bf+=head + if (i % s == 0): + v+=t + it+=b + bf+=str(it) + bf+=", " + it+=v + +# Everything was printed to stdout diff --git a/misc/hpsp_tables.py b/misc/hpsp_tables.py deleted file mode 100755 index 53ab727..0000000 --- a/misc/hpsp_tables.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/python2.7 -# it: Initial Value -# v: Basic Increment -# i: Initial level (minus one) -# s: steps to increase (default 10) -# t: increase on each step (default 1) -# m: Maximum level -# b: Base Value Boost (raises it) -it=120 -v=8 -i=0 -s=20 -t=0 -b=20 -m=160 - -# head: tabulation on each line -# h1: header on first line, can be HPTable or SPTable -# tail: Comment after each line, will be followed by the level range -head=" " -h1=" SPTable:[ " -tail=" // " - -# The code begins here (bf: buffer) -bf="" -print "" -while (i <= m): - i+=1 - if i==1: - bf+=h1 - elif i % 10 == 1: - bf+=tail - bf+=str(i-10) - bf+=" - " - bf+=str(i-1) - print bf - bf="" - bf+=head - if (i % s == 0): - v+=t - it+=b - bf+=str(it) - bf+=", " - it+=v - -# Everything was printed to stdout diff --git a/misc/sp_table.py b/misc/sp_table.py new file mode 100755 index 0000000..53ab727 --- /dev/null +++ b/misc/sp_table.py @@ -0,0 +1,46 @@ +#!/usr/bin/python2.7 +# it: Initial Value +# v: Basic Increment +# i: Initial level (minus one) +# s: steps to increase (default 10) +# t: increase on each step (default 1) +# m: Maximum level +# b: Base Value Boost (raises it) +it=120 +v=8 +i=0 +s=20 +t=0 +b=20 +m=160 + +# head: tabulation on each line +# h1: header on first line, can be HPTable or SPTable +# tail: Comment after each line, will be followed by the level range +head=" " +h1=" SPTable:[ " +tail=" // " + +# The code begins here (bf: buffer) +bf="" +print "" +while (i <= m): + i+=1 + if i==1: + bf+=h1 + elif i % 10 == 1: + bf+=tail + bf+=str(i-10) + bf+=" - " + bf+=str(i-1) + print bf + bf="" + bf+=head + if (i % s == 0): + v+=t + it+=b + bf+=str(it) + bf+=", " + it+=v + +# Everything was printed to stdout -- cgit v1.2.3-70-g09d2