AmirRezaM75 / skullking

Online version of skull king board game
https://skullking.ir/
MIT License
21 stars 2 forks source link
board-game boardgame kenopsia online-game skullking

About Game

This program is a digital version of a board game that belongs to the original series of Grandpa Skull King.

Screenshot of Skull King online board game.

Skull King is a trick-taking game in which you will bid the exact number of tricks you predict you will win each round. You’ll battle with your rivals as you strive to keep your own bid afloat… while seizing opportunities to also sink your opponents! The pirate with the highest score at the end of the game wins and earns the title of Captain of the Seven Seas!

Cards

Suit Cards

Special Cards

Expansion Cards

Loot and Tigress cards are not implemented duo to complexity.

Rules

When a suit card is led

If a suit card is played first in a trick (lead), all players must ‘follow suit’and play that same suit (if they are going to play a numbered card). If you don’t have the suit that was lead, you may play any other suit.

When a special card is led

Leading with an escape

When an Escape is lead, the next player sets the suit that must be followed, unless they play one of these as well, which would defer setting the suit to the next player.

Leading with a character

When a Mermaid, Pirate, Skull King, Kraken, or White Whale leads a trick, there is no suit to follow for that trick. Each other player may play any card they choose.

Scoring

Bidding One or More

When you win the exact number of tricks that you bid, you are awarded 20 points for each trick taken. Capture more or fewer tricks than you bid, and you’ll lose 10 points for every trick you were off. You don’t earn points for any tricks captured that round.

Bidding Zero

Bid zero and get your bid correct and your potential score is 10 points times the number of cards dealt that round. However, if you bid zero and then take 1 or more tricks, you’ll lose 10 points per card dealt that round instead.

Bonus Points

The Number Fourteen Cards

Every 14 you have at the end of the round earns you a bonus, whether played by you or an opponent.

Character Cards

Capturing (taking) character cards will earn a bonus:

Setup

Production

Nginx

server
{
  listen 80;
  server_name api.skullking.ir;
  return 301 https://$host$request_uri;
}

server {
  listen 443 ssl;
  ssl_certificate /etc/letsencrypt/live/skullking.ir/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/skullking.ir/privkey.pem;
  server_name api.skullking.ir;

  location / {
    proxy_pass http://127.0.0.1:3002/;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }

  location /games/join  {
    proxy_pass http://127.0.0.1:3002$request_uri;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

    proxy_read_timeout 300;
    proxy_connect_timeout 300;
    proxy_send_timeout 300;
  }
}

Docker

docker compose -f docker-compose-production.yml up -d --build