Giter Club home page Giter Club logo

duckhunt-discord / dhv3 Goto Github PK

View Code? Open in Web Editor NEW
45.0 8.0 20.0 33.79 MB

Obsolete version of the DuckHunt discord bot. Please see DHV4 instead. https://github.com/DuckHunt-discord/DHV4

Home Page: https://github.com/DuckHunt-discord/DHV4

License: GNU Affero General Public License v3.0

Python 3.09% HTML 0.19% PHP 0.14% Twig 0.40% CSS 0.33% SCSS 0.20% JavaScript 95.65%
game discord-bot discord api api-server api-client rest-api text-based duck-hunt text-game

dhv3's Introduction

⚠️ DEPRECATED ! ⚠️

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️


DuckHunt-Discord

Un super bot pour discord. idée du jeu par MenzAgitat, porté selon son idée (http://scripts.eggdrop.fr/details-Duck+Hunt-s228.html)

Qu'est-ce que c'est ?

Le but du jeu est de tuer les canards dès que vous les voyez ! C'est un peu un fps, mais pour discord :°)

Ou est l'aide du bot ?

Elle se trouve ici :

https://github.com/DuckHunt-discord/DuckHunt-Discord/wiki/Aide

Comment avoir le bot sur son serveur ?

Deux moyens :

J'ai besoin d'aide, que faire ?

Ouvrez une issue !

Des badges ?

Code Issues

Licence

	Cette création est mise à disposition selon le Contrat
	Attribution-NonCommercial-ShareAlike 3.0 Unported disponible en ligne
	http://creativecommons.org/licenses/by-nc-sa/3.0/ ou par courrier postal à
	Creative Commons, 171 Second Street, Suite 300, San Francisco, California
	94105, USA.
	Vous pouvez également consulter la version française ici :
	http://creativecommons.org/licenses/by-nc-sa/3.0/deed.fr

dhv3's People

Contributors

chew avatar diagamma avatar imgbotapp avatar paris-ci avatar quantifiedcode-bot avatar taoshix avatar turtle1331 avatar ztoddw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dhv3's Issues

Ability to disable decoys / limit to only one decoy at a time

At the moment decoys are incredibly exploitable. We're using the DuckHunt bot in a (fairly competitive) discord channel for a large city subreddit. The ducks are set to sleep during local sleepytime to make it a bit more fair for the people who sleep during normal hours.

Right now I can wait until 4am and spawn 50 ducks using decoys and then kill them all myself while everyone is in bed. Even without a good clover, superducks make this highly worth it.

If we could limit decoys to allow only one spawning at a time it would make this much more of a pain to abuse; if not we'd really appreciate it if decoys could just be disabled entirely as a setting.

Malédiction du manchot

Vu sur IRC :

[17:19:07]  <@Boole>	Chouchoups38 > En fouillant les buissons autour du canard, tu trouves un parchemin portant le sceau de la CCCCC (Coalition Contre le Comité Contre les Canards) et comportant la Malédiction du Manchot : tu es devenu incapable de recharger ton arme mais tu peux encore tirer tant qu'il te reste des munitions chargées. L'effet dure 3h.

New hunting and animation system

Another bot produced an animation with the pictures editing commentary and changing place figures, The goal was a race. I figured you could do the same with this bot, Riding a landscape with figures, and making figure of the duck move in it every few seconds, then as a chessboard, the player would have to enter the coordinates of the house where the duck is, And with that it would have the chance to hit when firing, However if you enter the wrong coordinates of the house duck at that time, will have 100% chance of making mistakes.

I hope you have understood. I do not speak English, so I use a translator.

OperationalError

Salut,
Un canard venait d'apparaître sur le channel dédié au bot, j'ai tiré, et cette erreur est survenue.
J'ai épinglé les messages que je copie ici, je peux les retrouver si nécessaire.
Merci pour le bot aussi 👍

-...-''°-,,.-''° _ö< QUAAK
Dragorn421 le seul et l'unique ! - Aujourd'hui à 20:56
!bang
!reload
DuckHuntBOT - Aujourd'hui à 20:56
@Dragorn421 le seul et l'unique ! > ❌ Une erreur (OperationalError) est survenue dans la commande bang, voici le traceback :
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)

File "/home/duckhunt/cogs/shoot.py", line 116, in bang
scores.addToStat(message.channel, message.author, "balles", -1)

File "/home/duckhunt/cogs/utils/scores.py", line 46, in addToStat
updatePlayerInfo(channel, dict_)

File "/home/duckhunt/cogs/utils/scores.py", line 33, in updatePlayerInfo
table.upsert(info, ["id_"])

Malheureusement, j'ai besoin des permissions add_reactions et create_instant_invite pour envoyer un rapport d'erreur !
@Dragorn421 le seul et l'unique ! > ❌ Une erreur (OperationalError) est survenue dans la commande reload, voici le traceback :
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)

File "/home/duckhunt/cogs/shoot.py", line 269, in reload
scores.addToStat(message.channel, message.author, "unneeded_reloads", 1)

File "/home/duckhunt/cogs/utils/scores.py", line 46, in addToStat
updatePlayerInfo(channel, dict_)

File "/home/duckhunt/cogs/utils/scores.py", line 33, in updatePlayerInfo
table.upsert(info, ["id_"])

Malheureusement, j'ai besoin des permissions add_reactions et create_instant_invite pour envoyer un rapport d'erreur !
Dragorn421 le seul et l'unique ! - Aujourd'hui à 20:56
:/
!bang
DuckHuntBOT - Aujourd'hui à 20:58
@Dragorn421 le seul et l'unique ! > ❌ Une erreur (OperationalError) est survenue dans la commande bang, voici le traceback :
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)

File "/home/duckhunt/cogs/shoot.py", line 116, in bang
scores.addToStat(message.channel, message.author, "balles", -1)

File "/home/duckhunt/cogs/utils/scores.py", line 46, in addToStat
updatePlayerInfo(channel, dict_)

File "/home/duckhunt/cogs/utils/scores.py", line 33, in updatePlayerInfo
table.upsert(info, ["id_"])

Malheureusement, j'ai besoin des permissions add_reactions et create_instant_invite pour envoyer un rapport d'erreur !

Level-role assignments

The title says it: An option to assign roles for players, when reaching a defined level.

Greetings,
Kirill

/tts Option ?

Could it be possible to add a !TTS option that would enable a TTS "COUACK" ?

!tts_enable true or false maybe ?

Thank you

Change !shop to allow bulk purchase

Pretty much as the title says.
As the extra parameter (for the items it makes sense for, like clips or bullets), players should be able to give a positive non-zero integer for a bulk purchase (e.g. !shop 2 2 buys 2 clips)

New argument for !coin

An additional argument to "!coin", like "!coin #channelname" or similar would do that.
Why I find it useful, you may ask... Well, when you want to surprise some users on that channel or make a special or give them some extra ducks, you cannot do that without a message from yourself right before the duck message, so it would be better to hide that and bring some coins in from a different (in my case private) channel.

Sleeping ducks

Il faudrait ajouter la possibilité de spécifier des heures durant lesquelles les canards dorment.

Suggestion: Vary duck-kill onomatopoeia variants based on ammo type

Guess we are all familiar to

:skull_crossbones: BOUM You killed the duck...

messages.

Though, it recently came to my mind that it could be neat to have variants for the BOUM sound depending on the type of ammo used.

Why?
First of all, regular ammo would certainly make a different sound in reality as compared to explosive ammo, so it would make sense, in a way. Secondly, looking at the amount of randomization put into the duck spawn messages etc, it seems a bit simplistic to only ever see just one single type of killing sound throughout your whole duck hunting career.

Nothing too important, but nothing too difficult to implement either, I suppose.

Match any command case

!shop = !Shop = !sHop etc...
Peu importe la façon dont c'est écrit du moment que c'est shop faudrait que la commande soit validée

Sell trash you can find in bushes

It would be nice to be able to sell everything we can find in bushes for a few exp bonus

  • Add setting : min_exp_sell_trash (int, default=0)
  • Add setting : max_exp_sell_trash (int, default=3)
  • Add column : exp redeemable (int) (@Diagamma)
  • Add a new subcommand to shop : !shop sell to redeem exp

Renommer emoji_ducks en custom_ducks

Étant donné qu'on peut utiliser n'importe quoi pour emoji_used, je propose de les renommer respectivement custom_ducks et custom_duck_used. C'est plus clair, et ça donnera un plus grand sentiment de personnalisation (marketing à l'arrache tmtc).

Buying individual bullets vs magazines is a trivial decision

The way the system is setup right now it is a purely mathematical decision if you want to buy individual bullets or whole magazines. This is not engaging, the optimal choice is always obvious.

If bulletPrice*bulletsPerMagazine>magazinePrice buy the magazine, otherwise buy individual bullets. Per the current progression table and shop prices, this holds up until level 26 where bulletsPerMagazine becomes one. Even someone bad at math can do the comparison correctly here.

Traduction manquante (je pense)

Dans l'affichage de duckstats, lorsqu'on a acheté des munitions explosives, le temps restant est affiché en anglais apparemment :

image

J'ai regardé dans le code, il ne semble pas que la chaine soit i18n

Système de guilde

Un système de guilde avec possibilité pour le créateur de recruter des gens dans sa guilde, avec l'impossibilité de saboter des membres de sa guilde. On pourrait voir le top des guildes dans le !top avec une réaction à droite des flèches. Pour le coût de création de guilde, entre 500 et 1000 exp.

Peut être un magasin de guilde et le créateur pourrait choisir une "imposition" en % qui irait dans une caisse de guilde pour acheter des bonus, l'imposition prendrait l'exp qu'on gagne (Genre 20%, si on tue un canard à 10exp on en a plus que 8 et 2 vont dans une caisse de guilde). Je sais pas vraiment ce qu'on pourrait acheter ça viens de me passer à l'esprit

Onomatopoeia problems

Various of the onomatopoeia do not fit in various languages, here are my suggestions:

English:
BOUM -> BOOM
Duck cries: quack, waak, wak

German:
BOUM -> BUMM
Duck cries: quak

Spanish:
BOUM -> PUM
Duck cries: cua

Give balance to user on successful shop buy

  • By any chance could you make it so when you buy somehting it tells you the balance?
  • Also the ablity to have a separate channel for buying things so the hunting channel isn't flooded with people buying stuff,
  • with an inventory system to store items until they are needed.

These would really improve the game alot.

Les canards mutants débarquent !

-SYNOPSIS

Journal audio du Dr.Matrolf Ducker
20/04/1889 à 03:24: Après maintes tentatives de clonages et de mutations génétique, j'ai finalement réussi à obtenir des résultats qui étaient au-dessus de toutes mes attentes. L'expérience 327 a été un succès total de fait par son ADN qui est des plus stables, j'ai donc immédiatement lancé le protocole A.R.M.Y avec pour modèle le génome de l'expérience 327. À l'heure où j'enregistre ce journal audio, je ne saurais dire le nombre de canards mutant qui sont en train de se développer mais je suis certain que cette avancée biologique est un petit pas pour l'homme et un grand pas pour l'humanité. Allons voir ensemble les capacités révolutionnaire de notre premier succès. "OUVERTURE DU SAS DE PROTECTION" Le canard s'approche tout doucement, pas de signes remarquables. Une minute mais qu'est-ce que c'est que ça ? Le canard mutant ne se comporte pas de la façon attendue, il possède de très grandes griffes et ... AAAAH MON OEIL, IL EST DANGEREUX JE DOIS ARR... biiiiiiiiiip CRRRROAK ROAK ROAK ROAK !

-EXPLICATIONS

-> Introduction des canards mutant (CM) avec un taux de drop un peu supérieur aux Supers Canard.
-> Les CM n'attaquent QUE les 10 meilleurs joueurs du canal aléatoirement en leur volant des points d'expérience.
-> Un CM commence à attaquer dès lors qu'il apparaît, et ne s'arrête que quand il est tué ou s'en va.
-> Un CM attaque à intervalle de 10 secondes et vole entre 10 et 20 points d'expérience à chaque attaque.
-> Un CM de base vaut 0 points d'expérience, mais commence à voler des points d'expérience aux joueurs dès son entrée sur le canal. Celui qui tue le CM récupère alors tous les points d'expérience que le CM a volé aux joueurs.
-> Comme pour les Supers Canard, les CM ont entre 3 et 7 points de vie par défaut.
-> La présence du chromosome R dans l'ADN des CM fait qu'ils crient comme les canards mais avec un "R" : "CROAK" ; "CROIN"

Aiming system

i have a idea for aiming for example when there is a duck bot sends a pic of sky devided in 10 or 8 idk then puts a duck pic in one of those parts if duck its in party 3 we send !bang 3

Duckstats addition

It would be useful to see how much exp you need to get to level up; say if you set x level as a goal, you can use that as a tracker and use some basic math to see how many ducks you have to kill before leveling up.

  • I'm submitting a ...
    • bug report
    • feature request
    • something else/not sure

Les canards n'apparaissent plus (timer figé ?)

Salut !

Cet après midi j'ai remarqué avec un autre que les canards ont cessé d'apparaître dans le channel dédié au bot, donc je fais !help et l'autre !ping pour voir si le bot est en ligne, pas de problème.
Un !bang trouve un canard, et en effet d'après les derniers messages du bot un canard devrait être présent. Il s'agissait d'un supercanard et une fois tué plus aucun canard n'était là.

Les logs concernés https://pastebin.com/Gptr5wZm

Comme on le voit la limite est de 100 canards par jour donc ce n'était pas le problème, et le bot semble avoir arrêté d'envoyer des messages après 10:30 ce matin (16/06)

Je ne sais pas qui héberge le bot, je crois bien que c'est le bot "officiel" (vous) :) (son id 187636089073172481)

Ma théorie c'est qu'un timer quelconque a été stoppé ou a planté puisque que le canard ne semble pas avoir disparu après plusieurs heures et aucun n'est apparu.

Rework "Sight" functionality

Current Situation

  • At the moment, the sight increases the accuracy of a single shot by ((100% - current accuracy) / 3), and costs 6 XP. This makes the sight kind of useless right now, in general.

  • But besides the cost/reward imbalance, sight has the general issue of being not much use in higher levels at all, while having (in comparison) a rather large effect in lower levels, which might make it hard to balance it globally - unless the duration (either in time or shots) of a sight varies depending on the hunter level.

Proposal

  • The sight's effect should generally last for more than just a single shot. At a cost of 6 XP, probably about 4-5 shots (ignoring the (low) possibility of superducks) would be required to make the expected outcome of using a sight vs not using a sight positive even for very low level hunters which profit the most from the sight's effect due to their low regular accuracy. However, for higher-level hunters, the benefits of sight shrink dramatically as their base accuracy increases (see https://api-d.com/snaps/progression_table_en.html).

Example: A level 4 hunter at 58% accuracy would gain (100-58)/3 = 42/3 = 14% accuracy, i.e. would have 58% "vanilla" accuracy VS 58+14 = 72% accuracy with sight.
XP gained with sight after N shots would be: N * 0.72 * 10 - N * 0.28 * 1 - sightXPCost;
XP gained without sight after N shots would be: N * 0.58 * 10 - N * 42 * 1;
At a cost of 6 XP for a sight, the advantage of sight is: 1.4 * N + 0.14 * N - 6, so the break even point is at N = 6 / 1.54 = 3.896... that means at least 4 shots have to be affected by sight for the sight's benefit to be non-negative (ignoring clover and super duck effects).

A level 14 hunter at 74% accuracy would gain (100-74)/3 = 26/3 = 8.7% accuracy, and according to the formulas above would need N = 6 / (0.87+0.887) = 6 / 0.957 = 6.270... i.e. minimum 7 shots affected by sight in order to have a non-negative XP outcome from using a sight.
A level 24 hunter at 84% accuracy would gain 16/3 = 5.3% accuracy, and need N = 6 / (0.53+0.053) = 6/0.583 = 10,291... i.e. minimum 11 shots affected by sight in order to have a non-negative outcome from using a sight.
A level 34 hunter at 94% accuracy would gain 6/3 = 2% accuracy, and need N = 6 / 0.22 = 27.272... i.e. minimum 28 shots affected by sight in order to have a non-negative outcome from using a sight.
A level 41 hunter at 98% accuracy would gain 2/3 = 0.7% accuracy, and need N = 6 / 0.077 = 77.922... i.e. 78 shots affected by sight in order to have a non-negative outcome from using a sight.

  • One idea to fix the issue of sights being obsolete in higher level could be some sort of "durability" for the sight, with the sight getting "damaged" somehow (losing durability) whenever preventing a miss, and not getting damaged when not preventing a miss.
    That way, lower level hunters (who naturally would miss more often) would damage their sight more quickly, while higher level hunters would only rarely damage their sight as they rarely miss without a sight.
    Then, the sight would have greater effect per shot for lower levels, but also a shorter lifetime (in shots), and on higher levels it would have a longer lifetime (in shots) with a lesser effect per shot.

Reasoning
Besides the general buff to the sight's effect duration which is required to make the sight any use at any level at all, especially the durability concept provides benefits over the current way sights work.

With this mechanic change, it would be possible to balance the cost-reward-ratio of the sight for all levels a lot more easily, and the sight would be useful on a much wider level range.

Only misfire onto present users

When you miss and hit another user, you can hit some random dude who has never showed up for months.

As such, there is a large chance of the event not having the full impact it is meant to have.

As a solution, only pick from currently online users to give a higher chance of the event having the impact it is meant to have.

WIki/GitHub missing installation guide, also suggesting a credentials_example.json

The wiki page has nothing for the installation guide and the github page also has nothing. As it is, if a user wished to self-host the bot, it wouldn't really be possible with the given information.

Let's throw a credentails_example.json in here, and fix up the installation guide on the wiki or put one here

Bless and good vibes with you! Sorry for opening this on the wrong version

Detect typos in issued commands

Sometimes commands are typed in a hurry and typos result. It'd be interesting if typos were detected and reacted to.

For example, if you typo the !bang command, the shot could fire way off the mark.

Shooting other players (hunting accidents) is unbalanced, especially for new players.

Current Situation

  • The cooldown until you get your weapon back is currently up to 24 hours (you are eligible to receive your weapon back at midnight UTC).
  • The cost of getting your weapon back before then is 40 exp.
  • You are completely incapable of playing if you do not have your weapon.

This results in the following:

  1. New players with under 43 exp cannot play for up to 24 hours. Since the players are new and don't have an investment in the game, they will loose interest quickly.
  2. Players with a lot of exp (500+) are not affected by these events anymore. They can simply buy back their gun at any time. This - in the long term - makes the game boring.
  3. Even if a player chooses not to buy back their gun - 24 hours is a long time.

Suggested Fixes

  • Make buying back a gun cost a certain percentage of exp instead. This would allow anybody to buy back their gun at any time, but if it costs a lot, it might discourage players (especially players that have a lot of exp). This allows for less linear gameplay.
  • Additionally, you could return the weapon at a shorter interval (say after 12h, or 8h). This would encourage players to not simply buy back their gun if the price is too high for their liking.

Canards explosifs

Ils ont une sale tendance à exploser les armes de quelques chasseurs... Oops

Random events

(Thanks to <@248904069840764938> boshaus#3796 for the idea)
Random event days :

  • Ducks are migrating: 2x ducks for next 24h.
  • Foggy Weather: increased delay to 5s.
  • A medical waste company dumped steroids into the lake: 25% of ducks are super ducks.

!top types

Hello,

I was thinking about the possibility of providing more with the !top command.

For instance :

  • "!top missed [n]" the top n players accounting for missed duck stat
  • "!top ghost [n]" the top n players accounting for no duck shots
  • "!top time [n]" the top n players accounting for minimal shot time
  • "!top ratio [n]" the top n players accounting for exp/kills ratio

Maybe more data are accessible ...

This is purely cosmetics ;)

Manipulate others

Could you implement something to delete messages like !shop 17 from the channel? It's no secret at the moment if you want to manipulate others.

!top is crashing

When I do !top I've this weird (and incomplete?) error message.

  File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 50, in wrapped
    ret = yield from coro(*args, **kwargs)

  File "/home/duckhunt/cogs/exp.py", line 214, in top
    await self.bot.add_reaction(message, first_page_emo)

  File "/usr/local/lib/python3.6/dist-packages/discord/client.py", line 956, in add_reaction
    yield from self.http.add_reaction(message.id, message.channel.id, emoji)

  File "/usr/local/lib/python3.6/dist-packages/discord/http.py", line 133, in request

Do you know where it come from? The bot is not self-hosted and have the permission to add a reaction btw.
And if you don't, I think I'm gonna search and PR a fix.

Intégrer la liste des items du shop au bot

Possible de le faire dynamiquement en récupérant la docstring des méthodes et en listant les items avec group.commands.
Mais faudra améliorer les docstrings et en plus elles sont qu'en anglais. :/
Sinon on peut faire un .json avec les items du shop, leur nom, leur desc et leur prix, comme ça non seulement y'a pas le prob de la langue et en plus on peut garder une seule commande !shop ('fin avec un peu de bidouillage, surtout si on peut faire des méthodes un peu plus "abstraites" pour les items, genre une seule qui détecte le type du champ de la BDD etc).

J'veux bien ton avis @paris-ci.

Repair trash found in bushes

Issue #33 presents one way of dealing with the trash found in bushes, but some of it is broken versions of items you can buy. Let lucky people repair the stuff and get it for cheap.

Améliorer la doc pour self-host

Je sais bien qu'on supporte pas le self-hosting, mais je me sens sale vu la basse qualité de la doc mise à disposition. Faut faire un petit INSTALL.md, éventuellement remplir le wiki, et que je corrige les scripts de migration (et que j'en ajoute de nouveaux pour générer la BDD).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.