diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-26 15:27:04 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-26 15:27:04 -0300 |
commit | 0c25acaa7322de380809f0ed3514b7dbbbefc7fa (patch) | |
tree | b419449889fe3c70d12ed2c56c1a7c0219fcaa41 | |
parent | 061ac16210375fa68419bfa40da68655fb207c9f (diff) | |
download | client-0c25acaa7322de380809f0ed3514b7dbbbefc7fa.tar.gz client-0c25acaa7322de380809f0ed3514b7dbbbefc7fa.tar.bz2 client-0c25acaa7322de380809f0ed3514b7dbbbefc7fa.tar.xz client-0c25acaa7322de380809f0ed3514b7dbbbefc7fa.zip |
In theory, this displays unit job on inventory screen and corrects HP/ATK vals.
-rw-r--r-- | game/01_init.rpy | 16 | ||||
-rw-r--r-- | game/inventory.rpy | 9 | ||||
-rw-r--r-- | game/misc.rpy | 42 |
3 files changed, 26 insertions, 41 deletions
diff --git a/game/01_init.rpy b/game/01_init.rpy index d90bf7e..3dc04ff 100644 --- a/game/01_init.rpy +++ b/game/01_init.rpy @@ -95,10 +95,10 @@ init -3 python: # Jobs Job_Swordsman =1 - Job_Assassin =2 + Job_Undefined1 =2 Job_Mage =3 Job_Archer =4 - Job_Gunner =5 + Job_Undefined2 =5 # IRC flags IRC_AUTH_NONE =0 @@ -125,6 +125,18 @@ init -3 python: "status_effects": 0 } + + # Returns human readable job + def parse_job(JOB): + if (JOB == Job_Swordsman): + return _("Swordsmaster") + elif (JOB == Job_Mage): + return _("Wizard") + elif (JOB == Job_Archer): + return _("Ranger") + else: + return _("???") + # Smart Print command def stdout(message): if debug: diff --git a/game/inventory.rpy b/game/inventory.rpy index 63df518..e864c3c 100644 --- a/game/inventory.rpy +++ b/game/inventory.rpy @@ -102,8 +102,9 @@ screen char_details(un, hpval, akval, idx): yalign 0.95 spacing 30 - label _("{b}%s{/b}\n%s\n\nHP: %d — ATK: %d\nLv %d/%d — EXP: %d") % ( + label _("{b}%s{/b}\n%s\n\n%s\nHP: %d — ATK: %d\nLv %d/%d — EXP: %d") % ( star_write(un["rare"]), un["name"], + parse_job(un["job"]), hpval, akval, Player["inv"][idx]["level"], un["max_level"], @@ -149,10 +150,8 @@ label show_inv: $stdout("Selected unit index %d" % _return) $un=allunits[Player["inv"][_return]["unit_id"]] $show_img("unit_"+str(un["unit_id"]), at_list=[ttop]) # truecenter - $hpval=readjust_status(un["rare"], un["job"], - True)*Player["inv"][_return]["level"]+un["hp"] - $akval=readjust_status(un["rare"], un["job"], - False)*Player["inv"][_return]["level"]+un["strength"] + $hpval=readjust_status(Player["inv"][_return]["level"], un["hp"]) + $akval=readjust_status(Player["inv"][_return]["level"], un["strength"]) $ret=renpy.call_screen("char_details", un, hpval, akval, _return) diff --git a/game/misc.rpy b/game/misc.rpy index c46f1b9..a37d779 100644 --- a/game/misc.rpy +++ b/game/misc.rpy @@ -117,6 +117,10 @@ init python: https://github.com/websocket-client/websocket-client/issues/532 Due to #532 we had to disable SSL... again + threading.enumerate() → Find one which name is "MainThread" + Create a threading.Event in an overlay .set() + To send the RenpyQuit exception?? + https://grandsphere.fandom.com/wiki/Champion_Challenge @@ -313,40 +317,10 @@ init python: renpy.invoke_in_thread(ap_restore) return + # Techinically a battle function, readjusts a status value + # Must be exactly the same as server side function!! + def readjust_status(lvl, val): + return val+int(val*(max(lvl-1, 0)/100.0)) - # Techinically a battle function, readjusts a value - # Rarity affects directly primary stat. We should distribute 140 points - def readjust_status(rar, job, hp=True): - newv=50 - # Imbalanced class - if (job == Job_Swordsman): - if hp: - newv+=30+rar - else: - newv+=10+(rar/2) - elif (job == Job_Mage): - if hp: - newv+=10+(rar/2) - else: - newv+=30+rar - # Balanced class - elif (job == Job_Assassin): - if hp: - newv+=15+(rar/2) - else: - newv+=25+rar - elif (job == Job_Archer): - if hp: - newv+=25+rar - else: - newv+=15+(rar/2) - # All-rounder class, with no steady growth - elif (job == Job_Gunner): - if hp: - newv+=20+(rar/2) - else: - newv+=20+(rar/2) - - return newv |