From dceeef86481b50fca74ec2e64974b60441757a1c Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 30 Aug 2018 16:07:33 +0100 Subject: [PATCH 1/2] Add missing comma in strax.py --- modules/strax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/strax.py b/modules/strax.py index ebb67a2c..9b6e431b 100644 --- a/modules/strax.py +++ b/modules/strax.py @@ -9,7 +9,7 @@ class Module(object): def strax(self, event): suggestion_greeting = ["Might I suggest", "I'd suggest", "We should attack now with", "We must attack now with"] method_of_attack_a = ["full-frontal", "pincer", "surprise", "brutally excessive", "multi-pronged", "glorious", - "violent", "devestating" "superior"] + "violent", "devestating", "superior"] method_of_attack_an = ["acid-heavy", "immediate", "overwhelming", "unstoppable"] type_of_attack = ["assault", "attack", "bombardment", "offensive", "barrage", "charge", "strike", "operation", "manoeuvre", "blitzkrieg"] From b13c9715076f4d59cb0f00bda3c6cccaa5531894 Mon Sep 17 00:00:00 2001 From: dongfix <294904+dngfx@users.noreply.github.com> Date: Thu, 30 Aug 2018 16:17:15 +0100 Subject: [PATCH 2/2] Update strax generator to make more sense when exclaiming instead of questioning. --- modules/strax.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/strax.py b/modules/strax.py index 9b6e431b..b2496839 100644 --- a/modules/strax.py +++ b/modules/strax.py @@ -7,7 +7,8 @@ class Module(object): self.strax, help="Glory to the sontaran empire, through IRC!") def strax(self, event): - suggestion_greeting = ["Might I suggest", "I'd suggest", "We should attack now with", "We must attack now with"] + suggestion_greeting = ["Might I suggest", "I'd suggest"] + command_greeting = ["We should attack now with", "We must attack now with"] method_of_attack_a = ["full-frontal", "pincer", "surprise", "brutally excessive", "multi-pronged", "glorious", "violent", "devestating", "superior"] method_of_attack_an = ["acid-heavy", "immediate", "overwhelming", "unstoppable"] @@ -27,7 +28,11 @@ class Module(object): 2]) == 1 else " a " + random.choice( method_of_attack_a) - suggestion = random.choice( - suggestion_greeting) + method_of_attack + " " + random.choice(type_of_attack) + " with " + random.choice(attack_adjective) + " " + random.choice(attack_object) + " and " + random.choice(attack_object_two) + "?" + + greeting_choice = random.choice([1,2]) + greeting = random.choice(suggestion_greeting) if greeting_choice == 1 else random.choice(command_greeting) + exclamation = "?" if greeting_choice == 1 else "!" + + suggestion = greeting + method_of_attack + " " + random.choice(type_of_attack) + " with " + random.choice(attack_adjective) + " " + random.choice(attack_object) + " and " + random.choice(attack_object_two) + exclamation event["stdout"].write(suggestion)