diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-23 20:47:12 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-23 20:47:12 -0300 |
commit | e9d3bd0aaac683fcfe2e007826bfcea456afcf3c (patch) | |
tree | b3912c2e63f703e8e30cca64aef4c5a2af095981 | |
parent | 4bac79f0c5960a2f72b26d84d557bf413e2d706b (diff) | |
download | sdk-e9d3bd0aaac683fcfe2e007826bfcea456afcf3c.tar.gz sdk-e9d3bd0aaac683fcfe2e007826bfcea456afcf3c.tar.bz2 sdk-e9d3bd0aaac683fcfe2e007826bfcea456afcf3c.tar.xz sdk-e9d3bd0aaac683fcfe2e007826bfcea456afcf3c.zip |
Elements, Job and Flags parser
-rw-r--r-- | ueditor.rpy | 86 |
1 files changed, 47 insertions, 39 deletions
diff --git a/ueditor.rpy b/ueditor.rpy index f6c4b8f..b7a98b8 100644 --- a/ueditor.rpy +++ b/ueditor.rpy @@ -85,10 +85,6 @@ screen units_editor(): add input hbox: spacing 10 - #textbutton _("-") action Function(ueditor, "unit_id", -1) - #label ("%d" % uedit["unit_id"]) - #textbutton _("+") action Function(ueditor, "unit_id", 1) - #def __init__(self, variable, key1, key2, inpu="int", key3=None, key4=None): label _("Name: ") $ input=Input( value=UEditorInputValue(uedit, "name", None, "str", dp=True), @@ -99,6 +95,7 @@ screen units_editor(): #key_events True action input.enable add input + label _("Max Lv. %d" % uedit["max_level"]) null height 25 label _("Base ID %d" % uedit["unit_base_id"]) @@ -115,14 +112,26 @@ screen units_editor(): add input null height 25 - label _("HP %d" % uedit["hp"]) - label _("ATK %d" % uedit["strength"]) - label _("Max Lv. %d" % uedit["max_level"]) + hbox: + spacing 24 + label _("HP %d" % uedit["hp"]) + label _("ATK %d" % uedit["strength"]) null height 25 - label _("Attribute %d" % uedit["attribute"]) - label _("Job %d" % uedit["job"]) - label _("Flags %d" % uedit["flags"]) + hbox: + textbutton _("-") action Function(ueditor, "attribute", -1) + label ("Element: %s" % ParseEle(uedit["attribute"])) + textbutton _("+") action Function(ueditor, "attribute", 1) + hbox: + textbutton _("-") action Function(ueditor, "job", -1) + label ("Job: %s" % ParseJob(uedit["job"])) + textbutton _("+") action Function(ueditor, "job", 1) + null height 25 + hbox: + textbutton _("-") action Function(ueditor, "flags", -1) + label _("Flags %d" % uedit["flags"]) + textbutton _("+") action Function(ueditor, "flags", 1) + text "None: 0\nCannot levelup: 1\nCannot party: 2\nEXP+: 4\nEvoMat: 8\nDouble GP: 16\nUnsellable: 32\nSuper EvoMat: 64" size 12 null height 25 label _(".:: Active Skill ::.") @@ -152,7 +161,34 @@ screen units_editor(): key "K_RETURN" action Function(RestartInteraction)#Return() init python: - import json, copy + def ParseJob(job): + if job == 1: + return "Swordsman" + elif job == 2: + return "Assassin" + elif job == 3: + return "Mage" + elif job == 4: + return "Archer" + elif job == 5: + return "Gunner" + else: + return "ERROR (%d)" % job + + def ParseEle(ele): + if ele == 1: + return "Fire" + elif ele == 2: + return "Water" + elif ele == 3: + return "Nature" + elif ele == 4: + return "Light" + elif ele == 5: + return "Shadow" + else: + return "ERROR (%d)" % ele + def RestartInteraction(): renpy.restart_interaction() return @@ -213,34 +249,6 @@ init python: renpy.notify("New unit added: %d" % ueid) return - def ueditor_addloot(): - global uedit - uedit=allunitsbase[current] - uedit["loot"].append(["1000", 0]) - renpy.notify("Added new loot field id 1000 (an invalid ID)") - return - - def ueditor_addmonster(wave): - global uedit - uedit=allunitsbase[current] - pointer=uedit["waves"][wave-1] - if len(pointer) < 3: - pointer.append({ - "name": "New Monster", - "sprite": 950000, - "attribute": 1, - "boss": False - }) - else: - renpy.notify("Max monsters per wave reached!") - return - - def ueditor_addwave(): - global uedit - uedit=allunitsbase[current] - uedit["waves"].append([]) - renpy.notify("Blank wave created\nThis is buggy, remember to add monsters") - return def ueditor_delete(key1, key2=None, key3=None, key4=None): |