diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-08-15 14:56:48 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-08-15 14:56:48 -0300 |
commit | a859841cb9a600a1e92f6c0730ca5f10dc2a82d6 (patch) | |
tree | cf2a9011b2511935e8b4830c2025b3ab10c19159 | |
parent | 1f96ee4658c2df3280e0da7a0ddf09628c91cac9 (diff) | |
download | client-a859841cb9a600a1e92f6c0730ca5f10dc2a82d6.tar.gz client-a859841cb9a600a1e92f6c0730ca5f10dc2a82d6.tar.bz2 client-a859841cb9a600a1e92f6c0730ca5f10dc2a82d6.tar.xz client-a859841cb9a600a1e92f6c0730ca5f10dc2a82d6.zip |
Look and learn, @Xanthem noob - THIS is how you do it!
*flips frying pan*
Just kidding - It was you who gave me this idea in first place.
Hint - You can use "ALT+1", "ALT+2", etc. to manipulate the spheres :-)
-rw-r--r-- | game/ATTRIBUTION | 25 | ||||
-rw-r--r-- | game/battle.rpy | 1 | ||||
-rw-r--r-- | game/gfx/sphere/s/0.png | bin | 0 -> 11798 bytes | |||
-rw-r--r-- | game/gfx/sphere/s/1.png | bin | 0 -> 13293 bytes | |||
-rw-r--r-- | game/gfx/sphere/s/2.png | bin | 0 -> 13416 bytes | |||
-rw-r--r-- | game/gfx/sphere/s/3.png | bin | 0 -> 13585 bytes | |||
-rw-r--r-- | game/gfx/sphere/s/4.png | bin | 0 -> 13461 bytes | |||
-rw-r--r-- | game/gfx/sphere/s/5.png | bin | 0 -> 13775 bytes | |||
-rw-r--r-- | game/gfx/sphere/s/6.png | bin | 0 -> 13626 bytes | |||
-rw-r--r-- | game/gfx/sphere/s/7.png | bin | 0 -> 13145 bytes | |||
-rw-r--r-- | game/gui/battle.rpy | 110 | ||||
-rw-r--r-- | game/irc.rpy | 2 |
12 files changed, 87 insertions, 51 deletions
diff --git a/game/ATTRIBUTION b/game/ATTRIBUTION index c1fc91d..00be654 100644 --- a/game/ATTRIBUTION +++ b/game/ATTRIBUTION @@ -103,14 +103,23 @@ Where relevant, you must also include a link to https://tmw2.org in your credit. gfx/mobs/0.png (-) (-) (-) gfx/mobs/960000.png (Santiago Iborra) (CC BY SA) (Arcmage) ## SPHERE - gfx/shpere/0.png (-) (-) (-) - gfx/shpere/1.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) - gfx/shpere/2.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) - gfx/shpere/3.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) - gfx/shpere/4.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) - gfx/shpere/5.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) - gfx/shpere/6.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) - gfx/shpere/7.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) + gfx/sphere/0.png (-) (-) (-) + gfx/sphere/1.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) + gfx/sphere/2.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) + gfx/sphere/3.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) + gfx/sphere/4.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) + gfx/sphere/5.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) + gfx/sphere/6.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) + gfx/sphere/7.png (Chrisdesign/Jesusalva) (CC0) (From OpenGameArt) +### SPHERE/S + gfx/sphere/s/0.png (-) (-) (-) + gfx/sphere/s/1.png (Jesusalva) (CC0) (Chrisdesign/sophokles/wayfarer) + gfx/sphere/s/2.png (Jesusalva) (CC0) (Chrisdesign/sophokles/wayfarer) + gfx/sphere/s/3.png (Jesusalva) (CC0) (Chrisdesign/sophokles/wayfarer) + gfx/sphere/s/4.png (Jesusalva) (CC0) (Chrisdesign/sophokles/wayfarer) + gfx/sphere/s/5.png (Jesusalva) (CC0) (Chrisdesign/sophokles/wayfarer) + gfx/sphere/s/6.png (Jesusalva) (CC0) (Chrisdesign/sophokles/wayfarer) + gfx/sphere/s/7.png (Jesusalva) (CC0) (Chrisdesign/sophokles/wayfarer) ## SQUARE gfx/square/0.png (Kindland) (CC0) (Modified) gfx/square/1.png (JS-JP) diff --git a/game/battle.rpy b/game/battle.rpy index fbc2cae..aab77a9 100644 --- a/game/battle.rpy +++ b/game/battle.rpy @@ -101,6 +101,7 @@ label combat: $ use_sphere=[AP_NONE, AP_NONE, AP_NONE, AP_NONE, AP_NONE] $ btl_ready = False $ do_action = ACT_NONE + $ csid = None python: try: do_action = renpy.call_screen("battle", _with_none=True) diff --git a/game/gfx/sphere/s/0.png b/game/gfx/sphere/s/0.png Binary files differnew file mode 100644 index 0000000..024f851 --- /dev/null +++ b/game/gfx/sphere/s/0.png diff --git a/game/gfx/sphere/s/1.png b/game/gfx/sphere/s/1.png Binary files differnew file mode 100644 index 0000000..7efbf21 --- /dev/null +++ b/game/gfx/sphere/s/1.png diff --git a/game/gfx/sphere/s/2.png b/game/gfx/sphere/s/2.png Binary files differnew file mode 100644 index 0000000..cebbec1 --- /dev/null +++ b/game/gfx/sphere/s/2.png diff --git a/game/gfx/sphere/s/3.png b/game/gfx/sphere/s/3.png Binary files differnew file mode 100644 index 0000000..83fa0be --- /dev/null +++ b/game/gfx/sphere/s/3.png diff --git a/game/gfx/sphere/s/4.png b/game/gfx/sphere/s/4.png Binary files differnew file mode 100644 index 0000000..2a73301 --- /dev/null +++ b/game/gfx/sphere/s/4.png diff --git a/game/gfx/sphere/s/5.png b/game/gfx/sphere/s/5.png Binary files differnew file mode 100644 index 0000000..823e742 --- /dev/null +++ b/game/gfx/sphere/s/5.png diff --git a/game/gfx/sphere/s/6.png b/game/gfx/sphere/s/6.png Binary files differnew file mode 100644 index 0000000..99c86ee --- /dev/null +++ b/game/gfx/sphere/s/6.png diff --git a/game/gfx/sphere/s/7.png b/game/gfx/sphere/s/7.png Binary files differnew file mode 100644 index 0000000..f23411c --- /dev/null +++ b/game/gfx/sphere/s/7.png diff --git a/game/gui/battle.rpy b/game/gui/battle.rpy index aa81a1c..c0934a3 100644 --- a/game/gui/battle.rpy +++ b/game/gui/battle.rpy @@ -62,7 +62,18 @@ init python: return return -# FIXME: Allow to drag spheres around + # FIXME: Allow to drag spheres around + def c_swap(idx): + global csid + if csid is None: + csid = copy.copy(idx) + return + o1 = copy.copy(Battle["spheres"][csid]) + o2 = copy.copy(Battle["spheres"][idx]) + Battle["spheres"][csid] = copy.copy(o2) + Battle["spheres"][idx] = copy.copy(o1) + csid = None + return ############################################################################# screen battle_mobs(): @@ -155,32 +166,24 @@ screen battle_core(): child At("gfx/actionarea.png", party1) draggable False yalign 1.0 - # Display the sphere - ## FIXME - ## Alternative 1 - Make this a button - ## Player clicks on the button - some function is called - ## TODO: What does the function do? - ## → backup = copy.copy(Battle["spheres"]) - ## → (We actually could just copy the whole `Battle` - ## and allow players to "revert"/"reset" the screen) - ## → Probably waits for you to click/tap on another sphere? - ## Once it finishes, it swaps the elements in Battle["spheres"] array - ## The blitting is frequent enough - ## So you don't need to cast a redraw() nor anything - ## Just swap them and it *should* work right away as far as - ## visual goes - ## ----------- - ## Note: You do not need to preserve the original array - ## However, well, if the array gets corrupted........ - drag: - child ("gfx/sphere/"+str(Battle["spheres"][0])+".png") - draggable False - droppable False - yalign 1.0 - xalign 0.5 + if (fx1 and Battle["party"][0]["hp"] <= 0): add At("gfx/off.png", party1) + # Display the sphere + imagebutton: + idle ("gfx/sphere/"+str(Battle["spheres"][0])+".png") + selected_idle ("gfx/sphere/s/"+str(Battle["spheres"][0])+".png") + hover ("gfx/sphere/"+str(Battle["spheres"][0])+".png") + selected_hover ("gfx/sphere/s/"+str(Battle["spheres"][0])+".png") + selected csid is 0 + action Function(c_swap, 0) + keysym "alt_1" + xpos 0.125 + xanchor 0.5 + yanchor 1.0 + ypos config.screen_height-10 + # One drag group per party member defined in Battle draggroup: xpos 0.50 @@ -213,15 +216,23 @@ screen battle_core(): child At("gfx/actionarea.png", party2) draggable False yalign 1.0 - drag: - child ("gfx/sphere/"+str(Battle["spheres"][1])+".png") - draggable False - droppable False - yalign 1.0 - xalign 0.5 if (fx2 and Battle["party"][1]["hp"] <= 0): add At("gfx/off.png", party2) + + imagebutton: + idle ("gfx/sphere/"+str(Battle["spheres"][1])+".png") + selected_idle ("gfx/sphere/s/"+str(Battle["spheres"][1])+".png") + hover ("gfx/sphere/"+str(Battle["spheres"][1])+".png") + selected_hover ("gfx/sphere/s/"+str(Battle["spheres"][1])+".png") + selected csid is 1 + action Function(c_swap, 1) + keysym "alt_2" + xpos 0.375 + xanchor 0.5 + yanchor 1.0 + ypos config.screen_height-10 + # One drag group per party member defined in Battle draggroup: xpos 0.75 @@ -254,15 +265,23 @@ screen battle_core(): child At("gfx/actionarea.png", party3) draggable False yalign 1.0 - drag: - child ("gfx/sphere/"+str(Battle["spheres"][2])+".png") - draggable False - droppable False - yalign 1.0 - xalign 0.5 if (fx3 and Battle["party"][2]["hp"] <= 0): add At("gfx/off.png", party3) + + imagebutton: + idle ("gfx/sphere/"+str(Battle["spheres"][2])+".png") + selected_idle ("gfx/sphere/s/"+str(Battle["spheres"][2])+".png") + hover ("gfx/sphere/"+str(Battle["spheres"][2])+".png") + selected_hover ("gfx/sphere/s/"+str(Battle["spheres"][2])+".png") + selected csid is 2 + action Function(c_swap, 2) + keysym "alt_3" + xpos 0.625 + xanchor 0.5 + yanchor 1.0 + ypos config.screen_height-10 + # One drag group per party member defined in Battle draggroup: xpos 1.0 @@ -295,16 +314,23 @@ screen battle_core(): child At("gfx/actionarea.png", party4) draggable False yalign 1.0 - drag: - child ("gfx/sphere/"+str(Battle["spheres"][3])+".png") - draggable False - droppable False - yalign 1.0 - xalign 0.5 if (fx4 and Battle["party"][3]["hp"] <= 0): add At("gfx/off.png", party4) + imagebutton: + idle ("gfx/sphere/"+str(Battle["spheres"][3])+".png") + selected_idle ("gfx/sphere/s/"+str(Battle["spheres"][3])+".png") + hover ("gfx/sphere/"+str(Battle["spheres"][3])+".png") + selected_hover ("gfx/sphere/s/"+str(Battle["spheres"][3])+".png") + selected csid is 3 + action Function(c_swap, 3) + keysym "alt_4" + xpos 0.875 + xanchor 0.5 + yanchor 1.0 + ypos config.screen_height-10 + ############################################################################# screen battle_bars(): #################################################### diff --git a/game/irc.rpy b/game/irc.rpy index 6640ee2..668d57e 100644 --- a/game/irc.rpy +++ b/game/irc.rpy @@ -24,7 +24,7 @@ init python: irc_online=False def irc_san(txt): - return txt.replace("[", "(").replace("]", ")").replace("\n", "").replace("{", "(").replace("}", "(").replace("%", "pc.") + return txt.replace("[", "(").replace("]", ")").replace("\n", "").replace("{", "(").replace("}", ")").replace("%", "pc.") def irc_open(): if not persistent.irc_enable: |