summaryrefslogtreecommitdiff
path: root/ueditor.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'ueditor.rpy')
-rw-r--r--ueditor.rpy27
1 files changed, 17 insertions, 10 deletions
diff --git a/ueditor.rpy b/ueditor.rpy
index 453dc02..4e56e3f 100644
--- a/ueditor.rpy
+++ b/ueditor.rpy
@@ -178,16 +178,17 @@ screen units_editor():
###########################################
null height 40
hbox:
- spacing 25
+ spacing 22
textbutton _("Save") action Function(ueditor_save)
textbutton _("Close") action Return()
- null width 20
+ null width 10
textbutton _("Recalc") action Function(ueditor_recalc)
- null width 20
+ null width 10
textbutton _("New Sub") action Function(ueditor_new, True)
textbutton _("New Unit") action Function(ueditor_new)
+ textbutton _("Auto") action Jump("ueditor_supernew")
## Right-click and escape refresh screen
key "game_menu" action Function(RestartInteraction)#Return()
@@ -245,7 +246,7 @@ init python:
sex=0
job=1
else:
- ueid=allunitsbase[current]["unit_id"]/100*100+1 # Truncate
+ ueid=allunitsbase[current]["unit_id"]//100*100+1 # Truncate
rar=allunitsbase[current]["rare"]+1
nam=allunitsbase[current]["name"]+" +"+str(rar)
attr=allunitsbase[current]["attribute"]
@@ -266,12 +267,12 @@ init python:
"job": job,
"cost": rar**2,
"flags": 0,
- "unit_base_id": ueid/100,
+ "unit_base_id": ueid//100,
"flavor": flav})
renpy.notify("New unit added: %d" % ueid)
return
- def ueditor_recalc():
+ def ueditor_recalc(notf=True, shp=0, ssr=0):
global uedit
uedit=allunitsbase[current]
job=uedit["job"]
@@ -291,21 +292,25 @@ init python:
STR=600;HP=200; # Gunner (unused)
elif job == 6:
STR = 0;HP = 0; # Special
+ # Apply the seed modifiers
+ STR += ssr
+ HP += shp
# Apply rarity modified
STR*=(rar+1)/2.0
HP*=(rar+1)/2.0
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,
- uedit["strength"], STR))
+ if notf:
+ renpy.notify("%s\nHP %d->%d \n ATK %d->%d" % (uedit["name"],
+ uedit["hp"], HP,
+ uedit["strength"], STR))
uedit["strength"]=copy.copy(STR)
uedit["hp"]=copy.copy(HP)
allunitsbase[current]["strength"]=copy.copy(STR)
allunitsbase[current]["hp"]=copy.copy(HP)
# Correct unit family and max level if needed
- allunitsbase[current]["unit_base_id"]=allunitsbase[current]["unit_id"]/100
+ allunitsbase[current]["unit_base_id"]=allunitsbase[current]["unit_id"]//100
allunitsbase[current]["max_level"]=10+(rar*10)
return
@@ -436,7 +441,9 @@ label units_editors:
$print("")
call screen units_editor
$print("Unit Editor closed")
+ # FIXME: A button to revert instead
menu:
+ "Do you want to save the buffer?"
"Save Changes":
$ ueditor_save()
"Discard Changes":