Third Rate Duelist With A Fourth Rate Deck: The TG TCG, Part 2 (#54659)

Finally adds the ruleset to the TGC, allowing players to play the game (in a relatively provisional state).
Cards now have rules and keywords attached, as well as a proper system for displaying information in the sidebar (all the credit for this has to go to @ArcaneMusic, who also contributed a huge amount of the ruleset for the cards).
The full ruleset and keywords can be found here: https://tgstation13.org/wiki/Tactical_Game_Cards
This commit is contained in:
EOBGames
2021-01-06 12:16:58 -03:00
committed by GitHub
parent 019906b2e2
commit 5a72442dc8
7 changed files with 899 additions and 507 deletions
+5
View File
@@ -580,6 +580,10 @@
/atom/proc/get_examine_string(mob/user, thats = FALSE)
return "[icon2html(src, user)] [thats? "That's ":""][get_examine_name(user)]"
///Used to insert text after the name but before the description in examine()
/atom/proc/get_name_chaser(mob/user, list/name_chaser = list())
return name_chaser
/**
* Called when a mob examines (shift click or verb) this atom
*
@@ -591,6 +595,7 @@
/atom/proc/examine(mob/user)
. = list("[get_examine_string(user, TRUE)].")
. += get_name_chaser(user)
if(desc)
. += desc
+41 -14
View File
@@ -41,12 +41,38 @@ GLOBAL_LIST_EMPTY(cached_cards)
if(!temp)
return
name = temp.name
desc = temp.desc
desc = "<i>[temp.desc]</i>"
icon = icon(temp.icon)
icon_state = temp.icon_state
id = temp.id
series = temp.series
// This totally isn't overengineered to hell, shut up
/**
* Alright so some brief details here, we store all "immutable" (Think like power) card variables in a global list, indexed by id
* This proc gets the card's associated card datum to play with
*/
/obj/item/tcgcard/proc/extract_datum()
var/list/cached_cards = GLOB.cached_cards[series]
if(!cached_cards)
return null
if(!cached_cards["ALL"][id])
CRASH("A card without a datum has appeared, either the global list is empty, or you fucked up bad. Series{[series]} ID{[id]} Len{[GLOB.cached_cards.len]}")
return cached_cards["ALL"][id]
/obj/item/tcgcard/get_name_chaser(mob/user, list/name_chaser = list())
if(flipped)
return ..()
var/datum/card/data_holder = extract_datum()
name_chaser += "Faction: [data_holder.faction]"
name_chaser += "Cost: [data_holder.summoncost]"
name_chaser += "Type: [data_holder.cardtype] - [data_holder.cardsubtype]"
name_chaser += "Power/Resolve: [data_holder.power]/[data_holder.resolve]"
if(data_holder.rules) //This can sometimes be empty
name_chaser += "Ruleset: [data_holder.rules]"
return name_chaser
GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
/obj/item/tcgcard/attack_hand(mob/user)
@@ -87,9 +113,9 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
/obj/item/tcgcard/update_icon_state()
. = ..()
if(!flipped)
var/datum/card/template = GLOB.cached_cards[series]["ALL"][id]
var/datum/card/template = extract_datum()
name = template.name
desc = template.desc
desc = "<i>[template.desc]</i>"
icon_state = template.icon_state
else
@@ -155,11 +181,12 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
desc = "It's the back of a trading card... no peeking!"
icon_state = "cardback"
else
var/datum/card/template = GLOB.cached_cards[series]["ALL"][id]
var/datum/card/template = extract_datum()
name = template.name
desc = template.desc
desc = "<i>[template.desc]</i>"
icon_state = template.icon_state
flipped = !flipped
/**
* A stack item that's not actually a stack because ORDER MATTERS with a deck of cards!
* The "top" card of the deck will always be the bottom card in the stack for our purposes.
@@ -167,7 +194,7 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
/obj/item/tcgcard_deck
name = "Trading Card Pile"
desc = "A stack of TCG cards."
icon = DEFAULT_TCG_DMI_ICON
icon = 'icons/obj/tcgmisc.dmi'
icon_state = "deck_up"
obj_flags = UNIQUE_RENAME
var/flipped = FALSE
@@ -266,6 +293,7 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
final_card.zoom_out()
qdel(src)
/**
* The user shuffles the order of the deck, then closes any visability into the deck's storage to prevent cheesing.
* *User: The person doing the shuffling, used in visable message and closing UI.
@@ -281,6 +309,7 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
user.visible_message("<span class='notice'>[user] shuffles \the [src]!</span>", \
"<span class='notice'>You shuffle \the [src]!</span>")
/**
* The user flips the deck, turning it into a face up/down pile, and reverses the order of the cards from top to bottom.
*/
@@ -299,7 +328,7 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
/obj/item/cardpack
name = "Trading Card Pack: Coder"
desc = "Contains six complete fuckups by the coders. Report this on github please!"
icon = DEFAULT_TCG_DMI_ICON
icon = 'icons/obj/tcgmisc.dmi'
icon_state = "cardback_nt"
w_class = WEIGHT_CLASS_TINY
custom_price = PAYCHECK_ASSISTANT * 1.5 //Effectively expensive as long as you're not a very high paying job... in which case, why are you playing trading card games?
@@ -329,7 +358,6 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
/obj/item/cardpack/series_one
name = "Trading Card Pack: Series 1"
desc = "Contains six cards of varying rarity from the 2560 Core Set. Collect them all!"
icon = DEFAULT_TCG_DMI_ICON
icon_state = "cardpack_series1"
series = "coreset2020"
contains_coin = 10
@@ -337,7 +365,6 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
/obj/item/cardpack/resin
name = "Trading Card Pack: Resin Frontier Booster Pack"
desc = "Contains six cards of varying rarity from the Resin Frontier set. Collect them all!"
icon = 'icons/runtime/tcg/xenos.dmi'
icon_state = "cardpack_resin"
series = "resinfront"
contains_coin = 0
@@ -393,9 +420,9 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
qdel(src)
/obj/item/coin/thunderdome
name = "Thunderdome Flipper"
desc = "A Thunderdome TCG flipper, for deciding who gets to go first. Also conveniently acts as a counter, for various purposes."
icon = DEFAULT_TCG_DMI_ICON
name = "\improper TGC Flipper"
desc = "A TGC flipper, for deciding who gets to go first. Also conveniently acts as a counter, for various purposes."
icon = 'icons/obj/tcgmisc.dmi'
icon_state = "coin_nanotrasen"
custom_materials = list(/datum/material/plastic = 400)
material_flags = NONE
@@ -416,12 +443,12 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices)
/obj/item/storage/card_binder
name = "card binder"
desc = "The perfect way to keep your collection of cards safe and valuable."
icon = DEFAULT_TCG_DMI_ICON
icon = 'icons/obj/tcgmisc.dmi'
icon_state = "binder"
inhand_icon_state = "album"
lefthand_file = 'icons/mob/inhands/misc/books_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/books_righthand.dmi'
resistance_flags = FLAMMABLE
resistance_flags = FLAMMABLE //burn your enemies' collections, for only you can Collect Them All!
w_class = WEIGHT_CLASS_SMALL
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

+747 -386
View File
File diff suppressed because it is too large Load Diff
+106 -107
View File
@@ -11,12 +11,12 @@
"id": "xenoborg",
"name": "Xenoborg",
"desc": "With a mini-gun in one hand and a rocket launcher in the other, the Xenoborg is a failed hybridization of a Xenomorph and a cyborg.",
"rules": "Asimov, Hivemind",
"rules": "Asimov. Once per turn, you may sacrifice a silicon card, and pay the difference between that card's summon cost and this card's summon cost to summon this card from your hand.",
"icon_state": "xeno_borg",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 7,
"resolve": 5,
"faction": "Science",
"summoncost": 6,
"cardtype": "Creature",
"cardsubtype": "Silicon Xenomorph",
"rarity": "epic"
@@ -27,10 +27,10 @@
"desc": "The juices from a Sentinel's neurotoxin gland pair brilliantly with a Pan-Galactic Gargle Blaster.",
"rules": "Hivemind",
"icon_state": "xeno_sentinel",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 5,
"resolve": 3,
"faction": "Xeno",
"summoncost": 4,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "common"
@@ -39,12 +39,12 @@
"id": "drone",
"name": "Xenomorph Drone",
"desc": "Rarely seen on the frontlines, the Drone is your average worker that lays the foundation of the hive.",
"rules": "Hivemind",
"rules": "Hivemind. Tap this card: you may summon a Xeno faction creature for 1 less mana this turn.",
"icon_state": "xeno_drone",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 1,
"resolve": 1,
"faction": "Xeno",
"summoncost": 2,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "common"
@@ -53,12 +53,12 @@
"id": "hunter",
"name": "Xenomorph Hunter (Resin Frontier)",
"desc": "A rare strain of Hunter that prioritizes slaying prey over infecting them.",
"rules": "Hivemind",
"rules": "If this card destroys a creature via combat, you may discard a card in your hand to add a card from your discard pile to your hand, whose summon cost is 2 or less.",
"icon_state": "xeno_hunter",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 6,
"resolve": 3,
"faction": "Xeno",
"summoncost": 5,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "uncommon"
@@ -67,12 +67,12 @@
"id": "spitter",
"name": "Xenomorph Spitter",
"desc": "While their acid gland is too dangerous to mix with alcohol (not that it stops the marines), a Spitter's acid is useful for industry as it can melt almost anything with ease.",
"rules": "Hivemind",
"rules": "Hivemind. Tap this card: draw the top 2 cards of your deck, you may re-arrange their order, then return them to the top of your deck.",
"icon_state": "xeno_spitter",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 3,
"resolve": 3,
"faction": "Xeno",
"summoncost": 3,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "uncommon"
@@ -83,10 +83,10 @@
"desc": "Running fast and dying faster, the sheer number of Runner corpses from a battle are enough to keep a research facility busy for years.",
"rules": "First Strike, Hivemind",
"icon_state": "xeno_runner",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 2,
"resolve": 3,
"faction": "Xeno",
"summoncost": 3,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "common"
@@ -95,12 +95,12 @@
"id": "praetorian",
"name": "Xenomorph Praetorian",
"desc": "The Praetorian is the Queen's royal guard, never seen far from the Queen's chambers.",
"rules": "Hivemind",
"rules": "Hivemind. If you have 2 or more other Xeno cards on your field alongside this card, you may sacrifice 3 Xeno cards and add Xenomorph Queen to your hand from your deck.",
"icon_state": "xeno_praetorian",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 3,
"resolve": 6,
"faction": "Xeno",
"summoncost": 5,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "rare"
@@ -109,12 +109,12 @@
"id": "hivelord",
"name": "Xenomorph Hivelord",
"desc": "The Hivelord is the last word in construction, capable of building entire hives in a matter of seconds.",
"rules": "Hivemind. For two mana, tap this card and summon a 0/2 Resin Wall counter creature.",
"rules": "Hivemind. For two mana, tap this card and summon a 0/2 Resin Wall counter creature. Each Resin Wall has Blocker.",
"icon_state": "xeno_hivelord",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 1,
"resolve": 3,
"faction": "Xeno",
"summoncost": 3,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "rare"
@@ -123,12 +123,12 @@
"id": "boiler",
"name": "Xenomorph Boiler",
"desc": "The Boiler is a long-range artillery machine, capable of spewing clouds of acid that melt everything in seconds.",
"rules": "Hivemind",
"rules": "Hivemind. If this card attacks, it is tapped for an additional turn before it is untapped.",
"icon_state": "xeno_boiler",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 6,
"resolve": 2,
"faction": "Xeno",
"summoncost": 4,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "rare"
@@ -137,12 +137,12 @@
"id": "ravager",
"name": "Xenomorph Ravager",
"desc": "With large scythe claws for hands, the furious Ravager goes berserk at the sight of fire.",
"rules": "Hivemind",
"rules": "Hivemind, Fury",
"icon_state": "xeno_ravager",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 4,
"resolve": 2,
"faction": "Xeno",
"summoncost": 3,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "rare"
@@ -151,12 +151,12 @@
"id": "crusher",
"name": "Xenomorph Crusher",
"desc": "Extensive testing has revealed that a pulse rifle is unable to penetrate a Crusher's thick armored head.",
"rules": "Hivemind",
"rules": "Hivemind, Blocker",
"icon_state": "xeno_crusher",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 1,
"resolve": 6,
"faction": "Xeno",
"summoncost": 3,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "rare"
@@ -165,12 +165,12 @@
"id": "defender",
"name": "Xenomorph Defender",
"desc": "The Defender's armored head crest makes an excellent makeshift shield.",
"rules": "Defender, Hivemind",
"rules": "Hivemind, Blocker",
"icon_state": "xeno_defender",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 1,
"resolve": 2,
"faction": "Xeno",
"summoncost": 2,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "common"
@@ -181,10 +181,10 @@
"desc": "Warriors exhibit greater cruelty than other Xeno strains, enjoying snapping a victim's limbs before finishing them off.",
"rules": "Hivemind",
"icon_state": "xeno_warrior",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 4,
"resolve": 4,
"faction": "Xeno",
"summoncost": 4,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "uncommon"
@@ -193,12 +193,12 @@
"id": "queen",
"name": "Xenomorph Queen (Resin Frontier)",
"desc": "The ruler of the hive. Organs from a Queen fetch a high price amongst researchers and less-than-moral surgeons.",
"rules": "Hivemind. For 2 mana, tap this creature and summon a 1/1 Xenomorph Brood counter creature, with Hivemind.",
"rules": "For 2 mana, tap the equipped creature and summon a 1/1 Xenomorph Brood counter creature, with Hivemind.",
"icon_state": "xeno_queen",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 5,
"resolve": 5,
"faction": "Xeno",
"summoncost": 5,
"cardtype": "Equipment",
"cardsubtype": "Armour",
"rarity": "epic"
@@ -207,12 +207,12 @@
"id": "carrier",
"name": "Xenomorph Carrier",
"desc": "Carriers are like the Easter Bunny except the eggs they hide will kill you.",
"rules": "Hivemind",
"rules": "Hivemind, Squad Tactics",
"icon_state": "xeno_carrier",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 2,
"resolve": 2,
"faction": "Xeno",
"summoncost": 3,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "uncommon"
@@ -221,12 +221,12 @@
"id": "defiler",
"name": "Xenomorph Defiler",
"desc": "Instead of utilizing eggs, the Defiler prefers to inject an unknown chemical in their victim, causing a devastating infection.",
"rules": "",
"rules": "Hivemind. When this card attacks a target enemy creature, calculate damage as though the target creature has this card's power subtracted from it first.",
"icon_state": "xeno_defiler",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 1,
"resolve": 3,
"faction": "Xeno",
"summoncost": 3,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "rare"
@@ -235,12 +235,12 @@
"id": "predalien",
"name": "Predalien",
"desc": "No concrete information is available on this elusive creature as no one that has seen it has lived to tell the tale.",
"rules": "Hivemind",
"rules": "Hivemind, Changeling",
"icon_state": "xeno_predalien",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 4,
"resolve": 3,
"faction": "Xeno",
"summoncost": 3,
"cardtype": "Creature",
"cardsubtype": "Xenomorph Soldier",
"rarity": "legendary"
@@ -249,12 +249,12 @@
"id": "shrike",
"name": "Xenomorph Shrike",
"desc": "It is unknown why Shrikes are able to lead a Hive, but their hives are always much smaller than a Queen's.",
"rules": "Hivemind",
"icon_state": "citrus",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"rules": "Hivemind. If Xenomorph Queen would be destroyed, you may re-equip Xenomorph Queen on this card instead, once per game.",
"icon_state": "xeno_shrike",
"power": 3,
"resolve": 1,
"faction": "Xeno",
"summoncost": 2,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "rare"
@@ -265,10 +265,10 @@
"desc": "Popular in illegal rodeos, a Bull's horn can pierce a reinforced wall with ease.",
"rules": "First Strike, Hivemind",
"icon_state": "xeno_bull",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 5,
"resolve": 3,
"faction": "Xeno",
"summoncost": 6,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "uncommon"
@@ -277,11 +277,11 @@
"id": "hivemind",
"name": "Xenomorph Hivemind",
"desc": "Recently discovered to have sapience, this pulsating orb will dig into the earth and rapidly spread resin throughout planets.",
"rules": "Defender, Hivemind",
"rules": "Defender",
"icon_state": "xeno_hivemind",
"power": 0,
"resolve": 0,
"faction": "",
"resolve": 1,
"faction": "Xeno",
"summoncost": 1,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
@@ -291,12 +291,12 @@
"id": "screecher",
"name": "Xenomorph Screecher",
"desc": "The Screecher's screeches are more psychologically damaging than the resulting hearing damage.",
"rules": "Hivemind",
"rules": "Deadeye",
"icon_state": "xeno_screecher",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 3,
"resolve": 2,
"faction": "Xeno",
"summoncost": 2,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "epic"
@@ -305,16 +305,15 @@
"id": "creep",
"name": "Xenomorph Creep",
"desc": "This special Hunter strain prioritizes stalking its target. It evolves into a strain of Hunter that is (mercifully) rarely seen aboard space stations.",
"rules": "Hivemind",
"rules": "Tap this card: Until the start of your next turn, this card has immunity to Xeno Creatures.",
"icon_state": "xeno_creep",
"power": 0,
"resolve": 0,
"faction": "",
"summoncost": 1,
"power": 4,
"resolve": 3,
"faction": "Xeno",
"summoncost": 5,
"cardtype": "Creature",
"cardsubtype": "Xenomorph",
"rarity": "common"
}
]
}
}