Merge branch 'master' into flask-develop
This commit is contained in:
commit
d91db426da
@ -19,6 +19,7 @@ Cog Function
|
|||||||
| lovecalculator | **Alpha** | <details><summary>Calculate the love between two users</summary>[Snap-Ons] Just updated to V3</details> |
|
| lovecalculator | **Alpha** | <details><summary>Calculate the love between two users</summary>[Snap-Ons] Just updated to V3</details> |
|
||||||
| lseen | **Alpha** | <details><summary>Track when a member was last online</summary>Alpha release, please report bugs</details> |
|
| lseen | **Alpha** | <details><summary>Track when a member was last online</summary>Alpha release, please report bugs</details> |
|
||||||
| nudity | **Incomplete** | <details><summary>Checks for NSFW images posted in non-NSFW channels</summary>Library this is based on has a bug, waiting for author to merge my PR</details> |
|
| nudity | **Incomplete** | <details><summary>Checks for NSFW images posted in non-NSFW channels</summary>Library this is based on has a bug, waiting for author to merge my PR</details> |
|
||||||
|
| planttycoon | **Alpha** | <details><summary>Grow your own plants!</summary>[Snap-Ons] Updated to V3, likely to contain bugs</details> |
|
||||||
| qrinvite | **Alpha** | <details><summary>Create a QR code invite for the server</summary>Alpha release, please report any bugs</details> |
|
| qrinvite | **Alpha** | <details><summary>Create a QR code invite for the server</summary>Alpha release, please report any bugs</details> |
|
||||||
| reactrestrict | **Alpha** | <details><summary>Removes reactions by role per channel</summary>A bit clunky, but functional</details> |
|
| reactrestrict | **Alpha** | <details><summary>Removes reactions by role per channel</summary>A bit clunky, but functional</details> |
|
||||||
| recyclingplant | **Alpha** | <details><summary>Work at a recycling plant</summary>[Snap-Ons] Just updated to V3</details> |
|
| recyclingplant | **Alpha** | <details><summary>Work at a recycling plant</summary>[Snap-Ons] Just updated to V3</details> |
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import random
|
import random
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import Config, checks, commands
|
from redbot.core import Config, checks, commands
|
||||||
@ -13,8 +14,10 @@ DEFAULT_MESSAGES = [
|
|||||||
# "Example message 2. Each message is in quotes and separated by a comma"
|
# "Example message 2. Each message is in quotes and separated by a comma"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
class AnnounceDaily:
|
|
||||||
|
class AnnounceDaily(Cog):
|
||||||
"""
|
"""
|
||||||
Send daily announcements
|
Send daily announcements
|
||||||
"""
|
"""
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Send daily announcements to all servers at a specified times",
|
"description": "Send daily announcements to all servers at a specified times",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"install_msg": "Thank you for installing AnnounceDaily! Get started with `[p]help AnnounceDaily`",
|
"install_msg": "Thank you for installing AnnounceDaily! Get started with `[p]load announcedaily` and `[p]help AnnounceDaily`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Send daily announcements",
|
"short": "Send daily announcements",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
|
from redbot.core.bot import Red
|
||||||
|
|
||||||
from .audiotrivia import AudioTrivia
|
from .audiotrivia import AudioTrivia
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
async def setup(bot: Red):
|
||||||
|
if bot.get_cog("Trivia"):
|
||||||
|
print("Trivia is already loaded, attempting to unload it first")
|
||||||
|
bot.remove_cog("Trivia")
|
||||||
|
await bot.remove_loaded_package("trivia")
|
||||||
|
bot.unload_extension("trivia")
|
||||||
|
|
||||||
bot.add_cog(AudioTrivia(bot))
|
bot.add_cog(AudioTrivia(bot))
|
||||||
|
@ -29,7 +29,7 @@ class AudioTrivia(Trivia):
|
|||||||
|
|
||||||
self.audioconf.register_guild(
|
self.audioconf.register_guild(
|
||||||
delay=30.0,
|
delay=30.0,
|
||||||
repeat=True
|
repeat=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
@commands.group()
|
@commands.group()
|
||||||
@ -90,6 +90,11 @@ class AudioTrivia(Trivia):
|
|||||||
await ctx.send("There is already an ongoing trivia session in this channel.")
|
await ctx.send("There is already an ongoing trivia session in this channel.")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
status = await self.audio.config.status()
|
||||||
|
|
||||||
|
if status:
|
||||||
|
await ctx.send("I recommend disabling audio status with `{}audioset status`".format(ctx.prefix))
|
||||||
|
|
||||||
if not self.audio._player_check(ctx):
|
if not self.audio._player_check(ctx):
|
||||||
try:
|
try:
|
||||||
if not ctx.author.voice.channel.permissions_for(ctx.me).connect or self.audio._userlimit(
|
if not ctx.author.voice.channel.permissions_for(ctx.me).connect or self.audio._userlimit(
|
||||||
|
5183
audiotrivia/data/lists/games-plab.yaml
Normal file
5183
audiotrivia/data/lists/games-plab.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,7 @@ https://www.youtube.com/watch?v=Fn0khIn2wfc:
|
|||||||
https://www.youtube.com/watch?v=qkYSuWSPkHI:
|
https://www.youtube.com/watch?v=qkYSuWSPkHI:
|
||||||
- the legend of zelda
|
- the legend of zelda
|
||||||
- legend of zelda
|
- legend of zelda
|
||||||
|
- zelda
|
||||||
https://www.youtube.com/watch?v=0hvlwLwxweI:
|
https://www.youtube.com/watch?v=0hvlwLwxweI:
|
||||||
- dragon quest ix
|
- dragon quest ix
|
||||||
- dragon quest 9
|
- dragon quest 9
|
||||||
@ -47,10 +48,8 @@ https://www.youtube.com/watch?v=9wMjq58Fjvo:
|
|||||||
https://www.youtube.com/watch?v=sr2nK06zZkg:
|
https://www.youtube.com/watch?v=sr2nK06zZkg:
|
||||||
- shadow of the colossus
|
- shadow of the colossus
|
||||||
https://www.youtube.com/watch?v=6CMTXyExkeI:
|
https://www.youtube.com/watch?v=6CMTXyExkeI:
|
||||||
|
- final fantasy v
|
||||||
- final fantasy 5
|
- final fantasy 5
|
||||||
- final fantasy five
|
|
||||||
- ff5
|
|
||||||
- ffv
|
|
||||||
https://www.youtube.com/watch?v=nRbROTdOgj0:
|
https://www.youtube.com/watch?v=nRbROTdOgj0:
|
||||||
- legend of zelda skyward sword
|
- legend of zelda skyward sword
|
||||||
- skyward sword
|
- skyward sword
|
||||||
@ -60,8 +59,6 @@ https://www.youtube.com/watch?v=VEIWhy-urqM:
|
|||||||
- super mario galaxy
|
- super mario galaxy
|
||||||
https://www.youtube.com/watch?v=IT12DW2Fm9M:
|
https://www.youtube.com/watch?v=IT12DW2Fm9M:
|
||||||
- final fantasy iv
|
- final fantasy iv
|
||||||
- ff4
|
|
||||||
- ffiv
|
|
||||||
- final fantasy 4
|
- final fantasy 4
|
||||||
https://www.youtube.com/watch?v=UZbqrZJ9VA4:
|
https://www.youtube.com/watch?v=UZbqrZJ9VA4:
|
||||||
- mother3
|
- mother3
|
||||||
@ -76,26 +73,20 @@ https://www.youtube.com/watch?v=eVVXNDv8rY0:
|
|||||||
- skyrim
|
- skyrim
|
||||||
https://www.youtube.com/watch?v=kzvZE4BY0hY:
|
https://www.youtube.com/watch?v=kzvZE4BY0hY:
|
||||||
- fallout 4
|
- fallout 4
|
||||||
- fallout four
|
|
||||||
https://www.youtube.com/watch?v=VTsD2FjmLsw:
|
https://www.youtube.com/watch?v=VTsD2FjmLsw:
|
||||||
- mass effect 2
|
- mass effect 2
|
||||||
- mass effect two
|
|
||||||
https://www.youtube.com/watch?v=800be1ZmGd0:
|
https://www.youtube.com/watch?v=800be1ZmGd0:
|
||||||
- world of warcraft
|
- world of warcraft
|
||||||
- wow
|
|
||||||
https://www.youtube.com/watch?v=SXKrsJZWqK0:
|
https://www.youtube.com/watch?v=SXKrsJZWqK0:
|
||||||
- batman arkham city
|
- batman arkham city
|
||||||
- arkham city
|
- arkham city
|
||||||
https://www.youtube.com/watch?v=BLEBtvOhGnM:
|
https://www.youtube.com/watch?v=BLEBtvOhGnM:
|
||||||
- god of war iii
|
- god of war iii
|
||||||
- god of war 3
|
- god of war 3
|
||||||
- god of war three
|
|
||||||
https://www.youtube.com/watch?v=rxgTlQLm4Xg:
|
https://www.youtube.com/watch?v=rxgTlQLm4Xg:
|
||||||
- gears of war 3
|
- gears of war 3
|
||||||
- gears of war three
|
|
||||||
https://www.youtube.com/watch?v=QiPon8lr48U:
|
https://www.youtube.com/watch?v=QiPon8lr48U:
|
||||||
- metal gear solid 2
|
- metal gear solid 2
|
||||||
- metal gear solid two
|
|
||||||
https://www.youtube.com/watch?v=qDnaIfiH37w:
|
https://www.youtube.com/watch?v=qDnaIfiH37w:
|
||||||
- super smash bros wii u
|
- super smash bros wii u
|
||||||
- super smash bros. wii u
|
- super smash bros. wii u
|
||||||
@ -117,46 +108,31 @@ https://www.youtube.com/watch?v=01IEjvD5lss:
|
|||||||
- guilty gear
|
- guilty gear
|
||||||
https://www.youtube.com/watch?v=VXX4Ft1I0Dw:
|
https://www.youtube.com/watch?v=VXX4Ft1I0Dw:
|
||||||
- dynasty warriors 6
|
- dynasty warriors 6
|
||||||
- dynasty warriors six
|
|
||||||
https://www.youtube.com/watch?v=liRMh4LzQQU:
|
https://www.youtube.com/watch?v=liRMh4LzQQU:
|
||||||
- doom 2016
|
- doom 2016
|
||||||
- doom
|
- doom
|
||||||
https://www.youtube.com/watch?v=ouw3jLAUXWE:
|
https://www.youtube.com/watch?v=ouw3jLAUXWE:
|
||||||
- devil may cry 3
|
- devil may cry 3
|
||||||
- devil may cry three
|
|
||||||
https://www.youtube.com/watch?v=B_MW65XxS7s:
|
https://www.youtube.com/watch?v=B_MW65XxS7s:
|
||||||
- final fantasy vii
|
- final fantasy vii
|
||||||
- final fantasy 7
|
- final fantasy 7
|
||||||
- ff7
|
|
||||||
- ffvii
|
|
||||||
https://www.youtube.com/watch?v=viM0-3PXef0:
|
https://www.youtube.com/watch?v=viM0-3PXef0:
|
||||||
- the witcher 3
|
- the witcher 3
|
||||||
- witcher 3
|
- witcher 3
|
||||||
https://www.youtube.com/watch?v=WQYN2P3E06s:
|
https://www.youtube.com/watch?v=WQYN2P3E06s:
|
||||||
- civilization vi
|
- civilization vi
|
||||||
- civilization 6
|
- civilization 6
|
||||||
- civ6
|
|
||||||
- civ vi
|
|
||||||
- civ 6
|
|
||||||
https://www.youtube.com/watch?v=qOMQxVtbkik:
|
https://www.youtube.com/watch?v=qOMQxVtbkik:
|
||||||
- guild wars 2
|
- guild wars 2
|
||||||
- guild wars two
|
- guild wars two
|
||||||
- gw2
|
|
||||||
- gw two
|
|
||||||
- gw 2
|
|
||||||
https://www.youtube.com/watch?v=WwHrQdC02FY:
|
https://www.youtube.com/watch?v=WwHrQdC02FY:
|
||||||
- final fantasy vi
|
- final fantasy vi
|
||||||
- final fantasy 6
|
- final fantasy 6
|
||||||
- ff6
|
|
||||||
- ffvi
|
|
||||||
https://www.youtube.com/watch?v=2_wkJ377LzU:
|
https://www.youtube.com/watch?v=2_wkJ377LzU:
|
||||||
- journey
|
- journey
|
||||||
https://www.youtube.com/watch?v=IJiHDmyhE1A:
|
https://www.youtube.com/watch?v=IJiHDmyhE1A:
|
||||||
- civilization iv
|
- civilization iv
|
||||||
- civilization 4
|
- civilization 4
|
||||||
- civ4
|
|
||||||
- civ iv
|
|
||||||
- civ 4
|
|
||||||
https://www.youtube.com/watch?v=kN_LvY97Rco:
|
https://www.youtube.com/watch?v=kN_LvY97Rco:
|
||||||
- ori and the blind forest
|
- ori and the blind forest
|
||||||
https://www.youtube.com/watch?v=TO7UI0WIqVw:
|
https://www.youtube.com/watch?v=TO7UI0WIqVw:
|
||||||
@ -170,8 +146,6 @@ https://www.youtube.com/watch?v=xkolWbZdGbM:
|
|||||||
https://www.youtube.com/watch?v=h-0G_FI61a8:
|
https://www.youtube.com/watch?v=h-0G_FI61a8:
|
||||||
- final fantasy x
|
- final fantasy x
|
||||||
- final fantasy 10
|
- final fantasy 10
|
||||||
- ff10
|
|
||||||
- ffx
|
|
||||||
https://www.youtube.com/watch?v=do5NTPLMqXQ:
|
https://www.youtube.com/watch?v=do5NTPLMqXQ:
|
||||||
- fire emblem fates
|
- fire emblem fates
|
||||||
https://www.youtube.com/watch?v=eFVj0Z6ahcI:
|
https://www.youtube.com/watch?v=eFVj0Z6ahcI:
|
||||||
@ -188,14 +162,11 @@ https://www.youtube.com/watch?v=wRWq53IFXVQ:
|
|||||||
- the legend of zelda wind waker
|
- the legend of zelda wind waker
|
||||||
- legend of zelda wind waker
|
- legend of zelda wind waker
|
||||||
- wind waker
|
- wind waker
|
||||||
- the wind waker
|
|
||||||
https://www.youtube.com/watch?v=nkPF5UiDi4g:
|
https://www.youtube.com/watch?v=nkPF5UiDi4g:
|
||||||
- uncharted 2
|
- uncharted 2
|
||||||
- uncharted two
|
|
||||||
https://www.youtube.com/watch?v=CdYen5UII0s:
|
https://www.youtube.com/watch?v=CdYen5UII0s:
|
||||||
- battlefield 1
|
- battlefield 1
|
||||||
- battlefield one
|
- battlefield one
|
||||||
- bf1
|
|
||||||
https://www.youtube.com/watch?v=8yj-25MOgOM:
|
https://www.youtube.com/watch?v=8yj-25MOgOM:
|
||||||
- star fox zero
|
- star fox zero
|
||||||
- starfox zero
|
- starfox zero
|
||||||
@ -208,9 +179,7 @@ https://www.youtube.com/watch?v=4EcgruWlXnQ:
|
|||||||
- monty on the run
|
- monty on the run
|
||||||
https://www.youtube.com/watch?v=oEf8gPFFZ58:
|
https://www.youtube.com/watch?v=oEf8gPFFZ58:
|
||||||
- mega man 3
|
- mega man 3
|
||||||
- mega man three
|
|
||||||
- megaman 3
|
- megaman 3
|
||||||
- megaman three
|
|
||||||
https://www.youtube.com/watch?v=ifbr2NQ3Js0:
|
https://www.youtube.com/watch?v=ifbr2NQ3Js0:
|
||||||
- castlevania
|
- castlevania
|
||||||
https://www.youtube.com/watch?v=W7rhEKTX-sE:
|
https://www.youtube.com/watch?v=W7rhEKTX-sE:
|
||||||
@ -218,8 +187,6 @@ https://www.youtube.com/watch?v=W7rhEKTX-sE:
|
|||||||
https://www.youtube.com/watch?v=as_ct9tgkZA:
|
https://www.youtube.com/watch?v=as_ct9tgkZA:
|
||||||
- mega man 2
|
- mega man 2
|
||||||
- megaman 2
|
- megaman 2
|
||||||
- mega man two
|
|
||||||
- megaman two
|
|
||||||
https://www.youtube.com/watch?v=FB9Pym-sdbs:
|
https://www.youtube.com/watch?v=FB9Pym-sdbs:
|
||||||
- actraiser
|
- actraiser
|
||||||
https://www.youtube.com/watch?v=G3zhZHU6B2M:
|
https://www.youtube.com/watch?v=G3zhZHU6B2M:
|
||||||
@ -229,7 +196,6 @@ https://www.youtube.com/watch?v=hlrOAEr6dXc:
|
|||||||
- zero mission
|
- zero mission
|
||||||
https://www.youtube.com/watch?v=jl6kjAkVw_s:
|
https://www.youtube.com/watch?v=jl6kjAkVw_s:
|
||||||
- sonic 2
|
- sonic 2
|
||||||
- sonic two
|
|
||||||
https://www.youtube.com/watch?v=K8GRDNU50b8:
|
https://www.youtube.com/watch?v=K8GRDNU50b8:
|
||||||
- the legend of zelda ocarina of time
|
- the legend of zelda ocarina of time
|
||||||
- legend of zelda ocarina of time
|
- legend of zelda ocarina of time
|
||||||
@ -263,8 +229,6 @@ https://www.youtube.com/watch?v=FBLp-3Rw_u0:
|
|||||||
https://www.youtube.com/watch?v=jqE8M2ZnFL8:
|
https://www.youtube.com/watch?v=jqE8M2ZnFL8:
|
||||||
- grand theft auto 4
|
- grand theft auto 4
|
||||||
- grand theft auto four
|
- grand theft auto four
|
||||||
- gta4
|
|
||||||
- gta 4
|
|
||||||
https://www.youtube.com/watch?v=GQZLEegUK74:
|
https://www.youtube.com/watch?v=GQZLEegUK74:
|
||||||
- goldeneye 007
|
- goldeneye 007
|
||||||
- goldeneye
|
- goldeneye
|
||||||
@ -291,13 +255,9 @@ https://www.youtube.com/watch?v=zz8m1oEkW5k:
|
|||||||
- tetris blitz
|
- tetris blitz
|
||||||
https://www.youtube.com/watch?v=gMdX_Iloow8:
|
https://www.youtube.com/watch?v=gMdX_Iloow8:
|
||||||
- ultimate marvel vs capcom 3
|
- ultimate marvel vs capcom 3
|
||||||
- ultimate marvel vs capcom three
|
|
||||||
- marvel vs capcom 3
|
- marvel vs capcom 3
|
||||||
- marvel vs capcom three
|
|
||||||
- ultimate marvel vs. capcom 3
|
- ultimate marvel vs. capcom 3
|
||||||
- ultimate marvel vs. capcom three
|
|
||||||
- marvel vs. capcom 3
|
- marvel vs. capcom 3
|
||||||
- marvel vs. capcom three
|
|
||||||
https://www.youtube.com/watch?v=vRe3h1iQ1Os:
|
https://www.youtube.com/watch?v=vRe3h1iQ1Os:
|
||||||
- sonic the hedgehog 2006
|
- sonic the hedgehog 2006
|
||||||
- sonic the hegehog
|
- sonic the hegehog
|
||||||
@ -311,13 +271,9 @@ https://www.youtube.com/watch?v=wp6QpMWaKpE:
|
|||||||
https://www.youtube.com/watch?v=R9XdMnsKvUs:
|
https://www.youtube.com/watch?v=R9XdMnsKvUs:
|
||||||
- call of duty 4 modern warfare
|
- call of duty 4 modern warfare
|
||||||
- call of duty 4
|
- call of duty 4
|
||||||
- call of duty four
|
|
||||||
- cod4
|
|
||||||
- cod 4
|
|
||||||
- modern warfare
|
- modern warfare
|
||||||
https://www.youtube.com/watch?v=f-sQhBDsjgE:
|
https://www.youtube.com/watch?v=f-sQhBDsjgE:
|
||||||
- killzone 2
|
- killzone 2
|
||||||
- killzone two
|
|
||||||
https://www.youtube.com/watch?v=-_O6F5FwQ0s:
|
https://www.youtube.com/watch?v=-_O6F5FwQ0s:
|
||||||
- soul calibur v
|
- soul calibur v
|
||||||
- sould calibur 5
|
- sould calibur 5
|
||||||
@ -331,7 +287,6 @@ https://www.youtube.com/watch?v=J46RY4PU8a8:
|
|||||||
- chrono cross
|
- chrono cross
|
||||||
https://www.youtube.com/watch?v=6LB7LZZGpkw:
|
https://www.youtube.com/watch?v=6LB7LZZGpkw:
|
||||||
- silent hill 2
|
- silent hill 2
|
||||||
- silent hill two
|
|
||||||
https://www.youtube.com/watch?v=ya3yxTbkh5s:
|
https://www.youtube.com/watch?v=ya3yxTbkh5s:
|
||||||
- Ōkami
|
- Ōkami
|
||||||
- okami
|
- okami
|
||||||
@ -344,10 +299,6 @@ https://www.youtube.com/watch?v=KGidvt4NTPI:
|
|||||||
https://www.youtube.com/watch?v=JbXVNKtmWnc:
|
https://www.youtube.com/watch?v=JbXVNKtmWnc:
|
||||||
- final fantasy vi
|
- final fantasy vi
|
||||||
- final fantasy 6
|
- final fantasy 6
|
||||||
- ff6
|
|
||||||
- ffvi
|
|
||||||
https://www.youtube.com/watch?v=-jMDutXA4-M:
|
https://www.youtube.com/watch?v=-jMDutXA4-M:
|
||||||
- final fantasy iii
|
- final fantasy iii
|
||||||
- final fantasy 3
|
- final fantasy 3
|
||||||
- ff3
|
|
||||||
- ffiii
|
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Start an Audio Trivia game",
|
"description": "Start an Audio Trivia game",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing Audio trivia! Get started with `[p]help AudioTrivia`",
|
"install_msg": "Thank you for installing Audio trivia!\n You **MUST** unload trivia to use this (`[p]unload trivia`)\n Then you can get started with `[p]load audiotrivia` and `[p]help AudioTrivia`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Start an Audio Trivia game",
|
"short": "Start an Audio Trivia game",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import re
|
import re
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import Config, checks
|
from redbot.core import Config, checks
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
from redbot.core.utils.chat_formatting import pagify, box
|
from redbot.core.utils.chat_formatting import pagify, box
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
class CCRole:
|
|
||||||
|
class CCRole(Cog):
|
||||||
"""
|
"""
|
||||||
Custom commands
|
Custom commands
|
||||||
Creates commands used to display text and adjust roles
|
Creates commands used to display text and adjust roles
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "[Incomplete] Creates custom commands to adjust roles and send custom messages",
|
"description": "[Incomplete] Creates custom commands to adjust roles and send custom messages",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing Custom Commands w/ Roles.",
|
"install_msg": "Thank you for installing Custom Commands w/ Roles. Get started with `[p]load ccrole` and `[p]help CCRole`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "[Incomplete] Creates commands that adjust roles",
|
"short": "[Incomplete] Creates commands that adjust roles",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -11,9 +11,12 @@ from chatter.chatterbot import ChatBot
|
|||||||
from chatter.chatterbot.comparisons import levenshtein_distance
|
from chatter.chatterbot.comparisons import levenshtein_distance
|
||||||
from chatter.chatterbot.response_selection import get_first_response
|
from chatter.chatterbot.response_selection import get_first_response
|
||||||
from chatter.chatterbot.trainers import ListTrainer
|
from chatter.chatterbot.trainers import ListTrainer
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class Chatter:
|
class Chatter(Cog):
|
||||||
"""
|
"""
|
||||||
This cog trains a chatbot that will talk like members of your Guild
|
This cog trains a chatbot that will talk like members of your Guild
|
||||||
"""
|
"""
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Create an offline chatbot that talks like your average member using Machine Learning",
|
"description": "Create an offline chatbot that talks like your average member using Machine Learning",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing Chatter!",
|
"install_msg": "Thank you for installing Chatter! Get started ith `[p]load chatter` and `[p]help Chatter`",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"sqlalchemy<1.3,>=1.2",
|
"sqlalchemy<1.3,>=1.2",
|
||||||
"python-twitter<4.0,>=3.0",
|
"python-twitter<4.0,>=3.0",
|
||||||
|
@ -4,11 +4,14 @@ from redbot.core import Config
|
|||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
from redbot.core.data_manager import cog_data_path
|
from redbot.core.data_manager import cog_data_path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class CogLint:
|
class CogLint(Cog):
|
||||||
"""
|
"""
|
||||||
V3 Cog Template
|
Automatically lint code in python codeblocks
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, bot: Red):
|
def __init__(self, bot: Red):
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Lint python code posted in chat",
|
"description": "Lint python code posted in chat",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"install_msg": "Thank you for installing CogLint",
|
"install_msg": "Thank you for installing CogLint! Get started with `[p]load coglint` and `[p]help CogLint`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Python cog linter",
|
"short": "Python cog linter",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
5
dad/__init__.py
Normal file
5
dad/__init__.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from .dad import Dad
|
||||||
|
|
||||||
|
|
||||||
|
def setup(bot):
|
||||||
|
bot.add_cog(Dad(bot))
|
112
dad/dad.py
Normal file
112
dad/dad.py
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
from collections import defaultdict
|
||||||
|
from datetime import datetime, timedelta
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
import aiohttp
|
||||||
|
import discord
|
||||||
|
from redbot.core import Config, checks
|
||||||
|
from redbot.core import commands
|
||||||
|
from redbot.core.bot import Red
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
|
async def fetch_url(session, url):
|
||||||
|
async with session.get(url) as response:
|
||||||
|
assert response.status == 200
|
||||||
|
return await response.json()
|
||||||
|
|
||||||
|
|
||||||
|
class Dad(Cog):
|
||||||
|
"""
|
||||||
|
Dad jokes
|
||||||
|
|
||||||
|
Nicknaming user idea comes from https://github.com/Vexs/DadBot
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, bot: Red):
|
||||||
|
self.bot = bot
|
||||||
|
self.config = Config.get_conf(self, identifier=6897100, force_registration=True)
|
||||||
|
|
||||||
|
default_guild = {
|
||||||
|
"enabled": False,
|
||||||
|
"nickname": False,
|
||||||
|
"cooldown": 240
|
||||||
|
}
|
||||||
|
|
||||||
|
self.config.register_guild(**default_guild)
|
||||||
|
|
||||||
|
self.cooldown = defaultdict(datetime.now)
|
||||||
|
|
||||||
|
@commands.command()
|
||||||
|
async def dadjoke(self, ctx: commands.Context):
|
||||||
|
headers = {"User-Agent": "FoxV3 (https://github.com/bobloy/Fox-V3)",
|
||||||
|
"Accept": "application/json"}
|
||||||
|
|
||||||
|
async with aiohttp.ClientSession(headers=headers) as session:
|
||||||
|
joke = await fetch_url(session, 'https://icanhazdadjoke.com/')
|
||||||
|
|
||||||
|
em = discord.Embed()
|
||||||
|
em.set_image(url="https://icanhazdadjoke.com/j/{}.png".format(joke['id']))
|
||||||
|
|
||||||
|
await ctx.send(embed=em)
|
||||||
|
|
||||||
|
@commands.group()
|
||||||
|
@checks.admin()
|
||||||
|
async def dad(self, ctx: commands.Context):
|
||||||
|
"""Dad joke superhub"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
@dad.command(name='toggle')
|
||||||
|
async def dad_toggle(self, ctx: commands.Context):
|
||||||
|
"""Toggle automatic dad jokes on or off"""
|
||||||
|
is_on = await self.config.guild(ctx.guild).enabled()
|
||||||
|
await self.config.guild(ctx.guild).enabled.set(not is_on)
|
||||||
|
await ctx.send("Auto dad jokes are now set to {}".format(not is_on))
|
||||||
|
|
||||||
|
@dad.command(name='nickname')
|
||||||
|
async def dad_nickname(self, ctx: commands.Context):
|
||||||
|
"""Toggle nicknaming"""
|
||||||
|
is_on = await self.config.guild(ctx.guild).nickname()
|
||||||
|
await self.config.guild(ctx.guild).nickname.set(not is_on)
|
||||||
|
await ctx.send("Nicknaming is now set to {}".format(not is_on))
|
||||||
|
|
||||||
|
@dad.command(name='cooldown')
|
||||||
|
async def dad_cooldown(self, ctx: commands.Context, cooldown: int):
|
||||||
|
"""Set the auto-joke cooldown"""
|
||||||
|
|
||||||
|
await self.config.guild(ctx.guild).cooldown.set(cooldown)
|
||||||
|
await ctx.send("Dad joke cooldown is now set to {}".format(cooldown))
|
||||||
|
|
||||||
|
async def on_message(self, message: discord.Message):
|
||||||
|
guild: discord.Guild = message.guild
|
||||||
|
if guild is None:
|
||||||
|
return
|
||||||
|
|
||||||
|
guild_config = self.config.guild(guild)
|
||||||
|
is_on = await guild_config.enabled()
|
||||||
|
if not is_on:
|
||||||
|
return
|
||||||
|
|
||||||
|
if self.cooldown[guild.id] > datetime.now():
|
||||||
|
return
|
||||||
|
|
||||||
|
lower = message.clean_content.lower()
|
||||||
|
lower_split = lower.split()
|
||||||
|
if len(lower_split)==0:
|
||||||
|
return
|
||||||
|
|
||||||
|
if lower_split[0] == "i'm" and len(lower_split) >= 2:
|
||||||
|
if await guild_config.nickname():
|
||||||
|
try:
|
||||||
|
await message.author.edit(nick=lower[4:])
|
||||||
|
except discord.Forbidden:
|
||||||
|
out = lower[4:]
|
||||||
|
else:
|
||||||
|
out = message.author.mention
|
||||||
|
else:
|
||||||
|
out = lower[4:]
|
||||||
|
|
||||||
|
await message.channel.send("Hi {}, I'm {}!".format(out, guild.me.display_name))
|
||||||
|
|
||||||
|
self.cooldown[guild.id] = datetime.now() + timedelta(seconds=(await guild_config.cooldown()))
|
20
dad/info..json
Normal file
20
dad/info..json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"author": [
|
||||||
|
"Bobloy"
|
||||||
|
],
|
||||||
|
"bot_version": [
|
||||||
|
3,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"description": "Tell dad jokes and give out bad nicknames",
|
||||||
|
"hidden": true,
|
||||||
|
"install_msg": "Thank you for installing Dad. Get started with `[p]load dad`, then `[p]help Dad`",
|
||||||
|
"requirements": [],
|
||||||
|
"short": "Dad joke bot",
|
||||||
|
"tags": [
|
||||||
|
"bobloy",
|
||||||
|
"utils",
|
||||||
|
"tools"
|
||||||
|
]
|
||||||
|
}
|
@ -2,9 +2,12 @@ import asyncio
|
|||||||
|
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import Config, checks, commands
|
from redbot.core import Config, checks, commands
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class ExclusiveRole:
|
class ExclusiveRole(Cog):
|
||||||
"""
|
"""
|
||||||
Custom commands
|
Custom commands
|
||||||
Creates commands used to display text and adjust roles
|
Creates commands used to display text and adjust roles
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Assign roles to be exclusive, preventing other roles from being added",
|
"description": "Assign roles to be exclusive, preventing other roles from being added",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing ExclusiveRole. Get started with `[p]help ExclusiveRole`",
|
"install_msg": "Thank you for installing ExclusiveRole. Get started with `[p]load exclusiverole` and `[p]help ExclusiveRole`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Set roles to be exclusive",
|
"short": "Set roles to be exclusive",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -4,9 +4,12 @@ import discord
|
|||||||
from redbot.core import Config, checks, commands
|
from redbot.core import Config, checks, commands
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
from redbot.core.utils.chat_formatting import pagify
|
from redbot.core.utils.chat_formatting import pagify
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class Flag:
|
class Flag(Cog):
|
||||||
"""
|
"""
|
||||||
Set expiring flags on members
|
Set expiring flags on members
|
||||||
"""
|
"""
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
0
|
0
|
||||||
],
|
],
|
||||||
"description": "Add expiring flags on members to track warnings or incidents",
|
"description": "Add expiring flags on members to track warnings or incidents",
|
||||||
"hidden": true,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing Flag! Get started with `[p]help Flag`",
|
"install_msg": "Thank you for installing Flag! Get started with `[p]load flag` and `[p]help Flag`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Add expiring flags to members",
|
"short": "Add expiring flags to members",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -3,9 +3,12 @@ from discord.utils import get
|
|||||||
from redbot.core import Config, checks, commands
|
from redbot.core import Config, checks, commands
|
||||||
|
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class ForceMention:
|
class ForceMention(Cog):
|
||||||
"""
|
"""
|
||||||
Mention the unmentionables
|
Mention the unmentionables
|
||||||
"""
|
"""
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Mentions roles that are unmentionable",
|
"description": "Mentions roles that are unmentionable",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing ForceMention! Get started with `[p]forcemention`",
|
"install_msg": "Thank you for installing ForceMention! Get started with `[p]load forcemention`, then `[p]forcemention`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Mention unmentionables",
|
"short": "Mention unmentionables",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -4,9 +4,12 @@ from random import randint
|
|||||||
import discord
|
import discord
|
||||||
from redbot.core import Config, checks, commands
|
from redbot.core import Config, checks, commands
|
||||||
from redbot.core.data_manager import cog_data_path
|
from redbot.core.data_manager import cog_data_path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class Hangman:
|
class Hangman(Cog):
|
||||||
"""Lets anyone play a game of hangman with custom phrases"""
|
"""Lets anyone play a game of hangman with custom phrases"""
|
||||||
navigate = "🔼🔽"
|
navigate = "🔼🔽"
|
||||||
letters = "🇦🇧🇨🇩🇪🇫🇬🇭🇮🇯🇰🇱🇲🇳🇴🇵🇶🇷🇸🇹🇺🇻🇼🇽🇾🇿"
|
letters = "🇦🇧🇨🇩🇪🇫🇬🇭🇮🇯🇰🇱🇲🇳🇴🇵🇶🇷🇸🇹🇺🇻🇼🇽🇾🇿"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Play Hangman with your friends",
|
"description": "Play Hangman with your friends",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing Hangman!",
|
"install_msg": "Thank you for installing Hangman! Get started with `[p]load hangman`, then `[p]help Hangman`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Play Hangman",
|
"short": "Play Hangman",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Keeps track of when people leave the server, and posts a message notifying",
|
"description": "Keeps track of when people leave the server, and posts a message notifying",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing Leaver. Get started with `[p]help Leaver`",
|
"install_msg": "Thank you for installing Leaver. Get started with `[p]load leaver`, then `[p]help Leaver`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Send message on leave",
|
"short": "Send message on leave",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -2,9 +2,12 @@ import discord
|
|||||||
|
|
||||||
from redbot.core import Config, checks, commands
|
from redbot.core import Config, checks, commands
|
||||||
from redbot.core.commands import Context
|
from redbot.core.commands import Context
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class Leaver:
|
class Leaver(Cog):
|
||||||
"""
|
"""
|
||||||
Creates a goodbye message when people leave
|
Creates a goodbye message when people leave
|
||||||
"""
|
"""
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Calculate the love percentage for two users",
|
"description": "Calculate the love percentage for two users",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing LoveCalculator. Love is in the air.",
|
"install_msg": "Thank you for installing LoveCalculator. Love is in the air.\n Get started with `[p]load lovecalculator`, then `[p]help LoveCalculator`",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"beautifulsoup4"
|
"beautifulsoup4"
|
||||||
],
|
],
|
||||||
|
@ -2,9 +2,12 @@ import aiohttp
|
|||||||
import discord
|
import discord
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class LoveCalculator:
|
class LoveCalculator(Cog):
|
||||||
"""Calculate the love percentage for two users!"""
|
"""Calculate the love percentage for two users!"""
|
||||||
|
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
0
|
0
|
||||||
],
|
],
|
||||||
"description": "Keep track of when users were last seen online",
|
"description": "Keep track of when users were last seen online",
|
||||||
"hidden": true,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing LastSeen. Get started with `[p]help LastSeen`",
|
"install_msg": "Thank you for installing LastSeen. Get started with `[p]load lseen`, then `[p]help LastSeen`",
|
||||||
"requirements": ["python-dateutil"],
|
"requirements": ["python-dateutil"],
|
||||||
"short": "Last seen tracker",
|
"short": "Last seen tracker",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -6,9 +6,12 @@ import discord
|
|||||||
from redbot.core import Config
|
from redbot.core import Config
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class LastSeen:
|
class LastSeen(Cog):
|
||||||
"""
|
"""
|
||||||
Report when a user was last seen online
|
Report when a user was last seen online
|
||||||
"""
|
"""
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Keep track of when users were last seen online",
|
"description": "Keep track of when users were last seen online",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"install_msg": "Thank you for installing LastSeen. Get started with `[p]help LastSeen`",
|
"install_msg": "Thank you for installing LastSeen. Get started with `[p]load nudity`, then `[p]help Nudity`",
|
||||||
"requirements": ["nudepy"],
|
"requirements": ["nudepy"],
|
||||||
"short": "Last seen tracker",
|
"short": "Last seen tracker",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
5
planttycoon/__init__.py
Normal file
5
planttycoon/__init__.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from .planttycoon import PlantTycoon
|
||||||
|
|
||||||
|
|
||||||
|
def setup(bot):
|
||||||
|
bot.add_cog(PlantTycoon(bot))
|
11
planttycoon/data/badges.json
Normal file
11
planttycoon/data/badges.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"badges": {
|
||||||
|
"Flower Power": {},
|
||||||
|
"Fruit Brute": {},
|
||||||
|
"Sporadic": {},
|
||||||
|
"Odd-pod": {},
|
||||||
|
"Greenfingers": {},
|
||||||
|
"Nobel Peas Prize": {},
|
||||||
|
"Annualsary": {}
|
||||||
|
}
|
||||||
|
}
|
22
planttycoon/data/defaults.json
Normal file
22
planttycoon/data/defaults.json
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"points": {
|
||||||
|
"buy": 5,
|
||||||
|
"add_health": 5,
|
||||||
|
"fertilize": 10,
|
||||||
|
"pruning": 20,
|
||||||
|
"pesticide": 25,
|
||||||
|
"growing": 5,
|
||||||
|
"damage": 25
|
||||||
|
},
|
||||||
|
"timers": {
|
||||||
|
"degradation": 1,
|
||||||
|
"completion": 1,
|
||||||
|
"notification": 5
|
||||||
|
},
|
||||||
|
"degradation": {
|
||||||
|
"base_degradation": 1.5
|
||||||
|
},
|
||||||
|
"notification": {
|
||||||
|
"max_health": 50
|
||||||
|
}
|
||||||
|
}
|
7
planttycoon/data/notifications.json
Normal file
7
planttycoon/data/notifications.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"messages": [
|
||||||
|
"The soil seems dry, maybe you could give your plant some water?",
|
||||||
|
"Your plant seems a bit droopy. I would give it some fertilizer if I were you.",
|
||||||
|
"Your plant seems a bit too overgrown. You should probably trim it a bit."
|
||||||
|
]
|
||||||
|
}
|
690
planttycoon/data/plants.json
Normal file
690
planttycoon/data/plants.json
Normal file
@ -0,0 +1,690 @@
|
|||||||
|
{
|
||||||
|
"plants": [
|
||||||
|
{
|
||||||
|
"name": "Poppy",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/S4hjyUX.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Dandelion",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/emqnQP2.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Daisy",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/lcFq4AB.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Chrysanthemum",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/5jLtqWL.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Pansy",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/f7TgD1b.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Lavender",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/g3OmOSK.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Lily",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/0hzy7lO.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Petunia",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/rJm8ISv.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Sunflower",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/AzgzQK9.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Daffodil",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/pnCCRsH.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Clover",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/jNTgirw.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tulip",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/kodIFjE.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Rose",
|
||||||
|
"article": "a",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/sdTNiOH.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Aster",
|
||||||
|
"article": "an",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/1tN04Hl.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Aloe Vera",
|
||||||
|
"article": "an",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/WFAYIpx.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Orchid",
|
||||||
|
"article": "an",
|
||||||
|
"time": 3600,
|
||||||
|
"rarity": "common",
|
||||||
|
"image": "http://i.imgur.com/IQrQYDC.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.625,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Flower Power",
|
||||||
|
"reward": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Dragon Fruit Plant",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/pfngpDS.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Mango Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/ybR78Oc.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Lychee Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/w9LkfhX.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Durian Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/jh249fz.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Fig Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/YkhnpEV.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jack Fruit Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/2D79TlA.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Prickly Pear Plant",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/GrcGAGj.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Pineapple Plant",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/VopYQtr.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Citron Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/zh7Dr23.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cherimoya Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/H62gQK6.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Mangosteen Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/McNnMqa.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Guava Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/iy8WgPt.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Orange Tree",
|
||||||
|
"article": "an",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/lwjEJTm.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Apple Tree",
|
||||||
|
"article": "an",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/QI3UTR3.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Sapodilla Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 5400,
|
||||||
|
"rarity": "uncommon",
|
||||||
|
"image": "http://i.imgur.com/6BvO5Fu.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 0.75,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Fruit Brute",
|
||||||
|
"reward": 1200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Franklin Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 7200,
|
||||||
|
"rarity": "rare",
|
||||||
|
"image": "http://i.imgur.com/hoh17hp.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Sporadic",
|
||||||
|
"reward": 2400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Parrot's Beak",
|
||||||
|
"article": "a",
|
||||||
|
"time": 7200,
|
||||||
|
"rarity": "rare",
|
||||||
|
"image": "http://i.imgur.com/lhSjfQY.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Sporadic",
|
||||||
|
"reward": 2400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Koki'o",
|
||||||
|
"article": "a",
|
||||||
|
"time": 7200,
|
||||||
|
"rarity": "rare",
|
||||||
|
"image": "http://i.imgur.com/Dhw9ync.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Sporadic",
|
||||||
|
"reward": 2400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jade Vine",
|
||||||
|
"article": "a",
|
||||||
|
"time": 7200,
|
||||||
|
"rarity": "rare",
|
||||||
|
"image": "http://i.imgur.com/h4fJo2R.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Sporadic",
|
||||||
|
"reward": 2400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Venus Fly Trap",
|
||||||
|
"article": "a",
|
||||||
|
"time": 7200,
|
||||||
|
"rarity": "rare",
|
||||||
|
"image": "http://i.imgur.com/NoSdxXh.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Sporadic",
|
||||||
|
"reward": 2400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Chocolate Cosmos",
|
||||||
|
"article": "a",
|
||||||
|
"time": 7200,
|
||||||
|
"rarity": "rare",
|
||||||
|
"image": "http://i.imgur.com/4ArSekX.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Sporadic",
|
||||||
|
"reward": 2400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Pizza Plant",
|
||||||
|
"article": "a",
|
||||||
|
"time": 9000,
|
||||||
|
"rarity": "super-rare",
|
||||||
|
"image": "http://i.imgur.com/ASZXr7C.png",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Odd-pod",
|
||||||
|
"reward": 3600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tba",
|
||||||
|
"article": "a",
|
||||||
|
"time": 9000,
|
||||||
|
"rarity": "super-rare",
|
||||||
|
"image": "tba",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1.5,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Odd-pod",
|
||||||
|
"reward": 3600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Pirahna Plant",
|
||||||
|
"article": "a",
|
||||||
|
"time": 9000,
|
||||||
|
"rarity": "super-rare",
|
||||||
|
"image": "http://i.imgur.com/c03i9W7.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1.5,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Odd-pod",
|
||||||
|
"reward": 3600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tba",
|
||||||
|
"article": "a",
|
||||||
|
"time": 9000,
|
||||||
|
"rarity": "super-rare",
|
||||||
|
"image": "tba",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1.5,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Odd-pod",
|
||||||
|
"reward": 3600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Peashooter",
|
||||||
|
"article": "a",
|
||||||
|
"time": 9000,
|
||||||
|
"rarity": "super-rare",
|
||||||
|
"image": "https://i.imgur.com/Vo4v2Ry.png",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 1.5,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Odd-pod",
|
||||||
|
"reward": 3600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tba",
|
||||||
|
"article": "a",
|
||||||
|
"time": 10800,
|
||||||
|
"rarity": "epic",
|
||||||
|
"image": "tba",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 2,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Greenfingers",
|
||||||
|
"reward": 5400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Pikmin",
|
||||||
|
"article": "a",
|
||||||
|
"time": 10800,
|
||||||
|
"rarity": "epic",
|
||||||
|
"image": "http://i.imgur.com/sizf7hE.png",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 2,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Greenfingers",
|
||||||
|
"reward": 5400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Flora Colossus",
|
||||||
|
"article": "a",
|
||||||
|
"time": 10800,
|
||||||
|
"rarity": "epic",
|
||||||
|
"image": "http://i.imgur.com/9f5QzaW.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 2,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Greenfingers",
|
||||||
|
"reward": 5400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Plantera Bulb",
|
||||||
|
"article": "a",
|
||||||
|
"time": 10800,
|
||||||
|
"rarity": "epic",
|
||||||
|
"image": "https://i.imgur.com/ExqLLHO.png",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 2,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Greenfingers",
|
||||||
|
"reward": 5400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Chorus Tree",
|
||||||
|
"article": "an",
|
||||||
|
"time": 10800,
|
||||||
|
"rarity": "epic",
|
||||||
|
"image": "https://i.imgur.com/tv2B72j.png",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 2,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Greenfingers",
|
||||||
|
"reward": 5400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Money Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 35400,
|
||||||
|
"rarity": "legendary",
|
||||||
|
"image": "http://i.imgur.com/MIJQDLL.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 3,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Nobel Peas Prize",
|
||||||
|
"reward": 10800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Truffula Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 35400,
|
||||||
|
"rarity": "legendary",
|
||||||
|
"image": "http://i.imgur.com/cFSmaHH.png",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 3,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Nobel Peas Prize",
|
||||||
|
"reward": 10800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Whomping Willow",
|
||||||
|
"article": "a",
|
||||||
|
"time": 35400,
|
||||||
|
"rarity": "legendary",
|
||||||
|
"image": "http://i.imgur.com/Ibwm2xY.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 3,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Nobel Peas Prize",
|
||||||
|
"reward": 10800
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"event": {
|
||||||
|
"January": {
|
||||||
|
"name": "Tanabata Tree",
|
||||||
|
"article": "a",
|
||||||
|
"time": 70800,
|
||||||
|
"rarity": "event",
|
||||||
|
"image": "http://i.imgur.com/FD38JJj.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 9,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Annualsary",
|
||||||
|
"reward": 21600
|
||||||
|
},
|
||||||
|
"February": {
|
||||||
|
"name": "Chocolate Rose",
|
||||||
|
"article": "a",
|
||||||
|
"time": 70800,
|
||||||
|
"rarity": "event",
|
||||||
|
"image": "http://i.imgur.com/Sqg6pcG.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 9,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Annualsary",
|
||||||
|
"reward": 21600
|
||||||
|
},
|
||||||
|
"March": {
|
||||||
|
"name": "Shamrock",
|
||||||
|
"article": "a",
|
||||||
|
"time": 70800,
|
||||||
|
"rarity": "event",
|
||||||
|
"image": "http://i.imgur.com/kVig04M.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 9,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Annualsary",
|
||||||
|
"reward": 21600
|
||||||
|
},
|
||||||
|
"April": {
|
||||||
|
"name": "Easter Egg Eggplant",
|
||||||
|
"article": "an",
|
||||||
|
"time": 70800,
|
||||||
|
"rarity": "event",
|
||||||
|
"image": "http://i.imgur.com/5jltGQa.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 9,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Annualsary",
|
||||||
|
"reward": 21600
|
||||||
|
},
|
||||||
|
"October": {
|
||||||
|
"name": "Jack O' Lantern",
|
||||||
|
"article": "a",
|
||||||
|
"time": 70800,
|
||||||
|
"rarity": "event",
|
||||||
|
"image": "http://i.imgur.com/efApsxG.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 9,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Annualsary",
|
||||||
|
"reward": 21600
|
||||||
|
},
|
||||||
|
"November": {
|
||||||
|
"name": "Mayflower",
|
||||||
|
"article": "a",
|
||||||
|
"time": 70800,
|
||||||
|
"rarity": "event",
|
||||||
|
"image": "http://i.imgur.com/nntNtoL.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 9,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Annualsary",
|
||||||
|
"reward": 21600
|
||||||
|
},
|
||||||
|
"December": {
|
||||||
|
"name": "Holly",
|
||||||
|
"article": "a",
|
||||||
|
"time": 70800,
|
||||||
|
"rarity": "event",
|
||||||
|
"image": "http://i.imgur.com/maDLmJC.jpg",
|
||||||
|
"health": 100,
|
||||||
|
"degradation": 9,
|
||||||
|
"threshold": 110,
|
||||||
|
"badge": "Annualsary",
|
||||||
|
"reward": 21600
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
42
planttycoon/data/products.json
Normal file
42
planttycoon/data/products.json
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"water": {
|
||||||
|
"cost": 5,
|
||||||
|
"health": 10,
|
||||||
|
"damage": 45,
|
||||||
|
"modifier": 0,
|
||||||
|
"category": "water",
|
||||||
|
"uses": 1
|
||||||
|
},
|
||||||
|
"manure": {
|
||||||
|
"cost": 20,
|
||||||
|
"health": 20,
|
||||||
|
"damage": 55,
|
||||||
|
"modifier": -0.035,
|
||||||
|
"category": "fertilizer",
|
||||||
|
"uses": 1
|
||||||
|
},
|
||||||
|
"vermicompost": {
|
||||||
|
"cost": 35,
|
||||||
|
"health": 30,
|
||||||
|
"damage": 60,
|
||||||
|
"modifier": -0.5,
|
||||||
|
"category": "fertilizer",
|
||||||
|
"uses": 1
|
||||||
|
},
|
||||||
|
"nitrates": {
|
||||||
|
"cost": 70,
|
||||||
|
"health": 60,
|
||||||
|
"damage": 75,
|
||||||
|
"modifier": -0.08,
|
||||||
|
"category": "fertilizer",
|
||||||
|
"uses": 1
|
||||||
|
},
|
||||||
|
"pruner": {
|
||||||
|
"cost": 500,
|
||||||
|
"health": 40,
|
||||||
|
"damage": 90,
|
||||||
|
"modifier": -0.065,
|
||||||
|
"category": "tool",
|
||||||
|
"uses": 10
|
||||||
|
}
|
||||||
|
}
|
22
planttycoon/info.json
Normal file
22
planttycoon/info.json
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"author": [
|
||||||
|
"Bobloy",
|
||||||
|
"SnappyDragon",
|
||||||
|
"PaddoInWonderland"
|
||||||
|
],
|
||||||
|
"bot_version": [
|
||||||
|
3,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"description": "Grow your own plants! Be sure to take care of it. Do `[p]gardening` to get started",
|
||||||
|
"hidden": false,
|
||||||
|
"install_msg": "Thank you for installing PlantTycoon. Check out all the commands with `[p]help PlantTycoon`",
|
||||||
|
"requirements": [],
|
||||||
|
"short": "Grow your own plants! Do `[p]gardening` to get started.",
|
||||||
|
"tags": [
|
||||||
|
"bobloy",
|
||||||
|
"games",
|
||||||
|
"environment"
|
||||||
|
]
|
||||||
|
}
|
1419
planttycoon/planttycoon.py
Normal file
1419
planttycoon/planttycoon.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,8 +8,8 @@
|
|||||||
0
|
0
|
||||||
],
|
],
|
||||||
"description": "Create a QR code invite for the server",
|
"description": "Create a QR code invite for the server",
|
||||||
"hidden": true,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing QRInvite! Get started with `[p]help QRInvite`",
|
"install_msg": "Thank you for installing QRInvite! Get started with `[p]load qrinvite`, then `[p]help QRInvite`",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"MyQR"
|
"MyQR"
|
||||||
],
|
],
|
||||||
|
@ -7,9 +7,12 @@ from PIL import Image
|
|||||||
from redbot.core import Config, commands
|
from redbot.core import Config, commands
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
from redbot.core.data_manager import cog_data_path
|
from redbot.core.data_manager import cog_data_path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class QRInvite:
|
class QRInvite(Cog):
|
||||||
"""
|
"""
|
||||||
V3 Cog Template
|
V3 Cog Template
|
||||||
"""
|
"""
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"author" : ["Bobloy"],
|
"author" : ["Bobloy"],
|
||||||
"bot_version" : [3,0,0],
|
"bot_version" : [3,0,0],
|
||||||
"description" : "Cog to prevent reactions on specific messages from certain users",
|
"description" : "Cog to prevent reactions on specific messages from certain users",
|
||||||
"hidden" : false,
|
"hidden" : true,
|
||||||
"install_msg" : "Thank you for installing ReactRestrict.",
|
"install_msg" : "Thank you for installing ReactRestrict.",
|
||||||
"requirements" : [],
|
"requirements" : [],
|
||||||
"short" : "[Incomplete] Prevent reactions",
|
"short" : "[Incomplete] Prevent reactions",
|
||||||
|
@ -4,6 +4,9 @@ import discord
|
|||||||
from redbot.core import Config
|
from redbot.core import Config
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class ReactRestrictCombo:
|
class ReactRestrictCombo:
|
||||||
@ -31,7 +34,7 @@ class ReactRestrictCombo:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class ReactRestrict:
|
class ReactRestrict(Cog):
|
||||||
"""
|
"""
|
||||||
Prevent specific roles from reacting to specific messages
|
Prevent specific roles from reacting to specific messages
|
||||||
"""
|
"""
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Apply for a job at the recycling plant! Sort out the garbage!",
|
"description": "Apply for a job at the recycling plant! Sort out the garbage!",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing RecyclingPlant. Start recycling today with `[p]recyclingplant`",
|
"install_msg": "Thank you for installing RecyclingPlant. Start recycling today with `[p]load recyclingplant`, then `[p]recyclingplant`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Apply for a job at the recycling plant!",
|
"short": "Apply for a job at the recycling plant!",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -5,9 +5,12 @@ import random
|
|||||||
from redbot.core import bank
|
from redbot.core import bank
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
from redbot.core.data_manager import cog_data_path
|
from redbot.core.data_manager import cog_data_path
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class RecyclingPlant:
|
class RecyclingPlant(Cog):
|
||||||
"""Apply for a job at the recycling plant!"""
|
"""Apply for a job at the recycling plant!"""
|
||||||
|
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Play Rock Papers Scissor Lizard Spock by Sam Kass in Discord!",
|
"description": "Play Rock Papers Scissor Lizard Spock by Sam Kass in Discord!",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing RPSLP. Get started with `[p]rpsls`",
|
"install_msg": "Thank you for installing RPSLP. Get started with `[p]load rpsls`, then `[p]rpsls`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Play Rock Papers Scissor Lizard Spock in Discord!",
|
"short": "Play Rock Papers Scissor Lizard Spock in Discord!",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -3,9 +3,12 @@ import random
|
|||||||
|
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class RPSLS:
|
class RPSLS(Cog):
|
||||||
"""Play Rock Paper Scissors Lizard Spock."""
|
"""Play Rock Paper Scissors Lizard Spock."""
|
||||||
|
|
||||||
weaknesses = {
|
weaknesses = {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Convert any website into text and post it in chat",
|
"description": "Convert any website into text and post it in chat",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"install_msg": "Thank you for installing SayUrl",
|
"install_msg": "Thank you for installing SayUrl! Get started with `[p]load forcemention`, then `[p]help SayUrl",
|
||||||
"requirements": ["html2text"],
|
"requirements": ["html2text"],
|
||||||
"short": "Convert URL to text",
|
"short": "Convert URL to text",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -4,16 +4,18 @@ import html2text
|
|||||||
from redbot.core import Config, commands
|
from redbot.core import Config, commands
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
from redbot.core.utils.chat_formatting import pagify
|
from redbot.core.utils.chat_formatting import pagify
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
async def fetch_url(session, url):
|
async def fetch_url(session, url):
|
||||||
with aiohttp.Timeout(20):
|
|
||||||
async with session.get(url) as response:
|
async with session.get(url) as response:
|
||||||
assert response.status == 200
|
assert response.status == 200
|
||||||
return await response.text()
|
return await response.text()
|
||||||
|
|
||||||
|
|
||||||
class SayUrl:
|
class SayUrl(Cog):
|
||||||
"""
|
"""
|
||||||
V3 Cog Template
|
V3 Cog Template
|
||||||
"""
|
"""
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Look up SCP articles. Warning: Some of them may be too creepy or gruesome.",
|
"description": "Look up SCP articles. Warning: Some of them may be too creepy or gruesome.",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "You are now connected to the SCP database. You may now proceed to access the data using `[p]help SCP`",
|
"install_msg": "You are now connected to the SCP database. You may now proceed to access the data using `[p]load scp`, then `[p]help SCP`",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Look up SCP articles.",
|
"short": "Look up SCP articles.",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
import discord
|
import discord
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class SCP:
|
class SCP(Cog):
|
||||||
"""Look up SCP articles. Warning: Some of them may be too creepy or gruesome."""
|
"""Look up SCP articles. Warning: Some of them may be too creepy or gruesome."""
|
||||||
|
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
|
@ -4,6 +4,9 @@ import discord
|
|||||||
|
|
||||||
from redbot.core import Config, commands
|
from redbot.core import Config, commands
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
async def fetch_img(session, url):
|
async def fetch_img(session, url):
|
||||||
@ -13,7 +16,7 @@ async def fetch_img(session, url):
|
|||||||
return await response.read()
|
return await response.read()
|
||||||
|
|
||||||
|
|
||||||
class StealEmoji:
|
class StealEmoji(Cog):
|
||||||
"""
|
"""
|
||||||
This cog steals emojis and creates servers for them
|
This cog steals emojis and creates servers for them
|
||||||
"""
|
"""
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Apply roles based on the # of days on server",
|
"description": "Apply roles based on the # of days on server",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing timerole. Configure with [p]timerole",
|
"install_msg": "Thank you for installing timerole.\nGet started with `[p]load timerole`. Configure with [p]timerole",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Apply roles after # of days",
|
"short": "Apply roles after # of days",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -5,9 +5,12 @@ import discord
|
|||||||
from redbot.core import Config, checks, commands
|
from redbot.core import Config, checks, commands
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
from redbot.core.utils.chat_formatting import pagify
|
from redbot.core.utils.chat_formatting import pagify
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class Timerole:
|
class Timerole(Cog):
|
||||||
"""Add roles to users based on time on server"""
|
"""Add roles to users based on time on server"""
|
||||||
|
|
||||||
def __init__(self, bot: Red):
|
def __init__(self, bot: Red):
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Send Text2Speech messages as an uploaded mp3",
|
"description": "Send Text2Speech messages as an uploaded mp3",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"install_msg": "Thank you for installing TTS. Get started with `[p]tts`",
|
"install_msg": "Thank you for installing TTS. Get started with `[p]load tts`, then `[p]help TTS`",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"gTTS"
|
"gTTS"
|
||||||
],
|
],
|
||||||
|
11
tts/tts.py
11
tts/tts.py
@ -4,11 +4,14 @@ import discord
|
|||||||
from gtts import gTTS
|
from gtts import gTTS
|
||||||
from redbot.core import Config, commands
|
from redbot.core import Config, commands
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class TTS:
|
class TTS(Cog):
|
||||||
"""
|
"""
|
||||||
V3 Cog Template
|
Send Text-to-Speech messages
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, bot: Red):
|
def __init__(self, bot: Red):
|
||||||
@ -24,9 +27,7 @@ class TTS:
|
|||||||
@commands.command(aliases=["t2s", "text2"])
|
@commands.command(aliases=["t2s", "text2"])
|
||||||
async def tts(self, ctx: commands.Context, *, text: str):
|
async def tts(self, ctx: commands.Context, *, text: str):
|
||||||
"""
|
"""
|
||||||
My custom cog
|
Send Text to speech messages as an mp3
|
||||||
|
|
||||||
Extra information goes here
|
|
||||||
"""
|
"""
|
||||||
mp3_fp = io.BytesIO()
|
mp3_fp = io.BytesIO()
|
||||||
tts = gTTS(text, 'en')
|
tts = gTTS(text, 'en')
|
||||||
|
@ -2,9 +2,12 @@ import codecs as c
|
|||||||
|
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class Unicode:
|
class Unicode(Cog):
|
||||||
"""Encode/Decode Unicode characters!"""
|
"""Encode/Decode Unicode characters!"""
|
||||||
|
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
|
@ -318,7 +318,7 @@ class GameBuilder:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if page >= len(ROLE_LIST):
|
if page >= len(ROLE_LIST):
|
||||||
self.rand_roles.append(CATEGORY_COUNT[page-len(ROLE_LIST)])
|
self.rand_roles.append(CATEGORY_COUNT[page - len(ROLE_LIST)])
|
||||||
else:
|
else:
|
||||||
self.code.append(page)
|
self.code.append(page)
|
||||||
|
|
||||||
|
@ -1,17 +1,23 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import random
|
import random
|
||||||
|
from typing import List, Any, Dict, Set, Union
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
|
|
||||||
from werewolf.builder import parse_code
|
from werewolf.builder import parse_code
|
||||||
from werewolf.player import Player
|
from werewolf.player import Player
|
||||||
|
from werewolf.role import Role
|
||||||
|
from werewolf.votegroup import VoteGroup
|
||||||
|
|
||||||
|
|
||||||
class Game:
|
class Game:
|
||||||
"""
|
"""
|
||||||
Base class to run a single game of Werewolf
|
Base class to run a single game of Werewolf
|
||||||
"""
|
"""
|
||||||
|
vote_groups: Dict[str, VoteGroup]
|
||||||
|
roles: List[Role]
|
||||||
|
players: List[Player]
|
||||||
|
|
||||||
default_secret_channel = {
|
default_secret_channel = {
|
||||||
"channel": None,
|
"channel": None,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Customizable Werewolf Game",
|
"description": "Customizable Werewolf Game",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"install_msg": "Thank you for installing Werewolf! Use [p]wwset to run inital setup",
|
"install_msg": "Thank you for installing Werewolf! Get started with `[p]load werewolf`\n Use `[p]wwset` to run inital setup",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"short": "Werewolf Game",
|
"short": "Werewolf Game",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -3,3 +3,21 @@ from werewolf.role import Role
|
|||||||
|
|
||||||
def night_immune(role: Role):
|
def night_immune(role: Role):
|
||||||
role.player.alive = True
|
role.player.alive = True
|
||||||
|
|
||||||
|
|
||||||
|
async def pick_target(role: Role, ctx, data):
|
||||||
|
if not role.player.alive: # FixMe: Game handles this?
|
||||||
|
await role.player.send_dm("You're already dead!")
|
||||||
|
return None
|
||||||
|
|
||||||
|
target_id = int(data)
|
||||||
|
try:
|
||||||
|
target = role.game.players[target_id]
|
||||||
|
except IndexError:
|
||||||
|
target = None
|
||||||
|
|
||||||
|
if target is None:
|
||||||
|
await ctx.send("Not a valid ID")
|
||||||
|
return None
|
||||||
|
|
||||||
|
return target_id, target
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from werewolf.night_powers import pick_target
|
||||||
from werewolf.role import Role
|
from werewolf.role import Role
|
||||||
|
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ class Seer(Role):
|
|||||||
return
|
return
|
||||||
self.see_target = None
|
self.see_target = None
|
||||||
await self.game.generate_targets(self.player.member)
|
await self.game.generate_targets(self.player.member)
|
||||||
await self.player.send_dm("**Pick a target to see tonight**\n")
|
await self.player.send_dm("**Pick a target to see tonight**")
|
||||||
|
|
||||||
async def _at_night_end(self, data=None):
|
async def _at_night_end(self, data=None):
|
||||||
if self.see_target is None:
|
if self.see_target is None:
|
||||||
@ -83,19 +84,7 @@ class Seer(Role):
|
|||||||
|
|
||||||
async def choose(self, ctx, data):
|
async def choose(self, ctx, data):
|
||||||
"""Handle night actions"""
|
"""Handle night actions"""
|
||||||
if not self.player.alive: # FixMe: Game handles this?
|
await super().choose(ctx, data)
|
||||||
await self.player.send_dm("You're already dead!")
|
|
||||||
return
|
|
||||||
|
|
||||||
target_id = int(data)
|
self.see_target, target = await pick_target(self, ctx, data)
|
||||||
try:
|
|
||||||
target = self.game.players[target_id]
|
|
||||||
except IndexError:
|
|
||||||
target = None
|
|
||||||
|
|
||||||
if target is None:
|
|
||||||
await ctx.send("Not a valid ID")
|
|
||||||
return
|
|
||||||
|
|
||||||
self.see_target = target_id
|
|
||||||
await ctx.send("**You will attempt to see the role of {} tonight...**".format(target.member.display_name))
|
await ctx.send("**You will attempt to see the role of {} tonight...**".format(target.member.display_name))
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from werewolf.night_powers import pick_target
|
||||||
from werewolf.role import Role
|
from werewolf.role import Role
|
||||||
|
|
||||||
|
|
||||||
@ -59,6 +60,7 @@ class Shifter(Role):
|
|||||||
def __init__(self, game):
|
def __init__(self, game):
|
||||||
super().__init__(game)
|
super().__init__(game)
|
||||||
|
|
||||||
|
self.shift_target = None
|
||||||
self.action_list = [
|
self.action_list = [
|
||||||
(self._at_game_start, 1), # (Action, Priority)
|
(self._at_game_start, 1), # (Action, Priority)
|
||||||
(self._at_day_start, 0),
|
(self._at_day_start, 0),
|
||||||
@ -74,7 +76,7 @@ class Shifter(Role):
|
|||||||
async def see_alignment(self, source=None):
|
async def see_alignment(self, source=None):
|
||||||
"""
|
"""
|
||||||
Interaction for investigative roles attempting
|
Interaction for investigative roles attempting
|
||||||
to see alignment (Village, Werewolf Other)
|
to see alignment (Village, Werewolf, Other)
|
||||||
"""
|
"""
|
||||||
return "Other"
|
return "Other"
|
||||||
|
|
||||||
@ -90,14 +92,38 @@ class Shifter(Role):
|
|||||||
Interaction for investigative roles.
|
Interaction for investigative roles.
|
||||||
More common to be able to deceive this action
|
More common to be able to deceive this action
|
||||||
"""
|
"""
|
||||||
return "MyRole"
|
return "Shifter"
|
||||||
|
|
||||||
async def _at_night_start(self, data=None):
|
async def _at_night_start(self, data=None):
|
||||||
await super()._at_night_start(data)
|
await super()._at_night_start(data)
|
||||||
|
self.shift_target = None
|
||||||
|
await self.game.generate_targets(self.player.member)
|
||||||
|
await self.player.send_dm("**Pick a target to shift into**")
|
||||||
|
|
||||||
async def _at_night_end(self, data=None):
|
async def _at_night_end(self, data=None):
|
||||||
await super()._at_night_end(data)
|
await super()._at_night_end(data)
|
||||||
|
if self.shift_target is None:
|
||||||
|
if self.player.alive:
|
||||||
|
await self.player.send_dm("You will not use your powers tonight...")
|
||||||
|
return
|
||||||
|
target = await self.game.visit(self.shift_target, self.player)
|
||||||
|
|
||||||
|
if target and target.player.alive:
|
||||||
|
await target.role.assign_player(self.player)
|
||||||
|
await self.assign_player(target)
|
||||||
|
|
||||||
|
# Roles have now been swapped
|
||||||
|
|
||||||
|
await self.player.send_dm("Your role has been stolen...\n"
|
||||||
|
"You are now a **Shifter**.")
|
||||||
|
await self.player.send_dm(self.game_start_message)
|
||||||
|
|
||||||
|
await target.send_dm(target.role.game_start_message)
|
||||||
|
else:
|
||||||
|
await self.player.send_dm("**Your shift failed...**")
|
||||||
async def choose(self, ctx, data):
|
async def choose(self, ctx, data):
|
||||||
"""Handle night actions"""
|
"""Handle night actions"""
|
||||||
await super().choose(ctx, data)
|
await super().choose(ctx, data)
|
||||||
|
|
||||||
|
self.shift_target, target = await pick_target(self, ctx, data)
|
||||||
|
await ctx.send("**You will attempt to see the role of {} tonight...**".format(target.member.display_name))
|
||||||
|
@ -8,9 +8,12 @@ from redbot.core import commands
|
|||||||
from werewolf.builder import GameBuilder, role_from_name, role_from_alignment, role_from_category, role_from_id
|
from werewolf.builder import GameBuilder, role_from_name, role_from_alignment, role_from_category, role_from_id
|
||||||
from werewolf.game import Game
|
from werewolf.game import Game
|
||||||
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
|
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
|
|
||||||
|
|
||||||
class Werewolf:
|
class Werewolf(Cog):
|
||||||
"""
|
"""
|
||||||
Base to host werewolf on a guild
|
Base to host werewolf on a guild
|
||||||
"""
|
"""
|
||||||
@ -389,4 +392,3 @@ class Werewolf:
|
|||||||
return False, None, None, None, None
|
return False, None, None, None, None
|
||||||
|
|
||||||
return True, role, category, channel, log_channel
|
return True, role, category, channel, log_channel
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user