mirror of
https://github.com/wr34k/IRCUFC.git
synced 2024-11-21 23:16:38 +00:00
Fixing stuff + readme
This commit is contained in:
parent
69c7df50ec
commit
2e6e55a499
39
README.md
39
README.md
@ -1 +1,38 @@
|
||||
# IRCUFC
|
||||
# IRCUFC
|
||||
WORK IN PROGRESS
|
||||
|
||||
IRC Game to let chatters having UFC like fights.
|
||||
|
||||
|
||||
Connect to #IRCUFC @ Efnet and type !fight to register to the next fight
|
||||
|
||||
|
||||
once 2 fighters will be registered, you'll reveice a list of actions possible for you to do in the next turn.
|
||||
|
||||
To register an action for the next turn, simply use !action following by the action (ex: !action kick high)
|
||||
|
||||
Once a fighter have no hp left, the fight is over.
|
||||
|
||||
|
||||
|
||||
|
||||
If both fighters are attacking at the same time, then the one who will hit is random. There's still an slight advantage to the last player having hit.
|
||||
|
||||
using 'block' will greatly increase the chance of blocking a hit. be careful though, if for instance you block high and your opponent attacks you low or middle, you'll have 100% chance of taking the hit. If you succeed to block a hit, you'll take the advantage for the next turn.
|
||||
|
||||
|
||||
There's a chance for fighters to fall down. In this case, hits will be much less powerful, and your opponent will do huge damage. You'll have to use the 'standup' action in order to .. stand up :) This action will make you vulnerable to a hit.
|
||||
|
||||
|
||||
TODO LIST:
|
||||
Fix shitty code (!!!)
|
||||
Add better output (Colors, formatting)
|
||||
Add submissions
|
||||
Add more strikes? (Superman punch, spinning kicks)
|
||||
Add ascii art to display at each turn
|
||||
|
||||
IDEAS:
|
||||
Add a betting system, where spectators can bet for the next fight
|
||||
Add XP system, where each fight let you get stronger / more resistant / get more moves
|
||||
|
||||
|
||||
|
2
fight.py
2
fight.py
@ -26,7 +26,7 @@ class Fight(object):
|
||||
self.fighters += [nick]
|
||||
|
||||
if len(self.fighters) == 2:
|
||||
self.IRC.privmsg(self.IRC.channel, "Alright {}, {}, let's fight!".format(self.fighters[0], self.fighters[1]))
|
||||
self.IRC.privmsg(self.IRC.channel, "Alright. {}, {}, let's fight!".format(self.fighters[0], self.fighters[1]))
|
||||
self.state = 'fighters_ready'
|
||||
else:
|
||||
self.IRC.privmsg(self.IRC.channel, "Waiting for 2nd fighter...")
|
||||
|
@ -15,7 +15,6 @@ class Fighter(object):
|
||||
self.nextAction = None
|
||||
|
||||
self.advantage = False
|
||||
self.groundpos = None
|
||||
|
||||
self.first_time_lowhp = True
|
||||
|
||||
|
2
irc.py
2
irc.py
@ -9,7 +9,7 @@ from ircReload import recompile
|
||||
from ircCommands import IrcCommands
|
||||
|
||||
|
||||
server = 'irc.servercentral.net'
|
||||
server = 'irc.underworld.no'
|
||||
port = 9999
|
||||
channel = ('#IRCUFC', None) # (chan, key)
|
||||
use_ssl = True
|
||||
|
@ -62,18 +62,16 @@ class IrcCommands(object):
|
||||
if self.fight.state == 'fighters_ready':
|
||||
self.fight.startFight()
|
||||
|
||||
else:
|
||||
if cmd == 'status':
|
||||
self.fight.getStatus(chan)
|
||||
|
||||
|
||||
if self.fight.state == 'waiting_fighters_action':
|
||||
elif self.fight.state == 'waiting_fighters_action':
|
||||
if cmd == 'action':
|
||||
if chan != self.IRC.channel:
|
||||
self.fight.set_next_action(nick, args)
|
||||
else:
|
||||
self.IRC.privmsg(self.IRC.channel, "{}".format(self.IRC.mirc.color("Not here retard your opponent can see your next move!", self.IRC.mirc.colors.LIGHTRED)))
|
||||
|
||||
else:
|
||||
if cmd == 'status':
|
||||
self.fight.getStatus(chan)
|
||||
|
||||
self.IRC.flood_flag[chan] = False
|
||||
self.IRC.flood_count[chan] = 0
|
||||
|
6
log.py
6
log.py
@ -63,15 +63,15 @@ class Log(object):
|
||||
return "".join(a for a in args)
|
||||
|
||||
def info(self, msg):
|
||||
if not self.debug:
|
||||
if self.debug:
|
||||
self.func( self.construct( "[", self.colors.fg.LIGHTGREEN, "*", self.colors.fg.DEFAULT, "] ", msg ) )
|
||||
|
||||
def warn(self, msg):
|
||||
if not self.debug:
|
||||
if self.debug:
|
||||
self.func( self.construct( "[", self.colors.fg.LIGHTYELLOW, "!", self.colors.fg.DEFAULT, "] ", msg ) )
|
||||
|
||||
def error(self, msg, exception=None):
|
||||
if not self.debug:
|
||||
if self.debug:
|
||||
self.func( self.construct( "[", self.colors.fg.LIGHTRED, "x", self.colors.fg.DEFAULT, "] ", msg ) )
|
||||
if exception:
|
||||
self.func( self.construct( "[", self.colors.fg.LIGHTRED, "x", self.colors.fg.DEFAULT, "] ", str(exception) ) )
|
||||
|
Loading…
Reference in New Issue
Block a user