init, basic structure, putting into a script for easy card builds
This commit is contained in:
59
cards/actions.json
Normal file
59
cards/actions.json
Normal file
@@ -0,0 +1,59 @@
|
||||
[
|
||||
{
|
||||
"Name": {
|
||||
"en": "Nil"
|
||||
},
|
||||
"Description": {
|
||||
"en": "All players must immediately play a Stance card."
|
||||
},
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
"en": "Curiosity"
|
||||
},
|
||||
"Description": {
|
||||
"en": "All players holding at least one Betrayal must raise their hands. You may swap any held Stance of yours for a Betrayal of their choice."
|
||||
},
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
"en": "Cacophony"
|
||||
},
|
||||
"Description": {
|
||||
"en": "All players must immediately reveal their Cacophony cards. If there are 3 or fewer other Cacophony cards revealed, gain that many points. Otherwise, discard all your Action cards."
|
||||
},
|
||||
"Copies": 5
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
"en": "Misery"
|
||||
},
|
||||
"Description": {
|
||||
"en": "All other players discard two Action cards. If Joy is in play, double this effect."
|
||||
},
|
||||
"Copies": 1,
|
||||
"Persistent": true
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
"en": "Joy"
|
||||
},
|
||||
"Description": {
|
||||
"en": "You may play two Action cards immediately. If Misery has been played this round, you may play three Action cards immediately instead."
|
||||
},
|
||||
"Copies": 1,
|
||||
"Persistent": true
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
"en": "Implosion"
|
||||
},
|
||||
"Description": {
|
||||
"en": "Cancel the effects of another player's Action."
|
||||
},
|
||||
"Copies": 1,
|
||||
"Instant": true
|
||||
}
|
||||
]
|
||||
32
cards/finals.json
Normal file
32
cards/finals.json
Normal file
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{
|
||||
"Name": {
|
||||
"en": "Entropy"
|
||||
},
|
||||
"Description": {
|
||||
"en": "Cancel the effects of all Final cards this round."
|
||||
},
|
||||
"Copies": 1,
|
||||
"Priority": 0
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
"en": "Cursed Deck"
|
||||
},
|
||||
"Description": {
|
||||
"en": "Swap two played Stances between any two players other than yourself."
|
||||
},
|
||||
"Copies": 1,
|
||||
"Priority": 1
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
"en": "Stoic Hymnal"
|
||||
},
|
||||
"Description": {
|
||||
"en": "Your Stances cannot be changed by any future Final effects this round."
|
||||
},
|
||||
"Copies": 1,
|
||||
"Priority": 2
|
||||
}
|
||||
]
|
||||
11
cards/missions.json
Normal file
11
cards/missions.json
Normal file
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"Name": {
|
||||
"en": "Masochism Tango"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If you are Betrayed while trying to Bargain three times in a single round, +8 points."
|
||||
},
|
||||
"Copies": 1
|
||||
}
|
||||
]
|
||||
42
cards/stances.json
Normal file
42
cards/stances.json
Normal file
@@ -0,0 +1,42 @@
|
||||
[
|
||||
{
|
||||
"Name": {
|
||||
"en": ""
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +3 points. If played against a Betrayal, -1 point."
|
||||
},
|
||||
"Type": "Bargain",
|
||||
"Copies": 20
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
"en": ""
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +2 points."
|
||||
},
|
||||
"Type": "Betrayal",
|
||||
"Copies": 20
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
"en": "Symbiosis"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +3 points, and an addition +2 points to both players. If played against a Betrayal, -1 point."
|
||||
},
|
||||
"Type": "Bargain",
|
||||
"Copies": 1
|
||||
},
|
||||
{
|
||||
"Name": {
|
||||
"en": "Excommunication"
|
||||
},
|
||||
"Description": {
|
||||
"en": "If played against a Bargain, +4 points. This card must be played face-up."
|
||||
},
|
||||
"Type": "Betrayal",
|
||||
"Copies": 1
|
||||
}
|
||||
]
|
||||
3
go.mod
Normal file
3
go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module github.com/yxzzy-wtf/conspiracy-card-game
|
||||
|
||||
go 1.18
|
||||
3
i18n/en.json
Normal file
3
i18n/en.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
||||
70
main.go
Normal file
70
main.go
Normal file
@@ -0,0 +1,70 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
)
|
||||
|
||||
type Card struct {
|
||||
Name map[string]string
|
||||
Description map[string]string
|
||||
Copies int
|
||||
}
|
||||
|
||||
type Action struct {
|
||||
Card
|
||||
Instant bool
|
||||
Persistent bool
|
||||
}
|
||||
|
||||
type Mission struct {
|
||||
Card
|
||||
}
|
||||
|
||||
type Stance struct {
|
||||
Card
|
||||
Type string
|
||||
BetrayBetray int
|
||||
BargainBargain int
|
||||
BetrayBargain int
|
||||
BargainBetray int
|
||||
}
|
||||
|
||||
type Final struct {
|
||||
Card
|
||||
Priority int
|
||||
}
|
||||
|
||||
func main() {
|
||||
a, _ := os.Open("cards/actions.json")
|
||||
defer a.Close()
|
||||
dec := json.NewDecoder(a)
|
||||
actions := []Action{}
|
||||
if err := dec.Decode(&actions); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
s, _ := os.Open("cards/stances.json")
|
||||
defer s.Close()
|
||||
dec = json.NewDecoder(s)
|
||||
stances := []Stance{}
|
||||
if err := dec.Decode(&stances); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
f, _ := os.Open("cards/finals.json")
|
||||
defer f.Close()
|
||||
dec = json.NewDecoder(f)
|
||||
finals := []Final{}
|
||||
if err := dec.Decode(&finals); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
m, _ := os.Open("cards/missions.json")
|
||||
defer f.Close()
|
||||
dec = json.NewDecoder(m)
|
||||
missions := []Mission{}
|
||||
if err := dec.Decode(&missions); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user