fix: functions are hard

This commit is contained in:
pwgen2155 2024-02-29 22:01:02 +11:00
parent 190c994dca
commit d9060c6748

View file

@ -2210,7 +2210,7 @@ class DawdleBot(abstract.AbstractBot):
f"{duration(penalty)} is added to {C('name', opp.name)}'s clock.")
opp.nextlvl += penalty
self.chanmsg(f"{C('name', opp.name)} reaches next level in {duration(opp.nextlvl)}.")
if rand.randomly('insult', 0, 2):
if rand.randomly('insult', 2):
self.chanmsg(f"the baka")
elif player.level > 19 and rand.randomly('pvp_swap_item', 25):
slot = rand.choice('pvp_swap_itemtype', Item.SLOTS)
@ -2236,7 +2236,7 @@ class DawdleBot(abstract.AbstractBot):
self.logchanmsg([player], "While recovering from a strenuous battle of thumb wrestling "
f"{C('name', player.name)} notices something "
f"in the mud. Upon investigation, they find an old lost item!")
if rand.randomly('insult', 0, 2):
if rand.randomly('insult', 2):
self.chanmsg(f"the lucky baka")
self.find_item(player)
@ -2303,7 +2303,7 @@ class DawdleBot(abstract.AbstractBot):
elif slot == "boots":
msg = f"{C('name', player.name)} stepped in some hot lava!"
self.logchanmsg([player], msg + f" {C('name')}{player.name}'s{C()} {C('item', Item.DESC[slot])} loses 10% of its effectiveness.")
if rand.randomly('insult', 0, 2):
if rand.randomly('insult', 2):
self.chanmsg(f"baka")
player.items[slot].level = int(player.items[slot].level * 0.9)
return
@ -2349,7 +2349,7 @@ class DawdleBot(abstract.AbstractBot):
msg = f"A sorceror enchanted {C('name')}{player.name}'s{C()} {C('item', 'boots')} with Swiftness!"
self.logchanmsg([player], msg + f" {C('name')}{player.name}'s{C()} {C('item', Item.DESC[slot])} gains 10% effectiveness.")
if rand.randomly('insult', 0, 2):
if rand.randomly('insult', 2):
self.chanmsg(f"WTFBBQ")
player.items[slot].level = int(player.items[slot].level * 1.1)
return
@ -2387,14 +2387,14 @@ class DawdleBot(abstract.AbstractBot):
f"You made to steal {C('name', target.name)}'s {C('item', Item.DESC[slot])}, "
f"but realized it was lower level than your own. You creep "
f"back into the shadows.")
if rand.randomly('insult', 0, 2):
if rand.randomly('insult', 2):
self.notice(player.nick, (f"you creep."))
else:
amount = int(player.nextlvl * rand.randint('evilness_penalty_pct', 1,6) / 100)
player.nextlvl += amount
self.logchanmsg([player], f"{C('name', player.name)} is forsaken by their evil god. {duration(amount)} is "
f"added to their clock.")
if rand.randomly('insult', 0, 2):
if rand.randomly('insult', 2):
self.chanmsg(f"YOUR INSOLENCE WILL NOT BE FORGOTTEN {C('name', player.name)}")
if player.nextlvl > 0:
self.chanmsg(f"{C('name', player.name)} reaches next level in {duration(player.nextlvl)}.")
@ -2466,7 +2466,7 @@ class DawdleBot(abstract.AbstractBot):
combatant = combatants[(p.posx, p.posy)]
if combatant.isadmin and rand.randomly('move_player_bow', 100):
self.chanmsg(f"{C('name', p.name)} encounters {C('name', combatant.name)} and bows humbly, knowing the end is neigh")
if rand.randomly('insult', 0, 2):
if rand.randomly('insult', 2):
self.chanmsg(f"Their heads hit as if a comedy routine is playing out before our eyes"
"Hot and flustered their cheeks turn red from embarrassment")
elif rand.randomly('move_player_combat', len(op)):
@ -2501,7 +2501,7 @@ class DawdleBot(abstract.AbstractBot):
self.chanmsg(f"{C('name', qp[0].name)}, {C('name', qp[1].name)}, {C('name', qp[2].name)}, and {C('name', qp[3].name)} have "
f"been chosen by the gods to {new_quest.text}. Quest to end in "
f"{duration(quest_time)}.")
if rand.randomly('insult', 0, 2):
if rand.randomly('insult', 2):
self.chanmsg(f"or, like, whenever... what's even the point? They only walk from here to there, anyone could do that "
"I'm not like... going to join them or anything... not even if you asked")
log.info("Starting mode 1 quest with duration %s", duration(quest_time))