Make attacks and quests more seldom. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 3f20f8289f8b35d264af24650e8c0b2de1ca9fe6 | |
parent 932453d1e11e635b84f5fcf0d4279ada0f2d14bf | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Tue, 29 Aug 2023 20:43:04 +0200 | |
Make attacks and quests more seldom. | |
Diffstat: | |
M modules/idlerpg/idlerpg-channel-se… | 12 ++++++------ | |
1 file changed, 6 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/modules/idlerpg/idlerpg-channel-service.py b/modules/idlerpg/idler… | |
@@ -230,10 +230,10 @@ def main(args): | |
say(chaninpath, "%s levelled down to level %s." % (hacker,… | |
hackers[hacker][5] = newlevel | |
- if random.randint(1, 65535) > 63000 and len(hackers) > 1: | |
+ if random.randint(1, 65535) > 65000 and len(hackers) > 1: | |
(attacker, defender) = random.choices(list(hackers.keys()), k=… | |
attack(hackers, attacker, defender) | |
- elif random.randint(1, 65535) < 2000 and len(hackers) > 1: | |
+ elif random.randint(1, 65535) < 500 and len(hackers) > 1: | |
questhackers = random.choices(list(hackers.keys()), k=random.r… | |
go_on_quest(hackers, questhackers) | |
@@ -269,14 +269,14 @@ def main(args): | |
hacker_info(hackers, cmdargs[0]) | |
else: | |
hacker_info(hackers, hacker) | |
- elif cmd == "!attack" and len(cmdargs) > 0: | |
- if cmdargs[0] in hackers: | |
+ elif cmd == "!attack": | |
+ if len(cmdargs) > 0 and cmdargs[0] in hackers: | |
attack(hackers, hacker, cmdargs[0]) | |
else: | |
(attacker, defender) = random.choices(list(hackers… | |
attack(hackers, attacker, defender) | |
- elif cmd == "!quest" and len(cmdargs) > 0: | |
- if cmdargs[0] in hackers: | |
+ elif cmd == "!quest": | |
+ if len (cmdargs) > 0 and cmdargs[0] in hackers: | |
argsinhackers = [hacker] | |
for cmdarg in cmdargs: | |
if cmdarg in hackers: |