summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-08-16 10:53:01 -0300
committerJesusaves <cpntb1@ymail.com>2021-08-16 10:53:01 -0300
commit672459901d647007927118a89779b1b90d7bc9ff (patch)
tree93342336e8da48932391b72d004db7d64aeab33d
parent91b67c1e4758033e6fc98e23c781c688e702cf70 (diff)
downloadclient-672459901d647007927118a89779b1b90d7bc9ff.tar.gz
client-672459901d647007927118a89779b1b90d7bc9ff.tar.bz2
client-672459901d647007927118a89779b1b90d7bc9ff.tar.xz
client-672459901d647007927118a89779b1b90d7bc9ff.zip
Allow you to switch the summon during combat (this is what the cog does)
-rw-r--r--game/01_init.rpy2
-rw-r--r--game/02_init.rpy2
-rw-r--r--game/ATTRIBUTION2
-rw-r--r--game/gui/battle.rpy4
-rw-r--r--game/gui/up_off.pngbin0 -> 2930 bytes
-rw-r--r--game/gui/up_on.pngbin0 -> 3115 bytes
-rw-r--r--game/screens.rpy39
7 files changed, 45 insertions, 4 deletions
diff --git a/game/01_init.rpy b/game/01_init.rpy
index 84032c8..a04b202 100644
--- a/game/01_init.rpy
+++ b/game/01_init.rpy
@@ -36,7 +36,7 @@ init -3 python:
# Configuration
config.autoreload = False
config.save_on_mobile_background = False
- persistent.release_name = "Christmas"
+ persistent.release_name = "Diamond Python"
if persistent.host is None:
persistent.host="spheres.tmw2.org"
persistent.serverlist=[["TMW2", "spheres.tmw2.org", 61000]]
diff --git a/game/02_init.rpy b/game/02_init.rpy
index 2e8a489..3791413 100644
--- a/game/02_init.rpy
+++ b/game/02_init.rpy
@@ -113,7 +113,7 @@ init -1 python:
def GAME_LOADER():
global allunitsbase, allunits, allquests, allstory, allworld, alltaverns
- global allnews, tr_uptodate, tr_memcheck, tr_fatality
+ global allnews, allsummons, tr_uptodate, tr_memcheck, tr_fatality
# Wait until everything is up to date
while not tr_uptodate:
diff --git a/game/ATTRIBUTION b/game/ATTRIBUTION
index 2895b76..269de09 100644
--- a/game/ATTRIBUTION
+++ b/game/ATTRIBUTION
@@ -154,6 +154,8 @@ Where relevant, you must also include a link to https://tmw2.org in your credit.
gui/green_btn.png (Melle) (CC0) (Open Game Art)
gui/green_btn_hover.png (Melle) (CC0) (Open Game Art)
gui/HUD.png (Melle) (CC0) (Open Game Art)
+ gui/up_off.png (wayfarer boy) (CC0) (Open Game Art)
+ gui/up_on.png (wayfarer boy) (CC0) (Open Game Art)
gui/purple_btn.png (Melle) (CC0) (Open Game Art)
gui/purple_btn_hover.png (Melle) (CC0) (Open Game Art)
gui/tv_frame.webp (Melle) (CC0) (Open Game Art)
diff --git a/game/gui/battle.rpy b/game/gui/battle.rpy
index 0a4caa2..7579dce 100644
--- a/game/gui/battle.rpy
+++ b/game/gui/battle.rpy
@@ -401,7 +401,7 @@ screen battle():
yalign 0.0
# Preferences button
null width 20
- imagebutton auto "gfx/gui/cog_%s.png" action ShowMenu('preferences')
+ imagebutton auto "gfx/gui/cog_%s.png" action ShowMenu('sumconf')
null width 20
text "%d " % (Battle["turn"])
text _(" Turn")
@@ -427,7 +427,7 @@ screen battle():
insensitive "gfx/gui/summon_none.png"
idle "gfx/gui/summon_idle.png"
hover "gfx/gui/summon_hover.png"
- action ifte(Battle["bp"] > 10 or debug, Return(ACT_SUMMON), None)
+ action ifte(Battle["bp"] >= allsummons[persistent.summon]["cost"], Return(ACT_SUMMON), None)
diff --git a/game/gui/up_off.png b/game/gui/up_off.png
new file mode 100644
index 0000000..8e7d50a
--- /dev/null
+++ b/game/gui/up_off.png
Binary files differ
diff --git a/game/gui/up_on.png b/game/gui/up_on.png
new file mode 100644
index 0000000..90db8b5
--- /dev/null
+++ b/game/gui/up_on.png
Binary files differ
diff --git a/game/screens.rpy b/game/screens.rpy
index 9a3c5e6..e5507a5 100644
--- a/game/screens.rpy
+++ b/game/screens.rpy
@@ -407,6 +407,10 @@ screen navigation():
## Help isn't necessary or relevant to mobile devices.
textbutton _("Help") action ShowMenu("help")
+ if not (main_menu or story_mode or hud_interface):
+ if Player["quest"] >= 5:
+ textbutton _("Summons") action ShowMenu("sumconf")
+
if not renpy.ios and not renpy.emscripten:
## The quit button is banned on iOS and unnecessary on Android and
@@ -725,6 +729,41 @@ style slot_button_text:
properties gui.button_text_properties("slot_button")
+## About screen ################################################################
+##
+## This screen gives credit and copyright information about the game and Ren'Py.
+##
+## There's nothing special about this screen, and hence it also serves as an
+## example of how to make a custom screen.
+
+screen sumconf():
+
+ tag menu
+
+ ## This use statement includes the game_menu screen inside this one. The
+ ## vbox child is then included inside the viewport inside the game_menu
+ ## screen.
+ use game_menu(_("Configure Summon"), scroll="viewport"):
+
+ style_prefix "about"
+
+ vbox:
+ for i, e in enumerate(allsummons):
+ if i < Player["max_sum"]:
+ hbox:
+ if persistent.summon == i:
+ image "gui/up_on.png"
+ else:
+ button:
+ action SetVariable("persistent.summon", i)
+ add "gui/up_off.png"
+ label _(" %s" % e["name"])
+ text _("%s" % e["desc"])
+ null height 10
+
+ text _("\n[config.name!t] [config.version!t] [persistent.release_name!t]")
+
+
## Preferences screen ##########################################################
##
## The preferences screen allows the player to configure the game to better suit