summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--db/mob_db.txt6
-rw-r--r--tools/retab.sml15
3 files changed, 21 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 443b910d..b518008d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,9 @@ char-server
login-server
map-server
+# Tools executables
+tools/retab
+
# Server files
log/
gm.log.*
diff --git a/db/mob_db.txt b/db/mob_db.txt
index e8a57de0..7d1a9163 100644
--- a/db/mob_db.txt
+++ b/db/mob_db.txt
@@ -36,11 +36,11 @@
1036, Zombie, Zombie, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 129, 800, 1872, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
1037, CloverPatch, Clover Patch, 1, 1, 0, 0, 1, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 22, 0, 800, 800, 672, 480, 742, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
1038, Squirrel, Squirrel, 15, 160, 1, 0, 1, 1, 15, 25, 1, 6, 1, 3, 1, 0, 15, 40, 1, 1, 1, 3, 20, 129, 800, 800, 672, 480, 743, 7000, 680, 1000, 681, 1000, 682, 1000, 683, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 1, 15
-//1039, FireLizard
+//1039, FireLizard
1040, Wisp, Wisp, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 129, 800, 1872, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
-//1041, Snail
+//1041, Snail
1042, Spectre, Spectre, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 129, 800, 1872, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
1043, Skeleton, Skeleton, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 129, 800, 1872, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
1044, LadySkeleton, Lady Skeleton, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 129, 800, 1872, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
1045, Fallen, Fallen, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 129, 800, 1872, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
-1046, SnakeLord, Snake Lord, 300, 40000, 0, 0, 8000, 2, 80, 120, 10, 10, 20, 40, 10, 10, 40, 10, 1, 1, 1, 0, 20, 132, 200, 1500, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
+1046, SnakeLord, Snake Lord, 300, 40000, 0, 0, 8000, 2, 80, 120, 10, 10, 20, 40, 10, 10, 40, 10, 1, 1, 1, 0, 20, 132, 200, 1500, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , , , , , , 0, 0
diff --git a/tools/retab.sml b/tools/retab.sml
index b374eff2..8e2a054e 100644
--- a/tools/retab.sml
+++ b/tools/retab.sml
@@ -1,3 +1,18 @@
+(*
+ * retab (c) 2009 The Mana World development team
+ * License: GPL, version 2 or later
+ *
+ * Compilation, e.g. (depends on SML implementation):
+ * mlton retab.sml
+ *
+ * Example usage:
+ * tools/retab < db/mob_db.txt > db/mob_db.txt.new && mv db/mob_db.txt.new db/mob_db.txt
+ *
+ * TODO:
+ * - Commas inside {} need to be seen as just one field when tabified
+ * - Commented lines should be left untabified
+ *)
+
fun width (#"\t", i) = let val m = i mod 8 in if m = 0 then 8 else m end
| width (c, i) = 1