summaryrefslogtreecommitdiff
path: root/ueditor_adv.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'ueditor_adv.rpy')
-rw-r--r--ueditor_adv.rpy103
1 files changed, 103 insertions, 0 deletions
diff --git a/ueditor_adv.rpy b/ueditor_adv.rpy
new file mode 100644
index 0000000..9f53a02
--- /dev/null
+++ b/ueditor_adv.rpy
@@ -0,0 +1,103 @@
+#################################################################################
+# This file is part of Spheres.
+# Copyright (C) 2022 Jesusalva
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#################################################################################
+# Editor labels for developers
+label ueditor_supernew:
+ $ rar = int(renpy.input("What is the base unit rarity?", allow="0123456789"))
+ python:
+ c = Counter()
+ for u in allunitsbase:
+ if u["unit_id"] % 10:
+ continue
+ if u["flags"]:
+ continue
+ c[u["rare"]] += 1
+ lastid = c[rar] + 2 # We start at 1, not at 0
+
+ $ unitid = int("1%02d%03d" % (rar, lastid))
+
+ $ name = renpy.input("How is this [rar]★ unit called?\nIts ID is: [unitid]")
+
+ menu:
+ "Male":
+ $ sex = 0
+ "Female":
+ $ sex = 1
+
+ menu:
+ "Please select the unit element:"
+ "Fire":
+ $ ele = Ele_Fire
+ "Water":
+ $ ele = Ele_Water
+ "Nature":
+ $ ele = Ele_Nature
+ "Light":
+ $ ele = Ele_Light
+ "Shadow":
+ $ ele = Ele_Shadow
+
+ menu:
+ "Please select the unit job:"
+ "Swordsman (DEF+)":
+ $ job = 1
+ "Assassin (Balanced)" if False:
+ $ job = 2
+ "Mage (ATK+)":
+ $ job = 3
+ "Archer (Balanced)":
+ $ job = 4
+ "Gunner (ATK++)" if False:
+ $ job = 5
+
+ $ desc = renpy.input("Describe the unit.", default="A standard unit in the game.")
+
+ python:
+ # Create the randomness seed
+ ssr=renpy.random.randint(-10, 15)
+ shp=renpy.random.randint(-10, 15)
+ i=0
+ while i < 3:
+ if i == 0:
+ atd = ""
+ else:
+ atd = " +%d" % i
+ allunitsbase.append({"skill_id": 0,
+ "strength": 500,
+ "rare": rar+i,
+ "name": "%s%s" % (name, atd),
+ "ability_id": 0,
+ "attribute": ele,
+ "hp": 500,
+ "unit_id": unitid*100+i,
+ "sex": sex,
+ "max_level": 10+(rar*10),
+ "job": job,
+ "cost": rar**2,
+ "flags": 0,
+ "unit_base_id": unitid,
+ "flavor": desc})
+ current = len(allunitsbase)-1
+ ueditor_recalc(False, shp, ssr)
+ i+=1
+ pass
+
+ $ ueditor_save()
+ jump units_editors
+
+