From db5789d98b822547cca92a55be258fd8e341fd24 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 23 Dec 2020 21:34:50 -0300 Subject: Protection --- ueditor.rpy | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ueditor.rpy b/ueditor.rpy index a8d580c..a77faf5 100644 --- a/ueditor.rpy +++ b/ueditor.rpy @@ -74,10 +74,6 @@ screen units_editor(): 0, 1), True) 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 _("ID: ") $ input=Input( value=UEditorInputValue(uedit, "unit_id", None, "int", dp=True), @@ -178,7 +174,7 @@ screen units_editor(): action input.enable add input - # TODO: Loot, waves + # TODO: Skills, portraits ########################################### null height 40 hbox: @@ -307,8 +303,8 @@ init python: # Apply rarity modified STR*=(rar+1)/2.0 HP*=(rar+1)/2.0 - STR=int(STR) - HP=int(HP) + STR=max(int(STR), 1) + HP=max(int(HP), 1) # Save data renpy.notify("%s\nHP %d->%d \n ATK %d->%d" % (uedit["name"], uedit["hp"], HP, -- cgit v1.2.3-70-g09d2