Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
b20d2637
Commit
b20d2637
authored
Jan 10, 2009
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed: version number propagates to included files
magic pack template now uses 'pack type' instead of 'pack item'
parent
f07494b6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
28 deletions
+32
-28
data/magic.mse-game/packs
data/magic.mse-game/packs
+19
-19
src/util/io/reader.cpp
src/util/io/reader.cpp
+6
-2
src/util/io/reader.hpp
src/util/io/reader.hpp
+7
-7
No files found.
data/magic.mse-game/packs
View file @
b20d2637
############################################################## Card pack
item
s
############################################################## Card pack
type
s
pack
item
:
pack
type
:
name: basic land
name: basic land
select: cyclic
select: cyclic
filter: card.rarity == "basic land" and not is_token_card() # can be shifted
filter: card.rarity == "basic land" and not is_token_card() # can be shifted
pack
item
:
pack
type
:
name: common
name: common
filter: card.rarity == "common" and not is_token_card() and not is_shifted_card()
filter: card.rarity == "common" and not is_token_card() and not is_shifted_card()
pack
item
:
pack
type
:
name: uncommon
name: uncommon
filter: card.rarity == "uncommon" and not is_token_card() and not is_shifted_card()
filter: card.rarity == "uncommon" and not is_token_card() and not is_shifted_card()
pack
item
:
pack
type
:
name: rare
name: rare
filter: card.rarity == "rare" and not is_token_card() and not is_shifted_card()
filter: card.rarity == "rare" and not is_token_card() and not is_shifted_card()
pack
item
:
pack
type
:
name: mythic rare
name: mythic rare
filter: card.rarity == "mythic rare" and not is_token_card() and not is_shifted_card()
filter: card.rarity == "mythic rare" and not is_token_card() and not is_shifted_card()
pack
item
:
pack
type
:
name: special
name: special
filter: card.rarity == "special" and not is_token_card() # can be shifted
filter: card.rarity == "special" and not is_token_card() # can be shifted
pack
item
:
pack
type
:
name: shifted common
name: shifted common
filter: card.rarity == "common" and not is_token_card() and is_shifted_card()
filter: card.rarity == "common" and not is_token_card() and is_shifted_card()
pack
item
:
pack
type
:
name: shifted uncommon
name: shifted uncommon
filter: card.rarity == "uncommon" and not is_token_card() and is_shifted_card()
filter: card.rarity == "uncommon" and not is_token_card() and is_shifted_card()
pack
item
:
pack
type
:
name: shifted rare
name: shifted rare
filter:
filter:
( card.rarity == "rare" or
( card.rarity == "rare" or
card.rarity == "mythic rare" # We've got to put shifted mythic rares somewhere
card.rarity == "mythic rare" # We've got to put shifted mythic rares somewhere
) and not is_token_card() and is_shifted_card()
) and not is_token_card() and is_shifted_card()
pack
item
:
pack
type
:
name: token / rulestip
name: token / rulestip
filter: is_token_card()
filter: is_token_card()
############################################################## shifted/special if possible
############################################################## shifted/special if possible
# shifted common if they exist, otherwise a normal common
# shifted common if they exist, otherwise a normal common
pack
item
:
pack
type
:
name: shifted common or else common
name: shifted common or else common
selectable: false
selectable: false
select: first
select: first
...
@@ -49,7 +49,7 @@ pack item:
...
@@ -49,7 +49,7 @@ pack item:
item: common
item: common
# basic land if it exist, otherwise a common
# basic land if it exist, otherwise a common
pack
item
:
pack
type
:
name: basic land or else common
name: basic land or else common
selectable: false
selectable: false
select: first
select: first
...
@@ -57,7 +57,7 @@ pack item:
...
@@ -57,7 +57,7 @@ pack item:
item: common
item: common
# special if it exist, otherwise a common
# special if it exist, otherwise a common
pack
item
:
pack
type
:
name: special or else common
name: special or else common
selectable: false
selectable: false
select: first
select: first
...
@@ -65,7 +65,7 @@ pack item:
...
@@ -65,7 +65,7 @@ pack item:
item: common
item: common
# shifted uncommon/rare if they exist, otherwise a normal uncommon
# shifted uncommon/rare if they exist, otherwise a normal uncommon
pack
item
:
pack
type
:
name: shifted uncommon or rare or else uncommon
name: shifted uncommon or rare or else uncommon
selectable: false
selectable: false
select: first
select: first
...
@@ -74,7 +74,7 @@ pack item:
...
@@ -74,7 +74,7 @@ pack item:
############################################################## Randomized selections
############################################################## Randomized selections
pack
item
:
pack
type
:
name: mythic rare or rare
name: mythic rare or rare
selectable: false
selectable: false
# In Shards of Alara there are 15 mythic rares and 53 rares.
# In Shards of Alara there are 15 mythic rares and 53 rares.
...
@@ -96,7 +96,7 @@ pack item:
...
@@ -96,7 +96,7 @@ pack item:
name: rare
name: rare
probability: 2
probability: 2
pack
item
:
pack
type
:
name: shifted uncommon or rare
name: shifted uncommon or rare
selectable: false
selectable: false
select: nonempty
select: nonempty
...
@@ -110,7 +110,7 @@ pack item:
...
@@ -110,7 +110,7 @@ pack item:
############################################################## Common proportions of cards
############################################################## Common proportions of cards
# of the common slots, 3/10 will be shifted, 1/10 will be special
# of the common slots, 3/10 will be shifted, 1/10 will be special
pack
item
:
pack
type
:
name: common sometimes shifted or special
name: common sometimes shifted or special
selectable: false
selectable: false
# TODO: Perhaps use some kind of proportional system here as well?
# TODO: Perhaps use some kind of proportional system here as well?
...
@@ -127,7 +127,7 @@ pack item:
...
@@ -127,7 +127,7 @@ pack item:
item: special or else common
item: special or else common
# of the uncommon slots, 1/3 will be shifted, 1/4 of that will be shifted rares instead
# of the uncommon slots, 1/3 will be shifted, 1/4 of that will be shifted rares instead
pack
item
:
pack
type
:
name: uncommon sometimes shifted
name: uncommon sometimes shifted
selectable: false
selectable: false
select: cyclic
select: cyclic
...
...
src/util/io/reader.cpp
View file @
b20d2637
...
@@ -30,14 +30,18 @@ Reader::Reader(const InputStreamP& input, Packaged* package, const String& filen
...
@@ -30,14 +30,18 @@ Reader::Reader(const InputStreamP& input, Packaged* package, const String& filen
handleAppVersion
();
handleAppVersion
();
}
}
Reader
::
Reader
(
Packaged
*
pkg
,
const
String
&
filename
,
bool
ignore_invalid
)
Reader
::
Reader
(
Reader
*
parent
,
Packaged
*
pkg
,
const
String
&
filename
,
bool
ignore_invalid
)
:
indent
(
0
),
expected_indent
(
0
),
state
(
OUTSIDE
)
:
indent
(
0
),
expected_indent
(
0
),
state
(
OUTSIDE
)
,
ignore_invalid
(
ignore_invalid
)
,
ignore_invalid
(
ignore_invalid
)
,
filename
(
filename
),
package
(
pkg
),
line_number
(
0
),
previous_line_number
(
0
)
,
filename
(
filename
),
package
(
pkg
),
line_number
(
0
),
previous_line_number
(
0
)
,
input
(
package_manager
.
openFileFromPackage
(
package
,
filename
))
,
input
(
package_manager
.
openFileFromPackage
(
package
,
filename
))
{
{
moveNext
();
moveNext
();
// in an included file, use the app version of the parent if we have none
handleAppVersion
();
handleAppVersion
();
if
(
file_app_version
==
0
)
{
file_app_version
=
parent
->
file_app_version
;
}
}
}
void
Reader
::
addAlias
(
Version
end_version
,
const
Char
*
a
,
const
Char
*
b
)
{
void
Reader
::
addAlias
(
Version
end_version
,
const
Char
*
a
,
const
Char
*
b
)
{
...
...
src/util/io/reader.hpp
View file @
b20d2637
...
@@ -32,18 +32,18 @@ typedef shared_ptr<wxInputStream> InputStreamP;
...
@@ -32,18 +32,18 @@ typedef shared_ptr<wxInputStream> InputStreamP;
* object that was just read.
* object that was just read.
*/
*/
class
Reader
{
class
Reader
{
private:
/// Construct a reader that reads a file in a package
/** Used for "include file" keys.
* package can be nullptr
*/
Reader
(
Reader
*
parent
,
Packaged
*
package
,
const
String
&
filename
,
bool
ignore_invalid
=
false
);
public:
public:
/// Construct a reader that reads from the given input stream
/// Construct a reader that reads from the given input stream
/** filename is used only for error messages
/** filename is used only for error messages
*/
*/
Reader
(
const
InputStreamP
&
input
,
Packaged
*
package
=
nullptr
,
const
String
&
filename
=
wxEmptyString
,
bool
ignore_invalid
=
false
);
Reader
(
const
InputStreamP
&
input
,
Packaged
*
package
=
nullptr
,
const
String
&
filename
=
wxEmptyString
,
bool
ignore_invalid
=
false
);
/// Construct a reader that reads a file in a package
/** Used for "include file" keys.
* package can be nullptr
*/
Reader
(
Packaged
*
package
,
const
String
&
filename
,
bool
ignore_invalid
=
false
);
~
Reader
()
{
showWarnings
();
}
~
Reader
()
{
showWarnings
();
}
/// Tell the reflection code we are reading
/// Tell the reflection code we are reading
...
@@ -182,7 +182,7 @@ class Reader {
...
@@ -182,7 +182,7 @@ class Reader {
template
<
typename
T
>
template
<
typename
T
>
void
unknownKey
(
T
&
v
)
{
void
unknownKey
(
T
&
v
)
{
if
(
key
==
_
(
"include file"
))
{
if
(
key
==
_
(
"include file"
))
{
Reader
reader
(
package
,
value
,
ignore_invalid
);
Reader
reader
(
this
,
package
,
value
,
ignore_invalid
);
reader
.
handle_greedy
(
v
);
reader
.
handle_greedy
(
v
);
moveNext
();
moveNext
();
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment