Coder Social home page Coder Social logo

dongerdong's People

Contributors

greykiteshield avatar mtfd avatar polsaker avatar tonyravioli avatar vgr255 avatar

Stargazers

 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  avatar

dongerdong's Issues

Some kind of weapon system

It's time to overcomplicate the game:
We could add some kind of weapon/shield system, assigning a random kit to every player when they !accept

Quoting Mithadon:

1 handed sword goes with shield so you have a chance to block but the sword is weaker than long sword, axe has a bigger variation from lowest to highest dmg dealt

except keyboardinterrupt on break

while dongerdong.irc.connected == True:
    time.sleep(1) # Infinite loop of awesomeness

to:

while dongerdong.irc.connected == True:
    try:
        time.sleep(1) # Infinite loop of awesomeness
    except KeyboardInterrupt:
        say some witty thing to chan
        print "exit due to keyboard interrupt" to stdout
        exit with error code 0

Allow user to fight bot

Create functionality for the bot to fight the user, !healing itself and !hitting the other player depending on probabilities. If it loses, bot should kick itself after (if possible) and rejoin automatically.

Timeout handler

Restart or reconnect bot if a ping request isn't heard from server after a certain amount of time. Useful for places like my server, where apparently it loses connection every night.

!ping

Create a !ping feature to allow bot to /ping the requesting user, and have bot output ping result back to user.

<user> !ping
<bot>  user: 0.577 seconds

Exception thrown when you ask for stats for an account name rather than a nick

Log:

DEBUG:bearded-potato-donger:command: pubmsg, source: ravioli!~ravioli@unaffiliated/ravioli, target: #donger, arguments: ['!stats MRX']
Unhandled exception in thread started by <bound method Donger._pubmsg of <__main__.Donger object at 0x22ee610>>
Traceback (most recent call last):
  File "./dongerdong.py", line 374, in _pubmsg
    if cli.channels[ev.target.lower()].users[nick.lower()].account != None:
KeyError: 'mrx'

What's up with that "!= None" thing? I don't even know what that line's doing.

Dongcoin values and functionality

I'm thinking...

  • 5 for a win in 1v1
  • 2 for each kill in a game with more than two players
  • 10 for a deathmatch win

Betting:

player1>!fight player2
player2>!accept player1
(intro to match)
PLACE BETS NOW
(sleep for 10 seconds while
players /msg dong bets:
    /msg dong !bet 20 on player1
dong announces bets as they come in)
FIGHT ascii
(betting closes on first !hit)

if no opposing bets are placed:
    cancel bets
else:
    calculate percentages of bets placed by multiple people on each player (i.e. on player 1: polsaker 60% of bet, ravioli 20% of bet, otherperson 20% of bet)
    use lowest total (so if there's 10 coin on player2 and 50 coin on player1, max payout (total) for all players is 10)

at the end of the fight, payout depending on percentages. so in the above example, if player1 wins, polsaker gets 6 coin, ravioli gets 2, and otherperson gets 2.

akick won't work in this sceneraio.

In #donger on freenode, User rotta666 and I have been doing deathmatches, and we both recieve instakills. After getting kicked, we were able to rejoin the channel, which i found odd, since it was a deathmatch. Upon closer inspection, it appears as though it is because akick doesn't work on +r (registered) users. However, it still bans just fine on deathmatches with no instakill. If you would like to assign this issue to me I would be more than happy to dig through my fork and find it.

Expire Old Bounties

Bounties that don't expire will pile up and become lost coins forever in purgatory and clutter up !wanted.
Time frames could be a few days or a few weeks.

nasty error

Traceback (most recent call last):
  File "./dongerdong.py", line 201, in _pubmsg
    self.fight(cli, self.pending[ev.splitd[1]], ev.splitd[1], self.deathmatch)
  File "./dongerdong.py", line 697, in fight
    self.prefight()
TypeError: fakeprefight() takes exactly 1 argument (0 given)

why isn't it passing self? that's odd

Connection error?

I'm at work and can't troubleshoot right this second, but trying to run dongerdong, here's the output:

DEBUG:peewee:('SELECT name FROM sqlite_master WHERE type = ? ORDER BY name;', ('table',))
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused
INFO:bearded-potato-donger:Connecting to irc.freenode.net:6667
ERROR:bearded-potato-donger:Couldn't connect to irc.freenode.net:6667: [Errno 111] Connection refused

Create a system for modular scripts

For instance, a folder called scripts, with a file like jaden.py. A user calls !jaden, which isn't a command specified in the main dongerdong.py script, but IS defined in that jaden.py file.

More deathmatch glitches

09:42 (      challenger ) !deathmatch newb 
09:42 (@     dong ) newb: challenger has challenged you to a deathmatch. The loser will be bant for 20 minutes. To accept, use '!accept challenger'
09:42 (   me ) wait wait...
09:42 (   me ) hold up
09:42 (   me ) !stats newb
09:42 (@     dong ) There are no registered stats for newb
09:43 (   me ) challenger: just do regular !fight
09:43 (      challenger ) :|
09:43 (   me ) don't wanna kill him on first fight, eh?
09:43 (      challenger ) !fight newb 
09:43 (@     dong ) newb: challenger has challenged you. To accept, use '!accept challenger'
09:43 (      challenger ) !stats
09:43 (@     dong ) challenger's stats: 16 wins, 1 easy wins, 16 losses, 0 coward quits, 0 idle-outs, 3 !praises, 21 fights started, accepted 10 fights (31 total 
                    fights), 167 !hits, 80 !heals, 4973HP of damage dealt and 5013 damage received. http://www.donger.org/stats/
09:43 (  newb ) !accept challenger 
09:43        dong ª set [+m] in #donger
09:43 (@     dong )    ___  _______ ________ ____  ______ _____________ __
09:43 (@     dong )   / _ \/ __/ _ /_  __/ // /  |/  / _ /_  __/ ___/ // /
09:43 (@     dong )  / // / _// __ |/ / / _  / /|_/ / __ |/ / / /__/ _  / 
09:43 (@     dong ) /____/___/_/ |_/_/ /_//_/_/  /_/_/ |_/_/  \___/_//_/  

!quit errors when no fight is in progress.

It should probably just do nothing when no fight is in progress.

Unhandled exception in thread started by <bound method Donger._pubmsg of <__main__.Donger object at 0x20aac10>>
Traceback (most recent call last):
  File "./dongerdong.py", line 208, in _pubmsg
    cli.mode(self.channel, "-v " + ev.source)
AttributeError: 'Donger' object has no attribute 'channel'

Stats Feature

Add feature to parse CSV located at http://ravio.li/donger/stats.txt. Should:

  1. Retrieve that list once, unless there have been no fights since stats were last retrieved (in that instance, use cached copy)
  2. Parse it to provide answers to these commands:
  • !leaderboard (or something like that) - spits out the three people with the most wins
  • !mystats (or something hopefully better) - spits out the user's wins vs losses.

Configurable bot owners with special permissions

Add configuration option in config.json for accounts which have owner permissions. We can use this to implement/allow special features like !flush to cancel all pending fights, or !cycle to restart the bot, for example.

"Owners" must be identified to services to be recognized.

Improve fight AI

Improve the bot's fight AI. It's currently too easy to beat the Supreme Dongerdong.

The bot must play fair.

Allow bot to provide different functions in a non-fight-channel environment.

Allow bot to join two channels:

  • fightchannel
  • anotherchannel

where functions in fightchannel are what we have now, and functions in anotherchannel include basic bot functions (weather, "botname!", etc.) in a plugin-based setup. For instance, dongerdong can use #donger as fightchannel and #crude as anotherchannel.

Ideally, bot can announce fights that are commencing in fightchannel, by telling anotherchannel. Bot will announce winners and losers at the conclusion of each fight, and the behavior of the bot can be configured by any user with ops in anotherchannel ("botname, stop", "botname, start").

Add verbose mode

Add verbose mode, enabled by:

!fight --verbose
or
!fight -v

Where verbose mode outputs all math on hits.

!accept <notarealnickname> causes dongerdong to say the person won?

DEBUG:bearded-potato-donger::[email protected] PRIVMSG #donger :!accept nope
DEBUG:bearded-potato-donger:command: pubmsg, source: [email protected], target: #donger, arguments: ['!accept nope']
Unhandled exception in thread started by <bound method Donger._pubmsg of <__main__.Donger object at 0x1e1ac10>>
Traceback (most recent call last):
  File "./dongerdong.py", line 131, in _pubmsg
    cli.channels[self.chan].users[ev.splitd[1]]
KeyError: 'nope'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./dongerdong.py", line 134, in _pubmsg
    del self.pending[ev.splitd[1]]
KeyError: 'nope'
DEBUG:bearded-potato-donger:TO SERVER: PRIVMSG #donger :Err... Maybe you meant to say !fight nope? They never challenged you.
DEBUG:bearded-potato-donger:TO SERVER: PRIVMSG #donger :Well... They were cowards... YOU WIN
DEBUG:bearded-potato-donger::ravioli!~ravioli@unaffiliated/ravioli PRIVMSG #donger :wtf

Nerf healing after a certain amount of heals

Cause the maximum heal to be negated by 8(?) hp every time someone uses !heal without using !hit. For instance, if a user just uses !heal for 3 turns in a row, the maximum heal will be 24 HP less than normal. Using !hit once(?) will reset that max heal HP.

Alter !top command to list based on kill-to-death

!top currently pulls people who have the most wins. It should order by kill-to-death ratio. Currently, if we had a user with 300 losses and 30 wins, they'd be considered the "top" player.

It should only include people who have participated in more than X fights (5? 10?) to prevent someone who has only 3 fights (2 wins, 1 loss) from dominating the leaderboard.

dongerdong can't handle switching accounts

Raw log

 PRIVMSG #donger :!fight rika
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+rika: heidemann has challenged you. To accept, use '!accept heidemann'
>> :rika!rika@trivialand/guesser/rika PRIVMSG #donger :+!accept heidemann
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong MODE #donger +m 
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+ __                         __  __  __                 
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+|__)||_/ /\   \  /     |__||_ ||  \|_ |\/| /\ |\ ||\ | 
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+| \ || \/--\   \/ .    |  ||__||__/|__|  |/--\| \|| \| 
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+RULES:
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+1. Wait your turn. One person at a time.
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+2. Be a dick about it.
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+ 
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+Use !hit [nick] to strike.
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+Use !heal to heal yourself.
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+Use !praise [nick] to praise to the donger gods (once per game).
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+Use '/msg dong !join' to join a game mid-fight.
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+ 
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+   _______________ ________
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+  / __/  _/ ___/ // /_  __/
<< PING LAG1430804161043
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+ / _/_/ // (_ / _  / / /   
>> :wolfe.freenode.net PONG wolfe.freenode.net :LAG1430804161043
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+/_/ /___/\___/_//_/ /_/    
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong MODE #donger +vv rika heidemann
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+It is rika's turn
<< PRIVMSG nickserv :identify rika 
>> :NickServ!NickServ@services. NOTICE heidemann :+You have been logged out of filicia.
>> :NickServ!NickServ@services. NOTICE heidemann :+You are now identified for rika.
>> :wolfe.freenode.net 396 heidemann trivialand/guesser/rika :is now your hidden host (set by services.)
>> :ChanServ!ChanServ@services. MODE #donger -v heidemann
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+  _________ _      _____   ___  ___ 
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+ / ___/ __ \ | /| / / _ | / _ \/ _ \
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+/ /__/ /_/ / |/ |/ / __ |/ , _/ // /
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+\___/\____/|__/|__/_/ |_/_/|_/____/ 
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+The coward is dead!
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong MODE #donger -m 
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong MODE #donger -v rika
<< PRIVMSG #donger :!fight dong
>> :rika!rika@trivialand/guesser/rika PRIVMSG #donger :+!fight dong
>> :dong!~dong@unaffiliated/ravioli/bot/dongerdong PRIVMSG #donger :+YOU WILL SEE

notice lack of reaction on << PRIVMSG #donger :!fight dong

Consolidate voice/devoice commands

Currently the bot issues one voice/devoice command per user, like this:

dong sets mode +v user1
dong sets mode +v user2

IRC supports this, which is much cleaner:

dong sets mode +vv user1 user2

!stats is broken

!stats doesn't pull anyone's stats anymore :(

!top still does.

Idles and quits should count as deaths...

...with the credit for the kill being awarded to the person's opponent (or the last person to hit them if it's multi-player). I think that's working now (giving easy wins), but they should be kicked as well (which isn't happening now).

Idles and quits in deathmatches should cause a bant (just like if they lost the normal way), but should also incur a fine of 10 dongcoins (to be given to the victor, along with the normal 10 coins for winning).

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.