Cockatrice
2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Toggle main menu visibility
Loading...
Searching...
No Matches
game_specific_terms.h
Go to the documentation of this file.
1
6
7
#ifndef GAME_SPECIFIC_TERMS_H
8
#define GAME_SPECIFIC_TERMS_H
9
10
#include <QCoreApplication>
11
#include <QString>
12
13
/*
14
* Collection of traslatable property names used in games,
15
* so we can use Game::Property instead of hardcoding strings.
16
* Note: Mtg = "Maybe that game"
17
*/
18
19
namespace
Mtg
20
{
21
QString
const
CardType
(
"type"
);
22
QString
const
ConvertedManaCost
(
"cmc"
);
23
QString
const
Colors
(
"colors"
);
24
QString
const
Loyalty
(
"loyalty"
);
25
QString
const
MainCardType
(
"maintype"
);
26
QString
const
ManaCost
(
"manacost"
);
27
QString
const
PowTough
(
"pt"
);
28
QString
const
Side
(
"side"
);
29
QString
const
Layout
(
"layout"
);
30
QString
const
ColorIdentity
(
"coloridentity"
);
31
32
inline
static
const
QString
getNicePropertyName
(QString key)
33
{
34
if
(key ==
CardType
) {
35
return
QCoreApplication::translate(
"Mtg"
,
"Card Type"
);
36
}
37
if
(key ==
ConvertedManaCost
) {
38
return
QCoreApplication::translate(
"Mtg"
,
"Mana Value"
);
39
}
40
if
(key ==
Colors
) {
41
return
QCoreApplication::translate(
"Mtg"
,
"Color(s)"
);
42
}
43
if
(key ==
Loyalty
) {
44
return
QCoreApplication::translate(
"Mtg"
,
"Loyalty"
);
45
}
46
if
(key ==
MainCardType
) {
47
return
QCoreApplication::translate(
"Mtg"
,
"Main Card Type"
);
48
}
49
if
(key ==
ManaCost
) {
50
return
QCoreApplication::translate(
"Mtg"
,
"Mana Cost"
);
51
}
52
if
(key ==
PowTough
) {
53
return
QCoreApplication::translate(
"Mtg"
,
"P/T"
);
54
}
55
if
(key ==
Side
) {
56
return
QCoreApplication::translate(
"Mtg"
,
"Side"
);
57
}
58
if
(key ==
Layout
) {
59
return
QCoreApplication::translate(
"Mtg"
,
"Layout"
);
60
}
61
if
(key ==
ColorIdentity
) {
62
return
QCoreApplication::translate(
"Mtg"
,
"Color Identity"
);
63
}
64
return
key;
65
}
66
}
// namespace Mtg
67
68
#endif
Mtg
Definition
game_specific_terms.h:20
Mtg::getNicePropertyName
static const QString getNicePropertyName(QString key)
Definition
game_specific_terms.h:32
Mtg::ConvertedManaCost
QString const ConvertedManaCost("cmc")
Mtg::PowTough
QString const PowTough("pt")
Mtg::CardType
QString const CardType("type")
Mtg::Side
QString const Side("side")
Mtg::Colors
QString const Colors("colors")
Mtg::Layout
QString const Layout("layout")
Mtg::ManaCost
QString const ManaCost("manacost")
Mtg::MainCardType
QString const MainCardType("maintype")
Mtg::ColorIdentity
QString const ColorIdentity("coloridentity")
Mtg::Loyalty
QString const Loyalty("loyalty")
libcockatrice_card
libcockatrice
card
game_specific_terms.h
Generated by
1.18.0