-# Todo:
-# - highest bidder leads
-# - show card after play
-
# Functions
function sp_init(cards, tmp0, tmp1)
{
bids = sp_bids[i] + sp_bids[i+2]
tricks = sp_tricks[i] + sp_tricks[i+2]
bags = tricks - bids
- if (sp_bags(i) + bags > 10) {
+ if (sp_bags(i) + bags >= 10) {
say(sp_team(i) " bag out")
sp_scores[i] -= 100
}
# Setup
-/^\.newgame ?([0-9]+)?$/ {
+/^\.newgame ?([0-9]+)?/ {
if (sp_state != "new") {
reply("There is already a game in progress.")
} else {
!sp_valid &&
(sp_state "bid" || sp_state == "play") &&
-/^\.(bid|play)\>$/ {
+/^\.(bid|play)\>/ {
if (FROM in sp_players)
say(".slap " FROM ", it is not your turn.")
else
sp_order[3] " took " int(sp_tricks[3]) "/" int(sp_bids[3]))
}
+(TO == NICK || DST == sp_channel) &&
/^\.(score|status)$/ {
if (sp_state == "new") {
say("There is no game in progress")
}
if (sp_state == "join") {
- say("Waiting for palyers: " \
+ say("Waiting for players: " \
sp_order[0] " " sp_order[1] " " \
sp_order[2] " " sp_order[3])
}