easterobot 1.3.1__py3-none-any.whl → 1.3.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,13 +91,13 @@ async def game_dual( # noqa: C901, D103, PLR0912
91
91
  )
92
92
  if len(e1) < bet:
93
93
  await ctx.response.send_message(
94
- "Vous n'avez pas assez d'oeufs",
94
+ "Vous n'avez pas assez d'œufs",
95
95
  ephemeral=True,
96
96
  )
97
97
  return
98
98
  if len(e2) < bet:
99
99
  await ctx.response.send_message(
100
- f"{member.mention} n'a pas assez d'oeufs",
100
+ f"{member.mention} n'a pas assez d'œufs",
101
101
  ephemeral=True,
102
102
  )
103
103
  return
@@ -113,7 +113,7 @@ async def game_dual( # noqa: C901, D103, PLR0912
113
113
  )
114
114
  if len(e1) < bet:
115
115
  await ctx.response.send_message(
116
- "Vous n'avez plus assez d'oeufs",
116
+ "Vous n'avez plus assez d'œufs",
117
117
  ephemeral=True,
118
118
  )
119
119
  return
@@ -121,7 +121,7 @@ async def game_dual( # noqa: C901, D103, PLR0912
121
121
  e.lock = True
122
122
  if len(e2) < bet:
123
123
  await ctx.response.send_message(
124
- f"{member.mention} n'a plus assez d'oeufs",
124
+ f"{member.mention} n'a plus assez d'œufs",
125
125
  ephemeral=True,
126
126
  )
127
127
  return
@@ -51,9 +51,9 @@ async def info_command(
51
51
  title=f"Informations sur {hunter.display_name}",
52
52
  description=(
53
53
  f"Classement : {hunter_rank.badge}\n"
54
- f"Nombre d'oeufs : `{hunter_rank.eggs}`\n"
54
+ f"Nombre d'œufs : `{hunter_rank.eggs}`\n"
55
55
  f"Chance brute : `{member_luck.luck:.0%}`\n"
56
- f"Chance de trouver un oeuf : `{member_luck.discovered:.0%}`\n"
56
+ f"Chance de trouver un œuf : `{member_luck.discovered:.0%}`\n"
57
57
  f"Chance de se faire voler : `{member_luck.spotted:.0%}`"
58
58
  ),
59
59
  ),
easterobot/hunts/luck.py CHANGED
@@ -18,6 +18,8 @@ class HuntLuck:
18
18
  @property
19
19
  def discovered(self) -> float:
20
20
  """Discovered probability."""
21
+ if self.egg_count <= self.config.commands.search.discovered.shield:
22
+ return 1.0
21
23
  prob = self.config.commands.search.discovered.probability(self.luck)
22
24
  if self.sleep_hours:
23
25
  prob /= self.config.sleep.divide_discovered
@@ -26,6 +28,8 @@ class HuntLuck:
26
28
  @property
27
29
  def spotted(self) -> float:
28
30
  """Spotted probability."""
31
+ if self.egg_count <= self.config.commands.search.spotted.shield:
32
+ return 0.0
29
33
  prob = self.config.commands.search.spotted.probability(self.luck)
30
34
  if self.sleep_hours:
31
35
  prob /= self.config.sleep.divide_spotted
@@ -33,21 +37,22 @@ class HuntLuck:
33
37
 
34
38
  def sample_discovered(self) -> bool:
35
39
  """Get if player get detected."""
36
- if self.egg_count <= self.config.commands.search.discovered.shield:
37
- logger.info("discovered: shield with %s eggs", self.egg_count)
38
- return True
39
40
  sample = RAND.random()
41
+ discovered = self.discovered
40
42
  logger.info(
41
- "discovered: expect over %.2f got %.2f",
42
- self.discovered,
43
+ "discovered: expect over %.4f got %.4f",
44
+ discovered,
43
45
  sample,
44
46
  )
45
- return self.discovered > sample
47
+ return discovered > sample
46
48
 
47
49
  def sample_spotted(self) -> bool:
48
50
  """Get if player get spotted."""
49
- if self.egg_count <= self.config.commands.search.spotted.shield:
50
- logger.info("spotted: shield with %s eggs", self.egg_count)
51
- return True
52
51
  sample = RAND.random()
53
- return self.spotted < sample
52
+ spotted = self.spotted
53
+ logger.info(
54
+ "spotted: expect over %.4f got %.4f",
55
+ spotted,
56
+ sample,
57
+ )
58
+ return spotted > sample
@@ -321,35 +321,35 @@ action:
321
321
  gif: https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExMTh2ZjFrdDdpN2h3aXZtYWxtcmdmNGI2ZWoyczg5b3d4Y2c0N2pwbiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3otPoxbuCuvXTbICfm/giphy.gif
322
322
  fail:
323
323
  text: "On a connu des morts de hamster plus originales, la peur de perdre l'œuf l’a emporté."
324
- gif: https://tenor.com/view/hamster-ayasan-gif-24417559
324
+ gif: https://c.tenor.com/9t7q9vCcYmMAAAAd/tenor.gif
325
325
  - text: "Pinguiner pour l'œuf"
326
326
  success:
327
327
  text: "I'm fast as fuck, boy. {Iel} court en s'enfuyant avec l'œuf."
328
328
  gif: https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExYXBrcmQwemt3Y2x1NXdrcnV0aWZxcWZrMGtzYXV4NTBrZGFhYnFhOSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/y5xRFqfdkgEXS/giphy.gif
329
329
  fail:
330
330
  text: "Saboté par un autre pingouin. {Iel} prend une petite baignade."
331
- gif: https://tenor.com/view/penguin-slap-gif-5263949288532448516
331
+ gif: https://c.tenor.com/SQ1N_QKllQQAAAAd/tenor.gif
332
332
  - text: "Invoquer un chat pour l'œuf"
333
333
  success:
334
- text: "Oh waw, quel maniement félin de l'œuf !"
335
- gif: https://tenor.com/view/happy-easter-images2022-cute-cat-gif-25406467
334
+ text: Oh waw, quel maniement félin de l'œuf !
335
+ gif: https://c.tenor.com/vwfpPXNTDPEAAAAd/tenor.gif
336
336
  fail:
337
337
  text: "{Iel} n'est pas tombé{e} sur le chat le plus adroit du quartier, {iel} tombe fatalement."
338
- gif: https://tenor.com/view/cat-meme-fall-down-sink-counter-gif-2237760511603157439
339
- - text: "Boire l'œuf ?"
338
+ gif: https://c.tenor.com/Hw4fVEKAqb8AAAAd/tenor.gif
339
+ - text: Boire l'œuf ?
340
340
  success:
341
341
  text: "Effectivement, quand ils sont solides, ça a plus de chances d'être des œufs. {Iel} récupère un œuf."
342
- gif: https://tenor.com/view/sml-junior-oh-man-guys-i-found-so-many-eggs-finding-eggs-gif-25432207
342
+ gif: https://c.tenor.com/cqBCSM5N55UAAAAd/tenor.gif
343
343
  fail:
344
344
  text: "Mmhh, effectivement, un œuf, ça ne se boit pas. Sa vision double l'empêche d'attraper l'œuf."
345
345
  gif: https://gifdb.com/images/high/easter-bunny-bud-light-6y0qi1qackuq0ijb.webp
346
- - text: "Poler pour l'oeuf"
346
+ - text: "Poler pour l'œuf"
347
347
  success:
348
348
  text: "Quelle adresse, {iel} séduit le lapin de Pâques et obtient un œuf"
349
- gif: https://tenor.com/view/easter-happyeaster-eastersunday-easterbunny-lol-gif-4003716
349
+ gif: https://c.tenor.com/aThWCOLIhvwAAAAd/tenor.gif
350
350
  fail:
351
351
  text: "Oulà, je n'aurais pas aimé être à sa place."
352
- gif: https://tenor.com/view/pole-whoops-fall-oh-no-face-plant-gif-14246225
352
+ gif: https://c.tenor.com/WQV-9F8Wt7QAAAAd/tenor.gif
353
353
  - text: "Ramasser calmement l'œuf"
354
354
  success:
355
355
  text: "Sa sagesse lui a permis d'arriver en vie jusqu'à l'œuf."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easterobot
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: Discord bot for Easter.
5
5
  Project-URL: Homepage, https://github.com/Dashstrom/easterobot
6
6
  Project-URL: Repository, https://github.com/Dashstrom/easterobot
@@ -19,9 +19,9 @@ easterobot/commands/basket.py,sha256=sV6JfPxg4U98dTTA5tr1wnMVM5DI9UXGL6FWL9OphTw
19
19
  easterobot/commands/disable.py,sha256=AMSUBIdS6H8PMv2iYJIOMPuciEUtrTVUWe9bAJ6m1yA,975
20
20
  easterobot/commands/edit.py,sha256=jppdU6A62zhWaO_LFukbp2eTSyiL9NKyK7fBI9n1Ph8,2139
21
21
  easterobot/commands/enable.py,sha256=MtvNFzQWjxB9QoHq2YF4j_KTLPnAVDayflUPemQGNuQ,1099
22
- easterobot/commands/game.py,sha256=WS_yj0SZB3BjhrKOJsqYYTXyxasdrru2_JjkuNS7RoE,6291
22
+ easterobot/commands/game.py,sha256=TMSv05qWAT_xKqg0AeelaDyvPxadZeyN4JfLbvucDUI,6291
23
23
  easterobot/commands/help.py,sha256=FWYSkmYvFzrGKBV7I-qu6J4EYXjRjFCJvDa5F48OaEU,1133
24
- easterobot/commands/info.py,sha256=y8tA0wKScZ7C-54LNIeH1z2dtKiaSMJsfkM3edi07js,1812
24
+ easterobot/commands/info.py,sha256=mh2vStpkRbuwwvV7PxPv0nhSMI-AP58c_cMvDa8ohW8,1812
25
25
  easterobot/commands/reset.py,sha256=ImumXlaWclJsV3p6vQeMcRKpww9i0P7pSOzH0gnEU9M,3753
26
26
  easterobot/commands/search.py,sha256=rgpqkcYutp0UgW_BN77YxdUg5zqWrQ4RRbBt4V49wo4,3304
27
27
  easterobot/commands/top.py,sha256=qjtRtvBKeKq228nRm_RYLY8HMrnz3n_fteBlr4WCpG0,3017
@@ -32,10 +32,10 @@ easterobot/games/rock_paper_scissor.py,sha256=LeYyZrE2fjPQk0AQnnN-YM2fkCkNtsfkR1
32
32
  easterobot/games/tic_tac_toe.py,sha256=pBHMfU9wmr6XGRr91IIG6cUwCF4xHZh3482KATFIs2A,5128
33
33
  easterobot/hunts/__init__.py,sha256=R0fO04m1F9kEmBy_5EzlYvWVjmY74q5adINEZGGnwCQ,258
34
34
  easterobot/hunts/hunt.py,sha256=fgjkgJB57AJxlYTq3nh4pbbAx-0OfmsDLTIjv1nb_zI,17758
35
- easterobot/hunts/luck.py,sha256=mn_x_Hc57GxeLK_CSw9d_0vhiiQTYeygaLKPMAIf6gk,1566
35
+ easterobot/hunts/luck.py,sha256=liQIkQEb_quBpyJsfSUd6wDXI0-SW2KakL-fMrx5T4M,1592
36
36
  easterobot/hunts/rank.py,sha256=EYvyXfYqklvMflJJfcByYHhaU_NKq_D10aqOl7XuF8E,2274
37
37
  easterobot/resources/alembic.ini,sha256=SmGkhRx5iZMpjEa5avCfz1lpF0_WZPEbGA_6MSI1GjU,3297
38
- easterobot/resources/config.example.yml,sha256=qfujEwZR_mEmHB3A_nzuIDB1KiNF2Yei7P7TNeNd80Q,38869
38
+ easterobot/resources/config.example.yml,sha256=KuB_sSQ1U6cdhL5JT45OVrStcryYvVUauV_xVS9fmec,38689
39
39
  easterobot/resources/credits.txt,sha256=zJT_OmCi_PqBPQnWPvWWI9sJx6hPrXcDnNNpLRWDd20,378
40
40
  easterobot/resources/logging.conf,sha256=RSL4k79N5oQb1hEtr5SiR_IAiKjkAHZaR4DR9lOxA-M,838
41
41
  easterobot/resources/logo.png,sha256=DUFH6Tq8MjW0LGWVc4sox6RvBZCQWHZHTM2e5Ua4od4,82599
@@ -63,8 +63,8 @@ easterobot/resources/emotes/icons/arrow.png,sha256=ZkAicY2AONJUQRTdvkG77wPO5EYE9
63
63
  easterobot/resources/emotes/icons/end.png,sha256=8jkufw0aS99tyZCb80PUzT2mkipQrYxwuFOFmOH6UNk,24526
64
64
  easterobot/resources/emotes/icons/versus.png,sha256=Ss9PZu4nENB7xo8Kdunt0STvCSrMbo-bTaYz-NJ8tfI,29212
65
65
  easterobot/resources/emotes/icons/wait.png,sha256=xXK6bKtPpD1f5wSjMGqzuPzVdV4gkOgMSJ_fVjuzJp4,20378
66
- easterobot-1.3.1.dist-info/METADATA,sha256=0wQhEUonxw9DMrOFkAM7xBvlybqo-qSkmLStkpd43d4,7787
67
- easterobot-1.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
68
- easterobot-1.3.1.dist-info/entry_points.txt,sha256=KaH17cNnu7qbWxFcMaj1wZ9GPTjWJ1OTqkBMhoLOmCQ,57
69
- easterobot-1.3.1.dist-info/licenses/LICENSE,sha256=kYRz570GVPktzhJxWtaencsrsjdKSetpe5WISlDrvnY,1093
70
- easterobot-1.3.1.dist-info/RECORD,,
66
+ easterobot-1.3.2.dist-info/METADATA,sha256=LvLy9sHS_h0hixexE9vvbMfr4sLYs9LrVRqDQIbNWjw,7787
67
+ easterobot-1.3.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
68
+ easterobot-1.3.2.dist-info/entry_points.txt,sha256=KaH17cNnu7qbWxFcMaj1wZ9GPTjWJ1OTqkBMhoLOmCQ,57
69
+ easterobot-1.3.2.dist-info/licenses/LICENSE,sha256=kYRz570GVPktzhJxWtaencsrsjdKSetpe5WISlDrvnY,1093
70
+ easterobot-1.3.2.dist-info/RECORD,,