diff --git a/litigious-liberators/.pre-commit-config.yaml b/litigious-liberators/.pre-commit-config.yaml new file mode 100644 index 00000000..f8c441d3 --- /dev/null +++ b/litigious-liberators/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: +- repo: https://github.com/ambv/black + rev: stable + hooks: + - id: black + language_version: python3 +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v1.2.3 + hooks: + - id: flake8 diff --git a/litigious-liberators/README.md b/litigious-liberators/README.md index 15e0c804..3c957332 100644 --- a/litigious-liberators/README.md +++ b/litigious-liberators/README.md @@ -1,9 +1,56 @@ -# Litigious Liberators +# Resurgence +### by Litigious Liberators -Please use this README to document your team's project. Make sure to include a general description, information on how to set-up and run your project, and anything else you think may be interesting for a README. The README is usually the first document people read when they visit a project on GitHub, so it's a good idea to make it appealing. + +## Contents + +- [Setting up your repo](#setting-up-your-repo) +- [Running the App](#running-the-app) +- [Using the App](#using-the-app) +- [Useful links](#useful-links) +- [License](#license) + + +### Setting up your repo + +Clone this repo: + +```bash +$ git clone git@github.com:duarteocarmo/code-jam-6.git +``` + +Create a virtualenv: + +```bash +$ python -m venv +``` + +Activate it: + +```bash +$ . /env/activate +``` + +Install dependencies + +```bash +(env) $ cd litigious-liberators # navigate to our folder +(env) $ pip install -r requirements.txt # install normal requirements +(env) $ pip install -r requirements-dev.txt # install dev as well +``` +## Running the App: +```bash +python main.py +``` +## Using the App +* Once you open the app and __single-click__ on the screen, the game's backstory will be presented. You can __double-click__ to skip the entire story. +* After that, you need to create your profile. Enter your name and answer few simple questions to determine your initial stats to move on to the next screen. +* Here you will be playing the actual game. You will be presented a scenario/individual where you have to press __right/left (keyboard)__ based on the choices displayed on the screen. To know more about the card, you can __click on the picture__. +* Your goal is to maximise all the three stats without any of them going empty. These stats might increase or decrease based on your choices ## Useful links + - **Code Jam Rules:** [https://pythondiscord.com/pages/code-jams/code-jam-6/rules/](https://pythondiscord.com/pages/code-jams/code-jam-6/rules/) - **General Code Jam info:** [https://pythondiscord.com/pages/code-jams/code-jam-6/](https://pythondiscord.com/pages/code-jams/code-jam-6/) @@ -13,3 +60,6 @@ Please use this README to document your team's project. Make sure to include a g ## License All projects will merged into our Code Jam repository, which uses the [MIT license](../LICENSE). Please make sure that if you add assets, the licenses of those assets are compatible with the MIT license. + + +There we go :) diff --git a/litigious-liberators/delinquent-black-font/DelinquentBlack-DY43.ttf b/litigious-liberators/delinquent-black-font/DelinquentBlack-DY43.ttf new file mode 100644 index 00000000..27cd9a9f Binary files /dev/null and b/litigious-liberators/delinquent-black-font/DelinquentBlack-DY43.ttf differ diff --git a/litigious-liberators/delinquent-black-font/DelinquentCaps-ARXg.ttf b/litigious-liberators/delinquent-black-font/DelinquentCaps-ARXg.ttf new file mode 100644 index 00000000..a7653064 Binary files /dev/null and b/litigious-liberators/delinquent-black-font/DelinquentCaps-ARXg.ttf differ diff --git a/litigious-liberators/delinquent-black-font/DelinquentCapsSkewdBlack-q2wq.ttf b/litigious-liberators/delinquent-black-font/DelinquentCapsSkewdBlack-q2wq.ttf new file mode 100644 index 00000000..faebd4e3 Binary files /dev/null and b/litigious-liberators/delinquent-black-font/DelinquentCapsSkewdBlack-q2wq.ttf differ diff --git a/litigious-liberators/delinquent-black-font/DelinquentExtract-V4we.ttf b/litigious-liberators/delinquent-black-font/DelinquentExtract-V4we.ttf new file mode 100644 index 00000000..d5ec09c3 Binary files /dev/null and b/litigious-liberators/delinquent-black-font/DelinquentExtract-V4we.ttf differ diff --git a/litigious-liberators/delinquent-black-font/DelinquentRegular-JplK.ttf b/litigious-liberators/delinquent-black-font/DelinquentRegular-JplK.ttf new file mode 100644 index 00000000..234d92d2 Binary files /dev/null and b/litigious-liberators/delinquent-black-font/DelinquentRegular-JplK.ttf differ diff --git a/litigious-liberators/fonts/Oldenburg/OFL.txt b/litigious-liberators/fonts/Oldenburg/OFL.txt new file mode 100644 index 00000000..55debde1 --- /dev/null +++ b/litigious-liberators/fonts/Oldenburg/OFL.txt @@ -0,0 +1,94 @@ +Copyright (c) 2011 by Sorkin Type Co (www.sorkintype.com), +with Reserved Font Name "Oldenburg". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/litigious-liberators/fonts/Oldenburg/Oldenburg-Regular.ttf b/litigious-liberators/fonts/Oldenburg/Oldenburg-Regular.ttf new file mode 100644 index 00000000..96691ba0 Binary files /dev/null and b/litigious-liberators/fonts/Oldenburg/Oldenburg-Regular.ttf differ diff --git a/litigious-liberators/hp.png b/litigious-liberators/hp.png new file mode 100644 index 00000000..80410219 Binary files /dev/null and b/litigious-liberators/hp.png differ diff --git a/litigious-liberators/main.py b/litigious-liberators/main.py new file mode 100644 index 00000000..d0d07ab4 --- /dev/null +++ b/litigious-liberators/main.py @@ -0,0 +1,27 @@ +from kivy.app import App +from kivy.uix.screenmanager import ScreenManager +from onboarding.onboarding import OnboardingScreen +from profile_cards.profile_cards import SelectionScreen, WinScreen, LossScreen +from profile_creation.createprofile import CreateProfile +from kivy.lang import Builder + + +class ResurgenceApp(App): + def build(self): + Builder.load_file("onboarding/onboarding.kv") + Builder.load_file("profile_creation/createprofile.kv") + Builder.load_file("profile_cards/profiles.kv") + sm = ScreenManager() + sm.add_widget(OnboardingScreen(name="onboarding")) + sm.add_widget(CreateProfile(name="create_profile")) + sm.add_widget(SelectionScreen(name="profile_selection")) + sm.add_widget(WinScreen()) + sm.add_widget(LossScreen()) + # sm.add_widget(PostSelectionScreen(name="post_selection_screen")) + return sm + + +if __name__ == "__main__": + # calling run method of the application will build the widget tree, + # and start the event loop. + ResurgenceApp().run() diff --git a/litigious-liberators/onboarding/intro_img_crop.jpg b/litigious-liberators/onboarding/intro_img_crop.jpg new file mode 100644 index 00000000..e5c6633a Binary files /dev/null and b/litigious-liberators/onboarding/intro_img_crop.jpg differ diff --git a/litigious-liberators/onboarding/onboarding.kv b/litigious-liberators/onboarding/onboarding.kv new file mode 100644 index 00000000..58fc77de --- /dev/null +++ b/litigious-liberators/onboarding/onboarding.kv @@ -0,0 +1,44 @@ +#:kivy 1.11.1 +: + canvas: + Color: + rgba: utils.get_color_from_hex('#321911') + Rectangle: + size: self.size + MyOnboardWidget: + id: my_onboard_widget + Image: + id: bg_img + source: "onboarding/intro_img_crop.jpg" + + Label: + id: app_name + pos_hint: {"center_x": 0.50, "center_y": 0.8} + text: "R E S U R G E N C E" + font_size: "30sp" + font_name: "delinquent-black-font/DelinquentCapsSkewdBlack-q2wq.ttf" + color: utils.get_color_from_hex("#ff0000")#1, 0, 0, 1 + Label: + text: "Double tap to skip intro" + pos_hint: {"center_x": 0.50, "center_y": 0.1} + color: 1,1,1,0.5 +# Label: +# id: story_0 +# pos_hint: {"center_x": 0.50, "center_y": 0.5} +# text: "It's the year 12020 CE.... It's the year 12020 CE... It's the year 12020 CE..." +# font_size: "35sp" +# text_size: (self.width,None) +# font_name: "delinquent-black-font/DelinquentExtract-V4we.ttf" +# color: 1, 1, 1, 1 +# opacity: 0 +# halign: "center" +# +# Label: +# id: story_1 +# pos_hint: {"center_x": 0.50, "center_y": 0.5} +# text: "Civilization" +# font_size: "35sp" +# font_name: "delinquent-black-font/DelinquentExtract-V4we.ttf" +# color: utils.get_color_from_hex("#ff0000")#1, 0, 0, 1 +# opacity: 0 + diff --git a/litigious-liberators/onboarding/onboarding.py b/litigious-liberators/onboarding/onboarding.py new file mode 100644 index 00000000..0cdd6ba5 --- /dev/null +++ b/litigious-liberators/onboarding/onboarding.py @@ -0,0 +1,136 @@ +from kivy.app import App +from kivy.uix.label import Label +from kivy.uix.floatlayout import FloatLayout +from kivy.uix.screenmanager import ScreenManager, Screen +from kivy.animation import Animation +from kivy.clock import Clock +from functools import partial + +lorem = "" +sentences = [ + "It's the year 12020 CE...", + """Civilization has fallen, after the humans caused their own demise as they tried to""" + """ interfere with the natural order of things thousands of years ago """, + """Experiments with the prehistoric animal DNA, race to the ultimate doomsday""" + """ weapon and the total neglect of Global Warming...""", + "Today, flora and fauna from all ages flourish, treading the ruins of an ancient civilization.", + """Some humans survived against all odds, striving to rebuild what was lost,""" + """ but without lost knowledge and wisdom it seems hopeless.""", + """You are one of these humans. Will you be the one, cunning and smart enough to tip""" + """ the scales or will your ignorant careless attitude ruin everything?""", + "Only time will tell.", +] +# images = [ +# "https://placekitten.com/g/1080/1920", +# "https://placekitten.com/g/200/300", +# "https://placekitten.com/g/300/400", +# ] + +images = ["onboarding/intro_img_crop.jpg"] + + +class MyOnboardWidget(FloatLayout): + steps = 0 + + def __init__(self, **kwargs): + super().__init__(**kwargs) + self.steps = 0 + # for index, image_url in enumerate(images): + # image_object = AsyncImage(source=image_url, size_hint=(1, 1)) + # image_object.opacity = 1 if index == 0 else 0 + # setattr(self, f"image_{index}", image_object) + # self.add_widget(image_object) + + for index, sentence in enumerate(sentences): + label_object = Label( + text=sentence, + text_size=(self.width * 4, None), + pos_hint={"center_x": 0.50, "center_y": 0.5}, + color=[1, 1, 1, 1], + valign="center", + # align="middle", + font_size="35sp", + font_name="delinquent-black-font/DelinquentExtract-V4we.ttf", + # text_size=(400, 600), + ) + # label_object.opacity = 1 if index == 0 else 0 + label_object.opacity = 0 + setattr(self, f"description_{index}", label_object) + self.add_widget(label_object) + + def animate(self, obj_out, obj_in, opacity, *args): + appear = Animation(opacity=1, duration=1) + disappear = Animation(opacity=opacity, duration=1) + appear.start(obj_in) + disappear.start(obj_out) + + def on_touch_down(self, touch): + if self.steps == 0: + Clock.schedule_once( + partial( + self.animate, self.parent.ids["bg_img"], getattr(self, f"description_0"), 0.2 + ), + 0.5 + 0 * 5, + ) + speed = 15 + delay = len(sentences[0]) / speed + 1 + for index, sentence in enumerate(sentences[1:], start=1): + # print(index, sentence) + # print(getattr(self, f"description_{index - 1}")) + # print(getattr(self, f"description_{index}")) + + Clock.schedule_once( + partial( + self.animate, + getattr(self, f"description_{index-1}"), + getattr(self, f"description_{index}"), + 0, + ), + 1 + delay, + ) + delay += len(sentence) / speed + if touch.is_double_tap: + self.parent.manager.current = "create_profile" + + self.steps += 1 + + return True + + +class OnboardingScreen(Screen): + pass + + +class CreateProfileTest(Screen): + pass + + +class OnboardingApp(App): + def build(self): + sm = ScreenManager() + sm.add_widget(OnboardingScreen(name="onboarding")) + sm.add_widget(CreateProfileTest(name="create_profile")) + return sm + + +if __name__ == "__main__": + OnboardingApp().run() + + +# def ola(): +# print("HELLLOOO") +# +# +# class CarouselApp(App): +# def build(self): +# # carousel = Carousel(direction="right", loop=True) +# # src = "https://placekitten.com/g/1080/1920" +# # src_1 = "https://placekitten.com/g/1080/1920" +# # image = AsyncImage(source=src) +# # image1 = AsyncImage(source=src_1) +# # carousel.add_widget(image) +# # carousel.add_widget(image1) +# # return carousel +# +# +# CarouselApp().run() diff --git a/litigious-liberators/profile_cards/hp.png b/litigious-liberators/profile_cards/hp.png new file mode 100644 index 00000000..80410219 Binary files /dev/null and b/litigious-liberators/profile_cards/hp.png differ diff --git a/litigious-liberators/profile_cards/profile_cards.py b/litigious-liberators/profile_cards/profile_cards.py new file mode 100644 index 00000000..40d06491 --- /dev/null +++ b/litigious-liberators/profile_cards/profile_cards.py @@ -0,0 +1,210 @@ +from kivymd.toast import toast +from kivy.uix.behaviors import ButtonBehavior +from kivy.uix.image import Image +from kivy.config import Config +from kivy.app import App +import os +from os import listdir +from random import shuffle +from copy import deepcopy +from kivy.uix.screenmanager import ScreenManager, Screen, SlideTransition +from kivy.uix.popup import Popup +from kivy.uix.button import Button +from kivy.uix.scrollview import ScrollView +from kivy.uix.boxlayout import BoxLayout +from kivy.properties import StringProperty, DictProperty +from yaml import safe_load +from kivy.core.window import Window +from collections import Counter +from kivy.uix.label import Label +from kivy.core.audio import SoundLoader + +Config.set("input", "mouse", "mouse,multitouch_on_demand") + + +class ScrollableLabel(ScrollView): + text = StringProperty("") + + +class Content(BoxLayout): + def __init__(self, **kwargs): + super(Content, self).__init__(**kwargs) + self.orientation = "vertical" + self.story = ScrollableLabel() + self.button = Button(text="Close") + self.add_widget(self.story) + self.add_widget(self.button) + + +class ImageButton(ButtonBehavior, Image): + def __init__(self, **kwargs): + super(ImageButton, self).__init__(**kwargs) + self.popup = Popup(title="Description", content=Content(), size_hint=(0.4, 0.7)) + self.popup.content.button.bind(on_press=self.popup.dismiss) + + def on_press(self): + self.popup.open() + + def close_popup(self): + self.popup.dismiss() + + +class SelectionScreen(Screen): + def on_pre_enter(self, *args): + self.ids["profile_list"]._keyboard = Window.request_keyboard( + self.ids["profile_list"]._keyboard_closed, self.ids["profile_list"] + ) + self.ids["profile_list"]._keyboard.bind( + on_key_down=self.ids["profile_list"]._on_keyboard_down + ) + return super().on_pre_enter(*args) + + +class ReplayScreen(Screen): + def __init__(self, **kw): + super().__init__(**kw) + dir_path = os.path.dirname(os.path.realpath(__file__)) + sourcefile = os.path.join(dir_path, "./winloss.jpg") + self.children[0].children[-1].source = sourcefile + + def replay(self): + profile_carousel = self.manager.get_screen("create_profile").ids.profile_carousel + profile_carousel.index = 0 + self.manager.current = "create_profile" + + +class LossScreen(ReplayScreen): + pass + + +class WinScreen(ReplayScreen): + pass + + +class ProfileCard(Screen): + def __init__(self, profile, **kwargs): + super(ProfileCard, self).__init__(**kwargs) + dir_path = os.path.dirname(os.path.realpath(__file__)) + pic_addr = f"../profiles/pictures/{profile['Picture']}" + sound_addr = f"../profiles/sounds/{profile.get('Sound')}" + self.ids.picture.source = os.path.join(dir_path, pic_addr) + self.sound = SoundLoader.load(os.path.join(dir_path, sound_addr)) + self.deltas = Counter(profile["Deltas"]) + self.ids.name.text = profile["Name"] + self.ids.right_choice.text += profile["Choices"]["right"] + self.ids.left_choice.text += profile["Choices"]["left"] + self.results = profile["Results"] + self.ids.picture.popup.content.story.text = profile["Biography"] + # self.ids.name.font_name = "../fonts/Oldenburg/Oldenburg-Regular.ttf" + # #When launching it from terminal using main.py the relative path to font changes. + # To test this part as isolated app uncomment the line above and comment the line bellow + self.ids.name.font_name = os.path.join( + os.path.dirname(os.path.abspath(__file__)), "../fonts/Oldenburg/Oldenburg-Regular.ttf" + ) + + def on_enter(self, *args): + if self.sound: + self.sound.play() + return super().on_enter(*args) + + +class ProfileList(ScreenManager): + _attributes = DictProperty(None) + + def __init__(self, **kwargs): + super(ProfileList, self).__init__(**kwargs) + self.profile_dir = os.path.join( + os.path.dirname(os.path.abspath(__file__)), "../profiles/write-ups" + ) + help = Label( + text="""Your goal is to maximize all three attributes: Knowledge, Welfare,Energy: + Use left/right arrowkeys to swipe the cards: each decision will influence your attributes! + Press on each card image if you want to learn more about it ;)""", + text_size=(self.width * 3, None), + ) + self.help = Popup(title="Help", content=help, size_hint=(0.5, 0.7)) + # self.help.content.button.bind(on_press=self.help.dismiss) + self.static_profile_list = listdir(self.profile_dir) + self.profile_list = deepcopy(self.static_profile_list) + self.cycler = self.r_cycle(self.profile_list) + # should be initialisable in main app + self._attributes = Counter({"Knowledge": 5, "Welfare": 5, "Energy": 5}) + # self._keyboard = Window.request_keyboard(self._keyboard_closed, self) + # self._keyboard.bind(on_key_down=self._on_keyboard_down) + with open(f"{self.profile_dir}/{next(self.cycler)}", "r") as profile_file: + profile = safe_load(profile_file.read()) + self.add_widget(ProfileCard(profile)) + + @property + def attributes(self): + return self._attributes + + @attributes.setter + def attributes(self, value): + self._attributes = value + for k, v in self._attributes.items(): + self._attributes[k] = min(10, v) + if any(x < 0 for x in self._attributes.values()): + App.get_running_app().root.current = "loss_screen" + elif all(x == 10 for x in self._attributes.values()): + App.get_running_app().root.current = "win_screen" + print(self.attributes) + + @staticmethod + def r_cycle(x): + while True: + shuffle(x) + for element in x: + yield element + + def card_swipe(self, direction): + next_profile = next(self.cycler) + with open(f"{self.profile_dir}/{next_profile}", "r") as profile_file: + profile = safe_load(profile_file.read()) + current = self.current_screen + trans = SlideTransition() + totals = Counter() + totals.update(self.attributes) + next_card = ProfileCard(profile) + delta = current.deltas[direction] + totals.update(delta) + self.attributes = totals + message = direction.upper() + "\n" + current.results[direction] + for k, v in delta.items(): + message += f"{k}: {v if v < 0 else '+' + str(v)}\n" + toast(message.rstrip()) + self.switch_to(next_card, direction=direction, transition=trans) + current.ids.picture.close_popup() + self.remove_widget(current) + + def _keyboard_closed(self): + self._keyboard.unbind(on_key_down=self._on_keyboard_down) + self._keyboard = None + + def _on_keyboard_down(self, keyboard, keycode, text, modifiers): + if keycode[1] == "right": + self.card_swipe("right") + + elif keycode[1] == "left": + self.card_swipe("left") + elif keycode[1] == "h": + self.help.open() + return True + + +class ProfilesApp(App): + def build(self): + self.sm = ScreenManager() + self.selection_screen = SelectionScreen() + self.loss_screen = LossScreen() + self.win_screen = WinScreen() + self.sm.add_widget(self.selection_screen) + self.sm.add_widget(self.loss_screen) + self.sm.add_widget(self.win_screen) + return self.sm + + +if __name__ == "__main__": + # calling run method of the application will build the widget tree, + # and start the event loop. + ProfilesApp().run() diff --git a/litigious-liberators/profile_cards/profiles.kv b/litigious-liberators/profile_cards/profiles.kv new file mode 100644 index 00000000..9e4b75e2 --- /dev/null +++ b/litigious-liberators/profile_cards/profiles.kv @@ -0,0 +1,191 @@ +#:kivy 1.11.1 +#:import utils kivy.utils +BoxLayout: + orientation: "vertical" + +: + name: 'profile_list' + canvas: + Color: + rgba: utils.get_color_from_hex('#321911') + Rectangle: + size: self.size + BoxLayout + orientation: "vertical" + BoxLayout + size_hint_y: None + spacing: 20 + BoxLayout + orientation: 'vertical' + Label: + text: "Knowledge" + font_size: sp(20) + font_name: "fonts/Oldenburg/Oldenburg-Regular.ttf" + ProgressBar: + max: 10 + value: profile_list._attributes["Knowledge"] + BoxLayout + orientation: 'vertical' + Label: + text: "Welfare" + font_size: sp(20) + font_name: "fonts/Oldenburg/Oldenburg-Regular.ttf" + ProgressBar: + max: 10 + value: profile_list._attributes["Welfare"] + BoxLayout + orientation: 'vertical' + Label: + text: "Energy" + font_size: sp(20) + font_name: "fonts/Oldenburg/Oldenburg-Regular.ttf" + ProgressBar: + max: 10 + value: profile_list._attributes["Energy"] + ProfileList: + id: profile_list + size_hint_y: 0.8 + Label: + text: "Press for help" + pos_hint: {"center_x": 0.10, "center_y": 0.025} + color: 0,0,0,0.5 + + +: + Label: + size_hint_y: None + height: self.texture_size[1] + text_size: self.width, None + text: root.text + +: + id:pop + size_hint: .4, .4 + auto_dismiss: False + title: 'XXX!!' + BoxLayout: + id: box + orientation:'vertical' + BoxLayout: + orientation:'horizontal' + ScrollableLabel: + id: bio + Button: + text: 'Close' + on_release: pop.dismiss() + + + +: + canvas: + Color: + rgba: utils.get_color_from_hex('#bbdefb') + Rectangle: + size: (self.size[0], self.size[1] - 100) + BoxLayout: + orientation: 'vertical' + ImageButton: + id: picture + size_hint_y: None + height: 200 + Label: + id: name + color: 0, 0, 0, 1 + size_hint_y: None + font_size: sp(30) + Label: + id: right_choice + color: 0, 0, 0, 1 + text: "Right: " + font_size: sp(20) + Label: + id: left_choice + text: "Left: " + color: 0, 0, 0, 1 + font_size: sp(20) + + + +: + name: 'loss_screen' + FloatLayout: + Image: + Label: + text: 'You Lose :(' + font_size: '60sp' + font_name: "delinquent-black-font/DelinquentCapsSkewdBlack-q2wq.ttf" + color: 1, 1, 1, 1 + Button: + text: 'Replay' + background_normal: '' + background_color: utils.get_color_from_hex('#fbc02d') + size_hint_y: 0.15 + color: 0, 0, 0, 1 + on_release: root.replay() + +: + name: 'win_screen' + FloatLayout: + Image: + Label: + text: 'You Win :D' + font_size: '60sp' + font_name: "delinquent-black-font/DelinquentCapsSkewdBlack-q2wq.ttf" + color: 1, 1, 1, 1 + Button: + text: 'Replay' + background_normal: '' + background_color: utils.get_color_from_hex('#fbc02d') + size_hint_y: 0.15 + color: 0, 0, 0, 1 + on_release: root.replay() + +: + level: 0.1 + width: self.height + size_hint: 1, 1 + color: 0, 0, 1 + canvas: + Color: + rgb: 0,0,0 + Line: + circle: (root.center_x,root.center_y,root.width/2) + StencilPush + Ellipse: + pos: root.pos + size: root.size + StencilUse + + Color: + rgb: root.color + Rectangle: + pos: root.pos + size: (root.width, root.level*root.height) + StencilUnUse + + StencilPop + +: + level: 0.1 + width: self.height + size_hint: 1, 1 + color: 0, 0, 1 + canvas: + + StencilPush + Rectangle: + pos: root.pos + #pos: (root.pos[0],root.pos[1]-root.level*root.height) + size: (root.width,root.level*root.height) + source: "hp.png" + StencilUse + + Color: + rgb: root.color + Rectangle: + pos: root.pos + #size: (root.width, root.level*root.height) + source: "hp.png" + StencilUnUse + + StencilPop diff --git a/litigious-liberators/profile_cards/winloss.jpg b/litigious-liberators/profile_cards/winloss.jpg new file mode 100644 index 00000000..01da3f9c Binary files /dev/null and b/litigious-liberators/profile_cards/winloss.jpg differ diff --git a/litigious-liberators/profile_creation/createprofile.kv b/litigious-liberators/profile_creation/createprofile.kv new file mode 100644 index 00000000..81ef2b36 --- /dev/null +++ b/litigious-liberators/profile_creation/createprofile.kv @@ -0,0 +1,157 @@ +#:kivy 1.11.1 +#:import utils kivy.utils + + ProfileSwiper: + id: profile_carousel + direction: "right" + BoxLayout: + orientation: 'vertical' + Label: + text: 'My Name is' + font_size: '30dp' +# font_name: "rock1.ttf" + BoxLayout: + orientation: 'vertical' + padding: '10dp' + spacing: '10dp' + TextInput: + font_size: '30dp' + multiline: False + BoxLayout: + orientation: 'horizontal' + padding: '10dp', '50dp' + spacing: '10dp' + Button: + text: 'Continue' + background_normal: '' + background_color: utils.get_color_from_hex('#fbc02d') + color: 0, 0, 0, 1 + size_hint_y: 0.4 + on_release: + root.ids.profile_carousel.validate_name() + + BoxLayout: + orientation: 'vertical' + Label: + text: "What would you do if you find a shiny object?" + font_size: '25dp' + BoxLayout: + orientation: 'vertical' + padding: '10dp' + spacing: '10dp' + ToggleButton: + text: 'Display it as a decoration' + group: 'Q1' + state: 'down' + ToggleButton: + text: 'pick and tell none about it' + group: 'Q1' + ToggleButton: + text: "Tell your trusty smart friend" + group: 'Q1' + ToggleButton: + # TODO: show some toast about your action's consequences + # For example: you chose to save him so he ends up telling stuff + text: 'Research about it in the library' + group: 'Q1' + BoxLayout: + orientation: 'horizontal' + padding: '10dp', '50dp' + spacing: '10dp' + Button: + text: 'Go Back' + background_normal: '' + background_color: utils.get_color_from_hex('#fbc02d') + color: 0, 0, 0, 1 + size_hint_y: 0.4 + on_release: root.ids.profile_carousel.load_previous() + Button: + text: 'Continue' + background_normal: '' + background_color: utils.get_color_from_hex('#fbc02d') + color: 0, 0, 0, 1 + size_hint_y: 0.4 + on_release: root.ids.profile_carousel.load_next() + + BoxLayout: + orientation: 'vertical' + Label: + text: 'You come across an angry animal. You:' + font_size: '30dp' + BoxLayout: + orientation: 'vertical' + padding: '10dp' + spacing: '10dp' + ToggleButton: + text: 'Run away' + group: 'Q2' + state: 'down' + ToggleButton: + text: 'Throw objects to scare it' + group: 'Q2' + ToggleButton: + text: 'Fight it with a stick' + group: 'Q2' + ToggleButton: + text: 'You are fearless and fight it like a man' + group: 'Q2' + BoxLayout: + orientation: 'horizontal' + padding: '10dp', '50dp' + spacing: '10dp' + Button: + text: 'Go Back' + background_normal: '' + background_color: utils.get_color_from_hex('#fbc02d') + color: 0, 0, 0, 1 + size_hint_y: 0.4 + on_release: root.ids.profile_carousel.load_previous() + Button: + text: 'Continue' + background_normal: '' + background_color: utils.get_color_from_hex('#fbc02d') + color: 0, 0, 0, 1 + size_hint_y: 0.4 + # TODO: With this design we only need to validate the name. But we need more questions. + on_release: root.ids.profile_carousel.load_next() + BoxLayout: + orientation: 'vertical' + Label: + text: 'You are stranded in the middle of nowhere. You:' + font_size: '30dp' + BoxLayout: + orientation: 'vertical' + padding: '10dp' + spacing: '10dp' + ToggleButton: + text: "I'm fragile. I'll die in an hour" + group: 'Q3' + state: 'down' + ToggleButton: + text: 'There is always a way... I should try something' + group: 'Q3' + ToggleButton: + text: 'I had gone through tougher situations than this' + group: 'Q3' + ToggleButton: + text: "This ain't much kiddo" + group: 'Q3' + BoxLayout: + orientation: 'horizontal' + padding: '10dp', '50dp' + spacing: '10dp' + Button: + text: 'Go Back' + background_normal: '' + background_color: utils.get_color_from_hex('#fbc02d') + color: 0, 0, 0, 1 + size_hint_y: 0.4 + on_release: root.ids.profile_carousel.load_previous() + Button: + text: 'Continue' + background_normal: '' + background_color: utils.get_color_from_hex('#fbc02d') + color: 0, 0, 0, 1 + size_hint_y: 0.4 + # TODO: With this design we only need to validate the name. But we need more questions. + on_release: root.manager.current = "profile_selection" diff --git a/litigious-liberators/profile_creation/createprofile.py b/litigious-liberators/profile_creation/createprofile.py new file mode 100644 index 00000000..467ad4d9 --- /dev/null +++ b/litigious-liberators/profile_creation/createprofile.py @@ -0,0 +1,78 @@ +from kivy.app import App +from kivy.uix.screenmanager import ScreenManager, Screen +from kivy.uix.carousel import Carousel +from collections import Counter +from kivy.properties import DictProperty +from kivymd.toast import toast + +import json +import os + + +class CreateProfile(Screen): + profile_data = DictProperty({}) + + def on_pre_leave(self, *args): + # load the answer to score mapping for each question from db + dir_path = os.path.dirname(os.path.realpath(__file__)) + filepath = os.path.join(dir_path, "quetoscore.json") + with open(filepath) as f: + que_to_score = json.load(f) + + # store the initial state of player based on selected profile creation quetions + self.profile_data["attributes"] = Counter({"Knowledge": 0, "Welfare": 0, "Energy": 0}) + + # calculate initial state based on selected answers + for idx, slide in enumerate(self.ids.profile_carousel.slides): + if idx == 0: + # first slide is for name + self.profile_data["name"] = slide.children[1].children[0].text + + else: + # iterate over toggle buttons and get their state and update + # the attributes based on selected toggle button + for idx, toggle_btn in enumerate(slide.children[1].children): + if toggle_btn.state == "down": + attributes = que_to_score[toggle_btn.group][f"A{idx+1}"] + self.profile_data["attributes"].update(attributes) + + self.manager.get_screen("profile_selection").ids[ + "profile_list" + ].attributes = self.manager.get_screen("create_profile").profile_data["attributes"] + print(self.manager.get_screen("profile_selection").ids["profile_list"]._attributes) + # TODO: Fix the initial stats caclulations before uncommenting following lines + # print(self.profile_data["attributes"]) + # self.manager.get_screen("profile_selection").ids[ + # "profile_list" + # ]._attributes = self.profile_data["attributes"] + return super().on_pre_leave(*args) + + +class ProfileSwiper(Carousel): + def on_touch_down(self, touch): + return super().on_touch_down(touch) + + def validate_name(self): + name = self.slides[0].children[1].children[0].text + if not name: + toast("Please enter name!") + else: + self.load_next() + + +class AfterSwipeScreen(Screen): + def on_enter(self, *args): + print(self.manager.get_screen("create_profile").profile_data) + return super().on_enter(*args) + + +class CreateProfileApp(App): + def build(self): + sm = ScreenManager() + sm.add_widget(CreateProfile(name="create_profile")) + sm.add_widget(AfterSwipeScreen(name="profile_selection")) + return sm + + +if __name__ == "__main__": + CreateProfileApp().run() diff --git a/litigious-liberators/profile_creation/quetoscore.json b/litigious-liberators/profile_creation/quetoscore.json new file mode 100644 index 00000000..d972a0ad --- /dev/null +++ b/litigious-liberators/profile_creation/quetoscore.json @@ -0,0 +1,68 @@ +{ + "Q1": { + "A1": { + "Knowledge": 4, + "Welfare": 0, + "Energy": 0 + }, + "A2": { + "Knowledge": 3, + "Welfare": 0, + "Energy": 0 + }, + "A3": { + "Knowledge": 2, + "Welfare": 0, + "Energy": 0 + }, + "A4": { + "Knowledge": 1, + "Welfare": 0, + "Energy": 0 + } + }, + "Q2": { + "A1": { + "Knowledge": 0, + "Welfare": 4, + "Energy": 0 + }, + "A2": { + "Knowledge": 0, + "Welfare": 3, + "Energy": 0 + }, + "A3": { + "Knowledge": 0, + "Welfare": 2, + "Energy": 0 + }, + "A4": { + "Knowledge": 0, + "Welfare": 1, + "Energy": 0 + } + }, + "Q3": { + "A1": { + "Knowledge": 0, + "Welfare": 0, + "Energy": 4 + }, + "A2": { + "Knowledge": 0, + "Welfare": 0, + "Energy": 3 + }, + "A3": { + "Knowledge": 0, + "Welfare": 0, + "Energy": 2 + }, + "A4": { + "Knowledge": 0, + "Welfare": 0, + "Energy": 1 + } + } +} diff --git a/litigious-liberators/profiles/pictures/ancient_ruins.png b/litigious-liberators/profiles/pictures/ancient_ruins.png new file mode 100644 index 00000000..6e5d32a1 Binary files /dev/null and b/litigious-liberators/profiles/pictures/ancient_ruins.png differ diff --git a/litigious-liberators/profiles/pictures/baka_trump.png b/litigious-liberators/profiles/pictures/baka_trump.png new file mode 100644 index 00000000..859a3f88 Binary files /dev/null and b/litigious-liberators/profiles/pictures/baka_trump.png differ diff --git a/litigious-liberators/profiles/pictures/chenny_lee.png b/litigious-liberators/profiles/pictures/chenny_lee.png new file mode 100644 index 00000000..12e0143e Binary files /dev/null and b/litigious-liberators/profiles/pictures/chenny_lee.png differ diff --git a/litigious-liberators/profiles/pictures/chick_yenn.jpg b/litigious-liberators/profiles/pictures/chick_yenn.jpg new file mode 100644 index 00000000..46014c52 Binary files /dev/null and b/litigious-liberators/profiles/pictures/chick_yenn.jpg differ diff --git a/litigious-liberators/profiles/pictures/chuck_tann.jpg b/litigious-liberators/profiles/pictures/chuck_tann.jpg new file mode 100644 index 00000000..f7766ca0 Binary files /dev/null and b/litigious-liberators/profiles/pictures/chuck_tann.jpg differ diff --git a/litigious-liberators/profiles/pictures/dj_mammo.jpg b/litigious-liberators/profiles/pictures/dj_mammo.jpg new file mode 100644 index 00000000..99b314dd Binary files /dev/null and b/litigious-liberators/profiles/pictures/dj_mammo.jpg differ diff --git a/litigious-liberators/profiles/pictures/floating_city.jpg b/litigious-liberators/profiles/pictures/floating_city.jpg new file mode 100644 index 00000000..78f9b9ee Binary files /dev/null and b/litigious-liberators/profiles/pictures/floating_city.jpg differ diff --git a/litigious-liberators/profiles/pictures/herbert_george_wells.jpg b/litigious-liberators/profiles/pictures/herbert_george_wells.jpg new file mode 100644 index 00000000..fff7ec32 Binary files /dev/null and b/litigious-liberators/profiles/pictures/herbert_george_wells.jpg differ diff --git a/litigious-liberators/profiles/pictures/icky_joo.jpg b/litigious-liberators/profiles/pictures/icky_joo.jpg new file mode 100644 index 00000000..a6d77933 Binary files /dev/null and b/litigious-liberators/profiles/pictures/icky_joo.jpg differ diff --git a/litigious-liberators/profiles/pictures/jeff_rench.jpg b/litigious-liberators/profiles/pictures/jeff_rench.jpg new file mode 100644 index 00000000..af0df337 Binary files /dev/null and b/litigious-liberators/profiles/pictures/jeff_rench.jpg differ diff --git a/litigious-liberators/profiles/pictures/kali_mann.png b/litigious-liberators/profiles/pictures/kali_mann.png new file mode 100644 index 00000000..c958f632 Binary files /dev/null and b/litigious-liberators/profiles/pictures/kali_mann.png differ diff --git a/litigious-liberators/profiles/pictures/karr_muk.jpg b/litigious-liberators/profiles/pictures/karr_muk.jpg new file mode 100644 index 00000000..cdd19c13 Binary files /dev/null and b/litigious-liberators/profiles/pictures/karr_muk.jpg differ diff --git a/litigious-liberators/profiles/pictures/living_fossil.png b/litigious-liberators/profiles/pictures/living_fossil.png new file mode 100644 index 00000000..aab74ff6 Binary files /dev/null and b/litigious-liberators/profiles/pictures/living_fossil.png differ diff --git a/litigious-liberators/profiles/pictures/mullar_baus.png b/litigious-liberators/profiles/pictures/mullar_baus.png new file mode 100644 index 00000000..7641e161 Binary files /dev/null and b/litigious-liberators/profiles/pictures/mullar_baus.png differ diff --git a/litigious-liberators/profiles/pictures/n_attan_lurk.jpg b/litigious-liberators/profiles/pictures/n_attan_lurk.jpg new file mode 100644 index 00000000..38fc6ebe Binary files /dev/null and b/litigious-liberators/profiles/pictures/n_attan_lurk.jpg differ diff --git a/litigious-liberators/profiles/pictures/strange_sculpture.png b/litigious-liberators/profiles/pictures/strange_sculpture.png new file mode 100644 index 00000000..a30edfa1 Binary files /dev/null and b/litigious-liberators/profiles/pictures/strange_sculpture.png differ diff --git a/litigious-liberators/profiles/pictures/weird_stone.png b/litigious-liberators/profiles/pictures/weird_stone.png new file mode 100644 index 00000000..d829f9f8 Binary files /dev/null and b/litigious-liberators/profiles/pictures/weird_stone.png differ diff --git a/litigious-liberators/profiles/pictures/wiki_the_wise.jpg b/litigious-liberators/profiles/pictures/wiki_the_wise.jpg new file mode 100644 index 00000000..a9ec0be0 Binary files /dev/null and b/litigious-liberators/profiles/pictures/wiki_the_wise.jpg differ diff --git a/litigious-liberators/profiles/pictures/xi_ping_ping.jpg b/litigious-liberators/profiles/pictures/xi_ping_ping.jpg new file mode 100644 index 00000000..e8130724 Binary files /dev/null and b/litigious-liberators/profiles/pictures/xi_ping_ping.jpg differ diff --git a/litigious-liberators/profiles/sounds/icky_joo.mp3 b/litigious-liberators/profiles/sounds/icky_joo.mp3 new file mode 100644 index 00000000..60aa26ea Binary files /dev/null and b/litigious-liberators/profiles/sounds/icky_joo.mp3 differ diff --git a/litigious-liberators/profiles/write-ups/ancient_ruins.yml b/litigious-liberators/profiles/write-ups/ancient_ruins.yml new file mode 100644 index 00000000..fab0e8be --- /dev/null +++ b/litigious-liberators/profiles/write-ups/ancient_ruins.yml @@ -0,0 +1,24 @@ +Name: Ancient Ruins +Picture: ancient_ruins.png +Biography: > + No one knows what caused their re-emergence and, consequently, the destruction of the city, but + one cannot stop feeling amazed looking at these structures, so tall that people speculate they + can be seen from outside of the planet. These concrete ruins of Noah's Ark are rumoured to + contain invaluable treasures within its stony mazes. +Choices: + right: Explore and find something useful + left: Come back later. +Results: + right: > + Treasures... Here I come.. + left: > + Meh... Not so interesting +Deltas: + right: + Knowledge: 2 + Welfare: 2 + Energy: -2 + left: + Knowledge: 0 + Welfare: 0 + Energy: 0 diff --git a/litigious-liberators/profiles/write-ups/baka_trump.yml b/litigious-liberators/profiles/write-ups/baka_trump.yml new file mode 100644 index 00000000..a05e1159 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/baka_trump.yml @@ -0,0 +1,22 @@ +Name: Baka Trump +Picture: baka_trump.png +Biography: > + I spend most of my free time sleeping. I also like building stuff, and help out with construction + of living spaces during territory expansion campaigns. I like my eggs fried with extra oil. +Choices: + right: Protest against Baka for destroying ecosystems. + left: Join his company - a nice career; you can live comfortably. +Results: + right: > + Not making the same mistake as some others have! + left: > + Welcome to Baka and Co. +Deltas: + right: + Knowledge: 1 + Welfare: -1 + Energy: -3 + left: + Knowledge: 3 + Welfare: 2 + Energy: 1 diff --git a/litigious-liberators/profiles/write-ups/chenny_lee.yml b/litigious-liberators/profiles/write-ups/chenny_lee.yml new file mode 100644 index 00000000..c25fe119 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/chenny_lee.yml @@ -0,0 +1,24 @@ +Name: Chenny Lee +Picture: chenny_lee.png +Biography: > + Pro: can cook + Con: will try to get you to do the dishes + Pro: not afraid of spiders + Con: afraid of moths +Choices: + right: Attend Chenny's cake party. + left: Explore a cave with Chenny. +Results: + right: > + Yummy! + left: > + Hope there aren't any moths. +Deltas: + right: + Knowledge: 0 + Welfare: 0 + Energy: 3 + left: + Knowledge: 1 + Welfare: 2 + Energy: -1 diff --git a/litigious-liberators/profiles/write-ups/chick_yenn.yml b/litigious-liberators/profiles/write-ups/chick_yenn.yml new file mode 100644 index 00000000..5ad18f74 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/chick_yenn.yml @@ -0,0 +1,24 @@ +Name: Chick Yenn +Picture: chick_yenn.jpg +Biography: > + I am the princess of this land. I love to live by occeans because I like to get my body tanned. + "Live today like you are getting fried tomorrow" - This has been my motto for a long time. +Choices: + right: > + Date princess Chick. + left: > + Let's have some fried chicken tomorrow. +Results: + right: > + She knows more about this land than anyone else! + left: > + Its always nice to have stomach filled! +Deltas: + right: + Knowledge: 3 + Welfare: 3 + Energy: 0 + left: + Knowledge: 0 + Welfare: 0 + Energy: 3 diff --git a/litigious-liberators/profiles/write-ups/chuck_tann.yml b/litigious-liberators/profiles/write-ups/chuck_tann.yml new file mode 100644 index 00000000..e6c3f82a --- /dev/null +++ b/litigious-liberators/profiles/write-ups/chuck_tann.yml @@ -0,0 +1,22 @@ +Name: Chuck Tann +Picture: chuck_tann.jpg +Biography: > + Yo homie! You must've heard the saying "Chuck the chicken may cross the road but nobody + crosses Chuck the chicken". I know kung-fu, karate, you name it. +Choices: + right: Become chuck's homie + left: Let's have some fried chicken tomorrow. +Results: + right: > + I better learn some moves. + left: > + Nothing better than fried chicken! +Deltas: + right: + Knowledge: 3 + Welfare: 3 + Energy: 1 + left: + Knowledge: 0 + Welfare: 0 + Energy: 3 diff --git a/litigious-liberators/profiles/write-ups/dj_mammo.yml b/litigious-liberators/profiles/write-ups/dj_mammo.yml new file mode 100644 index 00000000..7ffd70c8 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/dj_mammo.yml @@ -0,0 +1,24 @@ +Name: DJ Mammo +Picture: dj_mammo.jpg +Biography: > + Yo it's yo boi DJ Mammo! + Yo friendly cyborg mammoth. + Come to my party yo and enjoy my newest drug Elesdi. + This will boost ya creativity ma son. +Choices: + right: Mind my own business + left: Go to his party. +Results: + right: > + Drugs aint good man + left: > + Vibe Check! +Deltas: + right: + Knowledge: 0 + Welfare: 1 + Energy: 3 + left: + Knowledge: 3 + Welfare: 1 + Energy: 0 diff --git a/litigious-liberators/profiles/write-ups/floating_city.yml b/litigious-liberators/profiles/write-ups/floating_city.yml new file mode 100644 index 00000000..9d21888e --- /dev/null +++ b/litigious-liberators/profiles/write-ups/floating_city.yml @@ -0,0 +1,24 @@ +Name: Floating City +Picture: floating_city.jpg +Biography: > + A ship so huge that it could fit an Brachiosaurus clan lies in the middle of the Meranth lake. + Legends say that the ghostly fleet defend the gem of Ur'Anium from the hunters who enter it. +Choices: + right: > + Explore the insides. + left: > + Just Take a piece of it and go home. +Results: + right: > + Definitely haunted! + left: > + This might come useful later.. +Deltas: + right: + Knowledge: 2 + Welfare: -1 + Energy: -1 + left: + Knowledge: 1 + Welfare: 0 + Energy: 0 diff --git a/litigious-liberators/profiles/write-ups/herbert_george_wells.yml b/litigious-liberators/profiles/write-ups/herbert_george_wells.yml new file mode 100644 index 00000000..39cd1a2c --- /dev/null +++ b/litigious-liberators/profiles/write-ups/herbert_george_wells.yml @@ -0,0 +1,24 @@ +Name: Herbert George Wells +Picture: herbert_george_wells.jpg +Biography: > + I'm a writer. One of my most popular novels is The Time Machine, which a scientist read and got + inspired enough to make an actual one. Being a good scientist, the first person he visited using + it was me, and after using it to his heart's content he let me have it. So, here I am, in your + time period! +Choices: + right: Attend his lecture. + left: Report this creature. +Results: + right: > + +10 iq + left: > + Seems dangerous! +Deltas: + right: + Knowledge: 2 + Welfare: 1 + Energy: 0 + left: + Knowledge: 0 + Welfare: -1 + Energy: 0 diff --git a/litigious-liberators/profiles/write-ups/icky_joo.yml b/litigious-liberators/profiles/write-ups/icky_joo.yml new file mode 100644 index 00000000..5345336e --- /dev/null +++ b/litigious-liberators/profiles/write-ups/icky_joo.yml @@ -0,0 +1,26 @@ +Name: Icky Joo +Picture: icky_joo.jpg +Sound: icky_joo.mp3 +Biography: > + Uhh-huh, You heard the beat now lets break the dance floor my friend. I perfect my fortnite + moves. It is a great illusion for confusing T-Rexes. They just freeze and have their + jaw-dropped by seeing these sexy moves uh-huh. +Choices: + right: > + Learn some dance moves. + left: > + You suspect that he is trying to lure you so he can kill you. +Results: + right: > + Lets show some moves! + left: > + I Ain't becoming food this early. +Deltas: + right: + Knowledge: 3 + Welfare: 3 + Energy: -1 + left: + Knowledge: 0 + Welfare: -1 + Energy: 1 diff --git a/litigious-liberators/profiles/write-ups/jeff_rench.yml b/litigious-liberators/profiles/write-ups/jeff_rench.yml new file mode 100644 index 00000000..403d942c --- /dev/null +++ b/litigious-liberators/profiles/write-ups/jeff_rench.yml @@ -0,0 +1,24 @@ +Name: Jeff Rench +Picture: jeff_rench.jpg +Biography: > + On our first date, I'll carve our names in a tree. It's the most romantic way to let you know I + have long and sharp claws. +Choices: + right: > + First date with Jeff. + left: > + Ignore Jeff. +Results: + right: > + Hope he won't kill me. + left: > + What a creep! +Deltas: + right: + Knowledge: 0 + Welfare: -1 + Energy: -1 + left: + Knowledge: 0 + Welfare: -1 + Energy: -1 diff --git a/litigious-liberators/profiles/write-ups/kali_mann.yml b/litigious-liberators/profiles/write-ups/kali_mann.yml new file mode 100644 index 00000000..455fbdf8 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/kali_mann.yml @@ -0,0 +1,24 @@ +Name: Kali Mann +Picture: kali_mann.png +Biography: > + I love flying and terrorizing the enemy clans now and then, just in case they were thinking + we'd gone passive and it was fine for them to attack. I'm very devoted to my clan, and + participate in most territory-expansion campaigns, and am considered a very valuable member + of our Air Force. +Choices: + right: Join Kali's clan. + left: Group with the other clans to defeat Kali's +Results: + right: > + Welcome to the clan. + left: > + Not today Kali. +Deltas: + right: + Knowledge: 0 + Welfare: 1 + Energy: 0 + left: + Knowledge: 0 + Welfare: 3 + Energy: 0 diff --git a/litigious-liberators/profiles/write-ups/karr_muk.yml b/litigious-liberators/profiles/write-ups/karr_muk.yml new file mode 100644 index 00000000..cc15eaa6 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/karr_muk.yml @@ -0,0 +1,24 @@ +Name: Karr Muk +Picture: karr_muk.jpg +Biography: > + You've obviously already heard of me, but anyway: I'm Karr, the famous pop-star! Dinosaurs from + nearby clans are really crazy for me, but I thought I'd try doing something else outside. I'm strictly + non-vegetarian, so mind that - hey, don't blame me, vegans - it's not my fault T-Rexs are + carnivores... +Choices: + right: Attend Karr's concert. + left: Sabotage his concert. +Results: + right: > + Cool music! + left: > + Not my music taste. +Deltas: + right: + Knowledge: 0 + Welfare: 0 + Energy: 1 + left: + Knowledge: 0 + Welfare: -1 + Energy: -1 diff --git a/litigious-liberators/profiles/write-ups/living_fossil.yml b/litigious-liberators/profiles/write-ups/living_fossil.yml new file mode 100644 index 00000000..157e9cc8 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/living_fossil.yml @@ -0,0 +1,22 @@ +Name: Living Fossil +Picture: living_fossil.png +Biography: > + Some say it re-evolved to spite God. Others say it just happened to survive somehow. Few treat it + as holy, but all agree its mere existence is paradoxical. +Choices: + right: Kill and eat it. + left: Learn more about it. +Results: + right: > + Smells weird but tastes good + left: > + Such wisdom! +Deltas: + right: + Knowledge: 0 + Welfare: -2 + Energy: 3 + left: + Knowledge: 3 + Welfare: 2 + Energy: 0 diff --git a/litigious-liberators/profiles/write-ups/mullar_baus.yml b/litigious-liberators/profiles/write-ups/mullar_baus.yml new file mode 100644 index 00000000..24aa850b --- /dev/null +++ b/litigious-liberators/profiles/write-ups/mullar_baus.yml @@ -0,0 +1,25 @@ +Name: Mullar Baus +Picture: mullar_baus.png +Biography: > + Heyy there! I'm the chief cook for my clan, and know various cuisines. I usually spend my free + time watching petflix or playing with the baby dinosaurs, but mostly I'll be trying out some new + recipe to invigorate everybody who'll be eating my food. +Choices: + right: > + Tell her Chenny's tastes better. + left: > + Tell her she's better than Chenny +Results: + right: > + Oops! Sorry Mullar. + left: > + Hope Chenny won't kill me! +Deltas: + right: + Knowledge: 0 + Welfare: -1 + Energy: 1 + left: + Knowledge: 0 + Welfare: 1 + Energy: 1 diff --git a/litigious-liberators/profiles/write-ups/n_attan_lurk.yml b/litigious-liberators/profiles/write-ups/n_attan_lurk.yml new file mode 100644 index 00000000..3a4558a4 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/n_attan_lurk.yml @@ -0,0 +1,23 @@ +Name: N'attan Lurk +Picture: n_attan_lurk.jpg +Biography: > + Apart from my physical prowess, people associate me mostly with my killer lasagna. In my free + time, I like to go exploring the nearby hill to find cool dens, and play with the + Chaoyangsauruses. +Choices: + right: Go on your own path + left: Hike with N'attan. +Results: + right: > + I'm not an adventure guy. + left: > + Adventure time! +Deltas: + right: + Knowledge: 0 + Welfare: 0 + Energy: 0 + left: + Knowledge: 1 + Welfare: 1 + Energy: 1 diff --git a/litigious-liberators/profiles/write-ups/strange_sculpture.yml b/litigious-liberators/profiles/write-ups/strange_sculpture.yml new file mode 100644 index 00000000..f036b651 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/strange_sculpture.yml @@ -0,0 +1,23 @@ +Name: Strange Sculpture +Picture: strange_sculpture.png +Biography: > + Particular sections of the Land are filled nothing but these sculptures. Some speculate that + these are some sort of ancient currency so widespread they ended poverty for good. Others stand + firm on their belief they were idols for the ancient deity Bisleri +Choices: + right: Take one as home decoration. + left: Use it as a container. +Results: + right: > + Looks Good! + left: > + Nice idea! +Deltas: + right: + Knowledge: 0 + Welfare: 1 + Energy: 0 + left: + Knowledge: 1 + Welfare: 0 + Energy: 0 diff --git a/litigious-liberators/profiles/write-ups/weird_stone.yml b/litigious-liberators/profiles/write-ups/weird_stone.yml new file mode 100644 index 00000000..d15e9939 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/weird_stone.yml @@ -0,0 +1,22 @@ +Name: Weird Stone +Picture: weird_stone.png +Biography: > + Never seen a stone with a weird yet a perfectly shaped rectangular orifice. + Might be of some importance if it belonged to the ancient walkers. +Choices: + right: Leave it there. + left: Take it to DJ Mammo for further investigation. +Results: + right: > + Just an ordinary stone + left: > + An interesting find! +Deltas: + right: + Knowledge: 0 + Welfare: 0 + Energy: 0 + left: + Knowledge: 3 + Welfare: 2 + Energy: -1 diff --git a/litigious-liberators/profiles/write-ups/wiki_the_wise.yml b/litigious-liberators/profiles/write-ups/wiki_the_wise.yml new file mode 100644 index 00000000..e80bfc65 --- /dev/null +++ b/litigious-liberators/profiles/write-ups/wiki_the_wise.yml @@ -0,0 +1,24 @@ +Name: Wiki, The Wise +Picture: wiki_the_wise.jpg +Biography: > + Far beyond the Ancient ruins, atop of the Wailing Mountains, meditates the droid monk Wiki, The Wise. + Knows everything that happened or will happen. +Choices: + right: > + Break and scrap him for his parts. + left: > + Seek his wisdom. +Results: + right: > + This core will power my house for days. + left: > + Such wisdom! Much wow! +Deltas: + right: + Knowledge: 0 + Welfare: 2 + Energy: 2 + left: + Knowledge: 3 + Welfare: 0 + Energy: 0 diff --git a/litigious-liberators/profiles/write-ups/xi_ping_ping.yml b/litigious-liberators/profiles/write-ups/xi_ping_ping.yml new file mode 100644 index 00000000..d1a9ce7a --- /dev/null +++ b/litigious-liberators/profiles/write-ups/xi_ping_ping.yml @@ -0,0 +1,23 @@ +Name: Xi Ping Ping +Picture: xi_ping_ping.jpg +Biography: > + There isn't a brook or valley in my clan's territory I don't already know! I've also marked a + couple good spots to hide in when the apocalypse happens. I also enjoy reading, and am updated + on most of the well-known authors. +Choices: + right: Join her clan. + left: Show her some of your ancient book collection. +Results: + right: > + Safer than ever! + left: > + Always nice to have friends with resources! +Deltas: + right: + Knowledge: 0 + Welfare: 3 + Energy: 0 + left: + Knowledge: 3 + Welfare: 0 + Energy: 0 diff --git a/litigious-liberators/pyproject.toml b/litigious-liberators/pyproject.toml new file mode 100644 index 00000000..81079d56 --- /dev/null +++ b/litigious-liberators/pyproject.toml @@ -0,0 +1,5 @@ +# Configure black + +[tool.black] +# Allow lines of length up to 100 +line-length = 100 diff --git a/litigious-liberators/requirements-dev.txt b/litigious-liberators/requirements-dev.txt new file mode 100644 index 00000000..9ee37c55 --- /dev/null +++ b/litigious-liberators/requirements-dev.txt @@ -0,0 +1,3 @@ +black==19.10b0 +pre-commit==1.21.0 +kivymd==0.100.2 diff --git a/litigious-liberators/requirements.txt b/litigious-liberators/requirements.txt new file mode 100644 index 00000000..2beaed13 --- /dev/null +++ b/litigious-liberators/requirements.txt @@ -0,0 +1,4 @@ +kivy +kivymd==0.100.2 +ffpyplayer +pyyaml